Skip to content

Commit

Permalink
make running alot from git easier (for development)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasTomecek authored and pazz committed Mar 11, 2015
1 parent 1ec1fec commit 70d0bc3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions alot/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,6 @@ def main():

# set up and start interface
UI(dbman, cmdstring)

if __name__ == '__main__':
main()

7 comments on commit 70d0bc3

@ids1024
Copy link

@ids1024 ids1024 commented on 70d0bc3 Dec 4, 2015

Choose a reason for hiding this comment

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

It seems to be that it would be better to have a __main__.py file. Then, from the top level of the git repo, it would be as simple as running python alot.

@pazz
Copy link
Owner

@pazz pazz commented on 70d0bc3 Dec 4, 2015

Choose a reason for hiding this comment

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

wouldn't that start the ui even if i just import alot.foo ? Otherwise, __main__.py might be a good idea

@ids1024
Copy link

@ids1024 ids1024 commented on 70d0bc3 Dec 4, 2015

Choose a reason for hiding this comment

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

@pazz No, that is what would happen if the code was but in __init__.py. __main__.py is run when the module is executed as a script, so it should not cause any such problem.

@pazz
Copy link
Owner

@pazz pazz commented on 70d0bc3 Dec 16, 2015

Choose a reason for hiding this comment

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

right. let's have a __main__.py then :)

@pazz
Copy link
Owner

@pazz pazz commented on 70d0bc3 Dec 16, 2015

Choose a reason for hiding this comment

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

@geier
Copy link
Collaborator

@geier geier commented on 70d0bc3 Dec 16, 2015

Choose a reason for hiding this comment

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

I do this a bit differently: I install packages I want to tinker on with cd path/to/alot && pip install -e . and can than just run alot.

@ids1024
Copy link

Choose a reason for hiding this comment

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

@pazz Yes, that looks ok to me.

Please sign in to comment.