473,472 Members | 1,831 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

python packages cross references

Hi. I need help( or solution :-) ).
Problem: my project has 3 packages
prj
+------A
+------B
+------Utils

The question is: what is the right way to use functionality from Utils in A and B packages ?
I know that after importing package I know it's location, but it doesn't help me in any module within package A or B.
I can add full path to prj to sys.path but it seems to be the wrong way.
May be I missed something?

Thanks.

Roman
Jul 18 '05 #1
1 1651
Roman Yakovenko schrieb:
Hi. I need help( or solution :-) ).
Problem: my project has 3 packages
prj
+------A
+------B
+------Utils

The question is: what is the right way to use functionality from
Utils in A and B packages ?


Look at Python Tutorial Packages (6.4). You can make a prj package
and use intra-package references (6.4.2) for A, B and Utils.

Mit freundlichen Gruessen,

Peter Maas

--
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Tel +49-241-93878-0
E-mail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n'.decode('base64')
-------------------------------------------------------------------
Jul 18 '05 #2

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

Similar topics

0
by: Irmen de Jong | last post by:
QOTW: "What can I do with Python that I can't do with C#? You can go home on time at the end of the day." -- Daniel Klein "Python lends itself to playing with it and to discussing the merits of...
0
by: Emile van Sebille | last post by:
QOTW (advanced interfaces track): "I'm firmly in favour of any language that can DWIMNWIS." -- Tim Delaney QOTW (MS roadkill track): "Underestimate MS at your own risk. It is one thing to not...
1
by: Craig Ringer | last post by:
QOTW: "Such infrastructure building is in fact fun and instructive -- as long as you don't fall into the trap of *using* such complications in production code, where Python's simplicity rules;-)."...
0
by: Cameron Laird | last post by:
QOTW: "ortability is an n-way street." - Paul McGuire "Python's polymorphism support is so good that it makes inheritance much less important than it is in other languages." - Ben Sizer ...
1
by: Cameron Laird | last post by:
QOTW: "Alas, Python has extensive libraries and well documented to boot." - Edmond Dantes "Locking files is a complex business." - Sybren Stuvel File-locking *sounds* like an easy thing; it...
0
by: Paul Boddie | last post by:
QOTW: "I still want to keep compile time type checking to make sure I don't make any mistakes." "Sounds like you want two wives, but I'm pretty sure polygamy gets a checkbox in the naughty...
0
by: Gabriel Genellina | last post by:
QOTW: ""Given that C++ has pointers and typecasts, it's really hard to have a serious conversation about type safety with a C++ programmer and keep a straight face. It's kind of like having a guy...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.