Re: python2: Where is imp.py?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]





Am 30.12.18 um 23:06 schrieb Eli Schwartz via arch-general:
On 12/30/18 4:04 PM, Peter Nabbefeld wrote:
Hello,

I need to use the inspect module with python 2.7, but the imported imp
module seems to be missing - how can I get that, as there's no
python2-imp package?
That's categorically impossible as the imp module is a builtin in
python2 and imp.py is a (deprecated!) part of the stdlib in python3.

You should definitely be able to "import imp". Please explain your
problem further.

I try to use the inspect module with jython, but the import of imp fails.

inspect.py exists in /usr/lib/python2.7 (and also in /usr/lib/python3.7), while imp.py exists only in /usr/lib/python3.7

If it's a builtin in python2, it seems I have bad luck, though.

Kind regards

Peter



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux