Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command line (in progress) #42

Closed
wants to merge 5 commits into from
Closed

Conversation

Mar2zz
Copy link
Contributor

@Mar2zz Mar2zz commented Jan 6, 2012

Command line works, but I'd like to implement some more, but need some feedback to make it work. When --database=/path/to/database is given I want it to override the databasepath in settings.py. But I can't get this option to be saved to database.py, which always uses the one from settings.py.

It can be done by using all optparse code which is added in Maraschino.py again in database.py, to let it do it's own parsing, but that's a very ugly workaround to make it work. So perhaps someone has a better idea on how to do this?

I thought maybe a stringreplacement on sys.arg?

@gugahoi
Copy link
Collaborator

gugahoi commented Jan 6, 2012

This is pretty awesome! I reckon we should just use the DATABASE path info from settings.py if --database is not an argument in the command line. No need to reassign the database variable itself if the argument is there.

Furthermore, I think with this we can get rid of the "rename settings_example" part and just have settings.py by default? Or maybe have maraschino do it automatically on first run? This way it way really be clone and run.

@Mar2zz
Copy link
Contributor Author

Mar2zz commented Jan 7, 2012

Tested with apache. Apache instructions stay the same.
--port=XXXX overrides ports
--develop starts dev-server with debug

By default it starts the cherrypy server so it doesn't debug.

Tried to write a pidfile and daemon option, but it forks 2 or 3 times, so that won't work as expected. Need to learn some more before I can implement such sys functions.

So this is a finished request, can be implemented if you want to.

@Mar2zz
Copy link
Contributor Author

Mar2zz commented Jan 7, 2012

Just discovered that the whole cherrypy folder is not needed. Only the subfolder wsgiserver is needed. if you put wsgiserver in the root of lib and delete cherrypy, all you need to change is from cherrypy import wsgiserver to import wsgiserver. saves a lot of bits.

@mvanderberg
Copy link
Contributor

Hi Mar2zz,

Are you sure? I removed the cherrypy folder completely (as I think I saw that all the files an dependencies were copied to the python home)...
Everything still works (2 machines: windows 2003 and ubuntu)

Cheers, Mark

@gugahoi
Copy link
Collaborator

gugahoi commented Apr 2, 2012

Any chance this can be finished?

@mrkipling mrkipling closed this Jun 16, 2012
@mrkipling
Copy link
Owner

Apologies for slacking on this one, but the core restructure pull request pretty much covers all of this, and has been merged in now...

@Mar2zz
Copy link
Contributor Author

Mar2zz commented Jun 16, 2012

no problem I am slacking too, occupied with other stuff a lot recently.

Op 16-06-12 16:04, Bradley Abrahams schreef:

Apologies for slacking on this one, but the core restructure pull request pretty much covers all of this, and has been merged in now...


Reply to this email directly or view it on GitHub:
#42 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants