Question

So I'm fairly new to python in general, mostly use it to move files around easily, and what I've been doing lately was using raw_input to get a name to pass on as a directory name variable. But I say getopt and figured it would save time and effort to just try and get that variable that raw_input prompts the user for as an option. But I can't find any examples of what I want to do exactly.

Instead of waiting for it to prompt me I could just type meego.py shortname=example and have it do it's thing. Is this something easy enough to do?

Here's what I have no basically

var = raw_input("Shortname=")

print 'starting: ' + str(var)

svn_app = svn_root + "/" + var    


shutil.copyfile(riproot + '/images/ApplicationIcon.png',
            svn_app + '/images/ApplicationIcon.png') 

print 'done: ' + str(var)

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top