mirror of
https://github.com/python/cpython.git
synced 2025-11-02 14:41:33 +00:00
Fix most trivially-findable print statements.
There's one major and one minor category still unfixed: doctests are the major category (and I hope to be able to augment the refactoring tool to refactor bona fide doctests soon); other code generating print statements in strings is the minor category. (Oh, and I don't know if the compiler package works.)
This commit is contained in:
parent
452bf519a7
commit
be19ed77dd
331 changed files with 2567 additions and 2648 deletions
|
|
@ -125,15 +125,15 @@ def find_library(name):
|
|||
def test():
|
||||
from ctypes import cdll
|
||||
if os.name == "nt":
|
||||
print cdll.msvcrt
|
||||
print cdll.load("msvcrt")
|
||||
print find_library("msvcrt")
|
||||
print(cdll.msvcrt)
|
||||
print(cdll.load("msvcrt"))
|
||||
print(find_library("msvcrt"))
|
||||
|
||||
if os.name == "posix":
|
||||
# find and load_version
|
||||
print find_library("m")
|
||||
print find_library("c")
|
||||
print find_library("bz2")
|
||||
print(find_library("m"))
|
||||
print(find_library("c"))
|
||||
print(find_library("bz2"))
|
||||
|
||||
# getattr
|
||||
## print cdll.m
|
||||
|
|
@ -141,14 +141,14 @@ def test():
|
|||
|
||||
# load
|
||||
if sys.platform == "darwin":
|
||||
print cdll.LoadLibrary("libm.dylib")
|
||||
print cdll.LoadLibrary("libcrypto.dylib")
|
||||
print cdll.LoadLibrary("libSystem.dylib")
|
||||
print cdll.LoadLibrary("System.framework/System")
|
||||
print(cdll.LoadLibrary("libm.dylib"))
|
||||
print(cdll.LoadLibrary("libcrypto.dylib"))
|
||||
print(cdll.LoadLibrary("libSystem.dylib"))
|
||||
print(cdll.LoadLibrary("System.framework/System"))
|
||||
else:
|
||||
print cdll.LoadLibrary("libm.so")
|
||||
print cdll.LoadLibrary("libcrypt.so")
|
||||
print find_library("crypt")
|
||||
print(cdll.LoadLibrary("libm.so"))
|
||||
print(cdll.LoadLibrary("libcrypt.so"))
|
||||
print(find_library("crypt"))
|
||||
|
||||
if __name__ == "__main__":
|
||||
test()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue