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

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 4060
On 21 Mai, 12:07, Thomas Troeger <thomas.troeger....@siemens.com>
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
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...
3
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...
3
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...
9
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...
1
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...
17
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 ...
1
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...
13
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...
7
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...
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
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: 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?
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
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.