Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > pass named parameters to python

Reply
Thread Tools

pass named parameters to python

 
 
John Leslie
Guest
Posts: n/a
 
      02-08-2005
I am converting a korn shell script to python and want to be able to
pass named arguments into python e.g -firstparam -secondparam

Can this be done?
 
Reply With Quote
 
 
 
 
Duncan Booth
Guest
Posts: n/a
 
      02-08-2005
John Leslie wrote:

> I am converting a korn shell script to python and want to be able to
> pass named arguments into python e.g -firstparam -secondparam
>
> Can this be done?
>


See the module 'optparse'.
http://www.python.org/doc/current/li...-optparse.html
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Python does not allow a variable named "pass" BJ Swope Python 2 04-11-2010 01:57 PM
Named parameters Bill Pursell C Programming 37 06-24-2006 10:18 PM
"named parameters mechanism" Adam Hartshorne C++ 3 01-23-2006 11:42 AM
Python bug? Named parameters in recursive calls sometimes confuses python? Magnus Lyck? Python 5 12-02-2003 01:41 PM
Named parameters Adam Ruth C Programming 48 11-03-2003 11:44 PM



Advertisments