[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] BUG : cdrom.get_name = /dev/hda ?



Hey guys !

My machine is :

OS - Fedora Core 5
Python 2.4.3
pygame-1.7.1-9.fc5

my cdrom is a external-usb drive .

i made 2 tests , one with the drive in power on , the other with then in powe off
the test script is :


[code]
from pygame import cdrom

cdrom.init()

# get_count() retorna o numero de drives + 1
for i in range(cdrom.get_count()):
 tmp = cdrom.CD(i)
 tmp.init()
 print "get_all         :",
 print tmp.get_all()
 print "get_busy        : %s" %tmp.get_busy()
 print "get_current     :",
 print tmp.get_current()
 print "get_empty       : %s" %tmp.get_empty()
 print "get_id          : %s" %tmp.get_id()
 print "get_init        : %s" %tmp.get_init()
 print "get_name        : %s" %tmp.get_name()
 print "get_numtracks   : %s" %tmp.get_numtracks()
 print "get_paused      : %s" %tmp.get_paused()
[/code]


RESULTS :

with power on :
------------------------------------------
[root@fabricio-wrk cdlib.py]# python cdlib.py
cdrom.get_count : 1
get_all         : ((0, 2.0, 2106.4266666666667, 2104.4266666666667),)
get_busy        : 0
get_current     : (0, 0.0)
get_empty       : 0
get_id          : 0
get_init        : 1
get_name        : /dev/cdrom
get_numtracks   : 1
get_paused      : 0
------------------------------------------


with power off ------------------------------------------ [root@fabricio-wrk cdlib.py]# python cdlib.py cdrom.get_count : 1 get_all : () get_busy : 0 get_current : (0, 0.0) get_empty : 1 get_id : 0 get_init : 1 get_name : /dev/hda get_numtracks : 0 get_paused : 0 ------------------------------------------

hummm my cdrom is a /dev/hda ??? cant ...
i read in doc that if you do not have a cdrom , cdrom,get_count will return 0 , but its not . :(


sorry for the bad english ... :(

bye