fj11 / ulipad

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

the pythonpath set in the config.ini does not work #281

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. set pythonpath in config.ini
[default]
pythonpath = /home/test/workspace

2.
print sys.path in my code
can't find my path '/home/test/workspace' in the outputs

What version of the product are you using? On what operating system?
newest svn version.

Original issue reported on code.google.com by lileix...@gmail.com on 31 Oct 2011 at 9:55

GoogleCodeExporter commented 8 years ago
I didn't find this bug, and maybe you can add test code in UliPad.py, at line 
59, and add print statement like this:

{{{python

if ini.default.has_key('pythonpath'):
    pythonpath = ini.default.pythonpath
    if isinstance(pythonpath, list):
        sys.path = pythonpath + sys.path
    elif isinstance(pythonpath, (str, unicode)):
        sys.path.insert(0, pythonpath)
        print 'XXXXXXXXXXXXXXXX', pythonpath
    else:
        print 'The pythonpath should be a string list or a string.'
}}}
to see what happened.

Original comment by limo...@gmail.com on 31 Oct 2011 at 12:32

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
it run in python2.7 wx2.8.11

Original comment by lileix...@gmail.com on 1 Nov 2011 at 2:12

GoogleCodeExporter commented 8 years ago
{{{python

if ini.default.has_key('pythonpath'):
    pythonpath = ini.default.pythonpath
    if isinstance(pythonpath, list):
        sys.path = pythonpath + sys.path
    elif isinstance(pythonpath, (str, unicode)):
        sys.path.insert(0, pythonpath)
        print 'XXXXXXXXXXXXXXXX', pythonpath
    else:
        print 'The pythonpath should be a string list or a string.'
}}}
it can print the path
but in the problem still exist
maybe there's something wrong with the wx.Execute function

Original comment by lileix...@gmail.com on 1 Nov 2011 at 2:19

Attachments:

GoogleCodeExporter commented 8 years ago
So what's the real problem, because the pythonpath is indeed in the sys.path.

Original comment by limo...@gmail.com on 1 Nov 2011 at 2:22

GoogleCodeExporter commented 8 years ago
some packets are in the pythonpath directory ,then can't be imported

Original comment by lileix...@gmail.com on 1 Nov 2011 at 2:28

GoogleCodeExporter commented 8 years ago
How do you import these packages, e.g. in the shell or in your program?

Original comment by limo...@gmail.com on 1 Nov 2011 at 5:19