Python Forum
help with converting C# function to Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help with converting C# function to Python
#11
I see the different
just to see I understand:
p =[b'test'] 
this mean that p is a "string" ?
and
p = b'spam'
mean that p is a list of byte?
Reply
#12
My example was:
rc1 = gen(SignAdd + MSG + EOF)
But your code shows:
rc1 = gen( [SignAdd + MSG + EOF] )
So your code should be:
ToCs= SignAdd + MSG + EOF
rc1 = gen(ToCs)
Reply
#13
OK,
didn't notice this .....

I'm using MU Python code editor in my PI
and there is no debugger there
maybe you can recommend another python ide + debbuger?
then I will see my problem before asking :-)

Thanks ,
Reply
#14
https://codewith.mu/en/tutorials/1.0/debugger
Reply
#15
raceback (most recent call last):
  File "/usr/share/mu-editor/mu/mu-debug.py", line 4, in <module>
    from mu.app import debug
ImportError: No module named 'mu'



---------- FINISHED ----------
exit code: 1 status: 0
what is missing?

this is a new installation of PI
2019-04-08-raspbian-stretch-full

Thanks,
Reply
#16
Sorry, I do not have a R'PI.
Reply
#17
not helping :-)

but thank you for the rest of your help !
Reply
#18
korenron Wrote:this mean that p is a "string" ?
No, after
p = [b"spam"]
p is a list which single item is a bytes.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Converting python to FileMaker DWolf 6 1,603 Sep-22-2022, 03:40 AM
Last Post: DWolf
  Converting python to c# benahmadi 1 2,607 Oct-22-2019, 09:50 PM
Last Post: micseydel
  Converting Smiles to Fingerprint with pandas iterrows/apply-function: Jompie96 0 2,465 Jul-04-2019, 01:50 PM
Last Post: Jompie96
  converting array to and from string in python 3.7.2 srm 5 6,082 Jul-03-2019, 01:11 PM
Last Post: snippsat
  Converting R code to python mcva 2 12,469 Mar-09-2019, 04:01 PM
Last Post: mcva
  converting from c# to python peper 1 2,919 Jun-12-2018, 05:19 PM
Last Post: micseydel
  converting python script to another version gptura 5 4,635 Mar-13-2018, 12:16 PM
Last Post: gptura
  Converting Pseudocode to Python ncp511 1 5,096 Jan-16-2018, 04:34 PM
Last Post: Windspar
  Resources for converting Python 2.x code to 3.x Luke_Drillbrain 4 4,950 May-03-2017, 06:34 PM
Last Post: snippsat
  Need help converting some code from python 2.7 to 3.5 Blue Dog 3 4,820 Oct-18-2016, 12:30 AM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020