473,791 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1807
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.co m> 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
2351
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 contained before: server1:/usr/lib/zope/lib/python/Products# ls ExternalMethod PageTemplates StandardCacheManagers ZSQLMethods Hotfix_2002-06-14 PluginIndexes TemporaryFolder ZopeTutorial
6
2005
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. "if foo < bar") etc. All of these pages can be displayed properly in a browser so why not reuse the parser in e.g. Mozilla? Is there any way to get proper XML out of Mozilla? Calling mozilla on the
1
8195
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 following command: python script.py | mysql I am using RED HAT 9 Linux. The problem only happens if I use the pipe to MYSQL. It breaks but it gets to process around 1000 MYSQL statements.
2
8625
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 (2.3.3) but does appear to occur on Python 2.3.4 running on a very old Redhat Linux xxxxx 2.2.14-5.0 #1 Tue Mar 7 21:07:39 EST 2000 i686. The actual logged error follows my signature. Note that "files used:-" has been sent to the file. From a...
7
2421
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 up-arrow would previously give you the last command line to edit, it now just prints "^[[A".) This is a feature I use often, and it kinda nullifies that warm fuzzy feeling you get when things are otherwise working as expected. Python 2.2.2 was...
13
2160
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
2048
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 comment may be up to 64K long. We limit the search for the # signature to a few Kbytes at the end of the file for efficiency. # also, the signature must not appear in the comment. END_BLOCK = min(filesize, 1024 * 4) So the author knows that there's...
24
6133
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 programs that have worked flawlessly on all previous Python versions for years and they are now producing incorrect results in the code that uses os.stat. Searching through the 2.5.1 release notes I found the following:
2
1620
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): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'dom'
8
1915
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": http://docs.python.org/lib/typeiter.html I don't understand the reasoning behind this. As I understand it, an iterator is something like a stream. There's no constraint that once a stream is empty it must remain empty forever.
0
9669
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9515
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10207
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10154
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7537
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5558
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4109
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3713
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.