0

I am writing this script:

def main():
    rc = RemoteControl()
    
    # To Check if HCCU is responding to SCPI commands
    scpi_command = r'*IDN?'
    debug('Calling SendSCPICommandToHCCU:', scpi_command)
    result = rc.SendSCPICommandToHCCU(scpi_command)
    debug('Result:', result)

    scpi_command = r'setup:ports:recall "SISO_NR"'
    debug('Calling SendSCPICommandToHCCU:', scpi_command)
    result = rc.SendSCPICommandToHCCU(scpi_command)
    debug('Result:', result)

now in scpi_command I am passing a recall command to recall a profile which is a string("SISO_NR"). I want to modify this script in such a way that my script asks the user for the input of the string here. How can I do it?

Lucan
  • 2,907
  • 2
  • 16
  • 30

1 Answers1

1

To get an user input in python use input

Example:

command = input('Provide a command:')
print(command)

More infos: https://www.w3schools.com/python/ref_func_input.asp

Mathix420
  • 872
  • 11
  • 21