Package theia :: Package helpers :: Module interaction
[hide private]
[frames] | no frames]

Source Code for Module theia.helpers.interaction

 1  '''Module to define interaction functions for theia.''' 
 2   
 3  # Provides: 
 4  #       usage 
 5  #       welcome 
 6  #       errorRecursion 
 7  #       errorAtSpecifiedLocation 
 8  #       errorWhereIs 
 9  #       errorUnknown 
10   
11  usage = "Usage: theia [options] FNAME\n\nArguments:\n"\ 
12          + "  FNAME\t\t .tia format input file name." 
13   
14  welcome = ''' 
15  \ttheia Copyright (C) 2017 R. Duque 
16  \tLicense: GNU GPLv3+ <http://gnu.org/licenses/gpl.html> 
17  \tThis is free software: you are free to change and redistribute it. 
18  \tThere is ABSOLUTELY NO WARRANTY, to the extent permitted by law. 
19  ''' 
20   
21  errorRecursion = ''' 
22   
23  It looks like you reached the maximum recursion depth of your Python 
24  implementation (generally around 1000). The beam tracer builds the beam tree 
25  recursively and in your case the recursion went to far. The order and threshold 
26  simulation parameters were made to prevent this situation. What you can do: 
27   
28  \t1. Make sure you're running with reasonable order and threshold parameters; 
29  \t2. Increase the maximum recursion depth of your Python environment by placing 
30  \t   `sys.setrecursionlimit([whatever you need])` 
31  \t   right under the `"if __name__ == '__main__'` line in bin/theia, rebuild 
32  \t   theia with `make build-theia` in the project root and rerun your simulation; 
33  \t3. Contact your local administrator to increase the maximum recursion depth 
34  \t   on a system-wide basis and rerun your simulation. 
35  ''' 
36   
37  errorAtSpecifiedLocation = "theia: Error: The FreeCAD library was not found "\ 
38          + "at the specified location %s. Usually it is in /usr/lib/freecad/lib. "\ 
39          + "If you are not sure, omit the '-l', '--FREECAD-lib' option and theia "\ 
40          + "will find the library on its own.\nAborting." 
41   
42  errorWhereIs = "theia: Error: Unix command 'whereis freecad' did not yield "\ 
43          + "any directory. Please make sure you have FreeCAD installed and that "\ 
44          + "library location is in your $PATH.\nAborting" 
45   
46  errorUnknown = "theia: Error: %s was used as the source directory for the "\ 
47          + "FreeCAD library but an error occured, make sure your FreeCAD build is "\ 
48          + "correct.\nAborting." 
49