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

  • SEARCH
  • Home
  • 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 719301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:37:34+00:00 2026-05-14T05:37:34+00:00

Idlestartup is analogous to pythonstartup variable, but for IDLE, instead of command line. But

  • 0

Idlestartup is analogous to pythonstartup variable, but for IDLE, instead of command line.
But it seems not to work properly. I’m using python 2.6.5 on Windows.

I have the following script assigned to it:

from pprint import pprint
import sys
newPath = 'C:\\Python26\test')
sys.path.append(newPath)
print "initial config loaded"

Both variables Idlestartup and pythonstartup are assigned to the same file (script above).
When running IDLE, pprint and sys are NOT available, the final message is NOT printed, but newPath was added to sys.path.
Running the command line, pprint and sys are available, the final message is printed and newPath was added to sys.path.

Is it a bug? Am I doing something wrong?
Thanks

  • 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-14T05:37:34+00:00Added an answer on May 14, 2026 at 5:37 am

    sys.stdout may not be in its final state at the time idlestartup‘s getting loaded – so it’s quite possible that a print to it tries to go to the “original” standard-output, and then immediately the standard output is redirected to idle’s command window and so the effects of the print are never seen. In other words, no bugs, I think — it’s just not obvious how idlestartup may be guaranteed to send an important message to the user, if delivery of that message must be guaranteed (a message such as your example is no big deal, but if you did have important ones I’d look into Tk ways of delivering them in a guaranteed way).

    Edit: as for making sure that certain names are added to the main namespace, the latter’s named __main__ (both with and without idle), so adding to your code a few statements such as

    sys.modules['__main__'].pprint = pprint
    

    &c should work.

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

Sidebar

Ask A Question

Stats

  • Questions 382k
  • Answers 382k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You could achieve this by using :items instead of :some_model_a_sub_model_items… May 14, 2026 at 10:23 pm
  • Editorial Team
    Editorial Team added an answer If you have shell access: http://wiki.archlinux.org/index.php/Subversion_backup_and_restore If you don't have… May 14, 2026 at 10:23 pm
  • Editorial Team
    Editorial Team added an answer SQL*Plus can be run on the command line. Therefore you… May 14, 2026 at 10:23 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.