[issue13506] IDLE sys.path does not contain Current Working Directory

2012-01-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: I noticed that the script in ScriptBinding.py already dereferences interp and calls 3 interp functions directly, so I decided that calling a 4th on interp was fine. That lets restart_shell be specialized to the one purpose of being bound to Restart Shell on t

[issue13506] IDLE sys.path does not contain Current Working Directory

2012-01-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1b5abba0c808 by Terry Jan Reedy in branch '2.7': #13506 Add '' to path for interactive interpreter by adding with_cwd parameter http://hg.python.org/cpython/rev/1b5abba0c808 New changeset 1993aa091d89 by Terry Jan Reedy in branch '3.2': #13506 Add

[issue13506] IDLE sys.path does not contain Current Working Directory

2012-01-30 Thread Roger Serwy
Roger Serwy added the comment: I tested your patch and it works. For the sake of completeness, here's what I did: Test 1: Start IDLE in shell mode and run "import sys; print(sys.path)". The first entry should be '' This is consistent with the behavior of the regular python shell. Test 2: Re

[issue13506] IDLE sys.path does not contain Current Working Directory

2012-01-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Whoops, hit submit too soon, before saving tab to space change. -- Added file: http://bugs.python.org/file24377/issue13506d.diff ___ Python tracker ___

[issue13506] IDLE sys.path does not contain Current Working Directory

2012-01-30 Thread Terry J. Reedy
Changes by Terry J. Reedy : Removed file: http://bugs.python.org/file24376/issue13506c.diff ___ Python tracker ___ ___ Python-bugs-list mailin

[issue13506] IDLE sys.path does not contain Current Working Directory

2012-01-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: I tested on 3.2, Win 7. sys.path starts with '' on startup, after restart, and after ^c interrupt of 'while True: pass'. It start with absolute path when running a file from the editor. I believe this is as should be. I simplified the patch a bit. Its basic i

[issue13506] IDLE sys.path does not contain Current Working Directory

2011-12-17 Thread Marco Scataglini
Marco Scataglini added the comment: I test Roger patch on 2.7.2.1 and 3.2.1.1 fresh installs on Win7 Pro 32bit and I confirm it is fixing the issue and it also keeps the existing correct behavior. - Note: - I had to apply the patch with GNU patch: Tortoise is not patching my local fi

[issue13506] IDLE sys.path does not contain Current Working Directory

2011-12-04 Thread Marco Scataglini
Marco Scataglini added the comment: At first I did no see the difference on preserving the existing correct behavior and fixing the issue between the two patches... and I thought less is more, so mine was better... But, I checked again and by: "... running a python script will have sys.path i

[issue13506] IDLE sys.path does not contain Current Working Directory

2011-12-03 Thread Roger Serwy
Roger Serwy added the comment: I have given this issue some further consideration, and realized that my "+1" recommendation was not correct. Starting the interactive python interpreter will automatically include [''] in sys.path. A fresh restart of IDLE's shell does NOT include ''. However,

[issue13506] IDLE sys.path does not contain Current Working Directory

2011-12-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: On 3.2.2, I get >>> import sys >>> sys.path ['C:\\Programs\\Python32\\Lib\\idlelib', 'C:\\Windows\\system32\\python32.zip', 'C:\\Programs\\Python32\\DLLs', 'C:\\Programs\\Python32\\lib', 'C:\\Programs\\Python32', 'C:\\Programs\\Python32\\lib\\site-packages',

[issue13506] IDLE sys.path does not contain Current Working Directory

2011-11-30 Thread Roger Serwy
Roger Serwy added the comment: +1 The proposed patch works as described. I do agree with Marco that IDLE does need some more QA. -- nosy: +serwy ___ Python tracker ___ __

[issue13506] IDLE sys.path does not contain Current Working Directory

2011-11-29 Thread Marco Scataglini
Marco Scataglini added the comment: ... I think it could be fixed by adding sys.path.insert(0,"") on the # process sys.argv and sys.path: section in PyShell.py after (~about) line 1383 sys.path.insert(0, dir) sys.path.insert(0,"")

[issue13506] IDLE sys.path does not contain Current Working Directory

2011-11-29 Thread Marco Scataglini
Changes by Marco Scataglini : -- nosy: +kbk ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue13506] IDLE sys.path does not contain Current Working Directory

2011-11-29 Thread Marco Scataglini
New submission from Marco Scataglini : The IDLE shell sys.path does not contains any entry for the Current Working Directory ('' or '.' or '.\'); without it, when changing the CWD with os.chdir(), the shell cannot find, execute or import scripts or module in it. I can start the standard Python