LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-15-2013, 09:43 AM   #1
blastradius
Member
 
Registered: Oct 2004
Location: Cheshire, England
Distribution: Debian Stable
Posts: 269

Rep: Reputation: 39
How to set Emacs default for Python output


Hi

I'm relatively new to programming and I've decided to give it my best shot with Python. I am used to Emacs for general editing and would like to stick with it for Python but I have a (hopefully) small problem. If I enter a very simple bit of code such as:-

Code:
time = (raw_input ("Enter your time - "))
print time
in Emacs and hit ctrl-c ctrl-c, I get an error like this:-

Enter your time - Traceback (most recent call last):
File "<stdin>", line 1, in <module>
EOFError: EOF when reading a line

But if I run the code in Geany for example there's no error. I can open an ansi-term in another buffer and use that to run the code but I wondered if anyone had any pointers on the best way to work with Emacs for Python development and whether I could set Emacs to run Python code correctly when I hit the keybinding?

I'm running Debian Squeeze btw.

I hope I'm making sense
 
Old 03-15-2013, 03:44 PM   #2
lykwydchykyn
Member
 
Registered: Mar 2006
Location: Tennessee, USA
Distribution: Debian, Ubuntu
Posts: 135

Rep: Reputation: 36
Have you installed the "python-mode" package?

The emacs wiki has a pretty informative page about using Emacs as a python IDE; I've used a lot of that advice in my own setup. http://emacswiki.org/emacs/PythonProgrammingInEmacs
 
  


Reply

Tags
emacs, python


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Python IDE with emacs ArthurHuang Programming 1 02-29-2012 02:43 PM
emacs in terminal-mode constrains output to 80 columns (emacs bug, or watch bug?) jgombos Linux - Software 1 06-17-2011 09:49 PM
[SOLVED] where is default python set? splintercdo Slackware 4 02-14-2011 01:27 PM
Emacs: Tips for running python code within emacs gripip Linux - Newbie 0 10-02-2010 01:54 AM
emacs + auctex - opening output PDF inside emacs buffer coenvh Linux - Newbie 1 04-29-2010 05:52 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration