Hi all,
This script I'm working on, should take all the image files in the current
directory
and generate an HTML thumbnails.
import os
import urllib
# Generate thumbnail gallery
def genThumbs():
# Get current directory name
absolutePath = os.getcwd()
urlprefix = "http://kili.org/~day
Shashwat Anand wrote:
for dirname, subdirname, filenames in os.walk(absolutePath):
for filename in filenames:
print ""
%(currentdir,filename,currentdir,filename)
I see a small typo here.
print ""
%(currentdir,filename,currentdir,filename) should rather
Hi all
I'm trying use regex to match image formats:
import re
def findImageFiles():
imageRx = re.compile('\.jpe?g$|\.png$|\.gif$|\.tiff?$', re.I)
someFiles =
["sdfinsf.png","dsiasd.dgf","wecn.GIF","iewijiefi.jPg","iasjasd.py"]
findImages = imageRx(someFiles)
print "START: %s" %
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
(
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 o
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
Emile van Sebille wrote:
Robert Berman wrote:
Have any of you worked with such a library, or do you know of one or
two I can download and work with? Hopefully, they have reasonable
documentation.
My development environment is:
Python
Linux
Ubuntu version 8.10
I've used
[r...@fcfw2 /]#
Shaofeng NIu wrote:
I tried to compile and install python3.0 from source,but after
"make",it shows:
Python build finished, but the necessary bits to build these modules
were not found:
_dbm _gdbm _hashlib
_sqlite3 _ssl _tkinter
b
chinmaya wrote:
On Mon, Apr 13, 2009 at 11:07 PM, sudhanshu gautam
mailto:sudhanshu9...@gmail.com>> wrote:
I am new in python , so need a good books , previously read python
Bible and swaroop but not satisfied .
so tell me good books in pdf format those contents good problems a
I'm looking at recursion in "Think Python", and this is the bit of code:
#!/usr/bin/env python
def countdown(n):
if n <= 0:
print 'Blastoff!'
else:
print n
countdown(n-1)
I've typed that in vim and saved as countdown.py, but I'm n
David wrote:
Norman Khine wrote:
On Mon, Apr 27, 2009 at 12:07 AM, Sander Sweers
wrote:
Here is another one for fun, you run it like
python countdown.py 10
#!/usr/bin/env python
import sys
from time import sleep
times = int(sys.argv[1]) # The argument given on the command line
def countdow
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
Alex Feddor wrote:
.. What will be the best solution to trigger python code every minute
as soon as PC in on.
Cheers, Alex
___
Tutor maillist - Tutor@python.org
http://mai
Hi,
I'm extracting data from OpenLDAP, which needs to be formatted into
hyperlinks. So far, I can print the generated HTML code:
print "http://users.example.com/~"; + userName + ">" + lastName
+ ", " + firstName + ""
However I want to write each line to a file first, so that I can
alphabet
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 subgroups by lastName. So far i've only been able to sort by
gidNumber. But I can't seem to wrap my mind a
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
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
17 matches
Mail list logo