Opened 12 years ago

Closed 12 years ago

#8284 closed (wontfix)

raw_input broken in eclipse

Reported by: adamlofts Owned by: nobody
Component: Uncategorized Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


There are a few constructs in django like

response = raw_input()
if response == 'yes':

In eclipse on windows the '\r' is not stripped out of the string so the equality fails ('yes' != 'yes\r'). This means django refuses to delete my test database if i abort the tests in the middle. See:

I suggest something like:

def _django_raw_input():
  return raw_input.replace('\r', '')
raw_input = _django_raw_input

I will write a patch if someone recommends the correct solution.

Change History (2)

comment:1 Changed 12 years ago by adamlofts

I was perhaps a little premature reporting this since it isn't really django's fault. If anyone is interested: finishing the line with ctrl-enter seems to fix the problem (i'm a bit new to windows!). Feel free to close if you don't think its a problem.

comment:2 Changed 12 years ago by Russell Keith-Magee

Resolution: wontfix
Status: newclosed

This sounds like its an issue with the way eclipse (or PyDev) is handling input; AFAIK, there shouldn't be any platform specific gotchas with raw_input() the way we are using it.

Note: See TracTickets for help on using tickets.
Back to Top