Skip to content

Commit

Permalink
Fix PY3 error
Browse files Browse the repository at this point in the history
  • Loading branch information
rochacbruno committed Jun 14, 2016
1 parent 5c66817 commit 391d8f4
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 45 deletions.
38 changes: 1 addition & 37 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,43 +54,7 @@ Also you can specify a custom function to run or a string based code block to ru

If **IPython** is installed it will use it, otherwise will use the default Python console including support for tab autocomplete.

Lets see an example:

Edit the file :code:`manage.yml` with the following content::

---
shell:
readline_enabled: true
banner:
enabled: true
envvars: true
message: "{USER}, welcome to my Shell!"
auto_import:
display: true
objects:
myapp.module.Class:
myapp.module.object:
as: obj
init:
configure:
args:
- a
- b
kwargs:
foo: bar
init:
myapp.initialization.start:
args:
- a
- b
kwargs:
foo: bar
init_script: |
from foo import bar
bar.configure()


Then the above configurations will give you the :code:`manage shell` as in the picture below
Check the example in: https://github.com/rochacbruno/manage/tree/master/examples/simple


Custom Commands
Expand Down
30 changes: 27 additions & 3 deletions docs/manage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ manage package
Submodules
----------

manage.auto_import module
-------------------------

.. automodule:: manage.auto_import
:members:
:undoc-members:
:show-inheritance:

manage.cli module
-----------------

Expand All @@ -12,10 +20,26 @@ manage.cli module
:undoc-members:
:show-inheritance:

manage.manage module
--------------------
manage.commands_collector module
--------------------------------

.. automodule:: manage.commands_collector
:members:
:undoc-members:
:show-inheritance:

manage.template module
----------------------

.. automodule:: manage.template
:members:
:undoc-members:
:show-inheritance:

manage.utils module
-------------------

.. automodule:: manage.manage
.. automodule:: manage.utils
:members:
:undoc-members:
:show-inheritance:
Expand Down
3 changes: 1 addition & 2 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
Usage
=====

To use Manage in a project::
.. include:: ../examples/simple/README.rst

import manage
4 changes: 1 addition & 3 deletions manage/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@


if PY2:
# exec('def reraise(tp, value, tb=None):\n raise tp, value, tb')
def reraise(tp, value, tb=None):
raise tp, value, tb # noqa
exec('def reraise(tp, value, tb=None):\n raise tp, value, tb')
else:
def reraise(tp, value, tb=None):
if value.__traceback__ is not tb:
Expand Down

0 comments on commit 391d8f4

Please sign in to comment.