In Sikuli r930, how to trigger a commad, such as "Ping" ?
Hi, Sir,
In Sikuli r905 version,
I can trigger a "ping" command through os.systm("Ping www.google.com > test.log")
It works fine to record the ping result in a file.
However, in the latest version r930,
the sikuli always show an type error: "TypeError: unsupported operand type(s) for +: 'NoneType' and 'list"
Do I have any chance to use command in Sikuli r930 version?
I also attach the source code and error message in the following.
Thnaks in advance.
~~~~~~~
Sample Source Code:
=======
import os
import sys
import time
#need to create the file in the corresponding path
My_Log_File = "C:\Log\MyTest.log"
Ping_IP = "www.google.com"
if os.path.
os.
time.sleep (3)
os.system("ping "+ Ping_IP + ">" + My_Log_File)
time.sleep (3)
log_file = open(My_Log_File, "a+")
log_file.
log_file.close()
=======
Error message in r930:
-------
[info] Sikuli vision engine loaded.
[info] Windows utilities loaded.
[info] VDictProxy loaded.
[error] Stopped
[error] An error occurs at line 13
[error] Error message: Traceback (most recent call last):
File "C:\Users\
os.system("ping "+ Ping_IP + ">" + My_Log_File)
File "C:\win8\
File "C:\win8\
File "C:\win8\
TypeError: unsupported operand type(s) for +: 'NoneType' and 'list'
-------
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- Last query:
- Last reply: