Home Download Buy Blog Forum Support

Run with python

Re: Run with python

Postby oats on Thu Sep 08, 2011 9:24 pm

I've often wondered this same thing, never got it to work.
My program: print 'hello'. Saved in test.py.
Hit F7, I see this result pop up:
[Error 2] The system cannot find the file specified
[Finished]

If I view the console, this is what I see:
Code: Select all
Writing file /C/project/test.py with encoding UTF-8
Running python -u C:\project\test.py
Running python -u C:\project\test.py

I couldn't help but notice the UNIX path when saving the file, and the WINDOWs path when trying to run it. Could that be the problem?
oats
 
Posts: 101
Joined: Mon Nov 09, 2009 4:39 pm

Re: Run with python

Postby Nyckoo on Tue Sep 13, 2011 6:09 pm

i try print 'hello' but when i run it's open output panel and write finish in 0.14 second nothing else ...
Nyckoo
 
Posts: 7
Joined: Wed Aug 24, 2011 3:00 pm

Re: Run with python

Postby SpellSword on Sat Sep 17, 2011 7:27 am

It's possible your program 'is':
- Running.
- Finishing.
- And then closing.
Almost instantly because you are only giving it the command: print('hello')
before the program ends.

Try writing this on the line after: print('hello')
Code: Select all
input("Press the enter key to exit.")
What this will do is cause the program to wait for user input then continue. And since there is nothing more, it will end.


The (finish in 0.14) output you are seeing reminds me of this however I'm new to Python myself so I could be wrong about this.
SpellSword
 
Posts: 1
Joined: Sat Sep 17, 2011 7:15 am

Re: Run with python

Postby bhatnagarashish on Sat Sep 17, 2011 11:32 am

Good thread.I like the views of the members. It contains nice information. Thanks for sharing this thread with me.
bhatnagarashish
 
Posts: 1
Joined: Sat Sep 17, 2011 11:28 am

Previous

Return to General Discussion

Who is online

Users browsing this forum: Yahoo [Bot] and 17 guests