[Tutor] Rsync script hangs after a while

2014-02-04 Thread Dayo
what's wrong with this thing? Thanks Dayo ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] os.path.basename() issue with path slashes

2010-02-20 Thread Dayo Adewunmi
//kili.org/~dayo"; currentdir = os.path.basename(absolutePath) for dirname, subdirname, filenames in os.walk(absolutePath): for filename in filenames: print "" %(currentdir,filename,currentdir,filename) # Generate thumbnail gallery genThumbs() However, this is

Re: [Tutor] os.path.basename() issue with path slashes

2010-02-20 Thread Dayo Adewunmi
currentdir = os.path.basename(absolutePath) >>> print "" %(currentdir,filename,currentdir,filename) ~l0nwlf Arrrgh. Didn't see that forwardslash I put in there. It's fixed and works now. Thanks! Dayo ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Regex to find files ending with one of a given set of extensions

2010-02-21 Thread Dayo Adewunmi
k (most recent call last): File "test.py", line 25, in main() File "test.py", line 21, in main findImageFiles() File "test.py", line 14, in findImageFiles findImages = imageRx(someFiles) TypeError: '_sre.SRE_Pattern' object is not callable i'm ne

Re: [Tutor] Regex to find files ending with one of a given set of extensions

2010-02-22 Thread Dayo Adewunmi
Steven D'Aprano wrote: On Mon, 22 Feb 2010 04:23:04 am Dayo Adewunmi wrote: Hi all I'm trying use regex to match image formats: Perhaps you should use a simpler way. def isimagefile(filename): ext = os.path.splitext(filename)[1] return (ext.lower() in (

[Tutor] Running PIL.Image on .svg file

2010-02-23 Thread Dayo Adewunmi
Hi all When i use PIL.Image in this script:http://dpaste.com/163588/ on an .svg file, I get this error:http://dpaste.com/163584/ How do i process .svg files in python? Thanks Dayo ___ Tutor maillist - Tutor@python.org To unsubscribe

Re: [Tutor] Running PIL.Image on .svg file

2010-02-23 Thread Dayo Adewunmi
Eduardo Vieira wrote: On Tue, Feb 23, 2010 at 7:27 AM, Dayo Adewunmi wrote: Hi all When i use PIL.Image in this script:http://dpaste.com/163588/ on an .svg file, I get this error:http://dpaste.com/163584/ How do i process .svg files in python? Thanks Dayo

Re: [Tutor] PDF to text conversion

2009-04-21 Thread Dayo Adewunmi
utor Hi Robert, pdftotext is part of poppler-utils, an Ubuntu package which can be installed like so: sudo aptitude install poppler-utils But I to would be interested in finding a python library/module for this. Regards, Dayo ___ Tutor maillist

Re: [Tutor] how to compile python3.0

2009-04-24 Thread Dayo Adewunmi
2-dev libc6-dev libsqlite3-dev tk-dev g++ gcc Solution for _dbm $ wget -c http://bugs.python.org/file12234/dbm.diff $ patch -p0 < dbm.diff $ sudo apt-get build-dep python2.5 $ make $ sudo make install Regards Dayo ___ Tutor maillist - Tutor@python.org http

Re: [Tutor] python books

2009-04-25 Thread Dayo Adewunmi
-- chinmaya sn ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor I'm currently reading Think Python http://www.greenteapress.com/thinkpython/thinkpyth

[Tutor] How to run a .py file or load a module?

2009-04-26 Thread Dayo Adewunmi
ive interpreter, and call it like so: countdown(10) without getting the abovementioned error. Thanks. Dayo ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How to run a .py file or load a module?

2009-04-28 Thread Dayo Adewunmi
! = 1 to while n != 0 and changed n = n - 1 print n to print n n = n -1 Thanks for the time you guys have put into this. It's much appreciated. :-) Dayo ___ Tutor maillist - Tutor@python.org http://mail.pyt

Re: [Tutor] How to run a .py file or load a module?

2009-04-28 Thread Dayo Adewunmi
module, and also the idea of from import as Thanks a lot, everybody. :-) Dayo -- spir wrote: Le Sun, 26 Apr 2009 22:35:36 +0100, Dayo Adewunmi s'exprima ainsi: How can I a) Open my shell, and do something like: $ python countdown.py but have it ta

Re: [Tutor] Triggering code on 1 minute intervale ..

2009-05-09 Thread Dayo Adewunmi
://mail.python.org/mailman/listinfo/tutor A cron job? Regards Dayo ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] writing HTML code to a variable/file

2009-05-26 Thread Dayo Adewunmi
.g. name, which is in turn appended to namelist, and subsequently written to the file. How do I save this http://users.example.com/~"; + userName + ">" + lastName + ", " + firstName + " to a variable, then? Thanks Dayo ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Sorting list of tuples in two passes

2011-08-28 Thread Dayo Adewunmi
to wrap my mind around lambda, which is what my browsing around seems to indicate is needed to achieve this? Thanks Dayo import ldap,re from operator import itemgetter,attrgetter l = ldap.initialize("ldap://172.20.0.1";) l.simple_bind_s("","") base_dn = 'o

Re: [Tutor] Sorting list of tuples in two passes

2011-08-28 Thread Dayo Adewunmi
On 08/28/2011 06:23 PM, Hugo Arts wrote: On Sun, Aug 28, 2011 at 6:43 PM, Dayo Adewunmi wrote: Hi I have a list of tuples that each have four elements: [(firstName,lastName,userName,gidNumber),(.)] I'm trying to sort this list in two passes. First by gidNumber and then the subg

Re: [Tutor] Sorting list of tuples in two passes

2011-08-29 Thread Dayo Adewunmi
On 08/29/2011 01:59 AM, Hugo Arts wrote: On Mon, Aug 29, 2011 at 2:19 AM, Dayo Adewunmi wrote: On 08/28/2011 06:23 PM, Hugo Arts wrote: On Sun, Aug 28, 2011 at 6:43 PM, Dayo Adewunmi wrote: Hi I have a list of tuples that each have four elements: [(firstName,lastName,userName,gidNumber