This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author taleinat
Recipients dangyogi, taleinat
Date 2010-06-11.15:11:27
SpamBayes Score 0.00020404067
Marked as misclassified No
Message-id <1276269089.89.0.608423270885.issue8515@psf.upfronthosting.co.za>
In-reply-to
Content
I believe IDLE runs modules via execfile(), so I would expect the behavior to be similar, and execfile() does not set __file__. Doing "Run Module" is also IMO equivalent to doing execfile(), so this behavior retains consistency.

However, I would expect __file__ to be set when running IDLE -r <script>, but I get "name '__file__' is not defined" (with Python 2.6.2). This is inconsistent and should be fixed.
History
Date User Action Args
2010-06-11 15:11:30taleinatsetrecipients: + taleinat, dangyogi
2010-06-11 15:11:29taleinatsetmessageid: <1276269089.89.0.608423270885.issue8515@psf.upfronthosting.co.za>
2010-06-11 15:11:27taleinatlinkissue8515 messages
2010-06-11 15:11:27taleinatcreate