Re: [Tutor] Moving from snippits to large projects?

2012-01-08 Thread Hugo Arts
On Mon, Jan 9, 2012 at 3:09 AM, Leam Hall wrote: > I'm taking the O'Reilly Python 2 course on-line, and enjoying it. Well, when > Eclipse works, anyway. I'm still getting the hang of that. > > While my coding over the years has been small snippits in shell, PHP, and a > little C, python, and perl,

[Tutor] Moving from snippits to large projects?

2012-01-08 Thread Leam Hall
I'm taking the O'Reilly Python 2 course on-line, and enjoying it. Well, when Eclipse works, anyway. I'm still getting the hang of that. While my coding over the years has been small snippits in shell, PHP, and a little C, python, and perl, I've never made the transition from dozens of lines to

Re: [Tutor] making a custom file parser?

2012-01-08 Thread Hugo Arts
On Mon, Jan 9, 2012 at 2:19 AM, Devin Jeanpierre wrote: >> Parsing XML with regular expressions is generally very bad idea. In >> the general case, it's actually impossible. XML is not what is called >> a regular language, and therefore cannot be parsed with regular >> expressions. You can use reg

Re: [Tutor] making a custom file parser?

2012-01-08 Thread Devin Jeanpierre
> Parsing XML with regular expressions is generally very bad idea. In > the general case, it's actually impossible. XML is not what is called > a regular language, and therefore cannot be parsed with regular > expressions. You can use regular expressions to grab a limited amount > of data from a li

Re: [Tutor] different behaviour in Idle shell vs Mac terminal

2012-01-08 Thread Alan Gauld
On 08/01/12 23:34, Adam Gold wrote: I have short piece of code I'm using to print a string to > the terminal one letter at a time. It works fine when I invoke the script from within Idle; each letter appears afterthe preceding one according to the designated time > interval. > However if I r

Re: [Tutor] different behaviour in Idle shell vs Mac terminal

2012-01-08 Thread Steven D'Aprano
Adam Gold wrote: I have short piece of code I'm using to print a string to the terminal one letter at a time. It works fine when I invoke the script from within Idle; each letter appears after the preceding one according to the designated time interval. However if I run it in the Mac termina

[Tutor] different behaviour in Idle shell vs Mac terminal

2012-01-08 Thread Adam Gold
I have short piece of code I'm using to print a string to the terminal one letter at a time.  It works fine when I invoke the script from within Idle; each letter appears after the preceding one according to the designated time interval.  However if I run it in the Mac terminal ('python3 ./scri

Re: [Tutor] Zip, tar, and file handling

2012-01-08 Thread Alexander Etter
On Jan 6, 2012, at 22:57, daedae11 wrote: > I was asked to write a program to move files between ZIP(.zip) and > TAR/GZIP(.tgz/.tar.gz) or TAR/BZIP2(.tbz/.tar.bz2) archive. > > my code is: > > > import zipfile; > import tarfile; > import os; > from os import path ; > > def showAllFiles(