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

use argparse to handle arguments #16 #20

Merged
merged 3 commits into from
Sep 7, 2016

Conversation

douglasshimada
Copy link
Contributor

No description provided.

SystemExit: 2
"""
parser = argparse.ArgumentParser()
parser.add_argument("-p", "--path",
Copy link
Contributor

@lamenezes lamenezes Aug 21, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pode tirar o -p e --path, deixa o caminho como posicional mesmo, para que o programa seja rodado assim:

python -m dojo_toolkit /caminho/doidao --time 5

ou somente

python -m dojo_toolkit /caminho/doidao

😃

@douglasshimada
Copy link
Contributor Author

@lamenezes da uma olhada para ver se ficou melhor.

@@ -1,3 +1,3 @@
from .dojo import main
from .main import main

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

coloca um if __name__ == '__main__': aqui

@lamenezes
Copy link
Contributor

@douglasshimada ficou bem melhor! tem como implementar uns testes para isso? (antes vc precisa fazer merge do PR #21)

@lamenezes
Copy link
Contributor

@douglasshimada the patch is great! it just needs some tests 😄

@lamenezes lamenezes merged commit 79fbe8e into grupy-sanca:master Sep 7, 2016
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.

2 participants