Re: [Tutor] Configuaration files and paths?

2009-08-05 Thread Dave Angel
Allen Fowler wrote: What is the recommended way to configure my application find the various database and/or configuration files it needs? Recommemded by whom? A lot depends on the OS. Apple for example have one set of recommendations for MacOS, Windows has another and Linux has several

Re: [Tutor] Configuaration files and paths?

2009-08-05 Thread Allen Fowler
> > What is the recommended way to configure my application find the various > database and/or configuration files it needs? > > Recommemded by whom? A lot depends on the OS. Apple for example have one set > of > recommendations for MacOS, Windows has another and Linux has several to > cho

Re: [Tutor] Configuaration files and paths?

2009-08-05 Thread Alan Gauld
"Allen Fowler" wrote What is the recommended way to configure my application find the various database and/or configuration files it needs? Recommemded by whom? A lot depends on the OS. Apple for example have one set of recommendations for MacOS, Windows has another and Linux has several to

[Tutor] Configuaration files and paths?

2009-08-05 Thread Allen Fowler
Hello, What is the recommended way to configure my application find the various database and/or configuration files it needs? For instance my folder layout: /path_to_app/app.py /path_to_app/lib/ /path_to_app/database/ /path_to_app/config/ /path_to_app/photos and so on. (app.py being th

Re: [Tutor] Scope of exceptions

2009-08-05 Thread Alan Gauld
"Craig McDonald" wrote try: statements extractData() more_statements even_more_statements except KeyboardInterrupt: exit('Exiting') Once it enters/runs the extractData func and if I choose to exit (control c) it throws an exception rather than exiting cleanly. Do I need to put

Re: [Tutor] Scope of exceptions

2009-08-05 Thread Muhammad Ali
Instead of putting it in every function, you could probably do it once in your "main" function that does all the work... On Wed, Aug 5, 2009 at 4:34 PM, Craig McDonald wrote: > Howdy, > > I am in the process of moving all my perl scripts to python and also > trying to learn to program rather than

[Tutor] Scope of exceptions

2009-08-05 Thread Craig McDonald
Howdy, I am in the process of moving all my perl scripts to python and also trying to learn to program rather than just know enough to automate sections of my job. I am trying exit cleanly if I force the script to exit early. I am working my way through core python but not yet read properly about