A simple code is not running on Sublime Editor

A forum for general discussion of the Python programming language.

A simple code is not running on Sublime Editor

Postby shah » Mon Aug 19, 2013 10:04 pm

Hi, I am new in python. I did install sublime text editor and try to run the following code on it
Code: Select all
x = raw_input ("Enter your Name: ")
print "Hey " + x
raw_input ("press")


When i run this code on IDLE GUI it works perfect but within sublime it gives me the following error

Code: Select all
Enter your Name: Traceback (most recent call last):
  File "C:\Users\Administrator\Documents\pythonTest\printon_screen.py", line 1, in <module>
    x = raw_input ("Enter your Name: ")
EOFError: EOF when reading a line
[Finished in 0.3s with exit code 1]
[cmd: ['C:\\python27\\python.exe', '-u', 'C:\\Users\\Administrator\\Documents\\pythonTest\\printon_screen.py']]
[dir: C:\Users\Administrator\Documents\pythonTest]
[path: c:\windows\system32;C:\Program Files\Java\jdk1.7.0_21\bin;C:\Program Files\Java\jre7\bin;D:\app\oracle\product\11.2.0\dbhome_1\BIN;C:\Python27]


Please help thanks
Last edited by micseydel on Mon Aug 19, 2013 10:07 pm, edited 1 time in total.
Reason: Locked post, added code tags.
shah
 
Posts: 1
Joined: Mon Aug 19, 2013 10:00 pm

Re: A simple code is not running on Sublime Editor

Postby micseydel » Mon Aug 19, 2013 10:09 pm

In the future, put anything that involves code or indentation in code tags please. Also, I believe your answer lies here.
Join the #python-forum IRC channel on irc.freenode.net!
User avatar
micseydel
 
Posts: 1137
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: A simple code is not running on Sublime Editor

Postby metulburr » Tue Aug 20, 2013 4:13 am

sublime text 2 doesnt support input. You have to install a 3rd party library to sublime in order to allow this. Why its like this, i dont know. I abandoned sublime for this reason. Especially when you have numerous linux distros on a computer, and then that multiplied by each computer. Then using it for multiple languages. It makes it a pain to configure all those. So i never tried. I like IDE's i can install on a fresh distro, and start typing away instead of tinkering so much with an IDE that i will have to redo all over again on the next distro.

=I would also be interested in this subject. As every time i have tried before i get some problem, and then no one answer my questions for it. So then i just end up abandoning it, and going back to Vim or Geany.
New Users, Read This
OS Ubuntu 14.04, Arch Linux, Gentoo, Windows 7/8
https://github.com/metulburr
steam
User avatar
metulburr
 
Posts: 1331
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY


Return to General Discussions

Who is online

Users browsing this forum: No registered users and 0 guests