示例#1
0
    def check_path(path):
        for item in RESTRICTED:
            if item in path:
                return False
        return True

    return os.pathsep.join([path for path in paths if check_path(path)])


cur_path = os.getcwd()

sys.path.insert(0, os.path.join(cur_path, 'libs'))
sys.path.insert(0, os.path.join(cur_path, 'stdlib'))

bindir = os.path.join(cur_path, 'dlls') + os.pathsep
magickdir = os.path.join(cur_path, 'dlls', 'modules') + os.pathsep

os.environ["PATH"] = magickdir + bindir + get_path_var()
# ImageMagick non-ascii path issue fix
magickdir = magickdir.decode(sys.getfilesystemencoding()).encode('utf-8')
os.environ["MAGICK_CODER_MODULE_PATH"] = magickdir
os.environ["MAGICK_CODER_FILTER_PATH"] = magickdir
os.environ["MAGICK_CONFIGURE_PATH"] = magickdir
os.environ["MAGICK_HOME"] = magickdir

os.chdir(os.path.join(cur_path, 'dlls'))

import sk1

sk1.sk1_run()
        for item in RESTRICTED:
            if item in path:
                return False
        return True

    return os.pathsep.join([path for path in paths if check_path(path)])


cur_path = os.getcwd()

sys.path.insert(0, os.path.join(cur_path, 'libs'))
sys.path.insert(0, os.path.join(cur_path, 'stdlib'))

bindir = os.path.join(cur_path, 'dlls') + os.pathsep
magickdir = os.path.join(cur_path, 'dlls', 'modules') + os.pathsep

os.environ["PATH"] = magickdir + bindir + get_path_var()
# ImageMagick non-ascii path issue fix
magickdir = magickdir.decode(sys.getfilesystemencoding()).encode('utf-8')
os.environ["MAGICK_CODER_MODULE_PATH"] = magickdir
os.environ["MAGICK_CODER_FILTER_PATH"] = magickdir
os.environ["MAGICK_CONFIGURE_PATH"] = magickdir
os.environ["MAGICK_HOME"] = magickdir

os.chdir(os.path.join(cur_path, 'dlls'))

import sk1

# Passing cur_path we set portable version
sk1.sk1_run(cur_path)
示例#3
0
#!/usr/bin/env python
#
# -*- coding: utf-8 -*-
#
#	Copyright (C) 2013 by Igor E. Novikov
#
#	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/>.


import sk1

sk1.sk1_run()
示例#4
0
#! /usr/bin/python
#
# Wrapper script to start a sK1 application once it is installed
#
# Copyright (C) 2007 Igor E. Novikov
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
#

from sk1 import sk1_run
sk1_run()