Skip to content

Instantly share code, notes, and snippets.

@mcsquaredjr
Last active December 16, 2015 00:29
Show Gist options
  • Save mcsquaredjr/5348451 to your computer and use it in GitHub Desktop.
Save mcsquaredjr/5348451 to your computer and use it in GitHub Desktop.

Revisions

  1. mcsquaredjr revised this gist Apr 21, 2013. 1 changed file with 17 additions and 0 deletions.
    17 changes: 17 additions & 0 deletions install_gdata.py
    Original file line number Diff line number Diff line change
    @@ -8,6 +8,23 @@
    # The same operation should also be done in core.py, lines 25-34.
    #
    # Otherwise gdata won't work correctly.
    # Better yet, find all places in the library where it has lines:

    #try:
    # from xml.etree import cElementTree as ElementTree
    #except ImportError:
    # try:
    # import cElementTree as ElementTree
    # except ImportError:
    # try:
    # from xml.etree import ElementTree
    # except ImportError:
    # from elementtree import ElementTree
    #
    # And replace them with the next line:
    #
    # from xml.etree import ElementTree

    # Thanks to Ole Zom for his help in figuring this out.


  2. mcsquaredjr revised this gist Apr 21, 2013. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions install_gdata.py
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,7 @@
    # in the atom directory, comment out lines 47-56 and replace with the line:
    #
    # from xml.etree import ElementTree
    # The same operation should also be done in core.py, lines 25-34.
    #
    # Otherwise gdata won't work correctly.
    # Thanks to Ole Zom for his help in figuring this out.
    @@ -16,6 +17,8 @@
    from xml.etree import ElementTree
    The same operation should also be done in core.py, lines 25-34.
    Otherwise gdata won't work correctly.
    Thanks to Ole Zom for his help in figuring this out.
  3. mcsquaredjr revised this gist Apr 14, 2013. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions install_gdata.py
    Original file line number Diff line number Diff line change
    @@ -5,9 +5,8 @@
    # in the atom directory, comment out lines 47-56 and replace with the line:
    #
    # from xml.etree import ElementTree

    #
    # Otherwise gdata won't work correctly.

    # Thanks to Ole Zom for his help in figuring this out.


  4. mcsquaredjr revised this gist Apr 14, 2013. 1 changed file with 25 additions and 1 deletion.
    26 changes: 25 additions & 1 deletion install_gdata.py
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,27 @@
    # Install gdata and its samples.
    # To use the library add it to the system path

    # Due to some issues with cElementTree implementation, please visit __init__
    # in the atom directory, comment out lines 47-56 and replace with the line:
    #
    # from xml.etree import ElementTree

    # Otherwise gdata won't work correctly.

    # Thanks to Ole Zom for his help in figuring this out.


    note = \
    '''Due to some issues with cElementTree implementation, please visit __init__
    in the atom directory, comment out lines 47-56 and replace with the line:
    from xml.etree import ElementTree
    Otherwise gdata won't work correctly.
    Thanks to Ole Zom for his help in figuring this out.
    '''

    import tarfile
    import shutil
    import urllib
    @@ -27,4 +48,7 @@
    import editor
    editor.reload_files()

    print 'Done.'
    print 'Done.\n\n'

    print note

  5. mcsquaredjr created this gist Apr 9, 2013.
    30 changes: 30 additions & 0 deletions install_gdata.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    # Install gdata and its samples.
    # To use the library add it to the system path

    import tarfile
    import shutil
    import urllib
    import os

    try:
    os.mkdir('gdata')
    except:
    pass

    print 'Downloading gdata-python-client...'
    filename, headers = urllib.urlretrieve('https://gdata-python-client.googlecode.com/files/gdata-2.0.17.tar.gz')
    print 'Installing gdata-python-client...'
    t = tarfile.open(filename, 'r')
    t.extractall()
    t.close()
    shutil.move('gdata-2.0.17/src/atom', 'gdata/atom')
    shutil.move('gdata-2.0.17/src/gdata', 'gdata/gdata')
    shutil.move('gdata-2.0.17/samples', 'gdata/samples')
    shutil.move('gdata-2.0.17/tests', 'gdata/tests')
    shutil.rmtree('gdata-2.0.17')


    import editor
    editor.reload_files()

    print 'Done.'