473,383 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

How to load current buffer into interpreter in emacs?

cnb
I'm trying to switch to using emacs for python.

The interpreter and python-mode works but I can't load the file I'm
editing into the interpreter.

im not sure if c-c c-l is supposed to do that but it complains "no
module xxxx" .

what needs to be in my emacs-path?

what needs to be in my windows path?

I have c:/python25. adding that tot he path ads everything inside
python25? i have my programs in:
c:/python25/progs/
in which i have /progdir/someprog.py for example
Sep 16 '08 #1
4 3072
On 16 Sep, 14:01, cnb <circularf...@yahoo.sewrote:
I'm trying to switch to using emacs for python.

The interpreter and python-mode works but I can't load the file I'm
editing into the interpreter.
I'm using emacs to edit and run python programs on windows. In
my .emacs I have the following line:

(setq python-python-command "C:\\python25\\python.exe")

And it works.

Another alternative is to set the environment variable PYTHONPATH to
point to the location of the python interpreter, but then you also
need to edit the .../lisp/progmodes/python.el file to use semicolon
(instead of colon) as a path separator. (in emacs 22.1 it is in line
1354 of the file (search for PYTHONPATH).

(Or perhaps you needed to that anyway... I'm not sure).

Good luck
Niklas Norrthon
Sep 16 '08 #2
cnb
i can run the interpreter. its just i cant load a file into it.

i tried adding your suggestion but it didnt help. i dont think thats
the issue though.
Sep 16 '08 #3
On 16 Sep, 15:27, cnb <circularf...@yahoo.sewrote:
i can run the interpreter. its just i cant load a file into it.

i tried adding your suggestion but it didnt help. i dont think thats
the issue though.
Start the interperter (Menu Python - Start interpreter)
Emacs split the frame in two windows
Place the cursor in the python file (C-x o) if necessary
Eval Buffer (C-c C-c)

Niklas Norrthon
Sep 16 '08 #4
cnb
On Sep 16, 3:36*pm, Niklas Norrthon <niklas.norrt...@hotmail.com>
wrote:
On 16 Sep, 15:27, cnb <circularf...@yahoo.sewrote:
i can run the interpreter. its just i cant load a file into it.
i tried adding your suggestion but it didnt help. i dont think thats
the issue though.

Start the interperter (Menu Python - Start interpreter)
Emacs split the frame in two windows
Place the cursor in the python file (C-x o) if necessary
Eval Buffer (C-c C-c)

Niklas Norrthon

ok so C-c C-l is just for doing import, not loading current file?

When I do C-c C-c nothing happens at all.
Sep 16 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Alexandre Fayolle | last post by:
Hi there, I'm not an emacs power user at all, just getting started with pymacs to try to get BicycleRepairMan to run. I have pymacs 0.21 installed, and on init, I get an emacs error. The...
6
by: manders2k | last post by:
Hi all -- I'm contemplating the idea of writing a simple emacs-like editor in python (for fun and the experience of doing so). In reading through Craig Finseth's "The Craft of Text Editing": ...
0
by: Peter | last post by:
When I issue call sqlj.install_jar('file:///f:/jars/mail.jar','MAIL'); I get the messages SQL4301N Java or .NET interpreter startup or communication failed, reason
4
by: sashan | last post by:
Hi Is there a way to enable Emacs/Vim style buffer switching in the VC++ editor? For those that don't know this is where you hit a shortcut key in Emacs/Vim and then type the partial name of the...
0
by: thjwong | last post by:
I'm using WinXP with Microsoft Visual C++ .NET 69462-006-3405781-18776, Microsoft Development Environment 2003 Version 7.1.3088, Microsoft .NET Framework 1.1 Version 1.1.4322 SP1 Most developers...
331
by: Xah Lee | last post by:
http://xahlee.org/emacs/modernization.html ] The Modernization of Emacs ---------------------------------------- THE PROBLEM Emacs is a great editor. It is perhaps the most powerful and...
3
by: duyanning | last post by:
I have written a pyhton script that will process data file in current working directory. My script is in an different directory to data file. When I debug this script using pdb within emacs, emacs...
2
by: defn noob | last post by:
Can I run the python interpreter from with in Emacs? Do i have to change anything then? or is it by default? it already syntax-highlights python-files.
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.