Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 29th, 2006, 6:05 PM   #1
Gnome
Newbie
 
Join Date: Mar 2006
Posts: 5
Rep Power: 0 Gnome is on a distinguished road
I'm wondering..

(i'm a newb to python, and to programming), so don't flame me too much. I was just wondering.. When using python how do you make it from a .py into a .exe where you can look at it and stuff, i Dled all of the things that i've seen in prior threads here.. Py2exe, wxpython, and boa but i don't know how to get them to work. So, please help.

-Gnome
p.s Thanks in advance.
p.s.s Also, i'd like to know how you copy n paste the code, and some how get to see a program. I'm a total newb to programming, which i've stated. And this is my frist language. So don't flame me. Please.

Last edited by Gnome; Mar 29th, 2006 at 6:18 PM.
Gnome is offline   Reply With Quote
Old Mar 29th, 2006, 6:44 PM   #2
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Posts: 1,786
Rep Power: 5 Sane will become famous soon enough
Quote:
Originally Posted by Gnome
so don't flame me too much
Hahaha. Welcome man.

For py2exe...
- Make sure you downloaded the windows installation binary, .exe, and not a linux Tarball.
- Once you do that just save this code as setup.py in the c:/python24/ directory:
import py2exe
from distutils.core import setup

setup(name = "my_program.exe",
      console = ['my_program.py']
      )
- Then save a python script as my_program.py in the c:/python24/ directory.
- Run the command prompt (windows + r, cmd)
- switch to c:/python 24 (cd/python24/)
- type in python setup.py py2exe

You'll then find the exe file along with it's requirements under c:/python24/dist/


If you want to post your code, just wrap it in [ code ] [ /code ] tags. Sorry if I misunderstood that question.

And once again, welcome to PFO and Python!
Sane is offline   Reply With Quote
Old Mar 30th, 2006, 7:00 AM   #3
MegaArcon
Programmer
 
MegaArcon's Avatar
 
Join Date: Aug 2005
Posts: 66
Rep Power: 0 MegaArcon is an unknown quantity at this point
Welcome indeed! ^_^ Ah, it brings a tear to one's eye to see someone's first steps into programming. *sniff* Such a beautiful thing. *sniff*

You've picked a good language to start with. (At least as far as I'm conserned.) If you want to invest in a book on programming in python, I recomend Learning Python by O'Reilly...or anything by O'Reilly for that matter.

However, there are LOTS of python resources online. So you've got no shortage of free resources. Happy programming!
__________________
Isn't that just the way life goes? If it's worth doing, it's NP-Hard. Todd Wareham - Memorial University of Newfoundland
MegaArcon is offline   Reply With Quote
Old Mar 30th, 2006, 10:29 AM   #4
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Smile

From what I can deduct you are asking the very basic question:
How can I type, or copy and paste a Python program and run it?

What you need is an Editor, preferrably an Editor that can run your code after you have it ready. Those type of Editors are called IDE, a common one for Python is the old ugly IDLE that comes with your Python installation. A much more refreshing product is DrPython written for use in Highschools.

A very basic Copy and Paste, press down your left mouse button and drag it across the code on a Windows display, so all the code you are interested in is highlighted. Now point the mouse cursor onto the highlighted part and right click. A little popup menu comes up that lists amongst other things the word copy. Click on copy. Now your selected text/code is in the clipboard memory. Next go to the editor area of your IDE and right click again to show the little menu. Select Paste and the code you copied before will be pasted to the editor where ever your mouse cursor was.

If you use Windoze, you could use NotePad as an editor, but you can't run code from there.

Some pretty primitive instructions how to use the IDLE IDE are at:
http://www.daniweb.com/techtalkforums/thread20774.html

or Google for IDLE
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Old Mar 30th, 2006, 2:06 PM   #5
Gnome
Newbie
 
Join Date: Mar 2006
Posts: 5
Rep Power: 0 Gnome is on a distinguished road
Haha, Thanks dietrich, Although i'm not that newb. heh, but thanks for all those suggestions guys! I think i'll go google drpython and download it ^_^ :banana:
Gnome is offline   Reply With Quote
Old Mar 31st, 2006, 10:26 AM   #6
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Talking

Sorry, one never knows the degree of newbeness! Maybe a real super newbe reads this thread and gets some use from it!

Python programming is a lot of fun!
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Old Mar 31st, 2006, 3:34 PM   #7
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Posts: 1,786
Rep Power: 5 Sane will become famous soon enough
Yes, I <3 your detailed explanations Dietrich. =P
Sane is offline   Reply With Quote
Old Apr 16th, 2006, 9:07 AM   #8
Que
Newbie
 
Que's Avatar
 
Join Date: Apr 2006
Location: where kennedy got popped.
Posts: 5
Rep Power: 0 Que is on a distinguished road
hello I'm that afore mentioned super newb mentioned above , but through right clicking in the idle window I'm not presented the paste option just "go to file/line"

however instead of using wordpad and opening it try pushing the ctrl+v once you've copied test to your clipboard this works!

thanks in advance after some reading I think I may be the biggest project some of you may work on lol
__________________
"ignorance is bliss", to be given any merit, had to be said by an ignorant person, so how much merit do we give it???
Que is offline   Reply With Quote
Old Apr 16th, 2006, 12:15 PM   #9
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Red face

Sorry, looks like IDLE is using a pretty oldfashioned editor based on the 1970s WordStar control codes (I was told this by my father). You have to click on Edit and select from that menu, rather than right click the mouse.
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:47 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC