[FRPythoneers] dispatching from a script
bpederse at gmail.com
Fri Apr 15 11:44:32 MDT 2011
On Fri, Apr 15, 2011 at 11:37 AM, Ian Kelly <ian.g.kelly at gmail.com> wrote:
> On Fri, Apr 15, 2011 at 11:29 AM, Brent Pedersen <bpederse at gmail.com> wrote:
>> hi, not sure if this list is the appropriate venue, but i'll ask anyway.
> Nothing wrong with asking here, but comp.lang.python would probably be
> better by virtue of having more users.
yeah, but i dont want to subscribe to (yet another) high-volume mailing list
>> so i have a python library and i want to have several scripts but keep
>> them in the same name space.
>> so i'll have "mymodule" that's importable from python and then i want
>> to be able to have console scripts
>> $ mymodule action_a --args files
>> $ mymodule actoin_b --other_args other_files
> The argparse module in the standard library has support for
> sub-commands and probably does exactly what you want.
> This message sent by the FRPythoneers mailing list.
> Unsubscribe: echo unsubscribe | FRPythoneers-request at lists.community.tummy.com
> URL: http://lists.community.tummy.com/mailman/listinfo/frpythoneers
thanks, that does what i want:
just looks like it's not even in the 2.7 stdlib, so i'll add it as a dependency.
More information about the FRPythoneers