473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

PYTHONSTARTUP and Cygwin

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.
Jul 18 '05 #1
2 7648
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
Jul 18 '05 #2
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 <sh*****@holdenweb.com> 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

Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jörg Maier | last post by:
Hey guys, i have a big problem using Tkinter and pexpect in cygwin. i try to program an winscp-like rsync Program for all posix Platforms (linux, macosx, cygwin). i got a class SslConnection...
0
by: dw | last post by:
Pehaba, does anyone knows how to install MySQLdb on cygwin? - test device: MySQLdb 0.9.2.0 targz + cygwin 1.5.7-cr-0x9e + python 2.3.3 on cygwin + mysql 4.0.17 win32 - modified setup.py's...
9
by: Mayer | last post by:
Hello: I'm running python under cygwin and need to find the drive letter. Cygwin has a way of calling my drives by a name relative to the Cygwin directory, so I get things like /home/user rather...
2
by: Christopher Wood | last post by:
Greetings all, A quick query: as all sorts of stuff can be defined in a .pythonrc.py file or similar and called at python startup using the PYTHONSTARTUP environment variable, it's very useful...
4
by: goberle | last post by:
I have installed the Cygwin package under WinXP. I am trying to insure that I have a reasonable development environment, and that things are working properly, by trying to compile and run the...
2
by: 63q2o4i02 | last post by:
Hi, I'm using python 2.4 and windows XP. I have two packages in the windows version of python in site-packages. They are PyVisa and ctypes, and both live in c:\python24\lib\site-packages ...
4
by: reachsamdurai | last post by:
Hello, Can you please let me know the procedure to reach db2 command prompt from a cygwin window (hence without using Start-> Run -> db2cmd method). I'm planning to write shell scripts which...
0
by: dot | last post by:
I spent a few headache filled days trying to use GMP on windows (XP pro) I finally got it to work and since I found little help on the Web I thought someone might find what i did useful. ...
8
by: Ale | last post by:
Hi! I need to compile with "Make" a source written for linux that I need to execute under a Win32 system. I tried to launch Make under cygwin, and it works fine, but it doesn't run under Win32...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.