Skip to content

Commit

Permalink
Added a logging shell for gui builds.
Browse files Browse the repository at this point in the history
Relates to issue #15.
  • Loading branch information
Aeva Palecek committed Jan 4, 2017
1 parent 63c8a84 commit 066523a
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 3 deletions.
13 changes: 10 additions & 3 deletions converter_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,18 @@ def run_converter(self, *args, **kargs):
def shutdown(self, *args, **kargs):
Gtk.main_quit()

if __name__ == "__main__":

def run_main(args=sys.argv):
Gtk.init()
converter = ConverterWindow()
for path in sys.argv[0:]:
for path in args[0:]:
converter.add_level(path)
converter.refresh_levels_view()
Gtk.main()


raise Exception("oh noes!")


if __name__ == "__main__":
run_main()
28 changes: 28 additions & 0 deletions logger.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env python

# Copyright (c) 2016, Aeva M. Palecek

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.


try:
import converter_gui
converter_gui.run_main()

except Exception as err:
import traceback
msg = traceback.format_exc()
with open("error_info.txt", "w") as err_file:
err_file.write(msg)
raise

0 comments on commit 066523a

Please sign in to comment.