a = [[1,2],[3,1.5],[5,6]]
for i in a:
print i
if i[1]>i[0]:
print "second index is larger"
else:
print "second index is smaller"
[1, 2]
second index is larger
[3, 1.5]
second index is small
er
[5, 6]
second index is larger
What I'd like do is compare if 1.
On 11/14/07, Roy Chen ([EMAIL PROTECTED]) wrote:
>I would like to write a simple script that would rename a bunch of
>photos according to their creation date, i.e. the date which the
>photo was taken.
>
>Is there a way to use Python to obtain that information from the
>image file, or is that
Hello,
I was wondering whether it was possible to write a program which could directly
write some word in a box and click 'search' on a typical online database
without using the url. (e.g. is there a way to write a program which would
write some keyword, say 'tomato' on google and click 'google
Hello,
I'm new here .
To read EXIF with Python Imaging Library :
>>> import Image
>>> ouv=Image.open('path_to_your_picture_with_exif_data__jpeg')
>>> exifdata=imgExif._getexif()
>>> # Here a personnal exemple
>>> for keyExif, valueExif in zip(exifdata.keys(), exifdata.values()):
... print ke
> And while I haven't tried it, this page (http://effbot.org/zone/pil-
> changes-114.htm) appears to indicate exif format is somewhat
> supported in PIL; perhaps pyexif does a better job though?
PIL does a pretty job, though it's a pain.
from PIL import Image
from PIL.ExifTags import TAGS
def get
Hello,
I wanted to know how to load text box with the default value
Eg. In these lines there is a static text and a text box created ...
and if i want to load value '3' in the text box how can i do that ??
wx.StaticText(panel, -1, "Random Seed", (550,200))
wx.TextCtrl(panel,-1,pos=(620,2
Kent et al
I reworked the code to pass parameters (mainly arrays) to the functions. It
works and performs faster. Thank-you all very much for the insights.
Dinesh
- Original Message -
From: Kent Johnson
To: Dinesh B Vadhia
Cc: tutor@python.org
Sent: Wednesday, November 14, 2007
Thank you for your suggestion. I did not create the original script, so it
will stay as is and my addition for the menu has been adjusted.
Now that I can make a clear distinction of what I am returning, I am getting a
new error that leads me that I am trying to call a function that cannot be
Thus spake Roy Chen:
> Hello,
>
> I would like to write a simple script that would rename a bunch of
> photos according to their creation date, i.e. the date which the
> photo was taken.
>
> Is there a way to use Python to obtain that information from the
> image file, or is that information not s
> I'm assuming you don't want the last changed date you see on the file
> on your PC, but the creation date that the camera stored when the
> picture was taken.
>
> Now I don't know much about that, but I thought it was interesting, so
> I did some Googling :-)
>
> I don't know whether it's always
Hi,
I'm assuming you don't want the last changed date you see on the file
on your PC, but the creation date that the camera stored when the
picture was taken.
Now I don't know much about that, but I thought it was interesting, so
I did some Googling :-)
I don't know whether it's always stored, b
On Nov 14, 2007, at 9:05 PM, Kent Johnson wrote:
> Roy Chen wrote:
>> Hello,
>>
>> I would like to write a simple script that would rename a bunch of
>> photos according to their creation date, i.e. the date which the
>> photo was taken.
>>
>> Is there a way to use Python to obtain that informatio
ted b wrote:
> I want class One to be able to access access class
> Two's value property after its been updated. Everytime
> I try (by running, say testTwo().value) I get the
> __init__ value. The update method fro class Two is
> called elsewhere in the program, and I want class
> One's "getTwo" me
Roy Chen wrote:
> Hello,
>
> I would like to write a simple script that would rename a bunch of
> photos according to their creation date, i.e. the date which the
> photo was taken.
>
> Is there a way to use Python to obtain that information from the
> image file, or is that information not
I want class One to be able to access access class
Two's value property after its been updated. Everytime
I try (by running, say testTwo().value) I get the
__init__ value. The update method fro class Two is
called elsewhere in the program, and I want class
One's "getTwo" method to access class Two'
Dinesh B Vadhia wrote:
> Alan/Jim:
>
> It's good to hear some pragmatic advice.
>
> This particular module has 8 small functions that share common data
> (structures, primarily in arrays and vectors). I tried passing array_G
> as a parameter but that doesn't work because everything in the f
> I am trying to build a menu for the following script to make it
> more "user friendly". Nothing fancy, just a simple add data and
> look up the entered results.
>
> The problem is that when I run my modified version with this
> snippet (please see attachment for original and my modified ve
Hello,
I would like to write a simple script that would rename a bunch of
photos according to their creation date, i.e. the date which the
photo was taken.
Is there a way to use Python to obtain that information from the
image file, or is that information not stored in the file?
Thanks,
Ro
In the middle of your addName function you have defined another
function that requires 'self' and you've got a default argument
'get=1';
def numberType(self, get = 1):
You call this further down the function with the line;
self.type = numberType(self.get)
This should have been;
self.type = num
Greetings all!!
This is my first post and I am going to probably be vague at first, but, I will
try my best to be specific. I am a very GREEN scripter/programmer, so please
be as descriptive as possible. Ok, enough excuses, on with my question!
Here is my issue:
I am trying to build a menu f
Hello,
I am new to wxPython. I have made an application where i created
a button which opens the file from a directory. I created a static
text box near the button. I want to display the filename of file which
is opened using this open button. How can i read the file opened and
put that text
21 matches
Mail list logo