Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

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:
  #1  
Old February 25th, 2004, 04:10 PM
reaper69 reaper69 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 30 reaper69 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 10
My python editor comes with a compiler but I don't know how to use the compiler??!!??

I am using Python 2.2.3 that I got from a friend. Now the tutorial says some thing about having to have a command in the command line that will compile it well i have tryed anything I can but it still won't work. I want to compile this neat program I made and it just won't compile.

Reply With Quote
  #2  
Old February 25th, 2004, 04:36 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,537 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 18 h 17 m 47 sec
Reputation Power: 68
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
Being an interpreted language Python programs don't need to be compiled to run. So If you want to run a the Python program then fire up you're command line and...

Code:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Mark>cd c:\python

C:\Python>python path\to\python\program.py
...
...


Note: this example was taken from Microsoft Windows XP but the consept is the same on *nix . On Windows you can also run Python programs by double clicking on the file you want to run.

You might also be interested in upgrading you're Python version to the latest version (2.3.3). You can find this and much more at:

http://www.python.org/

Hope this has helped clear things up for you,

Mark.
__________________
programming language development: www.netytan.com Hula


Reply With Quote
  #3  
Old February 25th, 2004, 07:13 PM
reaper69 reaper69 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 30 reaper69 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 10
Well I know how to run the program it is just i am not entirely sure on how to compile it with Python interperter 2.2.3.

Reply With Quote
  #4  
Old February 26th, 2004, 01:56 AM
percivall percivall is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 133 percivall User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 10
You don't compile it.

Reply With Quote
  #5  
Old February 26th, 2004, 03:03 AM
Grim Archon's Avatar
Grim Archon Grim Archon is offline
Mini me.
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2003
Location: Cambridge, UK
Posts: 783 Grim Archon User rank is Corporal (100 - 500 Reputation Level)Grim Archon User rank is Corporal (100 - 500 Reputation Level)Grim Archon User rank is Corporal (100 - 500 Reputation Level)Grim Archon User rank is Corporal (100 - 500 Reputation Level)  Folding Points: 1488 Folding Title: Novice Folder
Time spent in forums: 3 Days 2 h 15 m 57 sec
Reputation Power: 12
Send a message via MSN to Grim Archon
When you run the "program.py" file Python automatically
compiles the text to bytecode and store it in memory. It is the bytecode that is actually run by Python. If your program imports another file then this file is also converted to bytecode but the bytecode is stored in .pyc files.

Bytecode is like a halfway house between plain text and real machine code.

To make a stand alone program .exe file you need other tools like py2exe and installer. But these are only needed if you plan to send your program to friends who do not have Python installed Even these .exe programs still run the bytecode! It is just that they bundle Python and the bytecode into one big file.
Cheers,
Grim
__________________
*** Experimental Python Markup CGI V2 ***

Last edited by Grim Archon : February 26th, 2004 at 05:52 AM. Reason: removed stupid error!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > My python editor comes with a compiler but I don't know how to use the compiler??!!??

Developer Shed Advertisers and Affiliates



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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap