|
#1
|
|||
|
|||
run python script from command line
Is there a way for me to run a python script from the command?
I get the following error Code:
# python test2.py Traceback (most recent call last): File "test2.py", line 31, in <module> Main() File "test2.py", line 8, in Main crt.Screen.Synchronous = True NameError: global name 'crt' is not defined |
#2
|
|||
|
|||
Hi rleon,
You can run scripts in SecureCRT by using the following: SecureCRT.exe /Script "Path_to_Script.py"
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#3
|
|||
|
|||
hi
Im on MAC dont have an exe file. Thanks |
#4
|
|||
|
|||
Hi rleon,
Sorry, for Mac OS, it would be: /Applications/SecureCRT.app/contents/MacOS/SecureCRT /Script "Path_to_Script.py"
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#5
|
|||
|
|||
Thanks that worked ..
is there an option that doesnt force a new window to be opened? Ideally I would like to run it from the current session. |
#6
|
|||
|
|||
Hi rleon,
I am not quite sure what you need. Does your script include code to logon the remote system? You can use /S "session_name" to launch a session via the command-line. The /T option opens the connection in a tab. See the Using the Software / Command Line Options topics in SecureCRT's Help file for more info.
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|