<s> """<STR_LIT>""" <EOL> __author__ = '<STR_LIT>' <EOL> import atom . core <EOL> import gdata . data <EOL> GS_TEMPLATE = '<STR_LIT>' <EOL> GSX_NAMESPACE = '<STR_LIT>' <EOL> INSERT_MODE = '<STR_LIT>' <EOL> OVERWRITE_MODE = '<STR_LIT>' <EOL> WORKSHEETS_REL = '<STR_LIT>' <EOL> class Error ( object ) : <EOL> pass <EOL> class HeaderNotSet ( Error ) : <EOL> """<STR_LIT>""" <EOL> class Cell ( atom . core . XmlElement ) : <EOL> """<STR_LIT>""" <EOL> _qname = GS_TEMPLATE % '<STR_LIT>' <EOL> col = '<STR_LIT>' <EOL> input_value = '<STR_LIT>' <EOL> numeric_value = '<STR_LIT>' <EOL> row = '<STR_LIT>' <EOL> class ColCount ( atom . core . XmlElement ) : <EOL> """<STR_LIT>""" <EOL> _qname = GS_TEMPLATE % '<STR_LIT>' <EOL> class Field ( atom . core . XmlElement ) : <EOL> """<STR_LIT>""" <EOL> _qname = GS_TEMPLATE % '<STR_LIT>' <EOL> index = '<STR_LIT:index>' <EOL> name = '<STR_LIT:name>' <EOL> class Column ( Field ) : <EOL> """<STR_LIT>""" <EOL> _qname = GS_TEMPLATE % '<STR_LIT>' <EOL> class Data ( atom . core . XmlElement ) : <EOL> """<STR_LIT>""" <EOL> _qname = GS_TEMPLATE % '<STR_LIT:data>' <EOL> column = [ Column ] <EOL> insertion_mode = '<STR_LIT>' <EOL> num_rows = '<STR_LIT>' <EOL> start_row = '<STR_LIT>' <EOL> class Header ( atom . core . XmlElement ) : <EOL> """<STR_LIT>""" <EOL> _qname = GS_TEMPLATE % '<STR_LIT>' <EOL> row = '<STR_LIT>' <EOL> class RowCount ( atom . core . XmlElement ) : <EOL> """<STR_LIT>""" <EOL> _qname = GS_TEMPLATE % '<STR_LIT>' <EOL> class Worksheet ( atom . core . XmlElement ) : <EOL> """<STR_LIT>""" <EOL> _qname = GS_TEMPLATE % '<STR_LIT>' <EOL> name = '<STR_LIT:name>' <EOL> class Spreadsheet ( gdata . data . GDEntry ) : <EOL> """<STR_LIT>""" <EOL> def find_worksheets_feed ( self ) : <EOL> return self . find_url ( WORKSHEETS_REL ) <EOL> FindWorksheetsFeed = find_worksheets_feed <EOL> class SpreadsheetsFeed ( gdata . data . GDFeed ) : <EOL> """<STR_LIT>""" <EOL> entry = [ Spreadsheet ] <EOL> class WorksheetEntry ( gdata . data . GDEntry ) : <EOL> """<STR_LIT>""" <EOL> row_count = RowCount <EOL> col_count = ColCount <EOL> class WorksheetsFeed ( gdata . data . GDFeed ) : <EOL> """<STR_LIT>""" <EOL> entry = [ Worksheet ] <EOL> class Table ( gdata . data . GDEntry ) : <EOL> """<STR_LIT>""" <EOL> data = Data <EOL> header = Header <EOL> class TablesFeed ( gdata . data . GDFeed ) : <EOL> """<STR_LIT>""" <EOL> entry = [ Table ] <EOL> class Record ( gdata . data . GDEntry ) : <EOL> """<STR_LIT>""" <EOL> field = [ Field ] <EOL> class RecordsFeed ( gdata . data . GDFeed ) : <EOL> """<STR_LIT>""" <EOL> entry = [ Record ] <EOL> class ListRow ( atom . core . XmlElement ) : <EOL> """<STR_LIT>""" <EOL> _qname = '<STR_LIT>' <EOL> class ListEntry ( gdata . data . GDEntry ) : <EOL> """<STR_LIT>""" <EOL> def get_value ( self , column_name ) : <EOL> """<STR_LIT>""" <EOL> values = self . get_elements ( column_name , GSX_NAMESPACE ) <EOL> if len ( values ) == <NUM_LIT:0> : <EOL> return None <EOL> return values [ <NUM_LIT:0> ] . text <EOL> def set_value ( self , column_name , value ) : <EOL> """<STR_LIT>""" <EOL> values = self . get_elements ( column_name , GSX_NAMESPACE ) <EOL> if len ( values ) > <NUM_LIT:0> : <EOL> values [ <NUM_LIT:0> ] . text = value <EOL> else : <EOL> new_value = ListRow ( text = value ) <EOL> new_value . _qname = new_value . _qname % ( column_name , ) <EOL> self . _other_elements . append ( new_value ) <EOL> class ListsFeed ( gdata . data . GDFeed ) : <EOL> """<STR_LIT>""" <EOL> entry = [ ListEntry ] <EOL> class CellEntry ( gdata . data . BatchEntry ) : <EOL> """<STR_LIT>""" <EOL> cell = Cell <EOL> class CellsFeed ( gdata . data . BatchFeed ) : <EOL> """<STR_LIT>""" <EOL> entry = [ CellEntry ] <EOL> def batch_set_cell ( row , col , input ) : <EOL> pass </s>
