Changeset 62f3dd9 for fedd/fedd_image.py


Ignore:
Timestamp:
Dec 10, 2010 9:00:16 AM (13 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master
Children:
913dc7a
Parents:
fbee30a
git-author:
Ted Faber <faber@…> (12/09/10 11:41:45)
git-committer:
Ted Faber <faber@…> (12/10/10 09:00:16)
Message:

allow command line progams to expand tildes. Added a class derived from OptionParser? to make that easily available.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/fedd_image.py

    rfbee30a r62f3dd9  
    1717        client_opts.__init__(self)
    1818        self.add_option("--experiment_cert", dest="exp_certfile",
    19                 type="string", help="experiment certificate file")
     19                action='callback', callback=self.expand_file, type='str',
     20                help="experiment certificate file")
    2021        self.add_option("--experiment_name", dest="exp_name",
    2122                type="string", help="human readable experiment name")
    22         self.add_option("--output", dest="outfile", type="string",
     23        self.add_option("--output", dest="outfile",
     24                action='callback', callback=self.expand_file, type='str',
    2325                help="output image file")
    2426        self.add_option("--format", dest="format", type="choice",
     
    3840                help="Size of output in pixels (diagrams are square")
    3941        self.add_option("--file", dest="file",
     42                action='callback', callback=self.expand_file, type='str',
    4043                help="experiment description file")
    4144        self.add_option("--group", dest="group", action="append", default=[],
Note: See TracChangeset for help on using the changeset viewer.