shadown / python-on-a-chip

Automatically exported from code.google.com/p/python-on-a-chip
Other
0 stars 0 forks source link

Make ipm help messages cross-platform #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
From Tyler Wilson:

There are a number of places that refer to Ctrl+D as an EOF shortcut
- in ipm.py, in particular. On Windows, note that the EOF shortcut is
Ctrl+Z. Likely want to check the platform in ipm.py and print the
right one. For example, in my local ipm.py, I added this below the
last import:

if sys.platform == "win32":
   EOF_KEY = "Ctrl+Z"
else:
   EOF_KEY = "Ctrl+D"

And then changed:

   self.stdout.write("Connection write error, type Ctrl+D to quit.
\n")

to:

   self.stdout.write("Connection write error, type " + EOF_KEY + " to
quit.\n")

Original issue reported on code.google.com by dwhall...@gmail.com on 16 Apr 2009 at 11:09

GoogleCodeExporter commented 9 years ago
Changed error message to print platform-specific EOF key.

Does not affect system tests.  Checked that 
"sys.platform.lower().startswith("win")" 
returns true on Cygwin.

Mainlined directly, see r344

Original comment by dwhall...@gmail.com on 19 Apr 2009 at 2:19

GoogleCodeExporter commented 9 years ago
Sorry, I know this is marked fixed, but I just wanted to add a clarification to
Comment #1 above:

The statement "Checked that "sys.platform.lower().startswith("win")" 
returns true on Cygwin." is slightly misleading. If this code returns True, 
then you
are actually using the Windows Python, NOT the Python that is built and 
installed via
the cygwin setup program. On a cygwin-built Python, sys.platform == 'cygwin', 
not
anything that starts with 'win'.

Thank you.

Original comment by tyler%ty...@gtempaccount.com on 23 Apr 2009 at 3:55

GoogleCodeExporter commented 9 years ago
Changed r08 to R08

Original comment by dwhall...@gmail.com on 12 Mar 2010 at 8:22

GoogleCodeExporter commented 9 years ago

Original comment by dwhall...@gmail.com on 13 Mar 2010 at 1:30