Joseph Quigley wrote:
> This suggestion:
>
> date = files[x]
>Data.year = date[2:4]
>Data.month = date[4:6]
>Data.day = date[6:8]
>
>
> Doesn't work because DspImage needs a concatenated string. (you'll see
> a 07/28/['5'] instead of the current 07/28/05.
D
Joseph Quigley wrote:
> Hey, if you are a Garfield fan or you just want to see the source code,
> you can download the whole kaboodle (it's cross platform) from:
> http://www.jqsoftware.com/software/Gacor/gacor-096.py
I hope you like some comments...
IMO the use of the Data class as a global op
Hi,
Thank you all for your help. I must say that the python mailing list is
the most helpfull of any place I've ever asked for help on. A close
second comes linuxquestions.org.
Somehow sort() got passed me in the Python Documentation and sort() has
fixed all my problems.
EDIT> Sort still didn'
The correct code looks like this:
files = os.listdir()
files.sort()x = 0direction = 1while True: ShowImg(files[x]) # An image display function x += -1-- Cheers, Murtog
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinf
> When I use:
> files = os.listdir()
Have you tried printing 'files'?
Are they in order there?
> it doesn't display the images in the right order! It will skip from
> ga050123.gif and go to ga050120.gif!
I suspect listdir doesn't use name order.
You probably need to do a sort() on the files list
Joseph Quigley wrote:
> Hi,
> Here's my directory listing as a list:
> ['ga041001.gif', 'ga041002.gif', 'ga041003.gif', 'ga041004.gif',
> 'ga041005.gif', 'ga041006.gif', 'ga041007.gif', 'ga041008.gif',
> 'ga041009.gif', 'ga041010.gif', 'ga041011.gif', 'ga000619.gif',
> 'ga050101.gif', 'ga050102.gif
Joseph Quigley wrote:
> When I use:
> files = os.listdir()
> x = 0
> direction = 1
> while True:
> ShowImg(files[x]) # An image display function
> x += -1
>
> it doesn't display the images in the right order! It will skip from
> ga050123.gif and go to ga050120.gif!
Why not do something l
Hi,
Here's my directory listing as a list:
['ga041001.gif', 'ga041002.gif', 'ga041003.gif', 'ga041004.gif',
'ga041005.gif', 'ga041006.gif', 'ga041007.gif', 'ga041008.gif',
'ga041009.gif', 'ga041010.gif', 'ga041011.gif', 'ga000619.gif',
'ga050101.gif', 'ga050102.gif', 'ga050103.gif', 'ga050104.gif',