473,387 Members | 1,721 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.

import a module from an archive ?

hi all,

i'd like to know if it's possible to import a module from an archive
(zip, rar, tar, jar, ...)
I've tried using different formats but it still doesn't work .....

i make:
sys.path.append('d:/myModules.zip')
import aModuleFromTheArchive


is there a way to do that ?
the problem is that i've embed a python interpreter in our java app and
our scripts need some standard modules from python and jython but the 2
'Lib' directories of python and jython are a bit heavy : 8Mb ....

thx,
vince

Jul 18 '05 #1
0 1217

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

Similar topics

5
by: Brandon Walters | last post by:
I wrote a file download module for my website. The reason for the file download module is that my website downloads work on a credit based system. So I need to keep track of and limit daily...
1
by: Remy Cool | last post by:
Hello, I've created an archive import class (with the help of importers.py from the python /demo/imputil dir) which imports packages and modules from a dictionary. So far so good. The problem...
0
by: Stian Søiland | last post by:
all examples performed with: Python 2.3+ (#2, Aug 10 2003, 11:09:33) on linux2 (2, 3, 0, 'final', 1) This is a recursive import:
0
by: John Roth | last post by:
I've found a case where it seems that Python is importing two copies of a module without any reason or indication. It took me a while to verify that this is what is occuring: I had to write a...
43
by: Dan Perl | last post by:
Here is a python feature that I would like: to be able to import modules from an archive like the jar files in Java. Maybe a regular tar file? Maybe a python specific file type, let's call it a...
2
by: Torsten Mohr | last post by:
Hi, is there some description available to overwrite the import hook? By googling i found out so far that i need to overwrite __builtins__.__import__ with something else. Can i also do this...
1
by: fts2012 | last post by:
follow the dive into python ----------------------------------------------------------------- ----------------------------------------------------------------- I append the filepath of <<dive into...
0
by: abarun22 | last post by:
Hi I am facing a problem while loading a SWIG generated shared module from python. The development is under HP-UX 32b platform. I use gcc version 4.0.2 to build the shared module. This is how i...
0
by: Gabriel Genellina | last post by:
En Fri, 13 Jun 2008 20:01:56 -0300, Dan Yamins <dyamins@gmail.com> escribió: Note that if you execute dir() at this point, you'll see the Operations name, *not* Operations.archive. The...
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:
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
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
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.