File tree Expand file tree Collapse file tree 6 files changed +14
-9
lines changed
Expand file tree Collapse file tree 6 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,13 @@ def iothub_devicemethod_sample_run():
3232 print ( "Response status : {0}" .format (response .status ) )
3333 print ( "Response payload : {0}" .format (response .payload ) )
3434
35- raw_input ("Press Enter to continue...\n " )
35+ try :
36+ # Try Python 2.xx first
37+ raw_input ("Press Enter to continue...\n " )
38+ except :
39+ pass
40+ # Use Python 3.xx in the case of exception
41+ input ("Press Enter to continue...\n " )
3642
3743 except IoTHubError as iothub_error :
3844 print ( "" )
@@ -44,7 +50,7 @@ def iothub_devicemethod_sample_run():
4450
4551
4652def usage ():
47- print ( "Usage: iothub_devicemethod_sample.py -c <connectionstring>" )
53+ print ( "Usage: iothub_devicemethod_sample.py -c <connectionstring> -d <device_id> " )
4854 print ( " connectionstring: <HostName=<host_name>;SharedAccessKeyName=<SharedAccessKeyName>;SharedAccessKey=<SharedAccessKey>>" )
4955 print ( " deviceid : <Existing device ID to call a method on>" )
5056
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ def iothub_devicetwin_sample_run():
3939
4040
4141def usage ():
42- print ( "Usage: iothub_devicetwin_sample.py -c <connectionstring>" )
42+ print ( "Usage: iothub_devicetwin_sample.py -c <connectionstring> -d <device_id> " )
4343 print ( " connectionstring: <HostName=<host_name>;SharedAccessKeyName=<SharedAccessKeyName>;SharedAccessKey=<SharedAccessKey>>" )
4444 print ( " deviceid : <Existing device ID to get and update the TWIN>" )
4545
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ def iothub_messaging_sample_run():
9494
9595
9696def usage ():
97- print ( "Usage: iothub_messaging_sample.py -c <connectionstring>" )
97+ print ( "Usage: iothub_messaging_sample.py -c <connectionstring> -d <device_id> " )
9898 print ( " connectionstring: <HostName=<host_name>;SharedAccessKeyName=<SharedAccessKeyName>;SharedAccessKey=<SharedAccessKey>>" )
9999 print ( " deviceid : <Existing device ID to to send a message to>" )
100100
Original file line number Diff line number Diff line change @@ -96,9 +96,8 @@ def iothub_registrymanager_sample_run():
9696
9797def usage ():
9898 print ( "Usage: iothub_registrymanager_sample.py -c <connection_string> -d <device_id>" )
99- print ( " connectionstring: <HostName=<host_name>;SharedAccessKeyName=<shared_access_key_name>;" \
100- "SharedAccessKey=<shared_access_key>> " )
101- print ( " deviceid : <New device ID for CRUD operations>" )
99+ print ( " connectionstring: <HostName=<host_name>;SharedAccessKeyName=<SharedAccessKeyName>;SharedAccessKey=<SharedAccessKey>>" )
100+ print ( " deviceid : <New device ID for CRUD operations>" )
102101
103102
104103if __name__ == '__main__' :
Original file line number Diff line number Diff line change 3333#define IMPORT_NAME iothub_service_client
3434#endif
3535
36- #define IOTHUB_PYTHON_SERVICE_SDK_VERSION " 15 "
36+ #define IOTHUB_PYTHON_SERVICE_SDK_VERSION " 16 "
3737#define VERSION_STRING IOTHUB_SERVICE_CLIENT_VERSION " ." IOTHUB_PYTHON_SERVICE_SDK_VERSION
3838
3939#if PY_MAJOR_VERSION >= 3
You can’t perform that action at this time.
0 commit comments