File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1616 package_dir = {"" : "src" },
1717 packages = ["cs50" ],
1818 url = "https://github.com/cs50/python-cs50" ,
19- version = "3.0.2 "
19+ version = "3.1.0 "
2020)
Original file line number Diff line number Diff line change @@ -32,6 +32,18 @@ def write(self, x):
3232sys .stdout = flushfile (sys .stdout )
3333
3434
35+ def eprint (* args , ** kwargs ):
36+ """
37+ Print an error message to standard error, prefixing it with
38+ file name and line number from which method was called.
39+ """
40+ end = kwargs .get ("end" , "\n " )
41+ sep = kwargs .get ("sep" , " " )
42+ (filename , lineno ) = inspect .stack ()[1 ][1 :3 ]
43+ print ("{}:{}: " .format (filename , lineno ), end = "" )
44+ print (* args , end = end , file = sys .stderr , sep = sep )
45+
46+
3547def formatException (type , value , tb ):
3648 """
3749 Format traceback, darkening entries from global site-packages directories
You can’t perform that action at this time.
0 commit comments