2016-11-10 1 views
1

저는 주위를 돌아 다니며 androidhelper 대신 sl4a를 가져 오는 스크립트를 보여주는 사람들을 발견했습니다. 내가 그것을하려고 할 때 나는 sl4a라는 모듈이 없다. Qpython3에서만 실행됩니까? qpython의 site-packages 폴더에 arm 용 sl4a가 있습니다. Tks.qpython with sl4a library

답변

1

qpython2에서 sl4a 모듈은 androidhelper 안에 있습니다. 사실, SL4A 모듈이 내부로 가져올 얻을 것이다 당신은 qpython3에서 qpython2

from androidhelper import sl4a 
# OR 
import androidhelper.sl4a as sl4a 
# OR 
import androidhelper # then access sl4a with androidhelper.sl4a 

에서 혼자 SL4A을 가져 중 하나를 아래에 할 수

은 SL4A와 androidhelper 모듈 모두 sys.path에 내 androidhelper

는 그래서 당신은 할 수 그들 중 아무거나 가져 오기

+0

좋은 단어입니다. 희망이 다른 사람도 도움이 될 것입니다. – user1930043

+0

다른 사람들에게 홍보하기 위해 답을 upvote 또는 accept 할 수 있습니다 : p – Skycc