Ian Bicking, el 2 de julio a las 15:48 me escribiste: > > 2- paster, paste script to be exact is way too complicated for > > "normal" tg commands, paster is build on top of optparse which at > > least in TG case will maintain the huge set of switches, most TG > > commands could be ran with a simpler structure of "tg2-admin cmd > > subcommand" this is due to some things being set by default like the > > project, model,etc. Second the fact that paster commands are classes > > goes against how TG-cli is implemented which is sets of commads, > > (please correct me if I'm wrong here) the only way I see we can > > implement sets of commands on pastescript is to have one class > > implement the command and in it's run method parse to get the > > "subcommand" part which makes it esencially imposible to add new > > subcommands to already existing commands. > > Why do you need these three-level commands? > > If you want, you could create a subclass of paster's Command class that > does more dispatching. You could even just look for an entry point of > "%s %s" % (self.name, self.args[0]), same entry point type as Paster's > current commands (since it's basically the same interface).
I don't know anything about paster nor TG current CLI, but have you considered going the git[1] way? What git does is just to call 'git-cmd arguments' when you call 'git cmd arguments'. The simplicity behind this model is just beautiful, and you don't need entry points or any other weird stuff. If you want to add a tg-admin subcommand just install a new command line utility called tg-admin-subcommand. Just a thought... [1] http://git.or.cz/ -- LUCA - Leandro Lucarella - Usando Debian GNU/Linux Sid - GNU Generation ------------------------------------------------------------------------ E-Mail / JID: [EMAIL PROTECTED] GPG Fingerprint: D9E1 4545 0F4B 7928 E82C 375D 4B02 0FE0 B08B 4FB2 GPG Key: gpg --keyserver pks.lugmen.org.ar --recv-keys B08B4FB2 ------------------------------------------------------------------------ Parece McGuevara's o CheDonald's --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears Trunk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears-trunk?hl=en -~----------~----~----~----~------~----~------~--~---
