文件名称:Python_Programmers_Guide digi
文件大小:211KB
文件格式:PDF
更新时间:2017-05-01 09:09:31
Python Programmers Guide digi
digi python开发必备必看。 Contents Purpose of this Guide.......................................................................................................... 4 What Is Python?.................................................................................................................. 4 Additional Python Documentation ..................................................................................... 4 Getting Started .................................................................................................................... 5 First Program: “Hello, World!” ...................................................................................... 5 Python Commands in the Digi Command-Line Interface .................................................. 6 python ............................................................................................................................. 6 set python........................................................................................................................ 7 Loading Python Programs onto a Digi Device ................................................................... 8 Using modulefinder.py to Determine Files to Load ....................................................... 8 Using digi_build_zip.py to Automatically Build a zip File............................................ 9 Recommended Distribution of Python Interpreter............................................................ 10 Python Module Reference................................................................................................. 10 Fully Supported Python Built-In Modules.................................................................... 10 Python Modules with Digi-Specific Behavior.............................................................. 10 os.............................................................................................................................. 11 random ...................................................................................................................... 12 re ............................................................................................................................... 12 socket ........................................................................................................................ 12 termios....................................................................................................................... 22 thread and threading.................................................................................................. 24 time ........................................................................................................................... 24 xbee_sensor............................................................................................................... 25 zigbee ........................................................................................................................ 30 File System Access ....................................................................................................... 32 Sample Programs .............................................................................................................. 33 GPS Demo .................................................................................................................... 33 Run the GPS Demo................................................................................................... 33 Files in GPS demo .................................................................................................... 34 Port Sharing Demo........................................................................................................ 36 Run the port sharing demo........................................................................................ 36