Access your todo list from multiple locations
by Mandar Vaze on January 17, 2009
in Hack, Open Source, Productivity, Python, Tutorials
Here is a clever method to access your todo list from multiple locations.
Ingredients
- todo.sh – This is a command line shell scripts which allows to manage your TO DO list
- DropBox Account : Free, Syncs various computers, Cross Platform (at least works on Windows as well as Linux)
Recipe
- Make Sure you have installed Dropbox clients on all of your machines (Mainly Work and Home)
- Download and install todo.sh in your Dropbox folder. This is main trick to make your TODO list portable.
- You need to modify the .todo file (or todo.py script itself) to set the TODO_DIR variable. I’ve created a folder called “tododir” in my Dropbox folder, and set the TODO_DIR variable as “tododir”. This helps avoiding path problems on various machines.
- (Optional) Read the tutorial available at LifeHacker
- Open command Prompt, and take charge of your TODO lists.
Why This Idea Rocks
- Since the todo list is maintained as simple text file, any machine/platform allows you to directly view and edit your todo list.
- While one would install Dropbox clients on all of their regularly used machines, You can always view and edit your todo.txt even from a cyber cafe, using Dropbox’s web interface.
Are you on Windows ?
- If you are on Windows, you will require cygwin which provides unix utilities on windows. (I was unable to get todo.sh working with mSys, which I got as part of mSys Git (More about it later, in another post))
- There is a variation of todo.sh written in Python (which is what I’m using these days). If which case, you need Python instead of Cygwin. Python version supports color coding of the items based on priority even on Windows.
Can I not just use USB Drive instead ?
- Sure you can. But some employers do not allow the employees to connect their personal USB devices to office computers. (Security, Virus threats) in which case Dropbox is better alternative.
- Even Cyber cafe won’t allow to plug in your USB drive, but you sure can access your files from Web Front end of Dropbox.
Python : Fun with subprocess.stdin
by Mandar Vaze on January 13, 2009
in Code, Python
As part of some automation work, I needed to execute a program which requires each command to be explictely validated by the user by expliciltely selecting “y” or “n” , on the command line. Since I was processing a large number of files, I decided to use python script.
I used the subprocess module of python to invoke the external program. It was easy to capture the output sent on stdout. In order to send ‘y‘ on stdin for each iteration, I tried sending ‘y‘ on stdin, but that would not work. The script would hang. After discussing this, with more experienced python programmer, it was suggested that one possible reason why the script hangs is may be because the stdin buffer wasn’t flushed. Both of us were not sure how to do that. Then it was discussed that when we run the external program from command line, we not only type ‘y‘ as response, but we also hit Enter there after, which results in flushing the stdin buffer. So may be that is what I ought to try.
To my surprise, it worked. So the solution was to pass ‘y/n‘ instead of single ‘y‘
Here is how my code looked like :
import subprocess
cmd = "...." # The command you wish to execute
proc = subprocess.Popen(cmd,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE)
print proc.communicate('Y\n')[0]
Productive use of Active Desktop – More ideas
by Mandar Vaze on January 7, 2009
in Hack, Productivity
Once you understand the idea behind using the Active Desktop, you can come up with several creative and unique ideas to make this feature work for you. Let me get you started by listing some that came to my mind.
- Apart from the mini phone list, I also have my Plan of the Week, as another HTML on my Desktop. At the end of each week, I create the plan of next week (Friday 4-6PM). Again, it is very easy to convert any piece of text into an HTML.
- Use a web page as Sticky Note to yourself. No Coding needed. Check this out.
- You can put your Google Calendar on your Desktop.
Please share your ideas in the comments

