Help with Python scripting task

By longestne ·
So I need to write this script for a friend in python and he's using this 'command line utility' he made (or took from something else I dunno but it is proprietary so google won't help). He sent me an email that said the following:

I use a command line utility called imgres which basically accepts a list of images ("imgres FileName_1 FileName_2) as arguments and then returns information in the following format:

img_resolution: ### x ###

The script he wants basically takes that info that is read out and prints out the resolution of the file along with the name of the file.

(I guess like file_name.###x### but I can always change the way in which it is organized later I just need to know how to implement the tool he spoke of)

Now, I am using Python for this and I understand how to read the information that it returns, what I don't get is how to specifically link the "command line utility" he is talking about. How do I link one of those into python and get it to do its job? Is it a module or what? I can imagine it going something like this:

from what I have found a command line utility is something actually used on the command line of the OS (I guess UNIX in this case) But all in all I and kind of lost and need a point in the correct direction.

thanks for any help in advance :)

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Related Discussions

Related Forums