473,387 Members | 1,606 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,387 software developers and data experts.

How to share 3rd-party modules between 2.2 and 2.3?

I have Red Hat 9 installed, which uses python2.2 for lots of system
tasks. I also installed 2.3 using the rpms available from python.org.

I want to write some CGI scripts that use pgdb. I want to write the
python scripts using python2.3, but the pgdb.py file is in

/usr/lib/python2.2/site-packages

which is not part of sys.path in python2.3. What is the best way of
sharing these modules?

I don't want to add /usr/lib/python2.2/site-packages to my $PYTHONPATH
variable because the apache user doesn't get a log in.

I thought about adding a symbolic link to
/usr/lib/python2.3/site-packages for every file in
/usr/lib/python2.2/site-packages.

Does anyone have a better idea?
Jul 18 '05 #1
3 1221
Matthew Wilson wrote:
I want to write some CGI scripts that use pgdb. I want to write the
python scripts using python2.3, but the pgdb.py file is in

/usr/lib/python2.2/site-packages

which is not part of sys.path in python2.3. What is the best way of
sharing these modules?


Put the code in /usr/lib/site-python.

Regards,
Martin

Jul 18 '05 #2
Martin v. Löwis wrote:
Matthew Wilson wrote:
I want to write some CGI scripts that use pgdb. I want to write the
python scripts using python2.3, but the pgdb.py file is in
/usr/lib/python2.2/site-packages

which is not part of sys.path in python2.3. What is the best way of
sharing these modules?


Put the code in /usr/lib/site-python.


I suppose pgdb.py is from PyGreSQL, which includes a C extension module. Sharing
extension modules between different Python minor versions *might* work, but it's
best to just install the package in question for both Python 2.2 and 2.3.

-- Gerhard
Jul 18 '05 #3
Matthew Wilson <ma**@overlook.homelinux.net> writes:
I have Red Hat 9 installed, which uses python2.2 for lots of system
tasks. I also installed 2.3 using the rpms available from python.org.

I want to write some CGI scripts that use pgdb. I want to write the
python scripts using python2.3, but the pgdb.py file is in

/usr/lib/python2.2/site-packages

which is not part of sys.path in python2.3. What is the best way of
sharing these modules?
I'd recommend against it. The bytecode is different between 2.2 and
2.3, so the .pycs alongside the source files will only be useful for
one install. And while binary compatibility of C extensions is fairly
likely, it's not total.
Does anyone have a better idea?


Just install pgdb again.

Cheers,
mwh

--
It could be argued that since Suitespot is infinitely terrible,
that anything else, by very definition of being anything else,
is infinitely superior. -- ".", alt.sysadmin.recovery
Jul 18 '05 #4

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

Similar topics

14
by: John Bentley | last post by:
Note this is crossposted to comp.lang.javacript and microsoft.public.dotnet.scripting. After some Googling and FAQing my understanding of these terms is, crudely: Javascript (3 different...
10
by: barcaroller | last post by:
Can anyone tell me what the difference is between the 3rd Edition and the Special Edition of Stroustrup's "The C++ Programming Language"?
24
by: Hardy | last post by:
I'm pretty new in this field. when reading some 70x material, I met with this term but cannot catch its accurate meaning. who can help me? thanks in advance:)~
1
by: brian.oneil2 | last post by:
Is there a way to install this onto a network file share and allow a team to access it? I would say share a CD from a networked CD drive, but there are multiple CD's that would have to be inserted....
7
by: isamusetu | last post by:
anybody knows how to share the dll between the process? I know there is a way to set the #pragma data_seg in the visual studio 6.0 C++, that can make the dll can be shared between the multiple...
2
by: yxq | last post by:
Hello I want to create and delete the folder share, i found that it is ok for generic folder, but it does not work for Root directory(i.e c:\, d:\) The code...
2
by: Johnny Fugazzi | last post by:
I would like to access a network share from my vb.net application. I do not want to map a drive to the share, however. I would also like to specifiy a user credential to use when connecting to...
3
by: musosdev | last post by:
Hi guys Okay, I've setup my projects to open and compile fine in VS2005 using FPSE and remote web, but it's *really* slow. So I thought I'd have a go at doing it the normal way, by loading from...
7
by: Lycan. Mao.. | last post by:
Hello, I am a newbie in C++ and I'm in trouble in choosing books, I hope some one who can give me some tips. I'm already know C and a little about Scheme, C#, Python, Lua and so on, and now I want...
3
by: travellinman | last post by:
Hi, I'm trying to combine the text in two original fields and paste them into another 3rd field on a form, but the problem is that there are leading zeros in both original fields, which access does...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.