473,699 Members | 2,417 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Minimal Python installation?

Hi,

I'd like to put the python library and interpreter on a small embedded
Linux x86 compatible device where disk space is an issue. I played
around with the minimal Python interpreters, but was not entirely happy
with them, so my question is, is there an (preferably easy) way to put
the interpreter and a cut-down version of the python library/modules
that ship with regular Python into a new archive that I can safely copy
and use? My current method is to copy the python interpreter and the
python shared library to the device. Then I create a tar archive with
all startup files from the site package directory to my archive using
the following one-liner:

strace -f -eopen python -c 'pass' 2>&1 | grep -v ENO | grep '\.py' | awk
'BEGIN { FS="\"" } { print $2 }' | tar cvf x.tar -T -

This effectively packs all python library files that are accessed upon
startup into a tar archive. But I figure this method is not what I want
because there surely are files I am missing here (for example which are
accessed when starting a script), and what I really want is a minimal
environment that works. Let's say I want a complete Python install, but
without all the batteries :-)

Any pointers?

Regards,
Thomas.
Jun 27 '08 #1
1 4070
On 21 Mai, 12:07, Thomas Troeger <thomas.troeger ....@siemens.co m>
wrote:
>
I'd like to put the python library and interpreter on a small embedded
Linux x86 compatible device where disk space is an issue. I played
around with the minimal Python interpreters, but was not entirely happy
with them, so my question is, is there an (preferably easy) way to put
the interpreter and a cut-down version of the python library/modules
that ship with regular Python into a new archive that I can safely copy
and use?
Perhaps there are some projects on the following pages which may help
in some way:

http://wiki.python.org/moin/EmbeddedPython
http://wiki.python.org/moin/Tiny_Python

[...]
Let's say I want a complete Python install, but without all the batteries :-)
I think there's an overlap between "installer" tools and some of the
projects mentioned on the above pages, especially where retaining only
the critical libraries in the resulting distribution is concerned.

Paul
Jun 27 '08 #2

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

Similar topics

4
3845
by: Logan | last post by:
Several people asked me for the following HOWTO, so I decided to post it here (though it is still very 'alpha' and might contain many (?) mistakes; didn't test what I wrote, but wrote it - more or less - during my own installation of Python 2.3 on Fedora Core 1 Linux for a friend of mine). Anyway, HTH, L.
3
2952
by: Zunbeltz Izaola | last post by:
Hi, I've build and installed python 2.2 and python2.3 in a linux box. Now i want to install some packages (Numeric, wxPython and scipy). I've install Numeric and wxPython for python2.3 without problem (python2.3 setup.py install ... and so on). But when I try python2.2 setup.py install I get the following error (for wxpython)
3
3775
by: Matthias Baas | last post by:
Hi, are there any guidelines about what to do if a Windows extension for Python 2.4 requires the C++ runtime (msvcp71.dll)? If I want to distribute a binary installer of an extension that contains C++ code, should I really include the msvcp71.dll in the package? It doesn't sound like a good idea to me if every package places another copy of this dll somewhere in the Python directory. Python 2.4 does install the C runtime (msvcr71.dll)...
9
2077
by: TPJ | last post by:
First I have to admit that my English isn't good enough. I'm still studying and sometimes I just can't express what I want to express. A few weeks ago I've written 'Python Builder' - a bash script that allows anyone to download, compile (with flags given by user) and install Python and some external modules (e.g. wxPython, PyGTK, Numeric...). I use Python every day and when new version of Python (or some external module) is released, I...
1
2375
by: José Joye | last post by:
I know, this kind of question has already been asked. However, I could not find an answer related to the minimal privilege required to be able to create a new event Source in the appplication event log. I have a service app that needs to access shares (therefore, I cannot not start it using the System account). This service needs not to be run with particular privilege. So, I use a account member of users' group. Doing so will fail...
17
1742
by: Anthony Baxter | last post by:
On behalf of the Python development team and the Python community, I'm happy to announce the release of Python 2.4.2 (final). Python 2.4.2 is a bug-fix release. See the release notes at the website (also available as Misc/NEWS in the source distribution) for details of the more than 60 bugs squished in this release. For more information on Python 2.4.2, including download links for various platforms, release notes, and known issues,...
1
2144
by: Srijit Kumar Bhadra | last post by:
I have browsed the following links 1) http://peak.telecommunity.com/DevCenter/EasyInstall 2) When Python *Eggs* better than Python *distutils*?? What's Eggs? (http://tinyurl.com/m8dyd) But I am still not clear what to do with an .egg file. For example, if I have a basic Python installation (http://www.python.org/ftp/python/2.4.3/python-2.4.3.msi) what should I do with a typical .egg file (e.g....
13
3359
by: Daniel Fetchinson | last post by:
Was looking at PEP 3108, http://www.python.org/dev/peps/pep-3108/ , Is it just me or others also think that it would be a major loss to remove tkinter from the python core? PEP 3108 starts off with: Each module to be removed needs to have a justification as to why it should no longer be distributed with Python. then goes on with,
7
1624
by: greg | last post by:
Thomas Philips wrote: Have a look in /Library/Frameworks/Python.framework/Versions/2.5 You can't -- this feature only exists in the Search window, which is a different kind of window from the normal Finder
0
8685
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8880
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7745
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6532
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3054
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 we have to send another system
2
2344
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.