本文整理汇总了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()