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.)

> 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.?

> 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.

(BTW: I wished that the 'json.py' file had a similar comment that tells you
that it is save to remove it, if you don't use it's functions)

Chris

--~--~---------~--~----~------------~-------~--~----~
 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to