* how to load file into interpreter(python)?
@ 2008-09-15 18:58 cnb
2008-09-15 21:06 ` Oleksandr Gavenko
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: cnb @ 2008-09-15 18:58 UTC (permalink / raw)
To: help-gnu-emacs
Python-mode worked right out out of the box in Emacs and then I added
Python to my path so now the interpreter works as well.
However when I try to load a file(that is not located in site-
packages) it doesn't work.
>>> Traceback (most recent call last):
ImportError: No module named parsing
It is fairly impractical to work with if that doesn't work and cut and
pasting doesn't work(not that it is a good alternative in the first
place) because of Python being intendation-sensitive.
Can I add something to my .emacs-file to solve this?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to load file into interpreter(python)?
2008-09-15 18:58 how to load file into interpreter(python)? cnb
@ 2008-09-15 21:06 ` Oleksandr Gavenko
2008-09-15 22:01 ` Thierry Volpiatto
[not found] ` <mailman.19307.1221515526.18990.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 6+ messages in thread
From: Oleksandr Gavenko @ 2008-09-15 21:06 UTC (permalink / raw)
To: help-gnu-emacs
On C-c C-l I get same error as you if load file from other dir
then firstly loaded.
Value of
import sys
print sys.path
get me some like
['', ..., 'e:\\bin\\python'].
Interpreter search import in this dirs.
How change it with working emacs I don't know.
Try eval file by C-c C-c (work from any dirs, but you must
sequentially load file to satisfy depends), there are many wrong.
Emacs and Python still badly friend (bed integration).
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to load file into interpreter(python)?
2008-09-15 18:58 how to load file into interpreter(python)? cnb
2008-09-15 21:06 ` Oleksandr Gavenko
@ 2008-09-15 22:01 ` Thierry Volpiatto
[not found] ` <mailman.19307.1221515526.18990.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 6+ messages in thread
From: Thierry Volpiatto @ 2008-09-15 22:01 UTC (permalink / raw)
To: cnb; +Cc: help-gnu-emacs
cnb <circularfunc@yahoo.se> writes:
> Python-mode worked right out out of the box in Emacs and then I added
> Python to my path so now the interpreter works as well.
What do you use ?
python-mode.el or python.el .
> However when I try to load a file(that is not located in site-
> packages) it doesn't work.
>>>> Traceback (most recent call last):
>
> ImportError: No module named parsing
All the modules you load have to be:
in your PYTHONPATH
or
in current directory
> It is fairly impractical to work with if that doesn't work and cut and
> pasting doesn't work(not that it is a good alternative in the first
> place) because of Python being intendation-sensitive.
>
> Can I add something to my .emacs-file to solve this?
>
What is your actual config of python ?
--
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to load file into interpreter(python)?
[not found] ` <mailman.19307.1221515526.18990.help-gnu-emacs@gnu.org>
@ 2008-09-16 10:07 ` cnb
2008-09-16 10:08 ` cnb
2008-09-16 10:26 ` cnb
2 siblings, 0 replies; 6+ messages in thread
From: cnb @ 2008-09-16 10:07 UTC (permalink / raw)
To: help-gnu-emacs
C:/Python25/;C:/Python25/Progs;
thos eare in my windows load path.
(setq load-path (cons "C:/Python25/" load-path))
(setq load-path (cons "C:/Python25/Progs/NetFlixRecSys/parsing.py"
load-path))
if I add soemthing like C:/somedir then everything in somedir is in my
loadpath? because i have C:/Python25/Progs/Netflix/parsing.py and it
doesn't load.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to load file into interpreter(python)?
[not found] ` <mailman.19307.1221515526.18990.help-gnu-emacs@gnu.org>
2008-09-16 10:07 ` cnb
@ 2008-09-16 10:08 ` cnb
2008-09-16 10:26 ` cnb
2 siblings, 0 replies; 6+ messages in thread
From: cnb @ 2008-09-16 10:08 UTC (permalink / raw)
To: help-gnu-emacs
im using the default python mode in latest emacs.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to load file into interpreter(python)?
[not found] ` <mailman.19307.1221515526.18990.help-gnu-emacs@gnu.org>
2008-09-16 10:07 ` cnb
2008-09-16 10:08 ` cnb
@ 2008-09-16 10:26 ` cnb
2 siblings, 0 replies; 6+ messages in thread
From: cnb @ 2008-09-16 10:26 UTC (permalink / raw)
To: help-gnu-emacs
even when using import/reload file from the emacs-python-menu and
choosing the file in the windows-GUI, thus giving the whole path I
still get the same error.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-09-16 10:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-15 18:58 how to load file into interpreter(python)? cnb
2008-09-15 21:06 ` Oleksandr Gavenko
2008-09-15 22:01 ` Thierry Volpiatto
[not found] ` <mailman.19307.1221515526.18990.help-gnu-emacs@gnu.org>
2008-09-16 10:07 ` cnb
2008-09-16 10:08 ` cnb
2008-09-16 10:26 ` cnb
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.