From esj at harvee.org Thu Mar 1 10:54:00 2012 From: esj at harvee.org (Eric S. Johansson) Date: Thu, 01 Mar 2012 04:54:00 -0500 Subject: [Python-mode] win-32 Message-ID: <4F4F4738.5020606@harvee.org> imenu-add-to-menu-bar: imenu-create-index-function =py-imenu-create-index-new File mode specification error: (file-error "Searching for program" "no such file or directory" "python") finally getting back to doing some Python work. I grabbed the latest off of launchpad and installed in win32 Emacs (23.1). I got the above error when I loaded the file. From searching the net, it looks like I need to define a Python interpreter. Is this still correct? From andreas.roehler at online.de Thu Mar 1 14:26:14 2012 From: andreas.roehler at online.de (=?ISO-8859-1?Q?Andreas_R=F6hler?=) Date: Thu, 01 Mar 2012 14:26:14 +0100 Subject: [Python-mode] win-32 In-Reply-To: <4F4F4738.5020606@harvee.org> References: <4F4F4738.5020606@harvee.org> Message-ID: <4F4F78F6.8090805@online.de> Am 01.03.2012 10:54, schrieb Eric S. Johansson: > imenu-add-to-menu-bar: imenu-create-index-function > =py-imenu-create-index-new > File mode specification error: (file-error "Searching for program" "no > such file or directory" "python") > > finally getting back to doing some Python work. I grabbed the latest off > of launchpad and installed in win32 Emacs (23.1). I got the above error > when I loaded the file. From searching the net, it looks like I need to > define a Python interpreter. Is this still correct? Hi Eric, would consider that a bug. Python code should be editable also if no Python installed - with some restrictions at least. May I ask you for a complete report starting from emacs -Q? Thanks for your help, Andreas From lpeng564 at gmail.com Fri Mar 2 12:07:14 2012 From: lpeng564 at gmail.com (lpeng564 at gmail.com) Date: Fri, 2 Mar 2012 19:07:14 +0800 Subject: [Python-mode] Python-mode Digest, Vol 93, Issue 2 In-Reply-To: References: Message-ID: <6941D3D0-06C8-4D33-8288-D6E77599E1A6@gmail.com> Re: win-32 (Andreas R?hler) iPhone On Mar 2, 2012, at 19:00, python-mode-request at python.org wrote: > win-32 (Andreas R?hler) From andreas.roehler at online.de Fri Mar 2 19:34:09 2012 From: andreas.roehler at online.de (=?UTF-8?B?QW5kcmVhcyBSw7ZobGVy?=) Date: Fri, 02 Mar 2012 19:34:09 +0100 Subject: [Python-mode] Fwd: [Question #189464]: How to run __main__ programs inside python-mode? Message-ID: <4F5112A1.50204@online.de> New question #189464 on python-mode.el: https://answers.launchpad.net/python-mode/+question/189464 I'm probably missing something obvious, but what's the best way to use python-mode to run/debug python scripts that are designed to be run from the command line? In particular, the problem I face is that while __main__ is set fine, if my code tries to access sys.argv, it gets information that is not very useful, e.g., In [5]: sys.argv Out[5]: ['/Library/Frameworks/EPD64.framework/Versions/7.2/bin/ipython', '-i'] I could always write a main() function, set up my own argument list, and then call main(myargs), or something similar, but this isn't so convenient when all I want to do is run someone else's sample code. How do others deal with this? Is there a facility in python-mode (or should there be) to pass a user-defined sys.argv to scripts run by pressing C-c C-c? From lpeng564 at gmail.com Sat Mar 3 13:23:16 2012 From: lpeng564 at gmail.com (lpeng564 at gmail.com) Date: Sat, 3 Mar 2012 20:23:16 +0800 Subject: [Python-mode] Python-mode Digest, Vol 93, Issue 3 In-Reply-To: References: Message-ID: <49C35107-442A-4ABF-B4C6-AA4195815764@gmail.com> Re: [Python-mode] Python-mode Digest, Vol 93, Issue 2 Message-ID: <6941D3D0-06C8-4D33-8288-D6E77599E1A6 at gmail.com> Content-Type: text/plain; charset=us-ascii Re: win-32 (Andreas R?hler) iPhone On Mar 3, 2012, at 19:00, python-mode-request at python.org wrote: > Re: [Python-mode] Python-mode Digest, Vol 93, Issue 2 > Message-ID: <6941D3D0-06C8-4D33-8288-D6E77599E1A6 at gmail.com> > Content-Type: text/plain; charset=us-ascii > > Re: win-32 (Andreas R?hler) -------------- next part -------------- An HTML attachment was scrubbed... URL: From lpeng564 at gmail.com Sun Mar 4 16:55:38 2012 From: lpeng564 at gmail.com (lpeng564 at gmail.com) Date: Sun, 4 Mar 2012 23:55:38 +0800 Subject: [Python-mode] Python-mode Digest, Vol 93, Issue 3 In-Reply-To: References: Message-ID: <8FEC6DE0-4946-45C5-9F76-F6F29098B43C@gmail.com> iPhone On Mar 3, 2012, at 19:00, python-mode-request at python.org wrote: > Send Python-mode mailing list submissions to > python-mode at python.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/python-mode > or, via email, send a message with subject or body 'help' to > python-mode-request at python.org > > You can reach the person managing the list at > python-mode-owner at python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Python-mode digest..." > > > Today's Topics: > > 1. Re: Python-mode Digest, Vol 93, Issue 2 (lpeng564 at gmail.com) > 2. Fwd: [Question #189464]: How to run __main__ programs inside > python-mode? (Andreas R?hler) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 2 Mar 2012 19:07:14 +0800 > From: "lpeng564 at gmail.com" > To: "python-mode at python.org" > Subject: Re: [Python-mode] Python-mode Digest, Vol 93, Issue 2 > Message-ID: <6941D3D0-06C8-4D33-8288-D6E77599E1A6 at gmail.com> > Content-Type: text/plain; charset=us-ascii > > Re: win-32 (Andreas R?hler) > > iPhone > > On Mar 2, 2012, at 19:00, python-mode-request at python.org wrote: > >> win-32 (Andreas R?hler) > > > ------------------------------ > > Message: 2 > Date: Fri, 02 Mar 2012 19:34:09 +0100 > From: Andreas R?hler > To: python-mode at python.org > Subject: [Python-mode] Fwd: [Question #189464]: How to run __main__ > programs inside python-mode? > Message-ID: <4F5112A1.50204 at online.de> > Content-Type: text/plain; charset=UTF-8; format=flowed > > New question #189464 on python-mode.el: > https://answers.launchpad.net/python-mode/+question/189464 > > I'm probably missing something obvious, but what's the best way to use > python-mode to run/debug python scripts that are designed to be run from > the command line? In particular, the problem I face is that while > __main__ is set fine, if my code tries to access sys.argv, it gets > information that is not very useful, e.g., > > In [5]: sys.argv > Out[5]: ['/Library/Frameworks/EPD64.framework/Versions/7.2/bin/ipython', > '-i'] > > I could always write a main() function, set up my own argument list, and > then call main(myargs), or something similar, but this isn't so > convenient when all I want to do is run someone else's sample code. > > How do others deal with this? Is there a facility in python-mode (or > should there be) to pass a user-defined sys.argv to scripts run by > pressing C-c C-c? > > > > > > ------------------------------ > > _______________________________________________ > Python-mode mailing list > Python-mode at python.org > http://mail.python.org/mailman/listinfo/python-mode > > > End of Python-mode Digest, Vol 93, Issue 3 > ****************************************** From andreas.roehler at online.de Sun Mar 4 19:36:39 2012 From: andreas.roehler at online.de (=?ISO-8859-15?Q?Andreas_R=F6hler?=) Date: Sun, 04 Mar 2012 19:36:39 +0100 Subject: [Python-mode] python-mode.el-6.0.5 released Message-ID: <4F53B637.60706@online.de> Hi all, release of python-mode.el-6.0.5 is done at https://launchpad.net/python-mode/trunk/6.0.5/+download/python-mode.el-6.0.5.tar.gz Please send bug reports resp. request features to https://bugs.launchpad.net/python-mode Changes coming with this version: - Menu is reworked and extended - commands combine executing statement/block... with dedicated/switch... etc. This may remove some need of customization. - local environments support started If calls to common `py-shell' should use local executable instead of default system Python set `py-use-local-default' alongside wit `py-shell-local-path' - `py-toggle-shells' alias of more powerful `py-switch-shells' Toggles between the interpreter customized in `py-shell-toggle-1' resp. `py-shell-toggle-2'. Was hard-coded CPython and Jython in earlier versions, now starts with Python2 and Python3 by default. - `py-shell-name' accepts PATH/TO/EXECUTABLE in addition to name of an installed default Python-Shell. Permits installing commands like (defun python-XYZ-shell (&optional argprompt) "Start an Python-XYZ interpreter ... " (interactive) (let ((py-shell-name "PATH/TO/PYTHON-XYZ")) (py-shell argprompt))) - new commands `indent-tabs-mode', `toggle-indent-tabs-mode', `indent-tabs-mode-on', `indent-tabs-mode-off' feature after a request at Stack Exchange asked Jul 13 '11 at 13:23 saying `tab-width' now follows `py-indent-offset' - new command `py-execute-region-default' forces the systems default Python interpreter to execute, ignores shebang - new `py-number-face', visible only when customized and `py-use-number-face-p' is `t', inherits default face With large files fontifying numbers may cause a delay Credits to github.com/fgallina/python.el/issues42 - new boolean `py-verbose-p' if `t', reached indent level etc. is messaged - `toggle-py-smart-indentation' new command also `py-smart-indentation-on', -off Enjoy, Andreas -- http://launchpad.net/python-mode http://launchpad.net/s-x-emacs-werkstatt/ From andreas.roehler at online.de Tue Mar 13 16:42:08 2012 From: andreas.roehler at online.de (=?ISO-8859-15?Q?Andreas_R=F6hler?=) Date: Tue, 13 Mar 2012 16:42:08 +0100 Subject: [Python-mode] display when py-shell-name tells path Message-ID: <4F5F6AD0.6040105@online.de> Hi Barry, hi all, after fixing lp:943832, py-execute-buffer ignores full-path py-shell-name on my machine a running py-shell buffer now displays proudly the full path, something like */home/MY-NAME/SOME-DIR/OTHER-DIR/Python-3.2.2/Python* which might not be the right thing for daily work. OTOH it seems worth somehow to discern such a thing - think also at virtualenv. So like the prompt-change from virtualenv maybe have some prefix-display? Cheers, Andreas