Beispiel #1
0
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
#

from __future__ import print_function

import sys
import os
import platform

from Loxodo.config import config
from src.config import config

# store base script name, taking special care if we're "frozen" using py2app or py2exe
if hasattr(sys, "frozen") and (sys.platform != 'darwin'):
    config.set_basescript(sys.executable)
else:
    config.set_basescript(__file__)

# If cmdline arguments were given, use the "cmdline" frontend.
if set(sys.argv) & {'-i', '-h'}:
    from Loxodo.frontends.cmdline import loxodo
    sys.exit()

# In all other cases, use the "wx" frontend.
try:
    import wx
    assert (wx.__version__.startswith('4.0.'))
except AssertionError as e:
    print('Found incompatible wxPython, the wxWidgets Python bindings: %s' %
          wx.__version__,
Beispiel #2
0
import sys
import os
import platform

# On Windows CE, use the "ppygui" frontend.
if platform.system() == "Windows" and platform.release() == "CE":
    from Loxodo.frontends.ppygui import loxodo
    sys.exit()

# All other platforms use the Config module
from Loxodo.config import config

# store base script name, taking special care if we're "frozen" using py2app or py2exe
if hasattr(sys,"frozen") and (sys.platform != 'darwin'):
    config.set_basescript(sys.executable)
else:
    config.set_basescript(__file__)

# If cmdline arguments were given, use the "cmdline" frontend.
if len(sys.argv) > 1:
    from Loxodo.frontends.cmdline import loxodo
    sys.exit()

# In all other cases, use the "wx" frontend.
try:
    import wx
except ImportError as e:
    print('Could not find wxPython, the wxWidgets Python bindings: %s' % e, file=sys.stderr)
    print('Falling back to cmdline frontend.', file=sys.stderr)
    print('', file=sys.stderr)
Beispiel #3
0
import sys
import os
import platform

# On Windows CE, use the "ppygui" frontend.
if platform.system() == "Windows" and platform.release() == "CE":
    from Loxodo.frontends.ppygui import loxodo

    sys.exit()

# All other platforms use the Config module
from Loxodo.config import config

# store base script name, taking special care if we're "frozen" using py2app or py2exe
if hasattr(sys, "frozen") and (sys.platform != "darwin"):
    config.set_basescript(unicode(sys.executable, sys.getfilesystemencoding()))
else:
    config.set_basescript(unicode(__file__, sys.getfilesystemencoding()))

# If cmdline arguments were given, use the "cmdline" frontend.
if set(sys.argv) & {"-i", "-h"}:
    from Loxodo.frontends.cmdline import loxodo

    sys.exit()

# In all other cases, use the "wx" frontend.
try:
    import wx
except ImportError, e:
    print >>sys.stderr, "Could not find wxPython, the wxWidgets Python bindings: %s" % e
    print >>sys.stderr, "Falling back to cmdline frontend."