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 June 25th, 2012, 04:09 AM
cheekychives cheekychives is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2012
Location: United Kingdom
Posts: 3 cheekychives User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 3 m 6 sec
Reputation Power: 0
Running some code

Hi,

I'm an absolute beginner, I'm afraid. Scanned the forum for an answer and couldn't find one... so I guess I have to stick my neck out.

I've got hold of some code and wish to run it. I've managed to load and active the Python27 and i'm at the stage where the Command Prompt dialogue box is at >>>

I've done some playing with typing some basics and the pressing enter. But pressing enter after pasting in this code doesn't work.

I know it's basic... but I'm struggling to find anything online.

Any help would be much appreciate.


(p.s. I've ordered a book for beginners, it's just that will take a few days to arrive)

Reply With Quote
  #2  
Old June 25th, 2012, 09:48 AM
b49P23TIvg's Avatar
b49P23TIvg b49P23TIvg is offline
Contributing User
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Aug 2011
Posts: 3,393 b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 3 Days 15 h 37 m 10 sec
Reputation Power: 383
Here's the official python tutorial: http://docs.python.org/tutorial/index.html

Explicit instructions for what you should type next depend on the effect you want and what's in the file.

On the command line

$ python superduperprogram.py


might work.


Or, maybe importing the module is better.


$ python
Python Version blah blah blah
>>> import superduperprogram
>>> superduperprogram.go(x=46)
'You win!'
>>>
Comments on this post
cheekychives agrees: A quick response and very helpful!
__________________
[code]Code tags[/code] are essential for python code!

Reply With Quote
  #3  
Old June 26th, 2012, 01:19 AM
cheekychives cheekychives is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2012
Location: United Kingdom
Posts: 3 cheekychives User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 3 m 6 sec
Reputation Power: 0
That's much appreciated. Ill read through this today. Thanks.

Reply With Quote
  #4  
Old June 26th, 2012, 08:32 AM
b49P23TIvg's Avatar
b49P23TIvg b49P23TIvg is offline
Contributing User
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Aug 2011
Posts: 3,393 b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 3 Days 15 h 37 m 10 sec
Reputation Power: 383
Hmm, so many people so much sharper than I am. I was already a programmer and spent a full week working through the python tutorial while on vacation at my quasi-daughter-in-laws home in Texas.

Reply With Quote
  #5  
Old June 26th, 2012, 04:48 PM
WynnDeezl WynnDeezl is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2011
Posts: 139 WynnDeezl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 3 h 53 m 35 sec
Reputation Power: 2
Quote:
Originally Posted by b49P23TIvg
Hmm, so many people so much sharper than I am. I was already a programmer and spent a full week working through the python tutorial while on vacation at my quasi-daughter-in-laws home in Texas.






HAHAHA!!

Reply With Quote
  #6  
Old June 27th, 2012, 03:31 AM
cheekychives cheekychives is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2012
Location: United Kingdom
Posts: 3 cheekychives User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 3 m 6 sec
Reputation Power: 0
Quote:
Originally Posted by b49P23TIvg
Hmm, so many people so much sharper than I am. I was already a programmer and spent a full week working through the python tutorial while on vacation at my quasi-daughter-in-laws home in Texas.


Err... umm, I see what you mean. I may have been a tad optimistic by saying I'll read it in a day... lol

Reply With Quote
  #7  
Old June 27th, 2012, 09:33 AM
Dietrich's Avatar
Dietrich Dietrich is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 484 Dietrich User rank is Second Lieutenant (5000 - 10000 Reputation Level)Dietrich User rank is Second Lieutenant (5000 - 10000 Reputation Level)Dietrich User rank is Second Lieutenant (5000 - 10000 Reputation Level)Dietrich User rank is Second Lieutenant (5000 - 10000 Reputation Level)Dietrich User rank is Second Lieutenant (5000 - 10000 Reputation Level)Dietrich User rank is Second Lieutenant (5000 - 10000 Reputation Level)Dietrich User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Days 23 h 21 m 50 sec
Reputation Power: 63
You would be much better off to paste the code into the editor of an IDE (Integrated Development Environment) like IDLE and run (press F5 key) it from there.

You can find IDLE for instance in:
C:\Python27\Lib\idlelib\idle.py
Comments on this post
cheekychives agrees: Very helpful.
__________________
Real Programmers always confuse Christmas and Halloween because Oct31 == Dec25

Last edited by Dietrich : June 27th, 2012 at 09:35 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > Running some code

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