Re: [Python-Dev] Criticism of execfile() removal in Python3
On Sat, Jun 14, 2014 at 1:11 PM, Paul Sokolovsky wrote:
> > > 1. It hampers interactive mode - instead of short and easy to type
> > > execfile("file.py") one needs to use exec(open("file.py").read()).
>
> > If the amount of typing is the problem, that's easy to solve:
> >
> > # do this once
> > def execfile(name):
> > exec(open("file.py").read())
>
FWIW, when I started using python (15?) years ago -- the first thing I
looked for was a way to "just run a file", at the interactive prompt, like
I had in MATLAB. I found and used execfile().
However, it wasn't long before I discovered that excecfile() was really
kind of a pain, you've got namespaces, and all sorts of stuff that made it
often not work like I wanted, and was a pain to type. I stopped using it
all together
More recently, I discovered iPython and its "run" function -- very nice, it
does the obvious stuff for you the way you'd expect.
My conclusions:
1) runfile() is not really very usefull, it's fine to hve removed it.
2) the built-in interactive python interpreter is really pretty lame. If
you want a good interactive experience, you need something more anyway
(iPython, for instance) -- putting execfile() back is only one tiny
improvement that's not worth it.
So if this is about micropython -- I think it would serve the project very
well to have a micropython-specific interactive mode. iPython is fabulous,
but though I imagine too heavy weight. But perhaps you could borrow some
things from it -- like "run" , for example.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R(206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
[email protected]
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Criticism of execfile() removal in Python3
On 06/16/2014 10:40 AM, Chris Barker wrote: My conclusions: 1) runfile() is not really very usefull, it's fine to hve removed it. s/runfile/execfile -- ~Ethan~ ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] Windows XP, Python 3.5 and PEP 11
Hi, I would like to know if Python 3.5 will still support Windows XP or not. Almost all flavors of Windows XP reached the end-of-life in April, 2014 except "Windows XP Embedded". There is even an hack to use Windows upgrades on the desktop flavor using the embedded flavor (by changing a key in the registry). Extracts of the Wikipedia page: "As of January 2014, at least 49% of all computers in China still ran XP. " "In January 2014, it was estimated that more than 95% of the 3 million automated teller machines in the world were still running Windows XP (which largely replaced IBM's OS/2 as the predominant operating system on ATMs)" http://en.wikipedia.org/wiki/Windows_XP A few months ago, I installed an ISO of Windows XP, downloaded from MSDN, to investigate a bug (something related to timer and HPET), but then I realized that I can use my Windows 7 VM to reproduce the issue. Now I cannot use my Windows XP VM anymore because I have to enter a product key (before I had a delay of 30 days), but I don't have this product key and my MSDN account expired. I don't want to waste my time and money with the registration thing, so I just gave up. Any of you plan to invest time on issues specific to Windows XP and produce binaries working on Windows XP? Or can we just provide binaries without testing them? For example, it looks like the following issue is specific to Windows XP: http://bugs.python.org/issue6926 Oh, and the PEP 11: http://legacy.python.org/dev/peps/pep-0011/#microsoft-windows "Microsoft has established a policy called product support lifecycle (...) Python's Windows support now follows this lifecycle." Victor ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Criticism of execfile() removal in Python3
On 17 Jun 2014 03:42, "Chris Barker" wrote:
>
> On Sat, Jun 14, 2014 at 1:11 PM, Paul Sokolovsky
wrote:
>
>>
>> > > 1. It hampers interactive mode - instead of short and easy to type
>> > > execfile("file.py") one needs to use exec(open("file.py").read()).
>>
>> >
>> > If the amount of typing is the problem, that's easy to solve:
>> >
>> > # do this once
>> > def execfile(name):
>> > exec(open("file.py").read())
>
>
> FWIW, when I started using python (15?) years ago -- the first thing I
looked for was a way to "just run a file", at the interactive prompt, like
I had in MATLAB. I found and used execfile().
Yes, if people are looking for a MATLAB replacement, they want IPython
rather than the default REPL.
The default one is deliberately minimal, IPython is designed to be a
comprehensive numeric and scientific workspace.
Cheers,
Nick.
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Windows XP, Python 3.5 and PEP 11
On Mon, Jun 16, 2014 at 4:12 PM, Victor Stinner wrote: > Hi, > > I would like to know if Python 3.5 will still support Windows XP or > not. Almost all flavors of Windows XP reached the end-of-life in > April, 2014 except "Windows XP Embedded". There is even an hack to use > Windows upgrades on the desktop flavor using the embedded flavor (by > changing a key in the registry). Extracts of the Wikipedia page: This was recently discussed in the "Moving Python 3.5 on Windows to a new compiler" thread, where Martin declared XP support to be ended [1]. I believe Tim Golden is the only resident Windows dev from whom I haven't seen at least implicit agreement that XP doesn't need further support, so I'd say our support for XP is well and truly dead :) In any case, surely anyone stuck with XP can be happy with Python 3.4. I'm perfectly fine with 3.2 on Win2k! -- Zach [1] https://mail.python.org/pipermail/python-dev/2014-June/134903.html ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Windows XP, Python 3.5 and PEP 11
On 17/06/2014 04:08, Zachary Ware wrote: On Mon, Jun 16, 2014 at 4:12 PM, Victor Stinner wrote: Hi, I would like to know if Python 3.5 will still support Windows XP or not. Almost all flavors of Windows XP reached the end-of-life in April, 2014 except "Windows XP Embedded". There is even an hack to use Windows upgrades on the desktop flavor using the embedded flavor (by changing a key in the registry). Extracts of the Wikipedia page: This was recently discussed in the "Moving Python 3.5 on Windows to a new compiler" thread, where Martin declared XP support to be ended [1]. I believe Tim Golden is the only resident Windows dev from whom I haven't seen at least implicit agreement that XP doesn't need further support, so I'd say our support for XP is well and truly dead :) In any case, surely anyone stuck with XP can be happy with Python 3.4. I'm perfectly fine with 3.2 on Win2k! I think we're justified in dropping XP support, for all the reasons others have given. Like most people, I suppose, I'm support WinXP in various ways (including embedded) because "not supported" != "not working". But those are all running 2.x versions of Python. It'll be good to be able stretch a little on the Windows API front without having to double-think about where a particular API came in. TJG ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
