Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to create a python gtk program which uses googlecl tools like listing google calendar appointments, accessing the google blog etc. However I do not know how to call the command in python gtk.

The command for running googlecl in the terminal is
google calendar list --date 2010-12-02

This command would list all the appointments in google calendar on the 2nd of december if entered in the terminal. However I do not know how to make python gtk do the same thing. Any help would be appreciated.

Googlecl is a command line tool released by google to facilate easy management of common tasks like google calendar, google blogger, google docs etc. You can find more info on

share|improve this question
Since your question is python development related, is probably a better place to ask. – João Pinto Dec 3 '10 at 9:21
up vote 2 down vote accepted

There's a very good chance (If you're using Python 3) that you'll want to use the Python Subprocess Module which will allow you to make, and collect output from, system calls - like the googlecl command.

If you're using Python < 2.6 (Odds are you aren't since 2.6 is the official version in the repos) Then you'll want to use the Python Commands Module. This is depreciated for the above Subprocess Module and is removed in Python 3.

share|improve this answer
googlecl is actually written in Python. I have written some scripts that use Subprocess for it, but maybe someone somewhere has done the clever thing, and is importing it and using it directly... – UrkoM Dec 3 '10 at 2:29
I will be using python 1.6 since that is the default version which comes with ubuntu and will ensure compatibility for all the users. So I basically run the following python command to get the output, import subprocess output = subprocess.Popen("google calendar list --date 2010-12-02") – nik90 Dec 3 '10 at 9:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.