Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Try It Free
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old August 27th, 2003, 12:55 AM
black black is offline
flashing vampire
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: nowhere
Posts: 19 black User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
py2ede on windows~

Howdy everyone~

i installed py2exe on my OS(win2k server) and want to make my python script into exe files so that others could run them without any problem. i just made a setup script with what the tuto said like this:
PHP Code:
# setup.py
from distutils.core import setup
import py2exe

setup
(name="myscript",
      
scripts=["myscript.py"],


but this didnt work, any suggestions ???

Reply With Quote
  #2  
Old August 27th, 2003, 09:20 AM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,529 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 17 h 19 m 5 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
Hey black,

You're gonna need to give us a lil more info, is there an error being raised or is it just not working. Also what option are you compiling it with (-c -w etc.) any other useful info you can think of would be great!

Take care,
Mark.

Reply With Quote
  #3  
Old August 27th, 2003, 10:04 PM
black black is offline
flashing vampire
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: nowhere
Posts: 19 black User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
frankly i dont understand the whole procedure so well, ok i just make a file as tuto said(code is right above in my first post), the tuto said next after that i should run something like "Python setup.py py2exe" but i dunno where i should run this line, i tried to run it under Dos prompt but failed, any help ?

Reply With Quote
  #4  
Old August 28th, 2003, 01:55 PM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,529 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 17 h 19 m 5 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
Py2exe makes a dll along with the windows executable. I'm not sure if there is an option to do without of the top of my head but normally for the exe to work you need to have the dll in the same dir.

Try double clicking the exe.. I dont see how but maybe the exe doesn't like to be run from DOS :S

Mark.

Reply With Quote
  #5  
Old August 29th, 2003, 07:15 AM
black black is offline
flashing vampire
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: nowhere
Posts: 19 black User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally posted by netytan
Py2exe makes a dll along with the windows executable. I'm not sure if there is an option to do without of the top of my head but normally for the exe to work you need to have the dll in the same dir.

Try double clicking the exe.. I dont see how but maybe the exe doesn't like to be run from DOS :S

Mark.


ok now the matter is i cant see any exe appears when i run that code, it must be somewhat mistake but i cant picked it out, now any suggestions ?

Reply With Quote
  #6  
Old August 29th, 2003, 08:23 AM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,529 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 17 h 19 m 5 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
Well if the exe is not being created it cant really be run . Mmmm.. if you follow these steps you should get an exe.

First make a setup file (setup.py) then open your DOS promt and cd (change dir) to Python's directory. Next type..

Code:
python full\path\to\setup.py py2exe


The file should be names the same as your program (in your setup file). I'd then do a search for this file because I'm not exactly sure where the file is created but I remember that the last file I did with Py2exe went in my 'C:/Documents and Settings/Username' directory under windows XP. You could look under 'C:/' on other versions of windows. If not do a search, best bet.

Hope this is some help

Mark.

Reply With Quote
  #7  
Old August 29th, 2003, 08:34 AM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,529 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 17 h 19 m 5 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
I was just looking at the docs for Py2exe on there home page. You can actually tell it where to create the files by using the -d flag like so.. (follow the first steps as in my other post but type this instead)

Code:
python full\path\to\setup.py py2exe -d full\path\to\where\you\want\to\built\the\files


http://starship.python.net/crew/theller/py2exe/

Mark.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > py2ede on windows~


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway