|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /proc/self/root/usr/lib/python2.4/site-packages/mx/Misc/ |
Upload File : |
mò
i.5?c @ sI d Z d Z d k Z d k Z d k Z d k Z d k Z d k Z d k Z d „ Z d d „ Z
d „ Z e
Z e i
d ƒ Z e i
d ƒ Z e i e e d „ Z e i i e i i e i i e i d
„ Z d f d „ ƒ YZ d
e f d „ ƒ YZ d e f d „ ƒ YZ d f d „ ƒ YZ e Z d „ Z e d j o e ƒ n d S( s CommandLine - Get and parse command line options
NOTE: This still is very much work in progress !!!
Different version are likely to be incompatible.
TODO:
· Incorporate the changes made by (see Inbox)
· Add number range option using srange()
Copyright (c) 1997-2001, Marc-Andre Lemburg; mailto:mal@lemburg.com
Copyright (c) 2000-2001, eGenix.com Software GmbH; mailto:info@egenix.com
See the documentation for further information on copyrights,
or contact the author. All Rights Reserved.
s 1.0Nc C s¤ g } g } x | D]w } | i d j o/ | i | i ƒ | i o | i d ƒ qŠ q | i o | i | i d ƒ q | i | i ƒ q Wt i | d ƒ | f S( sP Convert the option list to a getopt flag string and long opt
list
t -t :t =t N(
t st lt optionst ot prefixt appendt namet takes_argumentt stringt join( R R R R ( ( t7 /usr/lib/python2.4/site-packages/mx/Misc/CommandLine.pyt
_getopt_flags s
s >>> c C s3 d k } | i | ƒ } | d j o
t ‚ n | S( sw Get raw input from a terminal without echoing the characters to
the terminal, e.g. for password queries.
N( t getpasst promptt entryt Nonet KeyboardInterrupt( R R R ( ( R t invisible_input/ s
c C s( h } x | D] } | | | i <q
W| S( sC Return a dictionary mapping option names to Option instances.
N( t dR t optionR
( R R R ( ( R t option_dict; s s \s*(-?\d+)\s*$s \s*(-?\d+)\s*-\s*(-?\d+)\s*$c
C s¶ g } | i } x | | d ƒ D] } | i | ƒ } | o! | t | i ƒ d ƒ ƒ q n | i | ƒ } | o<