Re: [Tutor] Converting a string to a byte array

2017-09-25 Thread Phil
On 26/09/17 07:02, Cameron Simpson wrote: Just to this. If your serial file handle is a normal buffered one, you may also need to call .flush(). When you run from the command line as "python3 mycode.py" is done automatically at programme exit. In the IDE, the programme has not exited, so

Re: [Tutor] Converting a string to a byte array

2017-09-25 Thread Cameron Simpson
On 25Sep2017 09:29, Phil wrote: [...] Just for interest I amended my code to use what you provided and tried it under IDLE. There aren't any errors but but my Arduino is not responding. However, if I enter python3 mycode.py then it works perfectly. I'm sure there's an

Re: [Tutor] logging to cmd.exe

2017-09-25 Thread Mark Lawrence via Tutor
On 25/09/2017 14:20, Albert-Jan Roskam wrote: Hi, With Python 3.5 under Windows I am using the logging module to log messages to stdout (and to a file), but this occasionally causes logging errors because some characters cannot be represented in the codepage used by cmd.exe (cp850, aka OEM

Re: [Tutor] How to sort float number from big numbers to small numbers?

2017-09-25 Thread Steven D'Aprano
On Mon, Sep 25, 2017 at 03:34:05AM +, edmundo pierre via Tutor wrote: > I am trying to sort float numbers input by an user from the bigger to > smaller number. I do not know how to compare float numbers. Any ideas? > Thank you! If the numbers are provided by the user, they will be in the

Re: [Tutor] logging to cmd.exe

2017-09-25 Thread Peter Otten
Albert-Jan Roskam wrote: > Hi, > > > With Python 3.5 under Windows I am using the logging module to log > messages to stdout (and to a file), but this occasionally causes logging > errors because some characters cannot be represented in the codepage used > by cmd.exe (cp850, aka OEM codepage, I

Re: [Tutor] How to sort float number from big numbers to small numbers?

2017-09-25 Thread David Rock
> On Sep 24, 2017, at 22:34, edmundo pierre via Tutor wrote: > > I am trying to sort float numbers input by an user from the bigger to smaller > number. I do not know how to compare float numbers. Any ideas? Thank you! > Edwin Some basic ideas to think about: 1. inputs are

Re: [Tutor] How to sort float number from big numbers to small numbers?

2017-09-25 Thread Alan Gauld via Tutor
On 25/09/17 04:34, edmundo pierre via Tutor wrote: I am trying to sort float numbers input by an user from the bigger to smaller number. I do not know how to compare float numbers. Any ideas? Thank you! The same way you sort anything else. Using the comparison operations ==, <, >, <=, >=

[Tutor] logging to cmd.exe

2017-09-25 Thread Albert-Jan Roskam
Hi, With Python 3.5 under Windows I am using the logging module to log messages to stdout (and to a file), but this occasionally causes logging errors because some characters cannot be represented in the codepage used by cmd.exe (cp850, aka OEM codepage, I think). What is the best way to

[Tutor] How to sort float number from big numbers to small numbers?

2017-09-25 Thread edmundo pierre via Tutor
I am trying to sort float numbers input by an user from the bigger to smaller number. I do not know how to compare float numbers. Any ideas? Thank you! Edwin ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options:

[Tutor] windows specific: read process memory

2017-09-25 Thread Michael C
Hi all, I have a few questions about memory scanning! The following code attempts to print out all addresses whose value is int(-143)! 1. I am using a for loop to go through all the addresses! Is this the right thing to do? 2. I feed the read process memory function with hex(i), correct? 3. I am