The documentation included with the Python RTM API is a bit sparse, so here is a really simple example of a script that allows you to add tasks to your Remember the Milk inbox from the command line. I actually integrated this script with LaunchBar for an even nicer experience.
from rtm import
apiKey = "get your own"
secret = "this too"
token = "you'll create this with apiKey and secret"
newTask = " ".join(sys.argv[1:])
rtm = createRTM(apiKey, secret, token)
tl = rtm.timelines.create()
rsp = rtm.tasks.add(timeline=tl.timeline,name=newTask,parse=1)
There now that is really very easy.
To Add this to LaunchBar create a new search template. Name it something simple like TD and add this to the details section:
Cool! Now I can bring up LaunchBar, type TD to bring up my search template. Hit the spacebar to get a text entry box and then type in my todo item. Hit return and the above script is run to instantly add your new task to your inbox. You'll notice that the call to rtm.tasks.add has a parameter parse=1 This parameter tells RTM to parse due date information out of the string you give it.
Of course you could build on the above script to create your own little syntax to specify the list you wanted to add the task to, or for adding tags etc. But this is really simple to get started.