pys60
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
pys60 [2012/01/15 10:51] – created 119.192.238.152 | pys60 [2018/07/18 14:10] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 5: | Line 5: | ||
===== 설치 ===== | ===== 설치 ===== | ||
- | | + | 다운로드 하면 C:\Program Files\PythonForS60\PyS60Dependencies 폴더에 아래 파일이 있다. |
+ | 다음 파일을 클릭하여 Nokia PC Suite 로 설치한다. | ||
+ | | ||
* pips.sis | * pips.sis | ||
* PythonScriptShell_2.0.0_high_capas.sis | * PythonScriptShell_2.0.0_high_capas.sis | ||
- | http:// | + | ===== 패키징 ===== |
+ | 핸드폰에 설치된 python shell에서 직접 실행할 수 도 있지만, PyS60 Application Packager 프로그램을 이용하여 sis 로 패키징 할 수 있다. | ||
+ | 패키지 인증: http:// | ||
+ | |||
+ | ===== 메뉴얼 ===== | ||
+ | * S60 Module Reference http:// | ||
+ | * https:// | ||
+ | * http:// | ||
+ | |||
+ | ===== GPS 정보 가져오기 ===== | ||
+ | http:// | ||
+ | |||
+ | < | ||
+ | # note: your phone must have the ' | ||
+ | # and receive satalite data in order to make this script work. (can be problematic indoors). | ||
+ | import messaging | ||
+ | import positioning | ||
+ | |||
+ | positioning.select_module(positioning.default_module()) | ||
+ | positioning.set_requestors([{" | ||
+ | " | ||
+ | " | ||
+ | |||
+ | def send_sms_myposition(phone_number): | ||
+ | result = positioning.position() | ||
+ | #print 'all gps data: ', result | ||
+ | coordinates=result[" | ||
+ | mylatitude = coordinates[" | ||
+ | mylongitude = coordinates[" | ||
+ | print ' | ||
+ | print ' | ||
+ | messaging.sms_send(phone_number, | ||
+ | | ||
+ | send_sms_myposition(" | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | # Example 2. Non-blocking call | ||
+ | def cb(event): | ||
+ | print " | ||
+ | print event | ||
+ | print " | ||
+ | |||
+ | print " | ||
+ | print positioning.position(course=1, | ||
+ | |||
+ | </ | ||
+ | |||
+ | < | ||
+ | import positioning | ||
+ | import messaging | ||
+ | import httplib, urllib | ||
+ | |||
+ | positioning.select_module(positioning.default_module()) | ||
+ | positioning.set_requestors([{" | ||
+ | " | ||
+ | " | ||
+ | |||
+ | def getmyposition(): | ||
+ | result = positioning.position() | ||
+ | #print 'all gps data: ', result | ||
+ | # | ||
+ | coordinates=result[" | ||
+ | mylatitude = coordinates[" | ||
+ | mylongitude = coordinates[" | ||
+ | print ' | ||
+ | print ' | ||
+ | messaging.sms_send(" | ||
+ | params = urllib.urlencode({' | ||
+ | headers = {" | ||
+ | conn = httplib.HTTPConnection(" | ||
+ | conn.request(" | ||
+ | conn.close() | ||
+ | |||
+ | # | ||
+ | getmyposition() | ||
+ | </ | ||
+ | ===== 참고 ===== | ||
+ | |||
+ | * sms 보내기: http:// | ||
+ | * http post: http:// |
pys60.1326624713.txt.gz · Last modified: 2018/07/18 14:09 (external edit)