Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Reply
 
LinkBack Thread Tools Display Modes
Old 17-07-2010, 08:43 PM   #1 (permalink)
Violent serenity.
 
Psychosocial's Avatar
 
Join Date: Jun 2008
Location: Six feet under.
Posts: 3,822
Default Completely noob Python query.


So I thought of learning programming and thought that Python is the easiest and the simplest to begin with. I got around writing the Hello World script but the problem is when I save and run the file, nothing happens. The Python command shell should open showing 'Hello World' but nothing happens. The command line opens and closes in a flash. This was what happened to me when I tried to learn Python before a few months too! What's the damn problem ? I am on Win7 32Bit and using Python 3.1. Using Notepad++ to code but that's not the prob coz I even tried to do it with the Python GUI but it gave the same result.

Any helps ?
__________________
Registered pwner of theists, noobs, posers and emos.
Psychosocial is offline   Reply With Quote
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 17-07-2010, 10:08 PM   #2 (permalink)
Broken In
 
Join Date: Oct 2008
Posts: 133
Default Re: Completely noob Python query.

dont click the scripts
use the command prompt to execute them
__________________
http://img694.imageshack.us/img694/7417/tempmp.jpg
How am I supposed to meet my freetard friends and talk about Linsux now?
lucifer_is_back is offline   Reply With Quote
Old 17-07-2010, 11:37 PM   #3 (permalink)
Violent serenity.
 
Psychosocial's Avatar
 
Join Date: Jun 2008
Location: Six feet under.
Posts: 3,822
Default Re: Completely noob Python query.

How ? Sorry but am a really stupid beginneer.
__________________
Registered pwner of theists, noobs, posers and emos.
Psychosocial is offline   Reply With Quote
Old 18-07-2010, 12:21 AM   #4 (permalink)
Alpha Geek
 
Join Date: Jan 2007
Location: In your hearts
Posts: 828
Default Re: Completely noob Python query.

hey there are many ways of doing so,
1st is open Python's IDLE, then go to File--> Open (or something like that). Open ur Python script, then go to Run --> Run Module. This will run ur program.

2nd is copy your script to Pythons folder. Then run Python and enter "from script.py import *'' or ''import script.py'', where script.py is your script's name

3rd is u can go to command prompt. by typing 'cmd' in Run, then type '' python scriptpath.py'' here scriptpath.py is your scripts path and filename.

also in step 2nd and 3rd remember to add .py as extension.

actually flash just displays the output and closes in no time. i will recommend u to use IDLE to code python's programs, using any other editor may create some indentation problems.
abhijangda is offline   Reply With Quote
Old 18-07-2010, 09:23 AM   #5 (permalink)
Violent serenity.
 
Psychosocial's Avatar
 
Join Date: Jun 2008
Location: Six feet under.
Posts: 3,822
Default Re: Completely noob Python query.

Woah thanks man! Will try them!

---------- Post added at 09:23 AM ---------- Previous post was at 09:22 AM ----------

EDIT ...lol the first solution itself worked! Thanks a lot!
__________________
Registered pwner of theists, noobs, posers and emos.
Psychosocial is offline   Reply With Quote
Old 25-07-2010, 03:05 PM   #6 (permalink)
Alpha Geek
 
Join Date: Jan 2007
Location: In your hearts
Posts: 828
Default Re: Completely noob Python query.

ur welcome.
abhijangda is offline   Reply With Quote
Reply

Bookmarks

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
big problem in python abhijangda Programming 3 01-07-2010 09:23 AM
Python Basics #1 [ n00b Friendly] Rox Programming 0 03-06-2010 09:08 PM
Help in python abhijangda Programming 3 09-04-2010 12:06 PM
Wannabe Python Programmer - Please Help ! MetalheadGautham Programming 22 13-08-2008 11:27 AM
One Giant Command Line MetalheadGautham Open Source 23 24-05-2008 02:31 AM

 
Latest Threads
- by Charan
- by Charan
- by clmlbx

Advertisement




All times are GMT +5.5. The time now is 03:20 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2