[PyQt] linking subprocess function and items in listwidget?

klia alwaseem307ster at yahoo.com
Mon Mar 16 15:25:19 GMT 2009




Till Gerken-2 wrote:
> 
> On Mon, Mar 16, 2009 at 11:32 AM, klia <alwaseem307ster at yahoo.com> wrote:
>> I have function myexif.py that extracts exif data from photos into .csv
>> file, i have subprocess this function into this form under a bush button
>> (add photo)
>>
>> p= Popen(["python","myexif.py","-q","photopath"],
>> stdout=file("test.csv","w"))
>> p.wait()
>>
>> I am suppose to select one or more photos in the listwidget and execute
>> my
>> (add photo) button which will extracts exif data from the photos
>> selected,
>> but i am facing problem on how to get the function above to know the path
>> of
>> my selected photos in the listwidget?
> 
> Using a QListWidget, you will either have to add the items with their
> full path to the list or use a common directory root. If that is not
> possible, use a QListView and your own data model. A custom data model
> allows you to keep the list entry and path to the file name as
> separate entities.
> 
> http://doc.trolltech.com/4.4/model-view-programming.html
> 
> Till
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
> 
> 

Thanks for replaying

actually i am already able to add my items into my list widget with full
path info but how to make the subprocess function provided above realize
that i need to execute those items on the listwidget and not fixed path hard
coded in the function itself? 
-- 
View this message in context: http://www.nabble.com/linking-subprocess-function-and-items-in-listwidget--tp22535334p22540555.html
Sent from the PyQt mailing list archive at Nabble.com.



More information about the PyQt mailing list