Christopher Arndt wrote: > Adam Jones schrieb: > > 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. > > Point taken. But wouldn't the plural 'commands.py' be better then? (Though > there is a stdlib module of the same name, which is superseded by the > subprocess module.)
I'd like to say that I thought of the namespace issue and chose command.py instead for that reason, but in reality it was just luck. > > > Off-line as in "run when the server is down", or off-line as in "run > > outside of a thread"? > > Offline as in when the site is down. > > > 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. > > What about database bootstrapping, i.e. pre-filling it with groups, > permissions, etc.? > Yeah, I thought of that too. In fact, that exact issue is why I started TurboSetup[1] and why I was looking into this to begin with. I'd like to be able to have people go from zero to a running server without ever editing a config file or working with the shell. Both of those are good tools, but they were never intended for end user interaction. Development on that kind of stopped when I ran into this issue with starting an application, now that I have that resolved I can get back to work on making TG installations drop dead simple. > > 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 know what you mean, but it wouldn't be a problem to add some explanatory > comments in the Paste template. > > Something like: > > # The function in this module are used by the 'myproject-start.py' script > # in your main project directory. > # > # You can add you own functions used by command line scripts here. > # See the 'myproject-start.py' script for an example on how to structure > # your command line script. > # > # You should NOT remove this file unless you provide your own custom > # start-up script. That would probably work. Some people might delete the file without reading, but it should be pretty easy to fix that. IMO anyone who deletes files without knowing what they are needs that kind of learning experience anyways. -Adam [1] http://cheeseshop.python.org/pypi/TurboSetup --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

