本文整理匯總了Python中launch.Launch.handle_args方法的典型用法代碼示例。如果您正苦於以下問題:Python Launch.handle_args方法的具體用法?Python Launch.handle_args怎麽用?Python Launch.handle_args使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類launch.Launch
的用法示例。
在下文中一共展示了Launch.handle_args方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: hasattr
# 需要導入模塊: from launch import Launch [as 別名]
# 或者: from launch.Launch import handle_args [as 別名]
# 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 os
import sys
import cherrypy
from launch import Launch
"""
if hasattr(sys, "frozen"):
cwd = os.path.dirname(os.path.abspath(unicode(sys.executable, sys.getfilesystemencoding())))
else:
cwd = os.path.dirname(os.path.abspath(__file__))
sys.path.append(cwd)
"""
if __name__ == '__main__':
if os.name == "posix":
launchyc = Launch()
launchyc.handle_args()
elif os.name == "nt":
#importing here so that if the user isnt running windows
#they wont get an import error from the win only libs
from yamcatWin import LaunchWin
launchyc = LaunchWin()
launchyc.handle_args()