Attention: PROnetworks has upgraded our forum from phpbb2 to phpbb3!!

Please head over to our new converted forum at: http://www.pronetworks.org/forums/

This old forum will remain 'read-only' until approximately February 2009. We look forward to seeing you at the new forum!
Author Message
scroll1
PostPosted: Sun Apr 11, 2004 5:03 am Reply with quote

PRO Level 2
 
 


Joined: 05 Apr 2004
Posts: 14
Location: Australia
Thanks to Weavers advice I start my programming adventure within Python...It looks like the best starting point for me.

Now, I woulld like to edit in emacs and I have python installed on this XP box, however I can't seem to get my head around configuring emacs. I have a basic understanding of its use and I have the python-mode.el installed and I am able to run emacs in python-mode. However when I try C-c C-c on any simply script to get an output, it opens the output frame but gives me a blank screen. Have I missed a config file pointing emacs to where the python progs reside on my harddrive? I have gone through the faq at python.org...
any ideas appreciated
thanks
 
Back to top
Weaver
PostPosted: Sun Apr 11, 2004 1:25 pm Reply with quote

PROfessional Member
 
 


Joined: 18 Jun 2002
Posts: 2587
Location: /home/weaver/
Scroll, scroll, scroll, why did you have to go and say that word... Emacs...

j/k

I am sorry I wish I could help you out, but I am a vim zealot. I have never bothered messing around with emacs, trusty vi or vim has always been available.

However, I can take a guess at your situation. I am guessing this .el file that you have installed is some sort of language pack for python, maybe it supports syntax highlighting, certain macros, etc. I am guessing that the key combination you are pressing is supposed to "run" the current file you are editing?

When you do this, you are getting a blank screen? Correct?

Have you tried saving the script and then "running" it from the command line? Does that give you zero output (I am assuming your script actually prints something to the screen) ?

You are probably right in the fact that the config is pointing to the wrong place for the Python interpreter. Try opening up the .el file (if it isn't a binary file) and see if you can locate a place where it mentions the python interpreter.

The other way that might be easier, assuming the name of the python interpreter binary is the same in Windows, is just to add the python binary to your $PATH. That may work.

-Weaver

Emacs, emacs, emacs... grrr...
 
Back to top
scroll1
PostPosted: Sun Apr 11, 2004 5:47 pm Reply with quote

PRO Level 2
 
 


Joined: 05 Apr 2004
Posts: 14
Location: Australia
How students can be so easily led astray....
emacs (sorry about the rude word) was my logical choice because I could use it across all my platforms (including the ipaq!)
Your assumptions on all the queries were correct, the .el file is just a script but I can't find mention of pyhton paths...I have added the path to my environments settings, but still no result.
maybe I just use IDLE or work from the command prompt. It doesn't really matter, it was an extra luxury that I thought should work.
thanks anyway,

ps... just did a quick google and found many vim editors for many different platforms... oops I'll try it out on the PC...

pss...I have that python book you suggested arriving soon, it seemed the best forbeginner programmers, I'll let you know how I find it.
 
Back to top
Weaver
PostPosted: Sun Apr 11, 2004 6:37 pm Reply with quote

PROfessional Member
 
 


Joined: 18 Jun 2002
Posts: 2587
Location: /home/weaver/
Excellent on the book choice, I hope it turns out to be useful. Let me know, thanks.

I don't want to turn you into a vim zealot, but vi is available on really all Unix like platforms. That includes all flavors of Unix, Linux, and BSD (and Mac OS).

Vi is the 'VIsual editor' that was popular with original AT&T Unix guys. Later on (much later on) a guy named Bram decided to extend vi and named it vim, for "Vi IMproved." Great piece of softare. A great programmers editor, I would highly recommend learning it since it is everywhere except Windows (and ports are available).

I will warn you ahead of time it is unlike any editor you have ever used, you are going to need to read tutorials to figure out how to use it effectively. Vi [and Vim] are editors geared toward power users and they are not for the faint of heart. But... once you learn vim well you will never want to use anything else for coding.

If you try it and run into problems just ask questions.

-Weaver
 
Back to top
scroll1
PostPosted: Sun Apr 11, 2004 8:57 pm Reply with quote

PRO Level 2
 
 


Joined: 05 Apr 2004
Posts: 14
Location: Australia
I have downloaded gvim62 onto the XP box and it loads up well, it seems to work well under XP.
I have used vi on the old Debian laptop as a simple config file editor so I know my way around the interface.
I was impressed with the emacs ability to load a command prompt into a buffer window and then to also send my simple .py files to the interpreter (which I couldn't get working), are these features available on vim?
I'll spend some time with the vim docs now at:

http://www.vim.org/

cheers and thanks again

Scroll
 
Back to top
Back to top
Index >> Webmaster Domain & Code Room >> emacs and python

Page 1 of 1

 


Tired of the Ads? Registered users have 80% less adverts.