473,543 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Making a simple script standalone


Hi,
I'm new to this group. I've tried finding my answer in existing messages,
but no such luck.

What I want to do is to compile/bundle/prepare/whatever_term a simple
Python script for deployment on a Windows machine. Installing Python
itself on that machine, is not an option. Ideally I would like to obtain
a single executable file, but a script+runtime is acceptable.

There is nothing graphical, nothing fancy about the script.
The only imports are: os, stat, string and time.
Any suggestions on an - easy and clear - path to follow ?
--
Research is what I'm doing, when I don't know what I'm doing.
(von Braun)

Jan 16 '07 #1
11 1741
Rikishi 42 wrote:
Hi,
I'm new to this group. I've tried finding my answer in existing messages,
but no such luck.

What I want to do is to compile/bundle/prepare/whatever_term a simple
Python script for deployment on a Windows machine. Installing Python
itself on that machine, is not an option. Ideally I would like to obtain
a single executable file, but a script+runtime is acceptable.

There is nothing graphical, nothing fancy about the script.
The only imports are: os, stat, string and time.
Any suggestions on an - easy and clear - path to follow ?

pyinstaller + innosetup.

James
Jan 16 '07 #2
Rikishi 42 wrote:
Hi,
I'm new to this group. I've tried finding my answer in existing messages,
but no such luck.

What I want to do is to compile/bundle/prepare/whatever_term a simple
Python script for deployment on a Windows machine. Installing Python
itself on that machine, is not an option. Ideally I would like to obtain
a single executable file, but a script+runtime is acceptable.

There is nothing graphical, nothing fancy about the script.
The only imports are: os, stat, string and time.
Any suggestions on an - easy and clear - path to follow ?

I use py2exe and inno installer. Works great.

-Larry
Jan 16 '07 #3
At Tuesday 16/1/2007 19:49, Rikishi 42 wrote:
>What I want to do is to compile/bundle/prepare/whatever_term a simple
Python script for deployment on a Windows machine. Installing Python
itself on that machine, is not an option. Ideally I would like to obtain
a single executable file, but a script+runtime is acceptable.
distutils + py2exe
--
Gabriel Genellina
Softlab SRL


_______________ _______________ _______________ _____
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas

Jan 17 '07 #4
On Wednesday 17 January 2007 03:33, Gabriel Genellina wrote:
At Tuesday 16/1/2007 19:49, Rikishi 42 wrote:
>>What I want to do is to compile/bundle/prepare/whatever_term a simple
Python script for deployment on a Windows machine. Installing Python
itself on that machine, is not an option. Ideally I would like to obtain
a single executable file, but a script+runtime is acceptable.

distutils + py2exe
Tried that, just after asking here.
A bit messy (poor docs) and a very bloated result.
Thanks for the answer, anyway.
--
Research is what I'm doing, when I don't know what I'm doing.
(von Braun)

Jan 17 '07 #5
On Wednesday 17 January 2007 00:22, James Stroud wrote:
>There is nothing graphical, nothing fancy about the script.
The only imports are: os, stat, string and time.

Any suggestions on an - easy and clear - path to follow ?


pyinstaller + innosetup.
I will look into it, thanks!
Hope it's not as heavy as with py2exe...

--
Research is what I'm doing, when I don't know what I'm doing.
(von Braun)

Jan 17 '07 #6
On Wednesday 17 January 2007 00:48, Larry Bates wrote:
>There is nothing graphical, nothing fancy about the script.
The only imports are: os, stat, string and time.

Any suggestions on an - easy and clear - path to follow ?
I use py2exe and inno installer. Works great.
Thanks, I will look into it.
Hope it's not as heavy as py2exe...
--
Research is what I'm doing, when I don't know what I'm doing.
(von Braun)

Jan 17 '07 #7
Rikishi 42 wrote:
Hi,
I'm new to this group. I've tried finding my answer in existing messages,
but no such luck.

What I want to do is to compile/bundle/prepare/whatever_term a simple
Python script for deployment on a Windows machine. Installing Python
itself on that machine, is not an option. Ideally I would like to obtain
a single executable file, but a script+runtime is acceptable.

There is nothing graphical, nothing fancy about the script.
The only imports are: os, stat, string and time.
Any suggestions on an - easy and clear - path to follow ?

cx_Freeze was not mentioned so far. its perhaps most easy and clear.
Robert
Jan 17 '07 #8
At Wednesday 17/1/2007 16:05, Rikishi 42 wrote:
>What I want to do is to compile/bundle/prepare/whatever_term a simple
Python script for deployment on a Windows machine. Installing Python
itself on that machine, is not an option. Ideally I would like to obtain
a single executable file, but a script+runtime is acceptable.
distutils + py2exe

Tried that, just after asking here.
A bit messy (poor docs) and a very bloated result.
Consider that, at a bare minimum, you need to include python25.dll
wich is rather large, and transitive module imports can lead to a
large library.zip too.
Different "bundlers" may be more or less convenient, have more or
less documentation, easier or harder to use, but they all make
comparable file sizes; no one is so dumb to include all the scripts
reachable along the PYTHONPATH, and on the other hand, if it included
too few files your script might fail when it can't import a needed module.
See
http://mail.python.org/pipermail/pyt...st/336851.html
for a related issue.
If you're going to try different alternatives, posting your findings
at the end would be a good thing.
--
Gabriel Genellina
Softlab SRL


_______________ _______________ _______________ _____
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas

Jan 17 '07 #9
Gabriel Genellina wrote:
At Wednesday 17/1/2007 16:05, Rikishi 42 wrote:
>>What I want to do is to compile/bundle/prepare/whatever_term a simple
Python script for deployment on a Windows machine. Installing Python
itself on that machine, is not an option. Ideally I would like to
obtain
>>a single executable file, but a script+runtime is acceptable.

distutils + py2exe

Tried that, just after asking here.
A bit messy (poor docs) and a very bloated result.

Consider that, at a bare minimum, you need to include python25.dll wich
is rather large, and transitive module imports can lead to a large
library.zip too.
Different "bundlers" may be more or less convenient, have more or less
documentation, easier or harder to use, but they all make comparable
file sizes; no one is so dumb to include all the scripts reachable along
the PYTHONPATH, and on the other hand, if it included too few files your
script might fail when it can't import a needed module.
See http://mail.python.org/pipermail/pyt...st/336851.html
for a related issue.
If you're going to try different alternatives, posting your findings at
the end would be a good thing.
stay with py23 for "a script" (and more) and make <700kB
independent distros - UPX and 7zip involved:

http://groups.google.com/group/comp....f469a1b3dc3802
Jan 18 '07 #10

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

Similar topics

4
7307
by: Gregory | last post by:
Hello, I've managed to build two web pages, one that can display images with associated text data in a table, and one that can resize and display images without the text. I'd like to resize the images as I go, without writing them to disk on the server. Do I need to prepare all of the resized images before I display the data from the select...
2
2079
by: john | last post by:
Newbie about this stuff. I want to run some php scripts from a shell script(bash?) the php script i want to run is this: test.php and it's path is this: home/virtual/blahblah.com/home/abc/mainwebsite_html/bluhbluh/dbtest/
2
2605
by: Sandeep Gupta | last post by:
Hi, I've written a commercial application that uses Python scripts for some of the functionality. Installing the Python portion of the application requires me to first install Python, and then install the scripts. I'm looking for an easier way to install the Python portion. I've been referred to:...
1
3542
by: philregion | last post by:
Let's say I've got the following little script called test1.py: print "Content-type: text/html\n\n" print "<html><body>" print "<h1>Hello World</h1>" print "</body></html>" I want to run a script that takes advantage of CGIHTTPServer so that I can send a browser to http://localhost:8081/test1.py and see the results of the script above....
2
1450
by: Stewart | last post by:
Originally posted in comp.lang.javascript: Newsgroups: comp.lang.javascript From: "Stewart" Date: 23 Aug 2005 02:50:04 -0700 Local: Tues, Aug 23 2005 10:50 am Subject: FireFox, RemoveChild, AppendChild, making width grow? Hi,
6
11623
by: Oscar N. Goyee | last post by:
Well, its sames difficult for me; I love access so much and wish to make it perform extra task. I prepared an HTML form but can not connect it to my access table and so I think it is possible to make an access form a standalone form for user input. Can anyone assist. My mail add is dianafather@aim.com. *** Sent via Developersdex...
11
3166
by: Hari Sekhon | last post by:
I have written a script and I would like to ensure that the script is never run more than once at any given time. What is the best way of testing and exiting if there is another version of this script running somewhere on this machine? I guess what I'm asking is how to handle system processes the way I can in shell. I am running this on...
0
983
by: Chris | last post by:
Hello, For awhile now I've wanted to organize the vb scripts I've created over the years. Just haven't taken the time to make a Script Center type help file or DB. Just recently started messing around with Visual C# and thought this would be a good project to learn off of. I'm thinking a standalone app I could add/remove/search through and...
1
1830
by: HACKhalo2 | last post by:
Hi. I'm helping a friend of mine develop an online game, which is currently outdated. The person making skins for the site came up with a cool looking NavBar (found at http://www.thejackofclubs.net/images/soc_concept4.png ) and I want to change the current navbar (which is right now generated via PHP using tables and outdated expressions). The...
0
7336
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7582
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7329
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7675
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...
0
5877
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...
1
5257
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...
0
4884
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...
0
3384
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
626
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...

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.