Commit 5fd506ac71668a2ec500f0165e0db77b310d72e7
1 parent
cccd4f7f
Exists in
master
and in
68 other branches
FIX: InVesalius is creating .invesalius/presets folders
Showing
1 changed file
with
13 additions
and
4 deletions
Show diff stats
invesalius/invesalius.py
@@ -17,9 +17,18 @@ | @@ -17,9 +17,18 @@ | ||
17 | # detalhes. | 17 | # detalhes. |
18 | #-------------------------------------------------------------------------- | 18 | #-------------------------------------------------------------------------- |
19 | 19 | ||
20 | +from optparse import OptionParser | ||
21 | +import os | ||
20 | import sys | 22 | import sys |
21 | 23 | ||
22 | -from optparse import OptionParser | 24 | +# TODO: This should be called during installation |
25 | +# ---------------------------------------------------------------------- | ||
26 | +path = os.path.join(os.getenv("HOME"), ".invesalius", "presets") | ||
27 | +try: | ||
28 | + os.makedirs(path) | ||
29 | +except OSError: | ||
30 | + print "Warning: Directory (probably) exists" | ||
31 | +# ---------------------------------------------------------------------- | ||
23 | 32 | ||
24 | import wx | 33 | import wx |
25 | import wx.lib.pubsub as ps | 34 | import wx.lib.pubsub as ps |
@@ -67,15 +76,15 @@ def parse_comand_line(): | @@ -67,15 +76,15 @@ def parse_comand_line(): | ||
67 | else: | 76 | else: |
68 | print "Hey, guy you must pass a directory to me!" | 77 | print "Hey, guy you must pass a directory to me!" |
69 | 78 | ||
79 | +def print_events(data): | ||
80 | + print data.topic | ||
81 | + | ||
70 | def main(): | 82 | def main(): |
71 | application = InVesalius(0) | 83 | application = InVesalius(0) |
72 | parse_comand_line() | 84 | parse_comand_line() |
73 | application.ShowFrame() | 85 | application.ShowFrame() |
74 | application.MainLoop() | 86 | application.MainLoop() |
75 | 87 | ||
76 | -def print_events(data): | ||
77 | - print data.topic | ||
78 | - | ||
79 | if __name__ == '__main__': | 88 | if __name__ == '__main__': |
80 | # Add current directory to PYTHONPATH | 89 | # Add current directory to PYTHONPATH |
81 | sys.path.append(".") | 90 | sys.path.append(".") |