I want to know that how to get executed commands/codes history in python3.x as we are getting by history command in RHEL-8??
Tried history command and print(history) on >>>(python 3.x shell) prompt but getting error.
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> history
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
history
NameError: name 'history' is not defined
>>>
>>> print(history)
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
print(history)
NameError: name 'history' is not defined
>>>