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/cert_to_fedid.py

    rfbee30a r62f3dd9  
    33import sys, os
    44import subprocess, tempfile
     5import os.path
    56
    67from string import join
    7 from optparse import OptionParser
    8 from federation.util import abac_pem_type, abac_split_cert
     8from federation.util import abac_pem_type, abac_split_cert, file_expanding_opts
    99
    10 class Parser(OptionParser):
     10class Parser(file_expanding_opts):
    1111    def __init__(self):
    12         OptionParser.__init__(self, usage='%prog [options]')
     12        file_expanding_opts.__init__(self, usage='%prog [options]')
    1313        self.add_option('--out', dest='out', help='destination file',
     14                action='callback', callback=self.expand_file, type='str',
    1415                default='./cert.pem')
    1516        self.add_option('--debug', dest='debug', action='store_true',
Note: See TracChangeset for help on using the changeset viewer.