473,396 Members | 2,013 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,396 software developers and data experts.

Broken python-model.el

Hi All,

I just compiled Python 2.3.2 on my local machine as an upgrade from 2.2.
This appears to have broken my python-mode.el in emacs. When I try to
"Execute Buffer" Ctl-c Ctl-c I get:

Wrong type argument: sequencep, cpython

Any Ideas?

Jul 18 '05 #1
7 1790
Brian Donovan <jo**@doe.com> writes:
I just compiled Python 2.3.2 on my local machine as an upgrade from 2.2.
This appears to have broken my python-mode.el in emacs. When I try to
"Execute Buffer" Ctl-c Ctl-c I get:

Wrong type argument: sequencep, cpython

Any Ideas?


Did you download the version from the python-mode sourceforge project?
If not, try that.
John
Jul 18 '05 #2
John, the sourceforge project doesn't have any released files - beware
unreleased files :-).

I downloaded and tried the python-mode.el file you can access through the
CVS repository (version 4.40) - no wonder there has been no releases!

Initial impressions is that I will re-download the 4.6 version available
from the python web-site. One of the annoying things that hits you right in
the face (and this is terribly unfair to the sourceforge team working on
it! - it hasn't been released after all :-)) is the "blind" fontification of
what are believed to be Python keywords by the authors.

This list includes words such as "Exception", "ord", "self" plus a host of
others. So variables that I have such as "swimrecord" has the "ord" portion
font coloured differently from the rest of the string, "ChildException" has
the "Exception" differently coloured than the "Child" portion, "self" is a
different colour from the rest of the variable usage i.e. self.Name has
"self" and "Name" colourised differently - extremely annoying and *not* what
I expect the authors want to achieve! Certainly not what I want in an edit
session! :-)

So Brian might be better off trying to patch his python-mode.el rather than
download the tip of what is at sourceforge :-)

However, I use python-mode.el (4.6) which is available from
http://www.python.org/emacs/python-mode/ - I have Python 2.3.2 installed and
have no problems with C-c C-c. So perhaps Brian should check his version of
python-mode.el against that one?

Peter

"John J. Lee" <jj*@pobox.com> wrote in message
news:87************@pobox.com...
Brian Donovan <jo**@doe.com> writes:
I just compiled Python 2.3.2 on my local machine as an upgrade from 2.2. This appears to have broken my python-mode.el in emacs. When I try to
"Execute Buffer" Ctl-c Ctl-c I get:

Wrong type argument: sequencep, cpython

Any Ideas?


Did you download the version from the python-mode sourceforge project?
If not, try that.
John

Jul 18 '05 #3

Brian> I just compiled Python 2.3.2 on my local machine as an upgrade
Brian> from 2.2. This appears to have broken my python-mode.el in
Brian> emacs. When I try to "Execute Buffer" Ctl-c Ctl-c I get:

Brian> Wrong type argument: sequencep, cpython

What version of python-mode and Emacs are you using? What is the value of
py-default-interpreter? I just tried C-c C-c in a Python buffer with
version 4.40 and XEmacs 21.5beta9 and it worked fine for me.

Skip

Jul 18 '05 #4
Skip Montanaro <sk**@pobox.com> writes:
Brian> I just compiled Python 2.3.2 on my local machine as an upgrade
Brian> from 2.2. This appears to have broken my python-mode.el in
Brian> emacs. When I try to "Execute Buffer" Ctl-c Ctl-c I get:

Brian> Wrong type argument: sequencep, cpython

What version of python-mode and Emacs are you using? What is the value of
py-default-interpreter? I just tried C-c C-c in a Python buffer with
version 4.40 and XEmacs 21.5beta9 and it worked fine for me.


I also get the above error when the file begins with

#!/usr/bin/env

on Windows. XEmacs 21.4 (patch 13), python-mode 4.29.

Removing this line fixes it.

Thomas
Jul 18 '05 #5
Thomas Heller <th*****@python.net> writes:
Skip Montanaro <sk**@pobox.com> writes:
Brian> I just compiled Python 2.3.2 on my local machine as an upgrade
Brian> from 2.2. This appears to have broken my python-mode.el in
Brian> emacs. When I try to "Execute Buffer" Ctl-c Ctl-c I get:

Brian> Wrong type argument: sequencep, cpython

What version of python-mode and Emacs are you using? What is the value of
py-default-interpreter? I just tried C-c C-c in a Python buffer with
version 4.40 and XEmacs 21.5beta9 and it worked fine for me.
I also get the above error when the file begins with

#!/usr/bin/env

Make this
#!/usr/bin/env python
of course.
on Windows. XEmacs 21.4 (patch 13), python-mode 4.29.

Removing this line fixes it.

Thomas

Jul 18 '05 #6

Peter> Initial impressions is that I will re-download the 4.6 version
Peter> available from the python web-site. One of the annoying things
Peter> that hits you right in the face (and this is terribly unfair to
Peter> the sourceforge team working on it! - it hasn't been released
Peter> after all :-)) is the "blind" fontification of what are believed
Peter> to be Python keywords by the authors.

Peter> This list includes words such as "Exception", "ord", "self" plus
Peter> a host of others. So variables that I have such as "swimrecord"
Peter> has the "ord" portion font coloured differently from the rest of
Peter> the string, "ChildException" has the "Exception" differently
Peter> coloured than the "Child" portion, "self" is a different colour
Peter> from the rest of the variable usage i.e. self.Name has "self" and
Peter> "Name" colourised differently - extremely annoying and *not* what
Peter> I expect the authors want to achieve! Certainly not what I want
Peter> in an edit session! :-)

That's a feature I added recently. It's intended to highlight variables
which might be shadowing builtins. Eventually, it should be a
user-configurable feature. I checked in a fix to the "trailing builtin"
problem a couple days ago. Have you tried that yet?

Skip

Jul 18 '05 #7

Brian> Wrong type argument: sequencep, cpython

Thomas> I also get the above error when the file begins with

Thomas> #!/usr/bin/env

Thomas> on Windows. XEmacs 21.4 (patch 13), python-mode 4.29.
Thomas> Removing this line fixes it.

Yeah, I can see where that would cause problems.
(py-choose-shell-by-shebang) really needs to see a valid #! line. I'll see
if I can figure out a way to worm around this sort of breakage.

Skip

Jul 18 '05 #8

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

Similar topics

4
by: Jochen Demuth | last post by:
Hi, I am trying to install ZWiki on Zope 2.5.1 / Debian 2.4.20-bf2.4-xfs. First I copied the contents of the ZWiki-0.32.0.tgz to the Products-directory under SOFTWARE_HOME: This is what it...
6
by: Walter Dörwald | last post by:
Hello all! I'm trying to parse broken HTML with several Python tools. Unfortunately none of them work 100% reliable. Problems are e.g. nested comments, bare "&" in URLs and "<" in text (e.g....
1
by: Ruben | last post by:
I am reading a large text file a chunk at a time using the readlines(buffer_size) statement. I get an IOERROR ERRNO 32 Broken Pipe command when I "pipe" the output to MYSQL database using the...
2
by: Nigel King | last post by:
I have a problem with the logging module. It reports a Broken Pipe error after outputing to the log file occasionally (5%). This does not appear to happen on Mac OSX using current finked python...
7
by: Erik Johnson | last post by:
I am trying to upgrade my Python installation. After downloading sources and building Python 2.3.4, I am unable to use the command history editing feature in the interactive interpreter (where the...
13
by: Steven Bethard | last post by:
Jean-Paul Calderone <exarkun@divmod.comwrote: Interesting. Could you give a few illustrations of this? (I didn't run into the same problem at all, so I'm curious.) Steve
15
by: Martin Maney | last post by:
To quote from zipfile.py (2.4 library): # Search the last END_BLOCK bytes of the file for the record signature. # The comment is appended to the ZIP file and has a 16 bit length. # So the...
24
by: Joe Salmeri | last post by:
I just upgraded from Python 2.4.2 to Python 2.5.1 and have found some unexpected behavior that appears to be a bug in the os.stat module. My OS is Windows XP SP2 + all updates. I have several...
2
by: Bruno Rezende | last post by:
Hi, I think I've broken my python installation (don't know how). All the packages that are under 'lib' in python installation doesn't work the way expected: Traceback (most recent call last):...
8
by: Steven D'Aprano | last post by:
According to the Python docs, once an iterator raises StopIteration, it should continue to raise StopIteration forever. Iterators that fail to behave in this fashion are deemed to be "broken": ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.