Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93465049
inventory.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Nov 28, 23:49
Size
535 B
Mime Type
text/x-python
Expires
Sat, Nov 30, 23:49 (2 d)
Engine
blob
Format
Raw Data
Handle
22641997
Attached To
rSERVICENOWCHATALERT servicenow-chat-alert
inventory.py
View Options
#!/usr/bin/python
# -*- coding: utf-8 -*-
import
os
,
sys
# add ../../Sources to the PYTHONPATH
sys
.
path
.
append
(
os
.
path
.
join
(
".."
,
".."
,
"Sources"
))
from
yocto_api
import
*
errmsg
=
YRefParam
()
# Setup the API to use local USB devices
if
YAPI
.
RegisterHub
(
"usb"
,
errmsg
)
!=
YAPI
.
SUCCESS
:
sys
.
exit
(
"init error"
+
str
(
errmsg
))
print
(
'Device list'
)
module
=
YModule
.
FirstModule
()
while
module
is
not
None
:
print
(
module
.
get_serialNumber
()
+
' ('
+
module
.
get_productName
()
+
')'
)
module
=
module
.
nextModule
()
YAPI
.
FreeAPI
()
Event Timeline
Log In to Comment