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

intra-module dependencies

Assuming you have two directories of modules:

project/lib
project/filters

How can functions in "filters" reference functions in "lib"? Right now
I have in the files in filters:

sys.path.append( ".." )
import lib

But that's kinda ugly. Section 6.4 in the python tutorial says that if
I'm in the project/filters directory I should be able to access lib
like:
import project.lib

But that doesn't work if I'm running python scripts in the
project/filters directory. Is there any nicer way to do this?

Basically, I have a "main" project file that uses things in both lib and
filters, so normally I don't have this problem, but I want the filters
to be able to run by themselves.

Thanks! Please CC to me, I'm not subscribed

--
joey tsai | A witty saying proves nothing.
| -- Voltaire

Jul 18 '05 #1
0 1426

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

Similar topics

5
by: Evan Smith | last post by:
We recently upgraded the box that hosts our main DB2 database to an 8-CPU machine with 8 GB of memory. With all the extra horsepower, we were eager to test performance with intra-parallelism turned...
3
by: Support | last post by:
Hello: I have done some research on the following but still not clear as what mechanism is preferable PROBLEM: In a VB.NET environment, I will have two applications. Application (A) will do...
7
by: Komandur Kannan | last post by:
I have two issues to address: a) The source code lies in the network path. I am trying to use windows sockets for making a mail client. On execution of this program in debug mode, i get an error...
8
by: JSC | last post by:
Hello all, We're running AIX 5.3 and DB2 v8.1 FP 9. Topas and lscfg confirm that this is a 4-way SMP environment, however only 1 of the 4 processors seems to be operative. That is, with...
1
by: Laurence | last post by:
Hi folks, As I konw: database partition (aka data partition?), the database can span multiple machines; table partition, the data within a table can seperate by certain condition. How about...
15
by: Woody Ling | last post by:
I am starting to config a 64 bits DB2 in IBM 595 AIX box with 2 dual core CPU and I would like to assigned one 'processor' for one db partition. Should I config it as a 4 nodes or 2 nodes...
5
by: cnsabar | last post by:
Hi., I am having the index pg no. data in file .. i need to sort the data ., Can any one help regarding this using PERL .. Its very urgent ... Source file <ce:intra-ref id="10011#f0070"/>310f,...
1
by: marcroy.olsen | last post by:
Hi Python list, I have been struggleling with this before, but have never been able to find a good solution. The thing I dont understand is, I follow the guide here:...
3
ChrisWang
by: ChrisWang | last post by:
Hi all, I have a simple question about "Intra-package References" There are two source files and __init__.py in package MyPkg shown below: |-MyPkg -__init__.py -example.py -test.py
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...

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.