Re: [Tutor] LCM revisited + OOP

2012-11-27 Thread Ray Jones
On 11/27/2012 07:27 PM, Steven D'Aprano wrote: > For something as simple as Least Common Multiple? Using a function is > much more sensible than writing a class. > > OOP is for when you have a single data type that needs *state* and > *behaviour*. A LCM function only has behaviour, and so a func

[Tutor] LCM revisited + OOP

2012-11-27 Thread Ray Jones
Part I I am a good way through MIT's Introduction to Computer Science and Programming as offered through edX. I'm not certain I'm going to pass the course this first time through, the major hangup being the understanding of OOP. Part II When the LCM thread came through, I wrote some quick code do

Re: [Tutor] urllib2.urlopen()

2012-10-14 Thread Ray Jones
On 10/14/2012 02:26 AM, eryksun wrote: > e.hdrs['connection'] 'close' > e.hdrs.getheaders('connection') ['close'] I have often used help() to find my way around imported libraries. I didn't realize it would also help with instances. That's good to know. Ray __

Re: [Tutor] urllib2.urlopen()

2012-10-14 Thread Ray Jones
On 10/13/2012 11:55 PM, Brian van den Broek wrote: > On 14 October 2012 02:15, Ray Jones wrote: >> On 10/13/2012 07:50 PM, Steven D'Aprano wrote: > > >>> If you can do `print e.info()`, then you can also do `info = e.info()` >>> and inspect the info programm

Re: [Tutor] urllib2.urlopen()

2012-10-13 Thread Ray Jones
On 10/13/2012 07:50 PM, Steven D'Aprano wrote: > On 14/10/12 12:45, Ray Jones wrote: >> On 10/13/2012 05:09 PM, Brian van den Broek wrote: >>> On 13 October 2012 19:44, Ray Jones wrote: >>>> I am attempting to capture url headers and have my script make >>

Re: [Tutor] urllib2.urlopen()

2012-10-13 Thread Ray Jones
On 10/13/2012 05:09 PM, Brian van den Broek wrote: > On 13 October 2012 19:44, Ray Jones wrote: >> I am attempting to capture url headers and have my script make decisions >> based on the content of those headers. >> >> Here is what I am using in the relative port

[Tutor] urllib2.urlopen()

2012-10-13 Thread Ray Jones
I am attempting to capture url headers and have my script make decisions based on the content of those headers. Here is what I am using in the relative portion of my script: try: urllib2.urlopen('http://myurl.org') except urllib2.HTTPError, e: In the case of authentication error, I can print

Re: [Tutor] How to run this block of code dozens of times

2012-09-17 Thread Ray Jones
On 09/17/2012 02:46 AM, eryksun wrote: > On Sun, Sep 16, 2012 at 11:17 PM, Steven D'Aprano wrote: >> Other uses are: >> >> * a single leading underscore usually means "private, don't touch" >> >> * double leading and trailing underscore names have special meaning >> to Python, e.g.: > There's al

Re: [Tutor] 2.7.3 documentation gripe (feel free to ignore)

2012-09-14 Thread Ray Jones
On 09/14/2012 02:32 AM, Steven D'Aprano wrote: > On 14/09/12 17:29, Ray Jones wrote: >> >> 6.5. The del >> <http://docs.python.org/reference/simple_stmts.html#del> statement > [...] >> They call this DOCUMENTATION??? "it's similar to s

Re: [Tutor] (2.7.3) Inexplicable change of type

2012-09-14 Thread Ray Jones
Thanks for the responses. I knew it had to be something stupid ;)). Ray ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] (2.7.3) Inexplicable change of type

2012-09-14 Thread Ray Jones
On 09/14/2012 02:07 AM, Steven D'Aprano wrote: > On 14/09/12 18:43, Ray Jones wrote: > >> Between the two arrows, 'source' inexplicably switches from >> to. Why? > > source.remove('') does not do what you think it does. Checking the > Fine Man

[Tutor] (2.7.3) Inexplicable change of type

2012-09-14 Thread Ray Jones
The code: def split_string(source,splitlist): idx = 0 while idx < len(splitlist): if splitlist[idx] in source: source = ' '.join(source.split(splitlist[idx])) idx += 1 source = source.split(' ') print "source is", source,

[Tutor] 2.7.3 documentation gripe (feel free to ignore)

2012-09-14 Thread Ray Jones
6.5. The del statement *del_stmt* ::= "del" target_list Deletion is recursively defined very similar to the way assignment is defined. Rather than spe

[Tutor] Seeing response from authorization page with urllib2

2012-09-11 Thread Ray Jones
If I open a web page in my browser, I get a pop-up window that informs me that I need to provide authorization information. But often, in addition, that little pop-up window will give me some additional information supplied by the page itself. For example, the chromium browser pop-up might say, "Th

Re: [Tutor] urllib2.urlopen(....., timeout=)

2012-09-07 Thread Ray Jones
On 09/07/2012 08:32 AM, Dave Angel wrote: > On 09/07/2012 11:16 AM, Ray Jones wrote: >> 2.7.3 >> According to the docs, urlopen has a timeout capability. But it says >> that the timeout = '' >> >> I've tried integers as the timeout value, I've t

Re: [Tutor] urllib2.urlopen(....., timeout=)

2012-09-07 Thread Ray Jones
On 09/07/2012 08:33 AM, Steven D'Aprano wrote: > On 08/09/12 01:16, Ray Jones wrote: >> 2.7.3 >> According to the docs, urlopen has a timeout capability. But it says >> that the timeout = '' > > Which docs are those? According to these docs: > > http

[Tutor] urllib2.urlopen(....., timeout=)

2012-09-07 Thread Ray Jones
2.7.3 According to the docs, urlopen has a timeout capability. But it says that the timeout = '' I've tried integers as the timeout value, I've tried floatsit doesn't complain about my values, but neither does it timeout. Can anyone point me to the solution to getting the urlopen to timeout if

Re: [Tutor] Making big 'uns into little 'uns

2012-09-06 Thread Ray Jones
On 09/06/2012 05:34 PM, Steven D'Aprano wrote: > On 07/09/12 01:33, Ray Jones wrote: > >> Our homework "monitor" complains if we use code that hasn't been >> discussed in session yet. > > The good old "teaching by enforced ignorance" method. &g

Re: [Tutor] Making big 'uns into little 'uns

2012-09-06 Thread Ray Jones
On 09/06/2012 05:31 PM, Steven D'Aprano wrote: > On 06/09/12 23:56, Ray Jones wrote: >> I have a multiple 'if' expression that I need to drastically reduce in >> size, both for readability and to keep errors from creeping in. >> >> For example, I would lik

Re: [Tutor] Making big 'uns into little 'uns

2012-09-06 Thread Ray Jones
On 09/06/2012 10:05 AM, Alan Gauld wrote: > On 06/09/12 14:56, Ray Jones wrote: >> I have a multiple 'if' expression that I need to drastically reduce in >> size, both for readability and to keep errors from creeping in. >> >> For example, I would like to ha

Re: [Tutor] Making big 'uns into little 'uns

2012-09-06 Thread Ray Jones
On 09/06/2012 08:29 AM, Walter Prins wrote: > Hi Ray, > > On 6 September 2012 15:59, Ray Jones wrote: >> Basically it's as simple as ensuring that an array consists of integers, >> and that those integers fall within a certain range. Rather than using >> multipl

Re: [Tutor] Making big 'uns into little 'uns

2012-09-06 Thread Ray Jones
On 09/06/2012 07:48 AM, Dave Angel wrote: >>> On 09/06/2012 09:56 AM, Ray Jones wrote: >>>> I have a multiple 'if' expression that I need to drastically reduce in >>>> size, both for readability and to keep errors from creeping in. >>>> &g

Re: [Tutor] Making big 'uns into little 'uns

2012-09-06 Thread Ray Jones
On 09/06/2012 07:35 AM, Jerry Hill wrote: > On Thu, Sep 6, 2012 at 10:15 AM, Ray Jones wrote: >> Well, of all the. a REAL programming language. I mean, even >> Bash ;;)) >> >> Anyway, it was a shot. Thanks. > There's almost certainly a way to

Re: [Tutor] Making big 'uns into little 'uns

2012-09-06 Thread Ray Jones
On 09/06/2012 07:33 AM, Peter Otten wrote: > Ray Jones wrote: > >> I have a multiple 'if' expression that I need to drastically reduce in >> size, both for readability and to keep errors from creeping in. >> >> For example, I would like to have the variable

Re: [Tutor] Making big 'uns into little 'uns

2012-09-06 Thread Ray Jones
On 09/06/2012 07:15 AM, Dave Angel wrote: > On 09/06/2012 09:56 AM, Ray Jones wrote: >> I have a multiple 'if' expression that I need to drastically reduce in >> size, both for readability and to keep errors from creeping in. >> >> For example, I would like to

[Tutor] Making big 'uns into little 'uns

2012-09-06 Thread Ray Jones
I have a multiple 'if' expression that I need to drastically reduce in size, both for readability and to keep errors from creeping in. For example, I would like to have the variable 'test' point to the a location 'grid[rcount-1][ccount-1]' so that everywhere I would use 'grid.', I could replac

Re: [Tutor] Hey.need help on time

2012-09-06 Thread Ray Jones
On 09/06/2012 02:08 AM, eryksun wrote: > On Thu, Sep 6, 2012 at 4:25 AM, Ray Jones wrote: >> Why the additional step of calling time.tzset()? Once os.environ['TZ'] >> is set, I've found that time.localtime() responds to the new TZ without >> anything extra. Is

Re: [Tutor] Help

2012-09-06 Thread Ray Jones
On 09/03/2012 07:39 AM, Jack Little wrote: > > Ok, I am somewhat new to python, and I am making a text-based RPG. I get a > > weird error with this code: > > > > > > #A Python text-RPG > > #A Jak Production > > #APOC > > global ammo > > global health > > global lives > > global exp > > global food

Re: [Tutor] Hey.need help on time

2012-09-06 Thread Ray Jones
On 09/06/2012 12:51 AM, eryksun wrote: > On Thu, Sep 6, 2012 at 3:21 AM, Keitaro Kaoru wrote: >> been trying to change this so it wont use my server time. but my >> actual time here in the us.EST. havent been able to figure it out >> >> def sstime(user, body, m): >> os.environ['TZ'] = 'US/

Re: [Tutor] Unicode? UTF-8? UTF-16? WTF-8? ;)

2012-09-05 Thread Ray Jones
On 09/05/2012 08:18 AM, eryksun wrote: > On Wed, Sep 5, 2012 at 10:51 AM, Ray Jones wrote: >> subprocess.call(['dolphin', '/my_home/testdir/\u044c\u043e\u0432']) >> >> Dolphin's error message: 'The file or folder >> /my_home/testdir/\

Re: [Tutor] Unicode? UTF-8? UTF-16? WTF-8? ;)

2012-09-05 Thread Ray Jones
On 09/05/2012 07:51 AM, Ray Jones wrote: > subprocess.call(['dolphin', '/my_home/testdir/\u044c\u043e\u0432']) > > Dolphin's error message: 'The file or folder > /my_home/testdir/\u044c\u043e\u0432 does not exist' > > But if I copy the charac

Re: [Tutor] Unicode? UTF-8? UTF-16? WTF-8? ;)

2012-09-05 Thread Ray Jones
On 09/05/2012 07:31 AM, eryksun wrote: > On Wed, Sep 5, 2012 at 5:42 AM, Ray Jones wrote: >> I have directory names that contain Russian characters, Romanian >> characters, French characters, et al. When I search for a file using >> glob.glob(), I end up with stuff like \x9

Re: [Tutor] Unicode? UTF-8? UTF-16? WTF-8? ;)

2012-09-05 Thread Ray Jones
On 09/05/2012 04:52 AM, Peter Otten wrote: > Ray Jones wrote: > >> >> But doesn't that entail knowing in advance which encoding you will be >> working with? How would you automate the process while reading existing >> files? > If you don't *know* the enc

Re: [Tutor] Unicode? UTF-8? UTF-16? WTF-8? ;)

2012-09-05 Thread Ray Jones
On 09/05/2012 03:33 AM, Peter Otten wrote: > Ray Jones wrote: > >> I have directory names that contain Russian characters, Romanian >> characters, French characters, et al. When I search for a file using >> glob.glob(), I end up with stuff like \x93\x8c\xd1 in place of t

Re: [Tutor] Unicode? UTF-8? UTF-16? WTF-8? ;)

2012-09-05 Thread Ray Jones
On 09/05/2012 02:57 AM, Walter Prins wrote: > Hi Ray, > > On 5 September 2012 10:42, Ray Jones wrote: >> Can someone point me to a page that will clarify the concepts, not just >> try to show me the Python implementation of what I already don't >> understand? ;) &

[Tutor] Unicode? UTF-8? UTF-16? WTF-8? ;)

2012-09-05 Thread Ray Jones
I have directory names that contain Russian characters, Romanian characters, French characters, et al. When I search for a file using glob.glob(), I end up with stuff like \x93\x8c\xd1 in place of the directory names. I thought simply identifying them as Unicode would clear that up. Nope. Now I hav

Re: [Tutor] Running a script in the background (offshoot - sorry, OP)

2012-09-02 Thread Ray Jones
On 09/02/2012 06:03 PM, Steven D'Aprano wrote: > On Sun, Sep 02, 2012 at 03:14:53PM -0700, Ray Jones wrote: >> This is only tangentially related to the thread. Someone mentioned that >> so long as a script didn't require user input or output to the user, it >> could

Re: [Tutor] Running a script in the background

2012-09-02 Thread Ray Jones
On 09/02/2012 03:30 PM, Alan Gauld wrote: > On 02/09/12 23:14, Ray Jones wrote: >> could run silently in the background. But is there a way for a Python >> (2.7.3) script to determine whether it was called by the user or called >> by something like cron or kalarm? That way

Re: [Tutor] Running a script in the background

2012-09-02 Thread Ray Jones
This is only tangentially related to the thread. Someone mentioned that so long as a script didn't require user input or output to the user, it could run silently in the background. But is there a way for a Python (2.7.3) script to determine whether it was called by the user or called by something

Re: [Tutor] 2.7.3 generator objects

2012-09-02 Thread Ray Jones
On 09/01/2012 11:57 PM, eryksun wrote: > To be an iterable in general, it suffices to have either an __iter__ > method or a __getitem__ method. Here are the glossary definitions: > http://docs.python.org/glossary.html#term-iterable > http://docs.python.org/glossary.html#term-iterator After a few

Re: [Tutor] 2.7.3 generator objects

2012-09-01 Thread Ray Jones
On 09/01/2012 11:39 PM, Alan Gauld wrote: > On 02/09/12 06:44, Ray Jones wrote: >> I was playing with os.walk today. I can use os.walk in a for loop (does >> that make it an iterator or just an irritable? ^_^), but if I assign >> os.walk to 'test' (test = os.w

[Tutor] 2.7.3 generator objects

2012-09-01 Thread Ray Jones
I was playing with os.walk today. I can use os.walk in a for loop (does that make it an iterator or just an irritable? ^_^), but if I assign os.walk to 'test' (test = os.walk()), that variable becomes a generator object that does not work in a for loop. From what I can tell, it's supposed to work i

Re: [Tutor] Using a calling program to change Python script arguments

2012-08-31 Thread Ray Jones
On 08/31/2012 04:58 PM, Alan Gauld wrote: > > Creating a module is just a matter of creating a standard python file > > > #! /bin/python# you don't even really need a shebang for modules! > myVar = 66 > < end of myvar.py --> > > import myvar > print

Re: [Tutor] Using a calling program to change Python script arguments

2012-08-31 Thread Ray Jones
On 08/31/2012 02:19 PM, Alan Gauld wrote: > On 31/08/12 18:05, Ray Jones wrote: > >> script and have it parse. Is there another method for one Python script >> to call/import/execute a Python script and integrate the name space so >> that the variables in each of the

[Tutor] Using a calling program to change Python script arguments

2012-08-31 Thread Ray Jones
As an aid to learning Python, I am currently in the process of converting my Bash scripts into Python scripts. Through the years, as I have accumulated a variety of sites, I have been maintaining a half dozen or so Bash scripts that basically do the same thing: log me into a streaming video site an

Re: [Tutor] running more than one python program at the same time

2012-08-28 Thread Ray Jones
On 08/28/2012 03:30 PM, Benjamin Fishbein wrote: > Hello, > I wrote a program that I want to have running 24/7. But the problem is that I > also want to write and run other programs. I'm using Idle and it won't let me > run more than one script at a time. Do you know if there's a way to do this?

Re: [Tutor] Installing modules with easy_install

2012-08-28 Thread Ray Jones
On 08/28/2012 01:35 PM, Emile van Sebille wrote: > On 8/28/2012 1:17 PM Ray Jones said... >> On 08/28/2012 01:11 PM, eryksun wrote: >>> On Tue, Aug 28, 2012 at 4:00 PM, Ray Jones wrote: >>>> Oops. No, I see that /usr/local/lib/python2.7/dist-packages is >>&

Re: [Tutor] Installing modules with easy_install

2012-08-28 Thread Ray Jones
On 08/28/2012 01:11 PM, eryksun wrote: > On Tue, Aug 28, 2012 at 4:00 PM, Ray Jones wrote: >> Oops. No, I see that /usr/local/lib/python2.7/dist-packages is included >> in the sys.path. Now what? > Good, but does sys.path contain > /usr/local/lib/python2.7/dist-packages/pytz-

Re: [Tutor] Installing modules with easy_install

2012-08-28 Thread Ray Jones
On 08/28/2012 01:11 PM, eryksun wrote: > On Tue, Aug 28, 2012 at 4:00 PM, Ray Jones wrote: >> Oops. No, I see that /usr/local/lib/python2.7/dist-packages is included >> in the sys.path. Now what? > Good, but does sys.path contain > /usr/local/lib/python2.7/dist-packages/pyt

Re: [Tutor] Installing modules with easy_install

2012-08-28 Thread Ray Jones
On 08/28/2012 12:52 PM, eryksun wrote: > On Tue, Aug 28, 2012 at 2:39 PM, Ray Jones wrote: >>> Do you have multiple python installations on your machine? Do you run >>> easy_install in one and ipython in another? >> Perhaps. But the module is not accessible from the &#

Re: [Tutor] Installing modules with easy_install

2012-08-28 Thread Ray Jones
On 08/28/2012 12:35 PM, Steven D'Aprano wrote: > On 29/08/12 03:41, Ray Jones wrote: >> I'm working on another Python replacement for a Bash script, and I ran >> into a need for enhanced time zone functions. Following directions I >> found on a web site, I did the

Re: [Tutor] Installing modules with easy_install

2012-08-28 Thread Ray Jones
On 08/28/2012 12:44 PM, Peter Otten wrote: > Ray Jones wrote: > >> On 08/28/2012 11:06 AM, Peter Otten wrote: >>> Ray Jones wrote: >>> >>>> I'm working on another Python replacement for a Bash script, and I ran >>>> into a need for enhance

Re: [Tutor] Installing modules with easy_install

2012-08-28 Thread Ray Jones
On 08/28/2012 12:35 PM, Steven D'Aprano wrote: > On 29/08/12 03:41, Ray Jones wrote: >> I'm working on another Python replacement for a Bash script, and I ran >> into a need for enhanced time zone functions. Following directions I >> found on a web site, I did the

Re: [Tutor] Installing modules with easy_install

2012-08-28 Thread Ray Jones
On 08/28/2012 11:06 AM, Peter Otten wrote: > Ray Jones wrote: > >> I'm working on another Python replacement for a Bash script, and I ran >> into a need for enhanced time zone functions. Following directions I >> found on a web site, I did the following: >&g

[Tutor] Installing modules with easy_install

2012-08-28 Thread Ray Jones
I'm working on another Python replacement for a Bash script, and I ran into a need for enhanced time zone functions. Following directions I found on a web site, I did the following: # easy_install --upgrade pytz Searching for pytz Reading http://pypi.python.org/simple/pytz/ Reading http://pytz.sou

Re: [Tutor] 2.7.3 Popen argument issues

2012-08-27 Thread Ray Jones
On 08/27/2012 05:45 AM, eryksun wrote: > Most programs expect their arguments to have been tokenized as the > shell would as a matter of convention. So, for example, if vlc gets > "-I" in argv[1] it expects that argv[2] will be a value such as > "dummy". A value of "-I dummy" in argv[1] in principl

Re: [Tutor] 2.7.3 Popen argument issues

2012-08-27 Thread Ray Jones
On 08/26/2012 07:12 AM, eryksun wrote: > On Sun, Aug 26, 2012 at 7:55 AM, Ray Jones wrote: >> [0x8d42554] stream_out_standard stream out error: no mux specified or >> found by extension >> [0x8d42134] main stream output error: stream chain failed for >> `standard{mux

Re: [Tutor] 2.7.3 Popen argument issues

2012-08-26 Thread Ray Jones
On 08/26/2012 05:57 AM, Don Jennings wrote: > > On Aug 26, 2012, at 12:25 AM, tutor-requ...@python.org > <mailto:tutor-requ...@python.org> wrote: > >> Message: 2 >> Date: Sat, 25 Aug 2012 17:46:08 -0700 >> From: Ray Jones mailto:crawlz...@gmail.com>

Re: [Tutor] 2.7.3 Popen argument issues

2012-08-26 Thread Ray Jones
On 08/25/2012 10:19 PM, eryksun wrote: > On Sat, Aug 25, 2012 at 11:02 PM, eryksun wrote: >> out_file = "testing.avi" >> out_ip = "127.0.0.1" >> out_port = "11300" >> dst_file = '"transcode{vb=400}:std{access=file,mux=avi,dst=%s}"' % out_file >> dst_http = '"std{access=http,mux=mpjpeg,dst=%s:%s}"'

[Tutor] 2.7.3 Popen argument issues

2012-08-25 Thread Ray Jones
Is there a method by which I can get an exact representation of command line arguments passed by Popen as seen by the called program? The argument error I receive shows me an argument that looks exactly like the argument that I use with Bash (it should - I copied and pasted it) - but the Bash versi

Re: [Tutor] 2.7.3 'CalledProcessError' error....why?

2012-08-24 Thread Ray Jones
On 08/24/2012 04:14 PM, Emile van Sebille wrote: > On 8/24/2012 3:36 PM Ray Jones said... >> My code: >> >>try: >> subprocess.check_call(['ping', '-w1', ip]) >>except CalledProcessError: >> print 'System'

[Tutor] 2.7.3 'CalledProcessError' error....why?

2012-08-24 Thread Ray Jones
My code: try: subprocess.check_call(['ping', '-w1', ip]) except CalledProcessError: print 'System', ip, 'is not responding. Exiting' sys.exit(4) else: return None The result: Traceback (most recent call last): File "./testing.py", line 222, in main() File "./testin

Re: [Tutor] Python working with Bash....arrrggggh!

2012-08-24 Thread Ray Jones
On 08/24/2012 12:02 AM, Steven D'Aprano wrote: > On 24/08/12 16:27, Ray Jones wrote: > >> I am forever confused, however, on which methods can be found where. I >> just spent quarter of an hour searching in sys,* os.*, and shutil.*. for >> a 'kill' command

Re: [Tutor] Python working with Bash....arrrggggh!

2012-08-23 Thread Ray Jones
On 08/23/2012 10:37 PM, eryksun wrote: > On Thu, Aug 23, 2012 at 11:55 PM, Ray Jones wrote: > >> For example, if I wish to test if a file exists, I might do >> >> test = Popen('[ -f file-i-want-to-test-for ]') >> >> But the moment I invoke Bash for

Re: [Tutor] Python working with Bash....arrrggggh!

2012-08-23 Thread Ray Jones
On 08/23/2012 09:53 PM, aklei...@sonic.net wrote: >> As I code Python, I find myself falling back on Bash to handle basic OS >> tasks. How do you gurus deal with Python --> Bash conflicts? >> >> For example, if I wish to test if a file exists, I might do >> >> test = Popen('[ -f file-i-want-to-test

[Tutor] Python working with Bash....arrrggggh!

2012-08-23 Thread Ray Jones
As I code Python, I find myself falling back on Bash to handle basic OS tasks. How do you gurus deal with Python --> Bash conflicts? For example, if I wish to test if a file exists, I might do test = Popen('[ -f file-i-want-to-test-for ]') But the moment I invoke Bash for a test, I must deal wit

Re: [Tutor] subprocess.Popen help...thanks

2012-08-22 Thread Ray Jones
Thanks to all who responded. I'm deeply into some of the links provided, and my understanding has greatly increased. Ray On 08/22/2012 12:59 AM, Andreas Perstinger wrote: > On 22.08.2012 03:39, Ray Jones wrote: >> Does anyone know of a link to a really good tutorial that would h

Re: [Tutor] Hello Python Tutor - help please!

2012-08-22 Thread Ray Jones
I highly recommend the Google Python class that is found on YouTube. The first video is found at http://www.youtube.com/watch?v=tKTZoB2Vjuk The supporting class materials and assignments are found at http://code.google.com/edu/languages/google-python-class/ . This series of videos begins at a pret

[Tutor] subprocess.Popen help

2012-08-21 Thread Ray Jones
Does anyone know of a link to a really good tutorial that would help me with subprocess.Popen? a tutorial that uses really small words and more examples than explanation? After 15 years of scripting, I'm ashamed to say that I'm still not all that familiar with input, output, pipes, etc. much beyon

Re: [Tutor] Escaping globs for glob.iglob()

2012-08-21 Thread Ray Jones
On 08/21/2012 12:59 AM, Alan Gauld wrote: > On 21/08/12 06:42, Ray Jones wrote: > >>Files = glob.iglob(os.path.join(znDir, '*')) >>print Files >> >>for moveFile in Files: >> print moveFile >> >> Nothing happens. The &#

Re: [Tutor] Escaping globs for glob.iglob()

2012-08-20 Thread Ray Jones
On 08/20/2012 11:05 PM, Peter Otten wrote: > Ray Jones wrote: > >> The code: >> >> curDir = os.getcwd() >> znDir = shutil.abspath('../') >> baseDir = shutil.abspath('../../') >> >> Files = glob.iglob(os.path.join(znDir,

[Tutor] Escaping globs for glob.iglob()

2012-08-20 Thread Ray Jones
The code: curDir = os.getcwd() znDir = shutil.abspath('../') baseDir = shutil.abspath('../../') Files = glob.iglob(os.path.join(znDir, '*')) print Files for moveFile in Files: print moveFile shutil.move(moveFile, curDir) Nothing happens. The 'print...moveFile' never happens

Re: [Tutor] Introduction

2012-08-18 Thread Ray Jones
GUI? Moi? Hahahawellnow that you mention it, I wonder Ray On 08/18/2012 10:25 AM, Alan Gauld wrote: > On 18/08/12 17:36, Ray wrote: > >> I'm not certain why I'm diving into Python. My only coding experience >> has been using Bash scripts on my Ubuntu system for the past half dozen >

Re: [Tutor] Introduction

2012-08-18 Thread Ray Jones
Thanks for the welcome - I'll take a look at your recommendation. Ray On 08/18/2012 10:08 AM, Alex Clark wrote: > Hi Ray, > > On 2012-08-18 16:36:40 +, Ray said: > >> Hello. I am new to the mailing list and to Python. My knowledge of >> Python comes almost strictly from Nick Parlante's clas