일부 악기의 데이터 수집을 자동화하는 컴퓨터에서 sikuli 스크립트를 실행하고 있습니다. 최근에 PyVisa를 설치했고 파이썬을 사용하여 악기를 연결하고 통신 할 수있었습니다. sikuli에서 Visa 모듈을 가져올 수있는 방법이 있습니까? 파이썬에서와 같은 방법으로 내 도구와 통신하는 데 사용할 수 있습니까?Sikuli의 Python Pyvisa 모듈 가져 오기
0
A
답변
0
Sikuli는 Jython을 사용하여 실행합니다. Pure-Python 코드는 거의 항상 정상적으로 작동하지만 원시 C 코드가있는 Python 코드는 작동하지 않습니다. 필자는 PyVISA에 익숙하지 않지만 순수한 파이썬처럼 보입니다. 그래서 시도해 보겠습니다.
자이 톤이 보이는 곳에 PyVISA를 넣어야합니다. Jython documentation을 살펴보십시오.
0
나는 파이썬 라이브러리 : jenkinsapi를 Jython Sikuli 환경으로 가져 오려고했다. 두 가지를 결합하려는 여러 시도를 한 후 다음과 같은 작업을 수행했습니다.
Sikuli Editor import os에서 Jython으로 가져올 수없는 코드를 실행하는 함수를 정의합니다.
import os
def installBuild():
os.system("C:\\Users\\time\\Desktop\\FDSmokeTest\\fdoc_build.py")
파이썬은 jenkinsapi에 액세스 할 수 있지만, 자이 썬은 Sikuli 자이 썬 코드는 파이썬을 실행하는 시스템 호출을 실행 가진 후 간단한 파이썬 파일을 만들 수 없습니다.
from jenkinsapi.jenkins import *
import os
import unittest
import sys
from subprocess import call
def getSCMInfroFromLatestGoodBuild(url, jobName, username=None, password=None):
print "Getting Latest Good Build: http://addresstoourjenkins.com:9087 Job: Daily_Windows"
J = Jenkins(url, username, password)
job = J[jobName]
lgb = job.get_last_good_build()
print "Latest Good Daily Windows Build: " + str(lgb)
return lgb
def installBuild(buildnum):
print "Installing " + buildnum + " wait a few minutes while installation completes"
os.system("C:\Users\time\Desktop\FDSmokeTest\install.bat " + buildnum)
if __name__ == '__main__':
temp = getSCMInfroFromLatestGoodBuild('http://addresstoourjenkins.com:9087', 'Daily_Windows')
buildnum=str(temp).replace('Daily_Windows ', '')
installBuild(buildnum)
관련 문제
- 1. Pyvisa 가져 오기 문제
- 2. Python 모듈 가져 오기
- 3. Python 가져 오기 모듈
- 4. 모듈 가져 오기 오류 Python
- 5. Python 모듈 가져 오기 오류
- 6. Python 가져 오기 모듈 ImportError
- 7. Python : 모듈 가져 오기 최적화
- 8. python 모듈 가져 오기 - ImageChops
- 9. Python - 가져 오기 클라이언트 모듈
- 10. Python 가져 오기 모듈 오류
- 11. OpenCV Python 가져 오기 모듈
- 12. Ironpython C# 가져 오기 모듈 오류 가져 오기 CSV 모듈
- 13. 모듈 가져 오기, Levenshtein
- 14. 가져 오기 모듈
- 15. Python 가져 오기 모듈, 폴더 구조
- 16. Python : 함수와 같은 이름의 모듈 가져 오기
- 17. Python ZeroMQ 모듈 가져 오기 오류
- 18. python (django)에서 선택적으로 모듈 가져 오기
- 19. Django : python-twitter 모듈 가져 오기 문제
- 20. Python 가져 오기 오류 : 모듈 이름이 없습니다
- 21. 다른 작업 디렉토리에서 Python 모듈 가져 오기
- 22. Python C API의 문자열에서 모듈 가져 오기
- 23. Azure 함수 용 Python 모듈 가져 오기
- 24. Python 가상 환경에서 모듈 가져 오기 (SQLITE3)
- 25. Flask의 동일한 디렉토리에있는 Python 가져 오기 모듈
- 26. Python 모범 사례 가져 오기 모듈
- 27. Python 설치 모듈 및 가져 오기
- 28. Eclipse/Python 가져 오기 Dropbox 모듈
- 29. 컨텍스트가있는 모듈 가져 오기
- 30. Python에서 모듈 가져 오기