Home Download Buy Blog Forum Support

Newbie help to the playing with python

Newbie help to the playing with python

Postby Adagioklez on Fri Feb 25, 2011 2:56 pm

Hello again.

I have installed Sublime text 2 today, and I'm trying to play around with some small python scripts, however it seems that it can't read my python file.
When I'm trying to "build" the python script I get the feedback as you see in the attached files. Do you guys have any tips, or some place I should look?

btw. how do you in the console give input from several lines, each time it says something like unexpected EOF, if i tike somthing like "if x:"
Where I then would input something in the next line.

Thanks in advance.

Regards Stefan
Attachments
pythonConsole.png
pythonConsole.png (7.61 KiB) Viewed 1103 times
pythonscript.png
pythonscript.png (153.33 KiB) Viewed 1132 times
Adagioklez
 
Posts: 15
Joined: Fri Feb 25, 2011 1:03 pm

Re: Newbie help to the playing with python

Postby jps on Sat Feb 26, 2011 1:22 am

It looks like python.exe isn't in your path - does it run if you type 'python' in a command prompt?
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: Newbie help to the playing with python

Postby Adagioklez on Sat Feb 26, 2011 9:21 am

Hey.

Thanks for the reply, it was the solution. I'm looking forward to follow the development of version 2.
Adagioklez
 
Posts: 15
Joined: Fri Feb 25, 2011 1:03 pm

Re: Newbie help to the playing with python

Postby mansun on Tue Mar 08, 2011 7:33 pm

I am having the same issue with Sublime 2 (everything works fine with the 1.4 version). In my case, when I type 'python" in the command line everything works fine. When I run a python script using Sublime 2 (I am developing some plots using matplotlib), however, I do not get the output. When I check the task manager I see that python.exe is running on the background but, as I said before, I cannot see the resulting plot. I do not have this problem with 1.4. It might be just a stupid thing that I am missing but I cannot figure it out. Thanks!
mansun
 
Posts: 1
Joined: Tue Mar 08, 2011 7:28 pm

Re: Newbie help to the playing with python

Postby jps on Tue Mar 08, 2011 9:41 pm

It sounds like Python itself is being run fine. You can verify this by sprinkling in a few print statements.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: Newbie help to the playing with python

Postby tgkeul on Tue Mar 22, 2011 11:34 am

I have a similar problem.

Running this code prints to the output panel as expected.
Code: Select all
print ('Hello.world')


Running code which opens a Qt window works fine in 1.4 but not in ST2. Nothing opens, no process exists, as far as I see.
tgkeul
 
Posts: 140
Joined: Tue Dec 02, 2008 9:35 pm


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 23 guests