Closed
Description
From thomas.s...@gmail.com on February 18, 2010 23:18:39
Hi,
currently there is some effort in packaging this for fedora, and I'd like
to know, if you support python3 builds of psutil?
I needed to run 2to3 on the sources, but it seems like psutil works under
python3 after that.
Do you intend to use two different sources - one for python2 and one for
python3 - or do you prefer running 2to3 on them and thus support python2/3
in one tarball?
Thomas
P.S. live session in python3:
(Maybe is process.name broken, or I did something wrong...)
$ python3
Python 3.1.1 ( r311 :74480, Jan 14 2010, 15:34:21)
[GCC 4.4.2 20091222 (Red Hat 4.4.2-20)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import psutil
>>> psutil.get_pid_list()
[0, 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, 33, 34, 35, 36, 42, 43, 45,
46, 47, 48, 114, 221, 226, 227, 230, 251, 252, 253, 437, 439, 440, 560,
561, 562, 589, 648, 867, 908, 1036, 1037, 1038, 1085, 1088, 1089, 1136,
1137, 1138, 1139, 1140, 1141, 1243, 1320, 1343, 1344, 1355, 1372, 1382,
1383, 1404, 1426, 1428, 1493, 1523, 1535, 1537, 1546, 1547, 1568, 1584,
1595, 1604, 1613, 1642, 1650, 1661, 1674, 1675, 1676, 1677, 1678, 1679,
1710, 1711, 1729, 1735, 1769, 1781, 1786, 1803, 1811, 1820, 1821, 1871,
1912, 1915, 1917, 1921, 1922, 1924, 1926, 1927, 1928, 1930, 1932, 1937,
1939, 1943, 1946, 1948, 1950, 1958, 1960, 1962, 1964, 1968, 1972, 1976,
1997, 2032, 2067, 2088, 2096, 2101, 2114, 2146, 2157, 2200, 2205, 2206,
2221, 2223, 2259, 2284, 2337, 2339, 2341, 2342, 2345, 2355, 2360, 2361,
2371, 2407, 2462, 2464, 2469, 2475, 2495, 2661, 2866, 3111, 3120, 3180, 3218]
>>> p = psutil.Process(2088)
>>> p.name
'pulseaudio'
>>> p.cmdline
['/usr/bin/pulseaudio', '--start']
>>> p.uid
500
>>> p.gid
500
>>> p.username
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'Process' object has no attribute 'username'
>>> p.usernmae
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'Process' object has no attribute 'usernmae'
>>> rss, vms = p.get_memory_info()
>>> rss
4886528
>>> vms
458084352
>>>
Original issue: http://code.google.com/p/psutil/issues/detail?id=75