Home Download Buy Blog Forum Support

Run with python

Run with python

Postby Nyckoo on Wed Aug 24, 2011 3:11 pm

Hello I just come to begin to learn python I thus downloaded sublim text but impossible to execute a program when I make "F7" that just writes " finished in 0.158 second " even when I want to execute a program so simple as " print (" hello ")"
help me please...
Nyckoo
 
Posts: 7
Joined: Wed Aug 24, 2011 3:00 pm

Re: Run with python

Postby Rezzie on Wed Aug 24, 2011 4:52 pm

Can you show us the source of the python file you're trying to execute?
Rezzie
 
Posts: 7
Joined: Thu Aug 18, 2011 7:42 am

Re: Run with python

Postby Nyckoo on Wed Aug 24, 2011 5:42 pm

i have just trying to execute a "print ("hello")" in sublime text
in tool i have "save all on build " and in build systeme "python" and my file is save in ".py"
Nyckoo
 
Posts: 7
Joined: Wed Aug 24, 2011 3:00 pm

Re: Run with python

Postby ehamiter on Wed Aug 24, 2011 8:49 pm

If your file is "test.py" and you have
Code: Select all
print ('hello')

in it, just select Tools > Build and you should see "hello" pop up in the console.
ehamiter
 
Posts: 67
Joined: Wed Apr 27, 2011 2:42 am

Re: Run with python

Postby Nyckoo on Thu Aug 25, 2011 9:21 am

I have selected save all on build
my programme is test.py
and in build system i have selected python
but when i select build (F7) it's just write "finished in 0.014 seconds"
Nyckoo
 
Posts: 7
Joined: Wed Aug 24, 2011 3:00 pm

Re: Run with python

Postby Nyckoo on Sun Aug 28, 2011 2:34 pm

nobody knows the solution ?
Nyckoo
 
Posts: 7
Joined: Wed Aug 24, 2011 3:00 pm

Re: Run with python

Postby guillermooo on Sun Aug 28, 2011 2:55 pm

Does the script work from the command line?
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: Run with python

Postby Nyckoo on Sun Aug 28, 2011 6:06 pm

no ...when i write my script i can't run it ... it only write "finished in ..." in the outpout panel
Nyckoo
 
Posts: 7
Joined: Wed Aug 24, 2011 3:00 pm

Re: Run with python

Postby Nyckoo on Thu Sep 08, 2011 8:01 pm

nobody knows how can i run my programm ?
Nyckoo
 
Posts: 7
Joined: Wed Aug 24, 2011 3:00 pm

Re: Run with python

Postby bizoo on Thu Sep 08, 2011 8:07 pm

Code: Select all
print('hello')

is a Python 3 syntax (maybe work in Python 2.7, not sure...)
ST2 use a Python 2.6 interpreter so the code is:
Code: Select all
print 'hello'
bizoo
 
Posts: 889
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Next

Return to General Discussion

Who is online

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