Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > PYTHONSTARTUP and Cygwin

Reply
Thread Tools

PYTHONSTARTUP and Cygwin

 
 
Dwi Sianto Mansjur
Guest
Posts: n/a
 
      04-29-2004
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.
 
Reply With Quote
 
 
 
 
Steve Holden
Guest
Posts: n/a
 
      04-29-2004
Dwi Sianto Mansjur wrote:
> 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.
>>> import sys
>>> sys.path

['', '/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
 
Reply With Quote
 
 
 
 
Dwi Sianto Mansjur
Guest
Posts: n/a
 
      04-30-2004
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 <(E-Mail Removed)> wrote in message news:<%Sckc.8205$f_5.1627@lakeread01>...
> Dwi Sianto Mansjur wrote:
> > 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.
> >>> import sys
> >>> sys.path

> ['', '/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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Jython and PYTHONSTARTUP Steven D'Aprano Python 2 06-22-2012 11:46 PM
PYTHONSTARTUP and the -i command line option Christopher Wood Python 2 06-03-2005 07:47 AM
IDLE doesn't rerun PYTHONSTARTUP on restart Gary Feldman Python 0 09-08-2003 07:54 PM
confirm unsubscribe from cygwin-announce@cygwin.com cygwin-announce-help@cygwin.com Python 0 09-05-2003 01:29 AM
confirm unsubscribe from cygwin@cygwin.com cygwin-help@cygwin.com Python 0 09-04-2003 06:34 PM



Advertisments