Eclipse Carriage Return Workaround

S

Steve Holden

I've written a Python 3 course that uses an Eclipse-based teaching
system. The school is telling me that their version of Eclipse/pydev
appears to have an input() function that appends a carriage return
character to the user's input. This makes several things go screwy, as
it's definitely not the way the standalone interpreter works, even on
Windows.

Can anyone think of a simple way work around this issue by overriding
__builtins__.input() with a function that calls input() and then returns
an rstrip()ped version of the input string? I though of setting a
PYTHONSTARTUP environment variable, but that only affects interactive
interpreter instances.

regards
Steve
 
G

Gregory Ewing

Steve said:
Can anyone think of a simple way work around this issue by overriding
__builtins__.input() with a function that calls input() and then returns
an rstrip()ped version of the input string? I though of setting a
PYTHONSTARTUP environment variable, but that only affects interactive
interpreter instances.

Maybe you could put something in site.py?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top