# ********************day22_2-sys模块 *******************
# ********************day22_2-sys模块 *******************
# ********************day22_2-sys模块 *******************
# 参考资料:
# python模块(转自Yuan先生) - 狂奔__蜗牛 - 博客园
# https://www.cnblogs.com/guojintao/articles/9070485.html
# =====>>>>>>内容概览
# =====>>>>>>内容概览
# =====>>>>>>内容概览 '''
# ------------------------------------------------------------
# # 1、sys.argv ???
# # # 命令行参数List,第一个元素是程序本身路径
# ------------------------------------------------------------ # ------------------------------------------------------------
# # 2、sys.exit(n) 退出程序,正常退出时exit(0)
# # # 退出程序,正常退出时exit(0)
# ------------------------------------------------------------ # ------------------------------------------------------------
# # 3、sys.version
# # # 获取Python解释程序的版本信息
# # # ==>>>应用场景:当程序拷贝到其他的电脑的时候,需要进行对电脑的运行环境进行获取,
# # # 以保证程序在其他的操作系统环境下能够正常的运行
# ------------------------------------------------------------ # ------------------------------------------------------------
# # 4、sys.maxint
# # # 最大的Int值 (python 2 中才有这个模块)
# ------------------------------------------------------------ # ------------------------------------------------------------
# # 5、sys.path
# # # 返回模块的搜索路径,初始化时使用PYTHONPATH环境变量的值
# ------------------------------------------------------------ # ------------------------------------------------------------
# # 6、sys.platform
# # # 返回操作系统平台名称
# # # ==>>>应用场景:当程序拷贝到其他的电脑的时候,需要进行对电脑的运行环境进行获取,
# # # 以保证程序在其他的操作系统环境下能够正常的运行
# ------------------------------------------------------------ # ------------------------------------------------------------
# # 7、sys实例:进度条
# ------------------------------------------------------------

------------------------------------------------分割线-------------------------------------------------

------------------------------------------------分割线-------------------------------------------------

------------------------------------------------分割线-------------------------------------------------

'''
# ------------------------------------------------------------
# # 1、sys.argv
# # # 命令行参数List,第一个元素是程序本身路径
# # # Python中 sys.argv[]的用法简明解释 - CSDN博客
# # # https://blog.csdn.net/xu380393916/article/details/81486773
# ------------------------------------------------------------
'''
#
# import sys
# print(sys.argv)
#
# # D:\Anaconda3\python.exe D:/C_cache/py/day22_os_json_re_etc_MoKuai/day22_2_os_json_re_etc_MoKuai.py
# # ['D:/C_cache/py/day22_os_json_re_etc_MoKuai/day22_2_os_json_re_etc_MoKuai.py']
# #
# # Process finished with exit code 0 '''
# ------------------------------------------------------------
# # 2、sys.exit(n) 退出程序,正常退出时exit(0)
# # # 退出程序,正常退出时exit(0)
# ------------------------------------------------------------
'''
#
# import sys
# msg ='''
# 1:输入
# 2:退出
# '''
# dic = {
# "d_get":"1",
# "d_exit":"2"
# }
# while True:
# print(msg)
# usr_input = input("请输入选项:")
# if usr_input == dic["d_get"]:
# continue
# elif usr_input == dic["d_exit"]:
# sys.exit(0)
#
# # D:\Anaconda3\python.exe D:/C_cache/py/day22_os_json_re_etc_MoKuai/day22_2_os_json_re_etc_MoKuai.py
# #
# # 1:输入
# # 2:退出
# #
# # 请输入选项:1
# #
# # 1:输入
# # 2:退出
# #
# # 请输入选项:1
# #
# # 1:输入
# # 2:退出
# #
# # 请输入选项:2
# #
# # Process finished with exit code 0 '''
# ------------------------------------------------------------
# # 3、sys.version
# # # 获取Python解释程序的版本信息
# # # ==>>>应用场景:当程序拷贝到其他的电脑的时候,需要进行对电脑的运行环境进行获取,
# # # 以保证程序在其他的操作系统环境下能够正常的运行
# ------------------------------------------------------------
'''
#
# import sys
# print(sys.version)
#
# # D:\Anaconda3\python.exe D:/C_cache/py/day22_os_json_re_etc_MoKuai/day22_2_os_json_re_etc_MoKuai.py
# # 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)]
# #
# # Process finished with exit code 0 '''
# ------------------------------------------------------------
# # 4、sys.maxint
# # # 最大的Int值 (python 2 中才有这个模块)
# ------------------------------------------------------------
'''
# 以下的环境是在python2.7中运运行的
# import sys
# print(sys.maxint)
#
# # D:\C_cache\py\day18_WenJianChuLi\venv\Scripts\python.exe D:/C_cache/py/day22_os_json_re_etc_MoKuai/day22_2_os_json_re_etc_MoKuai.py
# # 2147483647
# #
# # Process finished with exit code 0 '''
# ------------------------------------------------------------
# # 5、sys.path
# # # 返回模块的搜索路径,初始化时使用PYTHONPATH环境变量的值
# ------------------------------------------------------------
'''
#
# import sys
# print(sys.path)
#
# # D:\Anaconda3\python.exe D:/C_cache/py/day22_os_json_re_etc_MoKuai/day22_2_os_json_re_etc_MoKuai.py
# # ['D:\\C_cache\\py\\day22_os_json_re_etc_MoKuai', 'D:\\C_cache\\py\\day22_os_json_re_etc_MoKuai', 'D:\\Anaconda3\\python36.zip', 'D:\\Anaconda3\\DLLs', 'D:\\Anaconda3\\lib', 'D:\\Anaconda3', 'D:\\Anaconda3\\lib\\site-packages', 'D:\\Anaconda3\\lib\\site-packages\\win32', 'D:\\Anaconda3\\lib\\site-packages\\win32\\lib', 'D:\\Anaconda3\\lib\\site-packages\\Pythonwin', 'D:\\Program Files (x86)\\PyCharm 2018.1.3\\helpers\\pycharm_matplotlib_backend']
# #
# # Process finished with exit code 0 '''
# ------------------------------------------------------------
# # 6、sys.platform
# # # 返回操作系统平台名称
# # # ==>>>应用场景:当程序拷贝到其他的电脑的时候,需要进行对电脑的运行环境进行获取,
# # # 以保证程序在其他的操作系统环境下能够正常的运行
# ------------------------------------------------------------
'''
#
# import sys
# print(sys.platform)
#
# # D:\Anaconda3\python.exe D:/C_cache/py/day22_os_json_re_etc_MoKuai/day22_2_os_json_re_etc_MoKuai.py
# # win32
# #
# # Process finished with exit code 0 '''
# ------------------------------------------------------------
# # 7、sys实例:进度条
# ------------------------------------------------------------
'''
# # 方式一:
# import sys,time
# i = 0
# while i<100:
# sys.stdout.write(">")
# sys.stdout.flush()
# i +=1
# time.sleep(0.02)
# print("\n完成传输!")
#
# # D:\Anaconda3\python.exe D:/C_cache/py/day22_os_json_re_etc_MoKuai/day22_2_os_json_re_etc_MoKuai.py
# # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# # 完成传输!
# #
# # Process finished with exit code 0 # # 方式二:
# import sys,time
# for i in range(100):
# sys.stdout.write(">")
# sys.stdout.flush()
# time.sleep(0.02)
# print("\n完成传输!")
#
# # D:\Anaconda3\python.exe D:/C_cache/py/day22_os_json_re_etc_MoKuai/day22_2_os_json_re_etc_MoKuai.py
# # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# # 完成传输!
# #
# # Process finished with exit code 0

  


												

day22_2-sys模块的更多相关文章

  1. python常用模块(模块和包的解释,time模块,sys模块,random模块,os模块,json和pickle序列化模块)

    1.1模块 什么是模块: 在计算机程序的开发过程中,随着程序代码越写越多,在一个文件里代码就会越来越长,越来越不容易维护. 为了编写可维护的代码,我们把很多函数分组,分别放到不同的文件里,这样,每个文 ...

  2. python标准模块(os及sys模块)

    一.os模块 用于提供系统级别的操作 os.getcwd() 获取当前工作目录 os.stat('path/filename') 获取文件/目录信息,其中包括文件大小等 os.sep 获得操作系统特定 ...

  3. [转载]python中的sys模块(二)

    #!/usr/bin/python # Filename: using_sys.py import sys print 'The command line arguments are:' for i ...

  4. [转载]Python中的sys模块

    #!/usr/bin/python # Filename: cat.py import sys def readfile(filename): '''Print a file to the stand ...

  5. python之sys模块详解

    python之sys模块详解 sys模块功能多,我们这里介绍一些比较实用的功能,相信你会喜欢的,和我一起走进python的模块吧! sys模块的常见函数列表 sys.argv: 实现从程序外部向程序传 ...

  6. sys模块和os模块,利用sys模块生成进度条

    sys模块import sysprint(sys.argv)#sys.exit(0)             #退出程序,正常退出exit(0)print(sys.version)       #获取 ...

  7. os和sys模块

    sys模块 sys模块主要是用于提供对python解释器相关的操作 函数 sys.argv #命令行参数List,第一个元素是程序本身路径 sys.path #返回模块的搜索路径,初始化时使用PYTH ...

  8. python中os和sys模块的详解

    平时在工作中经常会用到os模块和sys模块的一些特性,下面是这些特性的一些相关解释,希望对大家有所帮助 os模块 os.getcwd() 获取当前工作目录,即当前python脚本工作的目录路径 os. ...

  9. Python学习总结12:sys模块

    sys模块常用来处理Python运行时配置以及资源,从而可以与前当程序之外的系统环境交互. 1. 导入及函数查看 >>> import sys #导入sys模块 >>&g ...

  10. sys模块的初步认识

    #!/usr/bin/python # Filename: cat.py import sys def readfile(filename): '''Print a file to the stand ...

随机推荐

  1. vue 监听的使用

    watch:{    监听的属性:function(旧值,新值) {       } }   代码: <!DOCTYPE html> <html lang="en" ...

  2. Centos 安装php Imagick 扩展

    从 centos 仓库安装 首先安装 php-pear php-devel,gcc三个软件包 yum install php-pear php-devel gcc 通过 yum 安装Centos 官方 ...

  3. vue 学习一 组件生命周期

    先上一张vue组件生命周期的流程图 以上就是一个组件完整的生命周期,而在组件处于每个阶段时又会提供一些周期钩子函数以便我们进行一些逻辑操作,而总体来讲 vue的组件共有8个生命周期钩子 beforeC ...

  4. Kotlin Hello World

    { https://github.com/zhmmmm/Kotlin }

  5. NX二次开发-打开文件夹,并同时选中指定文件

    NX9+VS2012 #include <uf.h> #include <uf_ui.h> #include <uf_part.h> #include <at ...

  6. 判断语句 (a>b)?a:b【转载】

    文章转载自https://blog.csdn.net/hyj1996818/article/details/81783513 今天刷题有看到一种我没学过的判断语句 感觉很高级的样子 我跟大家分享下我的 ...

  7. NX二次开发-char*转换成CString,多字节转换成Unicode使用方法

    //定义一个结构体记录 struct group { CString text; //定义一个CString std::vector<tag_t> boudaries; std::vect ...

  8. 谈谈E语言

    基于中国文化底蕴的编程语言,  绝对不是E语言那个样子. 基于中文的编程,必将是计算机届的一次原子爆炸!

  9. CVE-2018-3246 weblogic xxe

    使用P牛2018-2894的容器 http://192.168.245.130:7001/ws_utc/begin.do 导入测试用例 上传时抓取数据包 POST /ws_utc/resources/ ...

  10. 面试问烂的 MySQL 查询优化,看完屌打面试官!

    Java技术栈 ,一般把连接数设置得大一些). 并发量:同一时刻数据库服务器处理的请求数量 3.超高的 CPU使用率:CPU资源耗尽出现宕机. 4.磁盘 IO:磁盘 IO性能突然下降.大量消耗磁盘性能 ...