本文整理汇总了Python中psr.sys.Sys.exit方法的典型用法代码示例。如果您正苦于以下问题:Python Sys.exit方法的具体用法?Python Sys.exit怎么用?Python Sys.exit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类psr.sys.Sys
的用法示例。
在下文中一共展示了Sys.exit方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: needConfig
# 需要导入模块: from psr.sys import Sys [as 别名]
# 或者: from psr.sys.Sys import exit [as 别名]
def needConfig(self):
Sys.clear()
self.pheader()
Sys.echo(" " * 4 + "ImpraStorage has no configuration file !!", Sys.Clz.fgB1)
Sys.dprint()
Sys.echo(
" " * 8 + "# to create the config file you must use this command with appropriate values :", Sys.Clz.fgn7
)
Sys.echo(" " * 8 + "# type command help for details", Sys.Clz.fgn7)
Sys.echo(" " * 8 + conf.PRG_CLI_NAME + " ", Sys.Clz.fgB7, False)
Sys.echo("conf ", Sys.Clz.fgB3, False)
Sys.echo("-S ", Sys.Clz.fgB3, False)
Sys.echo("profileName ", Sys.Clz.fgB1, False)
Sys.echo("-N ", Sys.Clz.fgB3, False)
Sys.echo("yourName ", Sys.Clz.fgB1, False)
Sys.echo("-K -H ", Sys.Clz.fgB3, False)
Sys.echo("accountHost ", Sys.Clz.fgB1, False)
Sys.echo("-P ", Sys.Clz.fgB3, False)
Sys.echo("993 ", Sys.Clz.fgB1, False)
Sys.echo("-U ", Sys.Clz.fgB3, False)
Sys.echo("accountName ", Sys.Clz.fgB1, False)
Sys.echo("-X ", Sys.Clz.fgB3, False)
Sys.echo("accountPassword ", Sys.Clz.fgB1)
Sys.dprint()
Sys.exit(1)
示例2: software
# 需要导入模块: from psr.sys import Sys [as 别名]
# 或者: from psr.sys.Sys import exit [as 别名]
#
# Kirmah is free software (free as in speech) : 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.
#
# Kirmah 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 Kirmah. If not, see <http://www.gnu.org/licenses/>.
#
from psr.sys import Sys, Const
from kirmah.cli import Cli
def main():
try:
c = 0
Cli('.'+Sys.sep)
except Exception as e :
Sys.pwarn((('main : ',(str(e),Sys.CLZ_ERROR_PARAM), ' !'),), True)
#~ raise e
c = 1
return c
if __name__ == '__main__':
Sys.exit(main())
示例3: exit
# 需要导入模块: from psr.sys import Sys [as 别名]
# 或者: from psr.sys.Sys import exit [as 别名]
def exit(code):
""""""
if Sys.isUnix() : Sys.exit(code)