On 03/05/10 06:16, Thomas C. Hicks wrote:
I am using Python 2.6.4 in Ubuntu.  Since I use Ubuntu (with its every
6 months updates) and want to learn Python I have been working on a
post-install script that would get my Ubuntu system up and running with
my favorite packages quickly.

As an aside, you don't particularly need to write a Python script for what you want from scratch, you could look at this script named "dpkg-origins" which is also written in Python and is related to what you want (it helps dump all installed packages on an existing system): http://goonmill.org/static/dpkg-origins

It basically allows you to do this...:

|dpkg-origins > selections.txt|

... which produces a file listing all the packages installed on a system. Obviously you can edit this file manually if you so choose.

Then, you can use the file on a freshly installed machine to reinstall all the packages using this pipeline command (here you don't need Python or a script as such):

| cat selections.txt | sudo dpkg --set-selections && sudo apt-get -u dselect-upgrade |

Not meaning to spoil your fun, but just thought I'd point all that out...

Regards

Walter
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to