pys60
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| pys60 [2012/01/15 10:55] – 119.192.238.152 | pys60 [2018/07/18 14:10] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 11: | Line 11: | ||
| * PythonScriptShell_2.0.0_high_capas.sis | * PythonScriptShell_2.0.0_high_capas.sis | ||
| - | http:// | ||
| ===== 패키징 ===== | ===== 패키징 ===== | ||
| - | 핸드폰에 설치된 python shell에서 직접 실행할 수 도 있지만, 패키징을 할 수 있다. | + | 핸드폰에 설치된 python shell에서 직접 실행할 수 도 있지만, |
| + | |||
| + | 패키지 인증: http:// | ||
| - | 패키징을 위해서 | ||
| - | http:// | ||
| - | 필요. | ||
| ===== 메뉴얼 ===== | ===== 메뉴얼 ===== | ||
| * S60 Module Reference http:// | * S60 Module Reference http:// | ||
| * https:// | * 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.1326624945.txt.gz · Last modified: 2018/07/18 14:09 (external edit)