Re: [Tutor] when is a generator "smart?"

2013-06-03 Thread eryksun
On Mon, Jun 3, 2013 at 3:41 AM, Jim Mooney wrote: > Ah, useful. A lot more than is on windows path and PYTHONPATH > obviously gets snuck in there. Sure enough, I queried sys.path and > there's a Lot more in there. The path for the script comes first, followed by the contents of the PYTHONPATH env

Re: [Tutor] selenium programs stopped working

2013-06-03 Thread Oscar Benjamin
Please don't top-post on this list (and many others). Inline or bottom-posted responses are usually preferred like the way that I've rearranged your message below. On 4 June 2013 02:27, Benjamin Fishbein wrote: > On Jun 3, 2013, at 8:08 PM, Benjamin Fishbein wrote: > >> I'm using selenium webdriv

Re: [Tutor] when is a generator "smart?"

2013-06-03 Thread Oscar Benjamin
On 4 June 2013 01:00, Jim Mooney wrote: >> Maybe or maybe not. When you run 'python setup.py install' (this >> happens implicitly when using pip), Python will try to run the >> setup.py script. At this point the script can do anything that its >> author likes. It could check for versions, it could

Re: [Tutor] selenium programs stopped working

2013-06-03 Thread Benjamin Fishbein
btw I'm on a Mac running 10.7. And after a couple minutes of not loading any webpage, the program gives me this error: Traceback (most recent call last): File "/Users/bfishbein/Documents/s_buy2.py", line 7, in driver = webdriver.Firefox() File "/Library/Python/2.7/site-packages/selenium

[Tutor] selenium programs stopped working

2013-06-03 Thread Benjamin Fishbein
I'm using selenium webdriver with python 2.7. I have some programs I wrote with it and they've been working properly for some months. But today I tried to write a new program with the selenium module. from selenium import webdriver from selenium.webdriver.common.keys import Keys driver = webdriv

Re: [Tutor] I think I found what I'm looking for.

2013-06-03 Thread David Robinow
On Mon, Jun 3, 2013 at 7:32 PM, Michael Sparks wrote: > speech.py is a Python module that provides a clean interface to Windows's > voice recognition and text-to-speech capabilities. But it requires Windows > XP or Vista, and Python 2.4 or 2.5. I use Windows 7. > ... > I think that I'm satisfied w

Re: [Tutor] when is a generator "smart?"

2013-06-03 Thread Jim Mooney
On 3 June 2013 14:41, Oscar Benjamin wrote: > Maybe or maybe not. When you run 'python setup.py install' (this > happens implicitly when using pip), Python will try to run the > setup.py script. At this point the script can do anything that its > author likes. It could check for versions, it coul

[Tutor] I think I found what I'm looking for.

2013-06-03 Thread Michael Sparks
speech.py is a Python module that provides a clean interface to Windows's voice recognition and text-to-speech capabilities. But it requires Windows XP or Vista, and Python 2.4 or 2.5. I use Windows 7. another one I found; Dragonfly is a speech recognition framework. It is a Python package which

Re: [Tutor] when is a generator "smart?"

2013-06-03 Thread bob gailer
On 6/1/2013 11:58 PM, Jim Mooney wrote: squarelist = (c**2 for c in range(x,y) if c%2 != 0) can be simplified to: squarelist = (c**2 for c in range(x,y,2)) as long as x is odd. -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist -

Re: [Tutor] when is a generator "smart?"

2013-06-03 Thread Oscar Benjamin
On 3 June 2013 21:36, Jim Mooney wrote: > So to clarify, the module names are the same on 2.7 and 3.3. Does that > mean the module writers set the module so it will only install on the > proper Py version, failing if it can't find it, so I don't have to > think about that? Maybe or maybe not. Whe

Re: [Tutor] when is a generator "smart?"

2013-06-03 Thread Jim Mooney
On 3 June 2013 11:47, Chris “Kwpolska” Warrick wrote: > >> Ah, question just came up. Since I have two pys, when a module is >> ported from 2.7 to 3.2 does it always have a different name? > > It never does. And in case it does, the developers are idiots. Using Python 2.7 on Windows 7 So to cla

Re: [Tutor] Need Help Modifying a wxPython GUI (scrolling display and logging)

2013-06-03 Thread Alan Gauld
On 03/06/13 15:01, Matt D wrote: I am using an open source wxPython GUI that I like very very much. I have ideas about some modifications I need but I cannot be bothering the author too much so I must learn some very specific things about Python OK, we can help on the python bits but not so mu

Re: [Tutor] when is a generator "smart?"

2013-06-03 Thread Chris “Kwpolska” Warrick
On Mon, Jun 3, 2013 at 8:13 PM, Jim Mooney wrote: > > On 3 June 2013 07:22, Oscar Benjamin wrote: > > > If you put "from __future__ import print_function" at the top of your > > module you can use the same print function in Python 2.6/2.7 and 3.x. > > I recommend doing this rather than bothering

Re: [Tutor] when is a generator "smart?"

2013-06-03 Thread Jim Mooney
On 3 June 2013 07:22, Oscar Benjamin wrote: > If you put "from __future__ import print_function" at the top of your > module you can use the same print function in Python 2.6/2.7 and 3.x. > I recommend doing this rather than bothering with the 2.x print > statement. Using Python 2.7 on Windows 7

Re: [Tutor] when is a generator "smart?"

2013-06-03 Thread Oscar Benjamin
On 3 June 2013 03:50, Jim Mooney wrote: > Py 2.7, Py 3.3 > raw_input, input There are good reasons for this change. Marc already suggested a solution for writing code that runs under both versions. > print, print() If you put "from __future__ import print_function" at the top of your module you

[Tutor] Need Help Modifying a wxPython GUI (scrolling display and logging)

2013-06-03 Thread Matt D
Hello, I am using an open source wxPython GUI that I like very very much. I have ideas about some modifications I need but I cannot be bothering the author too much so I must learn some very specific things about Python in order to make the modification myself. First, I need some help understandi

Re: [Tutor] when is a generator "smart?"

2013-06-03 Thread Mark Lawrence
On 03/06/2013 08:41, Jim Mooney wrote: On 2 June 2013 23:56, eryksun wrote: On Mon, Jun 3, 2013 at 12:44 AM, Jim Mooney wrote: On 2 June 2013 20:33, eryksun wrote: I looked into PC/getpathp.c. The value of PythonPath shown above is only a fallback for when Python is embedded. Otherwise

Re: [Tutor] Problem importing modules.

2013-06-03 Thread Alan Gauld
On 03/06/13 07:09, Shreyas Prakash wrote: I am using Python 2.7 I tried importing a module named hello.py I got this error message Traceback (most recent call last): File "", line 1, in import hello ImportError: No module named hello I am not sure why, Can you please give me more insight abou

Re: [Tutor] when is a generator "smart?"

2013-06-03 Thread Jim Mooney
On 2 June 2013 23:56, eryksun wrote: > On Mon, Jun 3, 2013 at 12:44 AM, Jim Mooney wrote: >> On 2 June 2013 20:33, eryksun wrote: > > I looked into PC/getpathp.c. The value of PythonPath shown above is > only a fallback for when Python is embedded. Otherwise the interpreter > can determine sys

Re: [Tutor] when is a generator "smart?"

2013-06-03 Thread eryksun
On Mon, Jun 3, 2013 at 12:44 AM, Jim Mooney wrote: > On 2 June 2013 20:33, eryksun wrote: > >> >> The base sys.path configured in the registry already has lib-tk: >> >> C:\>reg query hklm\software\python\pythoncore\2.7\pythonpath >> >> HKEY_LOCAL_MACHINE\software\python\pythoncore\2.7\pyt