Python 3基础教程30-sys模块

本文介绍sys模块,简单打印两个重定向输出。

# sys模块
import sys

# 重定向标准错误信息的
sys.stderr.write('This is stderr text\n')
# 因为从定向有缓冲区,所以需要以下这行代码
sys.stderr.flush()
sys.stdout.write('This is stdout text\n')

# 获取命令行参数,默认sys.argv[0]表示代码本身文件路径
print(sys.argv)
目前使用机会没有,以后实际用到了,再去研究和学习。

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
System Stability Tester began as a system stressing and benchmarking tool for overclockers, by the Greek pctechnology and overclockers community, the first months of 2005. Since its first release 0.1 is free and open source software. When version 0.7 came out in June 2007, the project moved to sourceforge.net in order to ease its distribution and gain popularity. How it works System Stability Tester tries to test the system's stability by calculating up to 128 millions of Pi digits. It supports multiple calculation algorithms. For the moment only two have been implemented. The Quadratic Convergence of Borwein and Gauss-Legendre, the algorithm SuperPi uses. The testing process includes the creation of two or more threads. After each step of the calculation, the results of all the threads are compared. Any differences between them are reported. There is also the option for single threaded calculation, but in this case there is no stability check. This is useful for benchmarking purposes only. The calculation of Pi itself is multi threaded since version 0.7.2, for the Borwein algorithm only. What System Stability Tester can do in brief Calculate up to 128 million digits of Pi. Create up to 32 threads. Recognize the CPU model, manufacturer and operational frequency. Compare the calculation results of all the threads after each step and issue a warning if something went wrong. Run continuously for up to 50 turns and log the results after each step and each turn. Record the calculated digits of Pi in a human readable text file. Single threaded calculation of Pi for benchmarking, similar to the well know SuperPi benchmark. Checksum validation over the result. Provides graphical and command line user interfaces.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值