Merge branch 'master' of git://git.assembla.com/fpdb-sql
This commit is contained in:
commit
5f1308688b
|
@ -88,7 +88,7 @@ class Filters(threading.Thread):
|
||||||
if len(result) == 1:
|
if len(result) == 1:
|
||||||
self.siteid[site] = result[0][0]
|
self.siteid[site] = result[0][0]
|
||||||
else:
|
else:
|
||||||
print "Either 0 or more than one site matched - EEK"
|
print "Either 0 or more than one site matched (%s) - EEK" % site
|
||||||
|
|
||||||
# For use in date ranges.
|
# For use in date ranges.
|
||||||
self.start_date = gtk.Entry(max=12)
|
self.start_date = gtk.Entry(max=12)
|
||||||
|
|
|
@ -199,10 +199,10 @@ class GuiAutoImport (threading.Thread):
|
||||||
bs = 0
|
bs = 0
|
||||||
elif os.name == 'nt':
|
elif os.name == 'nt':
|
||||||
path = sys.path[0].replace('\\','\\\\')
|
path = sys.path[0].replace('\\','\\\\')
|
||||||
command = 'python "'+path+'\\HUD_main.py" ' + self.settings['cl_options']
|
command = 'pythonw "'+path+'\\HUD_main.pyw" ' + self.settings['cl_options']
|
||||||
bs = 0
|
bs = 0
|
||||||
else:
|
else:
|
||||||
command = os.path.join(sys.path[0], 'HUD_main.py')
|
command = os.path.join(sys.path[0], 'HUD_main.pyw')
|
||||||
command = [command, ] + string.split(self.settings['cl_options'])
|
command = [command, ] + string.split(self.settings['cl_options'])
|
||||||
bs = 1
|
bs = 1
|
||||||
|
|
||||||
|
@ -210,7 +210,12 @@ class GuiAutoImport (threading.Thread):
|
||||||
print "opening pipe to HUD"
|
print "opening pipe to HUD"
|
||||||
self.pipe_to_hud = subprocess.Popen(command, bufsize=bs,
|
self.pipe_to_hud = subprocess.Popen(command, bufsize=bs,
|
||||||
stdin=subprocess.PIPE,
|
stdin=subprocess.PIPE,
|
||||||
universal_newlines=True)
|
stdout=subprocess.PIPE, # only needed for py2exe
|
||||||
|
stderr=subprocess.PIPE, # only needed for py2exe
|
||||||
|
universal_newlines=True
|
||||||
|
)
|
||||||
|
self.pipe_to_hud.stdout.close()
|
||||||
|
self.pipe_to_hud.stderr.close()
|
||||||
except:
|
except:
|
||||||
err = traceback.extract_tb(sys.exc_info()[2])[-1]
|
err = traceback.extract_tb(sys.exc_info()[2])[-1]
|
||||||
#self.addText( "\n*** GuiAutoImport Error opening pipe: " + err[2] + "(" + str(err[1]) + "): " + str(sys.exc_info()[1]))
|
#self.addText( "\n*** GuiAutoImport Error opening pipe: " + err[2] + "(" + str(err[1]) + "): " + str(sys.exc_info()[1]))
|
||||||
|
|
|
@ -55,11 +55,11 @@ class Sql:
|
||||||
# List indexes
|
# List indexes
|
||||||
################################
|
################################
|
||||||
if db_server == 'mysql':
|
if db_server == 'mysql':
|
||||||
self.query['list_tables'] = """SHOW INDEXES"""
|
self.query['list_indexes'] = """SHOW INDEXES"""
|
||||||
elif db_server == 'postgresql':
|
elif db_server == 'postgresql':
|
||||||
self.query['list_tables'] = """SELECT tablename, indexname FROM PG_INDEXES"""
|
self.query['list_indexes'] = """SELECT tablename, indexname FROM PG_INDEXES"""
|
||||||
elif db_server == 'sqlite':
|
elif db_server == 'sqlite':
|
||||||
self.query['list_tables'] = """SELECT name FROM sqlite_master
|
self.query['list_indexes'] = """SELECT name FROM sqlite_master
|
||||||
WHERE type='index'
|
WHERE type='index'
|
||||||
ORDER BY name;"""
|
ORDER BY name;"""
|
||||||
|
|
||||||
|
|
1051
pyfpdb/fpdb.py
1051
pyfpdb/fpdb.py
File diff suppressed because it is too large
Load Diff
1064
pyfpdb/fpdb.pyw
Executable file
1064
pyfpdb/fpdb.pyw
Executable file
File diff suppressed because it is too large
Load Diff
|
@ -130,8 +130,8 @@ setup(
|
||||||
description = 'Free Poker DataBase',
|
description = 'Free Poker DataBase',
|
||||||
version = '0.12',
|
version = '0.12',
|
||||||
|
|
||||||
console = [ {'script': 'fpdb.py', "icon_resources": [(1, "../gfx/fpdb_large_icon.ico")]},
|
windows = [ {'script': 'fpdb.pyw', "icon_resources": [(1, "../gfx/fpdb_large_icon.ico")]},
|
||||||
{'script': 'HUD_main.py', },
|
{'script': 'HUD_main.pyw', },
|
||||||
{'script': 'Configuration.py', }
|
{'script': 'Configuration.py', }
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
@ -3,5 +3,5 @@ rem .bat script to run fpdb
|
||||||
|
|
||||||
cd pyfpdb
|
cd pyfpdb
|
||||||
|
|
||||||
fpdb.exe
|
start /b fpdb.exe >..\fpdb_output.txt
|
||||||
|
|
||||||
|
|
|
@ -21,13 +21,10 @@ import sys
|
||||||
|
|
||||||
# sys.path[0] holds the directory run_fpdb.py is in
|
# sys.path[0] holds the directory run_fpdb.py is in
|
||||||
sys.path[0] = sys.path[0]+os.sep+"pyfpdb"
|
sys.path[0] = sys.path[0]+os.sep+"pyfpdb"
|
||||||
|
# cd to pyfpdb subdir
|
||||||
os.chdir(sys.path[0])
|
os.chdir(sys.path[0])
|
||||||
#print "sys.path[0] =", sys.path[0], "cwd =", os.getcwd()
|
#print "sys.path[0] =", sys.path[0], "cwd =", os.getcwd()
|
||||||
|
|
||||||
import fpdb
|
|
||||||
|
|
||||||
|
os.execvpe('pythonw.exe', ('pythonw.exe', 'fpdb.pyw', '-r'), os.environ)
|
||||||
if __name__ == "__main__":
|
# first arg is ignored (name of program being run)
|
||||||
me = fpdb.fpdb()
|
|
||||||
me.main()
|
|
||||||
exit()
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user