masroore / pyscripter

Automatically exported from code.google.com/p/pyscripter
0 stars 0 forks source link

Pyscripter does not add CWD to top of Python Path #489

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.open any script
2.start debugging
3.go to Tools>Python Path
4.CWD will not be at the top of the python path list (assuming you have any 
other paths set in the registry or environment variable)

What is the expected output? What do you see instead?
When I just double click the py to run it, my script does not error because it 
can find the current working dir at sys.path[0] position. When I run inside 
Pyscripter the script doesn't work because a different path is at the 
sys.path[0] position. Sys.path[0] is the standard for getting the directory 
where the current script is executed from.

What version of the product are you using? On what operating system?
latest, windows xp 32bit

Please provide any additional information below.

Original issue reported on code.google.com by Drew.Fla...@gmail.com on 11 Mar 2011 at 8:40

GoogleCodeExporter commented 9 years ago
EDIT: I have found that this is only an issue with the internal Python engine. 
With remote Python engine, the cwd gets added to the top of sys.path, as 
expected.

Original comment by Drew.Fla...@gmail.com on 11 Mar 2011 at 11:07

GoogleCodeExporter commented 9 years ago
Cannot reproduce.  I am running the following script:
import sys
print(sys.path[0])

and it produces the expected result both with the internal and the external 
interpreter.  Also Tools, Python, Path works as designed.

Original comment by pyscripter on 31 May 2011 at 4:27