#!/usr/bin/env python
#coding: iso-8859-15
import re, sys, pgdb, pg
import database

aDataBase = database.getDBname()
aHost = database.getDBhost()

#
# MAIN
#
if __name__ == '__main__':

    db = pg.DB(user="******", host=aHost, dbname=aDataBase)
    print db.query("select * from reference_coord")
    db.close()
Exemple #2
0
        """Usage: %prog [options]  <stationname> <objecttype> date
    <objecttype>: LBA|HBA|HBA0|HBA1|marker
    <date>      : yyyy.yy e.g. 2008.75 for Oct 1st 2008""")

    parser.add_option("-D",
                      "--database",
                      dest="dbName",
                      type="string",
                      default=getDBname(),
                      help="Name of StationCoordinates database to use")

    parser.add_option("-H",
                      "--host",
                      dest="dbHost",
                      type="string",
                      default=getDBhost(),
                      help="Hostname of StationCoordinates database")

    parser.add_option("-P",
                      "--port",
                      dest="dbPort",
                      type="int",
                      default=getDBport(),
                      help="Port of StationCoordinates database")

    parser.add_option("-U",
                      "--user",
                      dest="dbUser",
                      type="string",
                      default=getDBuser(),
                      help="Username of StationCoordinates database")
Exemple #3
0
#!/usr/bin/env python
# coding: iso-8859-15
import re, sys, pgdb, pg
import database

aDataBase = database.getDBname()
aHost = database.getDBhost()

#
# MAIN
#
if __name__ == "__main__":

    db = pg.DB(user="******", host=aHost, dbname=aDataBase)
    print db.query("select * from reference_coord")
    db.close()