PYTHONSTARTUP and Cygwin

Discussion in 'Python' started by Dwi Sianto Mansjur, Apr 29, 2004.

  1. 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.
     
    Dwi Sianto Mansjur, Apr 29, 2004
    #1
    1. Advertising

  2. Dwi Sianto Mansjur

    Steve Holden Guest

    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
     
    Steve Holden, Apr 29, 2004
    #2
    1. Advertising

  3. 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 <> 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
     
    Dwi Sianto Mansjur, Apr 30, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    513
  2. Replies:
    0
    Views:
    458
  3. Gary Feldman
    Replies:
    0
    Views:
    380
    Gary Feldman
    Sep 8, 2003
  4. Christopher Wood

    PYTHONSTARTUP and the -i command line option

    Christopher Wood, Jun 2, 2005, in forum: Python
    Replies:
    2
    Views:
    2,622
    Simon Percivall
    Jun 3, 2005
  5. Steven D'Aprano

    Jython and PYTHONSTARTUP

    Steven D'Aprano, Jun 21, 2012, in forum: Python
    Replies:
    2
    Views:
    318
    Hans Mulder
    Jun 23, 2012
Loading...

Share This Page