Python: added some new examples

This commit is contained in:
Philippe Tillet
2015-08-12 00:48:16 -07:00
parent ff4cf94df7
commit cd51f75eb5
3 changed files with 52 additions and 0 deletions

10
python/examples/infos.py Normal file
View File

@@ -0,0 +1,10 @@
import isaac as sc
platforms = sc.driver.get_platforms()
devices = [d for platform in platforms for d in platform.get_devices()]
print("----------------")
print("Devices available:")
print("----------------")
for (i, d) in enumerate(devices):
print '[', i, ']', '-', sc.driver.device_type_to_string(d.type), '-', d.name, 'on', d.platform.name
print("----------------")