Christopher Arndt wrote: > Adam Jones schrieb: > > I don't know about default, but "optional and trivial" sounds good to > > me. There is not much to stop us from switching to putting the startup > > command in a "command.py" file in the project folder and > > importing/running from start-<projectname>.py. From there setup.py can > > have a console script line provided but commented out. (like the > > turbogears.* keywords are now) > > +1 (but I would call it 'startup.py' or something similar) > > I very often have a few modifications in my start scripts, and it would be > nice > to have the code in my project package, so that different versions can be > installed at the same time. >
The reason I like command.py is that it seems appropriate to place anything that ends up on the command line there, so your startup function, command-line scripts, tg-admin extension(s) ... they can all go in one place. Sort of like how controllers.py is a decent collection place even though "dump it all in one file" doesn't work after a while. > > Cons: > > * Adds another file to the project directory (and another letter to > > controllers.py file name completion!) > > I don't get this. Which file completion do you mean? > > > * Not many other uses for console scripts in TG (due to scheduler, > > tg-admin extensions, etc) > > Oh, I could think of a few. Off-line database maintenance scripts for example. > Off-line as in "run when the server is down", or off-line as in "run outside of a thread"? If its run outside of a thread the scheduler is a better way to go unless you really really want to use cron or something. > > * Few people know about and/or use console scripts or command > > extensions. > > That's no real argument. I, for one, didn't know much about how to build eggs > at all, before I started using TG... Yes, and that is part of the point. Eggs can be kind of confusing to people who don't know how to use it. One thing that should be avoided is having a bewildering selection of files and folders when a project is created. Right now I don't know if the extra flexability in handling project startup is worth the confusion it will cause. I guess I can follow the lazy dev solution to it, file a patch and let Kevin decide. -Adam --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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?hl=en -~----------~----~----~----~------~----~------~--~---

