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

local moduile acess from cgi-bin

hello all.

I do some coding in python but this is my first attampt to write
somthing for hte web.

I need to write a cgi-bin script for a web-server, and i've got the
access for it from our "SYSTEM". the problem is that this script uses
some modules (pg, pyLab) that i've installed localy in my home dir.
Python knows how to find them due to an enviorment variable inthe shell
(please corrent me if i'm wrong).

now, i am by no means big expert about web servers, but if i got it
right, the web server run under some user ("www-data" or such).
so howi can i make this user (and the web) be able to run my python
code without having to install the modules as shared. (which i dont
think they will allow me).

thanks very much
amit

Jul 25 '06 #1
2 1228
noro wrote:
hello all.

I do some coding in python but this is my first attampt to write
somthing for hte web.

I need to write a cgi-bin script for a web-server, and i've got the
access for it from our "SYSTEM". the problem is that this script uses
some modules (pg, pyLab) that i've installed localy in my home dir.
Python knows how to find them due to an enviorment variable inthe shell
(please corrent me if i'm wrong).

now, i am by no means big expert about web servers, but if i got it
right, the web server run under some user ("www-data" or such).
so howi can i make this user (and the web) be able to run my python
code without having to install the modules as shared. (which i dont
think they will allow me).
import sys
sys.path.append('/home/amir/<wherever-your-modules-are>')

should do the trick.

HTH
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Jul 25 '06 #2
thanks bruno

Bruno Desthuilliers wrote:
noro wrote:
hello all.

I do some coding in python but this is my first attampt to write
somthing for hte web.

I need to write a cgi-bin script for a web-server, and i've got the
access for it from our "SYSTEM". the problem is that this script uses
some modules (pg, pyLab) that i've installed localy in my home dir.
Python knows how to find them due to an enviorment variable inthe shell
(please corrent me if i'm wrong).

now, i am by no means big expert about web servers, but if i got it
right, the web server run under some user ("www-data" or such).
so howi can i make this user (and the web) be able to run my python
code without having to install the modules as shared. (which i dont
think they will allow me).

import sys
sys.path.append('/home/amir/<wherever-your-modules-are>')

should do the trick.

HTH
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Jul 26 '06 #3

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

Similar topics

2
by: Shannon Wright | last post by:
Hello, I hope someone out there can help me on this: I am developing a php application on a windows xp machine running IIS and I cannot load the famous test.php page or any others with a php...
31
by: Bo Peng | last post by:
Dear list, I have many dictionaries with the same set of keys and I would like to write a function to calculate something based on these values. For example, I have a = {'x':1, 'y':2} b =...
3
by: eddy princen | last post by:
Hello, i'm need some help, i want to run a website on a server with an sql database ( that in itself is no problem, i've done this before) but with a possibility to update the sql database with...
4
by: Chuck Anderson | last post by:
My Web Host (Linux - Apache) recently upgraded to Php5. One thing lost in the upgrade was a global configuration that allowed me to place php.ini files in any directory and they would be read and...
1
by: lokeshreddy16 | last post by:
'this is my code plz guys help how to save data from vb 2005 and other this that i am able to view the data from acess but i am not able save to acess i dont whether my code for save is correct of...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.