[Tutor] Python debugger/IDE that can be launched from a remote command line

2013-05-10 Thread Michael O'Leary
I am working on a project in which the code and data I am working with are all on an Amazon EC2 machine. So far I have been ssh'ing to the EC2 machine in two terminal windows, running emacs or vi in one of them to view and update the code and running the "python -m pdb ..." debugger in the other on

[Tutor] Setting log directory from a command line argument

2013-02-21 Thread Michael O'Leary
I have added logging to a Python program I have been working on by putting this in the module's __init__.py file: ## import logging logger = logging.getLogger('ranking_factors') formatter = logging.Formatter('[%(asctime)s] %(levelname)s in %(module)s:%(funcName)s@%(lineno)s => %(message)s'

[Tutor] Class-based generator

2013-02-17 Thread Michael O'Leary
I wrote some code to create tasks to be run in a queue based system last week. It consisted of a big monolithic function that consisted of two parts: 1) read data from a file and create dictionaries and lists to iterate through 2) iterate through the lists creating a job data file and a task for th