OpenBazaar/OpenBazaar — pull request #675 by gubatron (2014-09-25 00:25:51+00:00)
Title: Openbazaar python launcher

I'm still missing:
- `openbazaar stop` (but servers can be stopped from Settings screen)
- implementation of --config parameter to load runtime settings from a file on disk. (should be easy but wanted to get revision first)

I've already squashed as much as I could, as I kept merging changes from the master branch while I was doing this for the past week.

Now openbazaaar can be started like this:
`./openbazaar start`
`./openbazaar -d -n 5 -j start`

or with self explaining options, my hope is to reduce the number of questions received with a clearer ux on the commandline:
`./openbazaar --development-mode --dev-nodes 5 --disable-upnp --disable-stun-check start`

now the periodic ip checker is turned off by default, as I believe most users will not need to be pinging the hell out of any service, so tor users will have to enable it like this

`./openbazaar --enable-ip-checker start`

The beauty of this new launcher (actual code is at `node/openbazaar.py`) is that we can now pass it through py2exe, py2app and have an openbazaar.exe that windows users should be able to use on their command line, I'll need some help with this once this gets merged.

There's been some important refactors, the code has been simplified when it comes to instantiating the most important objects, the method signatures are cleaner and less prone to inconsistencies and need for cascading maintenance when new parameters will be added, as most runtime parameters are now contained within a `OpenbazaarContext` object, which can be used at anytime to learn about the user's preferences.

During this process I managed to learn a lot about how openbazaar is started and there's still a few important refactors to be made, like this one https://github.com/OpenBazaar/OpenBazaar/issues/666 (CC: @Renelvon @yagoulas are already working on transport refactors, hopefully it'll be easy to merge the changes I've done here, as I believe I've managed to fix a bug caused by a missuse of the `inet_pton` function at a very important time during startup)

Please review with calm, and feel free to ask any questions, will be more than happy to accomodate so this gets merged sooner than later, would love to have this for Beta 2.0 if possible as it will make the user experience a lot more pleasurable and it will enable for advanced windows users to start playing with Openbazaar as well.