New to python mode, help!

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

New to python mode, help!

Malibu
Hi there.  I was using emacs before without python-mode but I am new to
xemacs.  I'd like to use python-mode and I think I've installed it
properly but nothing noticeable seems to be happening when I open a
python script.

I put the python mode code in:
~/.xemacs.d/plugins/python-mode.el-6.0.3

I put the following in my .xemacs/init.el file:

(add-to-list 'load-path "~/.xemacs.d/plugins/python-mode.el-6.0.3")
(require 'python-mode)

(setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist))
(setq interpreter-mode-alist (cons '("python" . python-mode)
                         interpreter-mode-alist))
(autoload 'python-mode "python-mode" "Python editing mode." t)

(global-font-lock-mode t)
(setq font-lock-maximum-decoration t)

When I open a .py file I get no syntax highlighting, no menu item..
nothing.  Could someone please help?  Thanks.


_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: New to python mode, help!

Tom Roche

Gene Horodecki Fri, 21 Oct 2011 08:21:02 -0500
> I am new to xemacs.

I'm GNU, but perhaps can be of assistance.

> nothing noticeable seems to be happening when I open a python
> script[:] no syntax highlighting, no menu item.. nothing.

Do you at least get "Python" in the mode line?

Do you see anything python-related in buffer="*Messages*"?

FWIW, Tom Roche <[hidden email]>
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: New to python mode, help!

Malibu
On 10/21/2011 8:43 AM, Tom Roche wrote:

> Gene Horodecki Fri, 21 Oct 2011 08:21:02 -0500
>> I am new to xemacs.
> I'm GNU, but perhaps can be of assistance.
>
>> nothing noticeable seems to be happening when I open a python
>> script[:] no syntax highlighting, no menu item.. nothing.
> Do you at least get "Python" in the mode line?
>
> Do you see anything python-related in buffer="*Messages*"?re
>
> FWIW, Tom Roche<[hidden email]>
> _______________________________________________
> Python-mode mailing list
> [hidden email]
> http://mail.python.org/mailman/listinfo/python-mode
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1411 / Virus Database: 1522/3963 - Release Date: 10/20/11
IN the messages buffer, I did see a complaint about the
(global-font-lock-mode t) which I removed and then no errors except for
usual X11 font complaints.  According to python-mode.el the line is not
required for xemacs anyway.  Nothing python related.  Yes I do get
'Python' in the mode line.
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: New to python mode, help!

Andreas Röhler-2
Am 21.10.2011 17:21, schrieb Gene Horodecki:
> On 10/21/2011 8:43 AM, Tom Roche wrote:
>> Gene Horodecki Fri, 21 Oct 2011 08:21:02 -0500

[ ... ]
> IN the messages buffer, I did see a complaint about the
> (global-font-lock-mode t) which I removed and then no errors except for
> usual X11 font complaints. According to python-mode.el the line is not
> required for xemacs anyway. Nothing python related. Yes I do get
> 'Python' in the mode line.

Hi,

as current release has some compatibility issues with XEmacs, we
maintain a separate branch for it - no release so far.

Get it with your browser from

http://bazaar.launchpad.net/~a-roehler/python-mode/XEmacs-compat-test/files

better still with bazaar installed:

bzr branch lp:~a-roehler/python-mode/XEmacs-compat-test


Interested to learn how it works,

thanks,

Andreas
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: New to python mode, help!

Malibu
On 10/21/2011 11:40 AM, Andreas Röhler wrote:

> Am 21.10.2011 17:21, schrieb Gene Horodecki:
>> On 10/21/2011 8:43 AM, Tom Roche wrote:
>>> Gene Horodecki Fri, 21 Oct 2011 08:21:02 -0500
>
> [ ... ]
>> IN the messages buffer, I did see a complaint about the
>> (global-font-lock-mode t) which I removed and then no errors except for
>> usual X11 font complaints. According to python-mode.el the line is not
>> required for xemacs anyway. Nothing python related. Yes I do get
>> 'Python' in the mode line.
>
> Hi,
>
> as current release has some compatibility issues with XEmacs, we
> maintain a separate branch for it - no release so far.
>
> Get it with your browser from
>
> http://bazaar.launchpad.net/~a-roehler/python-mode/XEmacs-compat-test/files 
>
>
> better still with bazaar installed:
>
> bzr branch lp:~a-roehler/python-mode/XEmacs-compat-test
>
>
> Interested to learn how it works,
>
> thanks,
>
> Andreas
> _______________________________________________
> Python-mode mailing list
> [hidden email]
> http://mail.python.org/mailman/listinfo/python-mode
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1411 / Virus Database: 1522/3965 - Release Date: 10/21/11
Ok first of all that did not seem to make a difference.  A bit of a
funny story though.  I was using GNU emacs in terminal mode and I did
not realize it had a GUI.  I typed emacs instead of xemacs just now with
my X11 tunnel open and x-server running and I like it a lot better then
xemacs!  So needless to say I will sojourn on with GNU emacs.

Question: I'm not really clear on exactly what python-mode includes.  
Does it include all the ropemacs type stuff or do I need to load that as
well?

Thanks.
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: New to python mode, help!

Malibu

At the risk of being a pest, I thought I would explain how far I have
gotten and what doesn't work for me.  Basically the code-completion
doesn't seem to be working.  For example:

import time
mytime = time.cl<TAB>

and I get nothing.

Also, I have read I should be able to do something like,
myfile = open( ,

and get a signature for the open function?  Not working either.

  I switched to GNU emacs, and I am using the .el for GNU emacs.  I
copied the .el files into ~/.emacs.d/site-lisp.  Here is the contents of
the directory:

#~/.emacs.d/site-lisp$ ls
highlight-indentation.el  ido.el  pycomplete.el  python-mode.el

Here is the contents of my .emacs file:

:~$ cat .emacs
(add-to-list 'load-path "~/.emacs.d/site-lisp")
;; python-mode settings
(setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist))
(setq interpreter-mode-alist(cons '("python" . python-mode)
                              interpreter-mode-alist))
;; path to the python interpreter, e.g.: ~rw/python27/bin/python2.7
(setq py-python-command "/usr/bin/python2.6")
(autoload 'python-mode "python-mode" "Python editing mode." t)

;; pymacs settings
(setq pymacs-python-command py-python-command)
(autoload 'pymacs-load "pymacs" nil t)
(autoload 'pymacs-eval "pymacs" nil t)
(autoload 'pymacs-apply "pymacs")
(autoload 'pymacs-call "pymacs")

(require 'pycomplete)

(require 'ido)
(ido-mode t)

Can anyone help me?  Thanks.
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: New to python mode, help!

Andreas Röhler-2
In reply to this post by Malibu
[ ... ]
> Question: I'm not really clear on exactly what python-mode includes.

Writing an info is a task to be done still - an entry in the bug tracker
exists already.

> Does it include all the ropemacs type stuff or do I need to load that as
> well?
>

Yes. BTW, think rope-integration should be delivered in future.

> Thanks.
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: New to python mode, help!

Andreas Röhler-2
In reply to this post by Malibu
Am 22.10.2011 04:03, schrieb Gene Horodecki:

>
> At the risk of being a pest, I thought I would explain how far I have
> gotten and what doesn't work for me. Basically the code-completion
> doesn't seem to be working. For example:
>
> import time
> mytime = time.cl<TAB>
>
> and I get nothing.
>
> Also, I have read I should be able to do something like,
> myfile = open( ,
>
> and get a signature for the open function? Not working either.
>
> I switched to GNU emacs, and I am using the .el for GNU emacs. I copied
> the .el files into ~/.emacs.d/site-lisp. Here is the contents of the
> directory:
>
> #~/.emacs.d/site-lisp$ ls
> highlight-indentation.el ido.el pycomplete.el python-mode.el
>
> Here is the contents of my .emacs file:
>
> :~$ cat .emacs
> (add-to-list 'load-path "~/.emacs.d/site-lisp")
> ;; python-mode settings
> (setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist))
> (setq interpreter-mode-alist(cons '("python" . python-mode)
> interpreter-mode-alist))
> ;; path to the python interpreter, e.g.: ~rw/python27/bin/python2.7
> (setq py-python-command "/usr/bin/python2.6")
> (autoload 'python-mode "python-mode" "Python editing mode." t)
>
> ;; pymacs settings
> (setq pymacs-python-command py-python-command)
> (autoload 'pymacs-load "pymacs" nil t)
> (autoload 'pymacs-eval "pymacs" nil t)
> (autoload 'pymacs-apply "pymacs")
> (autoload 'pymacs-call "pymacs")
>
> (require 'pycomplete)
>
> (require 'ido)
> (ido-mode t)
>
> Can anyone help me? Thanks.


See https://bugs.launchpad.net/python-mode/+bug/858621

Workaround: make a tags table, open it and use M-x dabbrev-expand
resp. its key

if you dont have a tags table ready yet, just opening some files with
related code delivers a reasonable completion.


Cheers




_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode