473,413 Members | 1,811 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,413 software developers and data experts.

emacs python-mode bug #1021885

Hi!

I am having some problem with python-emacs mode. I found a bug related
to it at sf.net:

bug #1021885 shell gets set to 'cpython':

http://sourceforge.net/tracker/?grou...il&aid=1021885

The problem is that when I try to run the script using C-c C-c, I get
the following message:

"Wrong type argument: sequencep, cpython"

My question is if there is anyone that found a workaround to this problem?

Thanks!

Marcio
Jul 18 '05 #1
3 1389
Marcio Rosa da Silva wrote:
Hi!

I am having some problem with python-emacs mode. I found a bug related
to it at sf.net:

bug #1021885 shell gets set to 'cpython':

http://sourceforge.net/tracker/?grou...il&aid=1021885
The problem is that when I try to run the script using C-c C-c, I get
the following message:

"Wrong type argument: sequencep, cpython"


If you first start the interpreter with C-c !, the execute-buffer
function will work.
Jul 18 '05 #2
Marcio Rosa da Silva wrote:
Hi!

I am having some problem with python-emacs mode. I found a bug related
to it at sf.net:

bug #1021885 shell gets set to 'cpython':

http://sourceforge.net/tracker/?grou...il&aid=1021885
The problem is that when I try to run the script using C-c C-c, I get
the following message:

"Wrong type argument: sequencep, cpython"

My question is if there is anyone that found a workaround to this problem?

Thanks!

Marcio


Hi Marcio,
the bug is in 'py-execute-region'
the patch below should fix it.

***************
*** 1679,1686 ****
(insert-buffer-substring cur start end)
;; Set the shell either to the #! line command, or to the
;; py-which-shell buffer local variable.
! (setq shell (or (py-choose-shell-by-shebang)
! (py-choose-shell-by-import)
py-which-shell))))
(cond
;; always run the code in its own asynchronous subprocess
--- 1679,1686 ----
(insert-buffer-substring cur start end)
;; Set the shell either to the #! line command, or to the
;; py-which-shell buffer local variable.
! (setq shell (or (car (rassoc (quote (py-choose-shell-by-shebang))
py-shell-alist))
! (car (rassoc (quote (py-choose-shell-by-import)) py-shell-alist))
py-which-shell))))
(cond
;; always run the code in its own asynchronous subprocess

Jul 18 '05 #3
kaba schrieb:
Marcio Rosa da Silva wrote:
Hi!

I am having some problem with python-emacs mode. I found a bug related
to it at sf.net:

bug #1021885 shell gets set to 'cpython':

http://sourceforge.net/tracker/?grou...il&aid=1021885
The problem is that when I try to run the script using C-c C-c, I get
the following message:

"Wrong type argument: sequencep, cpython"

My question is if there is anyone that found a workaround to this
problem?

Thanks!

Marcio

Hi Marcio,
the bug is in 'py-execute-region'
the patch below should fix it.

***************
*** 1679,1686 ****
(insert-buffer-substring cur start end)
;; Set the shell either to the #! line command, or to the
;; py-which-shell buffer local variable.
! (setq shell (or (py-choose-shell-by-shebang)
! (py-choose-shell-by-import)
py-which-shell))))
(cond
;; always run the code in its own asynchronous subprocess
--- 1679,1686 ----
(insert-buffer-substring cur start end)
;; Set the shell either to the #! line command, or to the
;; py-which-shell buffer local variable.
! (setq shell (or (car (rassoc (quote (py-choose-shell-by-shebang))
py-shell-alist))
! (car (rassoc (quote (py-choose-shell-by-import))
py-shell-alist))
py-which-shell))))
(cond
;; always run the code in its own asynchronous subprocess

Thank you very much!

greetings

Torsten
Jul 18 '05 #4

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

Similar topics

1
by: Wezzy | last post by:
Hi all, i've just seen the pydebug plugin for jEdit and my question is : is there something similar for emacs ? i'm looking for a debugger frontend, a very simple program, just set breakpoint,...
49
IDE
by: Thomas Lindgaard | last post by:
Hello I am probably going to start a war now... but so be it :) I just want to hear what all you guys who eat pythons for breakfast use for python coding. Currently I use Kate, but I would...
5
by: Darren Dale | last post by:
I am using Emacs Python mode, and my project involves reading large datafiles and processing large arrays. I have some code that reports the progress during these time consuming processes. It works...
81
by: julio | last post by:
Sorry but there is no another way, c# .net and mono are going to rip python, not because python is a bad lenguage, but because is to darn old and it refuses to innovate things, to fix wrong things,...
0
by: Skip Montanaro | last post by:
I got a little carried away with the gdbinit file that lives in the Python distribution at Misc/gdbinit today. I decided there's no particular reason that gdb shouldn't display the current Python...
5
by: levander | last post by:
I've been using pdb under emacs on an Ubuntu box to debug python programs. I just upgraded from Ubuntu Edgy to Feisty and this combo has stopped working. Python is at 2.5.1 now, and emacs is at...
331
by: Xah Lee | last post by:
http://xahlee.org/emacs/modernization.html ] The Modernization of Emacs ---------------------------------------- THE PROBLEM Emacs is a great editor. It is perhaps the most powerful and...
4
by: Richard Szopa | last post by:
Hi All, I am a devoted Emacs user and I write a lot in Python. However, I never managed to get my Emacs configuration right for this purpose. There were some discussions on this, but the threads...
14
by: jmDesktop | last post by:
Hi, I'm trying to learn Python. I using Aquamac an emac implementation with mac os x. I have a program. If I go to the command prompt and type pythong myprog.py, it works. Can the program be...
0
by: xahlee | last post by:
Here's a little tutorial that lets you write emacs commands for processing the current text selection in emacs in your favorite lang. Elisp Wrapper For Perl Scripts...
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
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,...
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
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...
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...
0
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...

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.