268
Python commands
exit()
Use exit() to exit the Python shell.
Syntax
exit()
Views
Python shell
Predefined user roles
network-admin
Usage guidelines
To return to user view from the Python shell, you cannot use the quit command. You must use the
exit() command.
Examples
# Exit the Python shell.
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> exit()
<Sysname>
python
Use python to enter the Python shell.
Syntax
python
Views
User view
Predefined user roles
network-admin
Usage guidelines
In the Python shell, you can use the following items:
• Python 2.7 commands.
• Python 2.7 standard API.
• Comware 7 extended API.
Examples
# Enter the Python shell.
<Sysname> python
Python 2.7.3 (default)
[GCC 4.4.1] on linux2