~ $ fgo
Traceback (most recent call last):
File "/usr/games/fgo", line 17, in <module>
run(WORKING_DIR)
File "/usr/share/games/fgo/src/__init__.py", line 19, in run
data = Config()
File "/usr/share/games/fgo/src/config.py", line 78, in __init__
self.update(first_run=True)
File "/usr/share/games/fgo/src/config.py", line 208, in update
self.updateAptLists()
File "/usr/share/games/fgo/src/config.py", line 214, in updateAptLists
self._readApt()
File "/usr/share/games/fgo/src/config.py", line 494, in _readApt
self._makeApt()
File "/usr/share/games/fgo/src/config.py", line 372, in _makeApt
lat += float(e[1])
ValueError: could not convert string to float: Version
~/Downloads $ python fgo
/usr/bin/python: can't find '__main__' module in 'fgo'
~/Downloads $ ./fgo
bash: ./fgo: Is a directory
~/Downloads $ fgo
bash: /usr/games/fgo: No such file or directory
santosdumont wrote in Sat Aug 09, 2014 12:40 pm:Slightly confused by terminology "..directory where FGo! was unpacked..." i.e. Downloads.
Now have the problem that the aircraft list in FGo is blank, can't figure out how to find it!
--- src/__init__.py
+++ src/__init__.py
@@ -22,13 +22,14 @@
file if you need to run FGo! with some pre-configurations."""
-def run(working_dir):
+def run(working_dir, on_load=None):
"""Initialize application."""
# Set current working directory.
chdir(working_dir)
root = Tk()
root.title('FGo!')
+ if on_load is not None: on_load()
# Initialize data object.
data = Config()
promptToNotUseCli()
#!/usr/bin/env python
"""FGo! - a simple GUI launcher for FlightGear Flight Simulator."""
from sys import path
from os import chdir
from os.path import join
import imp
path[0] = join(path[0], '../Resources/fgo/')
chdir(path[0])
from src import run
## Start gui hack
# Raise this Tk-created Python process to be the top window
# Adapted from http://stackoverflow.com/a/23571300
import subprocess
def applescript(script):
return subprocess.check_output(['/usr/bin/osascript', '-e', script])
def procidset():
return set(applescript(
'tell app "System Events" to return id of every process whose name is "Python"'
).replace(',','').split())
idset = procidset()
def on_load():
try:
procid = iter(procidset() - idset).next()
applescript('''
tell app "System Events"
repeat with proc in every process whose name is "Python"
if id of proc is ''' + procid + ''' then
set frontmost of proc to true
exit repeat
end if
end repeat
end tell''')
except StopIteration:
print("Mac error: process not found")
print(repr(idset))
## End gui hack
SCRIPT_DIR = path[0]
MAIN_DIR = 'src'
WORKING_DIR = join(SCRIPT_DIR, MAIN_DIR)
run(WORKING_DIR, on_load=on_load)
santosdumont wrote in Tue Aug 12, 2014 11:53 am:In short it was little to do with FGo per se, just a Mint/Ubuntu permissions thing, some folders just didn't like being transferred!
Users browsing this forum: No registered users and 6 guests