Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1032319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:03:37+00:00 2026-05-16T14:03:37+00:00

EDIT-4 I’ve gotten my sitecustomize.py to execute, but it tosses up an error. Here’s

  • 0

EDIT-4

I’ve gotten my sitecustomize.py to execute, but it tosses up an error. Here’s the code for it.

The error is:

Error in sitecustomize; set PYTHONVERBOSE for traceback:
RuntimeError: maximum recursion depth exceeded while calling a Python object

I’m not terribly advanced with Python yet, so I figured I’d comment out only the lines I did not think Iwould need. No encoding issues are showing up, so I just commented out lines 23-104, but that didn’t help either.

EDIT-3

I also happened to have 2.5.1 installed, so I compiled another script with that.

print 'This will test carriage returns on Windows with PyDev on Eclipse Helios'
print'Type something:',
test = raw_input()
print('You entered the following ascii values:')
for c in test:
    print(str(ord(c)))

This ran fine, and resulted in

This will test carriage returns on Windows with PyDev on Eclipse Helios
Type something: g
You entered the following ascii values:
103

So this is possibly a Python3 thing only? I know it’s not the interpreter, because I’m able to run it in command prompt just fine. What gives?

EDIT-2

Just tested with Helios, still having the same problem. Here’s my test program:

print('This will test carriage returns on Windows with PyDev on Eclipse Helios.')
print('Type something:', end='')
test = input()
print('You entered the following ascii values:')
for c in test:
    print(str(ord(c)))

And here’s the output when I type ‘g’ and press Enter:

This will test carriage returns on Windows with PyDev on Eclipse Helios.
Type something:g
You entered the following ascii values:
103
13

In the grand scheme of things, it’s a small issue. I could use input().rstrip() and it works. But the workaround shouldn’t even be necessary. I’m typing twice as much as I should need to in a language that I’m using because it’s concise and pretty.

EDIT-1

This is Eclipse 3.5. Unfortunately that’s the latest version that’s been approved for use at work. I’m going to try 3.6 at home to see if that’s any different, but I wouldn’t be able to use it anyway.


(original question)

I’ve been learning some basic Python, and decided to go with PyDev since it supported Python 3 as well as having all the nice code snippet and auto complete features.

However, I’m running into that darned carriage return issue on Windows.

My searches always lead me back to this mailing list:
http://www.mail-archive.com/python-list@python.org/msg269758.html

So I have grabbed the sitecustomize.py file, tried to include it in the Python path for my configured interpreter, as well as my project, but to no avail.

Has anybody else managed to work through this? Or maybe knows how to get the new sitecustomize.py to actually execute so it can override input() and raw_input()?

I know I could always make a short module with my own replacement input() function, but I’d really like to fix the problem at its root. Aptana acknowledges the issue ( http://pydev.org/faq.html#why_raw_input_input_does_not_work_correctly ) but offers no solution. Thanks in advance for your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T14:03:38+00:00Added an answer on May 16, 2026 at 2:03 pm

    Figured out a hack to make it work locally to my Python installation. In \Lib\site-packages\ make a script called “sitecustomize.py”, and put this code in it:

    original_input = builtins.input
    
    def input(prompt=''):  
        return original_input(prompt).rstrip('\r')
    
    input.__doc__ = original_input.__doc__
    
    builtins.input = input
    

    I don’t know anything about the side effects of this, or what sort of error checking I should be doing, but it works if you’re using PyDev on Windows to write scripts with Python3.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.