Ubuntu Pastebin

Paste from ubuntu at Tue, 20 Sep 2016 15:26:56 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
-[laptop1]- -[~]-
-[10:19 AM]-python3
Python 3.5.2 (default, Jul  5 2016, 12:43:10) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> err = IOError("invalid", errno=22)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: OSError does not take keyword arguments
>>> err = IOError("invalid", 22)
>>> try:
...     raise err
... except OSError:
...     print("test")
... 
test
>>> 
-[laptop1]- -[~]-
-[10:20 AM]-python2.7
Python 2.7.12 (default, Jul  1 2016, 15:12:24) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> err = IOError("invalid", 22)
>>> try:
...     raise err
... except OSError:
...     print("test")
... 
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
IOError: [Errno invalid] 22
>>> 
Download as text