Thanks Allesandro and Craig!
Craig this is exactly what I was looking for, would I be right to assume
that the tg2 functionality is in cmdline.py in class RnmsCommand in the
_get_config method?:
conf = appconfig('config:' + os.path.abspath(self.args.conf_file))
load_environment(conf.global_conf, conf.local_conf)
since the rest is making the console stuff, entry points, clever(! I
learned from reading the code) command inheritance etc'
if so?
BTW I guess class foo is just some example code lying there?
On Thursday, May 30, 2013 2:29:52 AM UTC+3, Craig Small wrote:
>
> On Wed, May 29, 2013 at 12:09:21PM -0700, alonn wrote:
> > how can I package it as a python shell script so I could just call:
> > python custom_script.py file.csv
> I go even one better than this and have
> custom_script file.csv
>
> It's even in the path (with virtualenv) so it just works :)
> I probably should write it up but if you want to see working code, have
> a look at: https://github.com/csmall/rnms
>
> setup.py - look at [console_scripts]
> rnms/lib/scripts/ - these are the actual script starting things
> rnms/lib/cmdline.py - the main object for my command line things
>
> rnms_info is probably the simplest one as its not a daemon.
> Sorry its a breif reply, let me know if you want more info.
>
> - Craig
>
> --
> Craig Small VK2XLZ http://enc.com.au/ csmall at : enc.com.au
> Debian GNU/Linux http://www.debian.org/ csmall at : debian.org
> GPG fingerprint: 5D2F B320 B825 D939 04D2 0519 3938 F96B DF50 FEA5
>
--
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.