# REMOTE DEBUGGING REMOTE_DBG = False # append pydev remote debugger if REMOTE_DBG: # Make pydev debugger works for auto reload. # Note pydevd module need to be copied in XBMC\system\python\Lib\pysrc try: import pysrc.pydevd as pydevd # stdoutToServer and stderrToServer redirect stdout and stderr to eclipse console pydevd.settrace('localhost', stdoutToServer=True, stderrToServer=True, suspend=False) except ImportError: sys.stderr.write( "Error: " + "You must add org.python.pydev.debug.pysrc to your PYTHONPATH.") sys.exit(1) except: sys.stderr.write('Remote Debugger is not started') # ACTUAL ADDON from lib import main try: myAddon = main.Main() myAddon.run(sys.argv) except: traceback.print_exc(file=sys.stdout)
# coding: utf-8 import urllib2 from lib import main from flask import Flask from flask import render_template from flask import request __author__ = 'DK' app = Flask(__name__) handle = main.Main() handle.loads() @app.route('/', methods=['GET']) def index(): if request.args.get('keyword'): result = handle.start(request.args.get('keyword')) return render_template('index.html', count=handle.count(), result=result) return render_template('index.html', count=handle.count()) if __name__ == '__main__': app.run(host='0.0.0.0', debug=False, port=8000)
#!/usr/bin/env-python # Torso Ninja - scrolling shooter video game # Copyright (C) 2015-2017 Erik Letson <*****@*****.**> # # 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/>. from lib import main main.Main()
#! /usr/bin/python from lib import main import os #get the current directory cwd = os.getcwd() main.Main(cwd)