PYTHONSTARTUP and Cygwin

D

Dwi Sianto Mansjur

I tried to set up PYTHONPATH in cygwin but it doesn't work.
Any clue why ?
The following is my session.

$ echo $PYTHONPATH
/home/Cherna/86_DevelopingTools:/home/Cherna/87_TestingCorpus

$ echo $PYTHONSTARTUP
/home/Cherna/86_DevelopingTools:/home/Cherna/87_TestingCorpus

$ python
Python 2.3.3 (#1, Dec 30 2003, 08:29:25)
[GCC 3.3.1 (cygming special)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.['', '/usr/lib/python23.zip', '/usr/lib/python2.3',
'/usr/lib/python2.3/plat-cygwin', '/usr/lib/python2.3/lib-tk',
'/usr/lib/python2.3/lib-dynload', '/usr/lib/python2.3/site-packages',
'/usr/lib/python2.3/site-packages/Numeric']

thanks.
 
S

Steve Holden

Dwi said:
I tried to set up PYTHONPATH in cygwin but it doesn't work.
Any clue why ?
The following is my session.

$ echo $PYTHONPATH
/home/Cherna/86_DevelopingTools:/home/Cherna/87_TestingCorpus

$ echo $PYTHONSTARTUP
/home/Cherna/86_DevelopingTools:/home/Cherna/87_TestingCorpus

$ python
Python 2.3.3 (#1, Dec 30 2003, 08:29:25)
[GCC 3.3.1 (cygming special)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.

['', '/usr/lib/python23.zip', '/usr/lib/python2.3',
'/usr/lib/python2.3/plat-cygwin', '/usr/lib/python2.3/lib-tk',
'/usr/lib/python2.3/lib-dynload', '/usr/lib/python2.3/site-packages',
'/usr/lib/python2.3/site-packages/Numeric']

thanks.

You probably forgot to export them to put them in the environment?

$ export PYTHONPATH=/c/testwebapp:/c/Steve

sholden@DELLBOY /c/testwebapp/views
$ echo $PYTHONPATH
/c/testwebapp:/c/Steve

sholden@DELLBOY /c/testwebapp/views
$ python
Python 2.3.3 (#1, Dec 30 2003, 08:29:25)
[GCC 3.3.1 (cygming special)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.['', '/c/testwebapp', '/c/Steve', '/usr/lib/python23.zip',
'/usr/lib/python2.3', '/usr/lib/python2.3/plat-cygwin',
'/usr/lib/python2.3/lib-tk', '/usr/lib/python
2.3/lib-dynload',
'/usr/lib/python2.3/site-packages']
Certainly works for me, anyhow ...

regards
Steve
 
D

Dwi Sianto Mansjur

yes, it works after I use:
export PYTHONPATH=/home/Cherna/DevelopingTools

I set the shell/environment variable in Cywin.bat
I thought that will take car of the business.
But now it works,

Thanks a lot.

Steve Holden said:
Dwi said:
I tried to set up PYTHONPATH in cygwin but it doesn't work.
Any clue why ?
The following is my session.

$ echo $PYTHONPATH
/home/Cherna/86_DevelopingTools:/home/Cherna/87_TestingCorpus

$ echo $PYTHONSTARTUP
/home/Cherna/86_DevelopingTools:/home/Cherna/87_TestingCorpus

$ python
Python 2.3.3 (#1, Dec 30 2003, 08:29:25)
[GCC 3.3.1 (cygming special)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
import sys
sys.path

['', '/usr/lib/python23.zip', '/usr/lib/python2.3',
'/usr/lib/python2.3/plat-cygwin', '/usr/lib/python2.3/lib-tk',
'/usr/lib/python2.3/lib-dynload', '/usr/lib/python2.3/site-packages',
'/usr/lib/python2.3/site-packages/Numeric']

thanks.

You probably forgot to export them to put them in the environment?

$ export PYTHONPATH=/c/testwebapp:/c/Steve

sholden@DELLBOY /c/testwebapp/views
$ echo $PYTHONPATH
/c/testwebapp:/c/Steve

sholden@DELLBOY /c/testwebapp/views
$ python
Python 2.3.3 (#1, Dec 30 2003, 08:29:25)
[GCC 3.3.1 (cygming special)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.['', '/c/testwebapp', '/c/Steve', '/usr/lib/python23.zip',
'/usr/lib/python2.3', '/usr/lib/python2.3/plat-cygwin',
'/usr/lib/python2.3/lib-tk', '/usr/lib/python
2.3/lib-dynload',
'/usr/lib/python2.3/site-packages']
Certainly works for me, anyhow ...

regards
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top