Re: [Tutor] Reading the CDROM in Linux

2010-11-06 Thread Alan Gauld
"Steven D'Aprano" wrote I usually mount cdroms on /dev/cdrom Surely that's where you mount cdroms *from*? I can't think that using /dev/cdrom as the mount point would be a good idea! Oops, yes, that should be /usr/cdrom, sorry. Alan G. ___

Re: [Tutor] Reading the CDROM in Linux

2010-11-05 Thread Terry Carroll
On Fri, 5 Nov 2010, Terry Carroll wrote: Aha, this looks like it will work; I was starting to think along these lines; I was thinking of reading the output of df, but this is cleaner. Just to close this out, here's what's working for me. It will need to be prettied up, and the "/media/" para

Re: [Tutor] Reading the CDROM in Linux

2010-11-05 Thread Carlos Daniel Ruvalcaba Valenzuela
This is more of a Linux question, but here is some advice: All files under /dev are more or less raw representations of the devices, meaning that /dev/cdrom or /dev/sr0 files represent the CDROM devices, however this is for raw access to the device data, now really for normal use, the sistem may "

Re: [Tutor] Reading the CDROM in Linux

2010-11-05 Thread Terry Carroll
On Sat, 6 Nov 2010, Steven D'Aprano wrote: Terry Carroll wrote: I have a program that traverses the directory of a CDROM using os.walk. I do most of my work on Windows, but some on (Ubuntu) Linux, and I'd like this to work in both environments. On Windows, I do something along the lines of t

Re: [Tutor] Reading the CDROM in Linux

2010-11-05 Thread Steven D'Aprano
Steven D'Aprano wrote: But if you might have an external hard drive plugged in, or a USB key, or similar, then you need to find out what the volume name of the mounted CD drive is. That's a good question and I don't have an answer right now. Let me think about it and get back to you. Well th

Re: [Tutor] Reading the CDROM in Linux

2010-11-05 Thread Steven D'Aprano
Terry Carroll wrote: I have a program that traverses the directory of a CDROM using os.walk. I do most of my work on Windows, but some on (Ubuntu) Linux, and I'd like this to work in both environments. On Windows, I do something along the lines of this: startpoint="D:/" What if the user h

Re: [Tutor] Reading the CDROM in Linux

2010-11-05 Thread Terry Carroll
On Sat, 6 Nov 2010, Steven D'Aprano wrote: Anyway, more modern Linux systems automatically mount CDs and DVDs. By convention, /mnt/... is used for manually mounts, and /media/... for automatic mounts of media. I am seeing my volume in /media ; however, I won't know the volume name when my pr

Re: [Tutor] Reading the CDROM in Linux

2010-11-05 Thread Steven D'Aprano
Alan Gauld wrote: I don't use Ubuntu so don;t know the standard anmswer there but it will depend on where the CD is mounterd. I usually mount cdroms on /dev/cdrom Surely that's where you mount cdroms *from*? I can't think that using /dev/cdrom as the mount point would be a good idea! Anyw

[Tutor] Reading the CDROM in Linux

2010-11-05 Thread Terry Carroll
Alan Gauld wrote: I don't use Ubuntu so don;t know the standard anmswer there but it will depend on where the CD is mounterd. I usually mount cdroms on /dev/cdrom That's what I figured; I now realize I didn't say so in my email, but it's mounted at /dev/sr0, which is where I came up with tha

Re: [Tutor] Reading the CDROM in Linux

2010-11-05 Thread Alan Gauld
"Terry Carroll" wrote On Windows, I do something along the lines of this: startpoint="D:/" for (root, dirs, files) in os.walk(startpoint): (stuff) What would I use for startpoint in Linux? I don't use Ubuntu so don;t know the standard anmswer there but it will depend on where t

[Tutor] Reading the CDROM in Linux

2010-11-05 Thread Terry Carroll
I have a program that traverses the directory of a CDROM using os.walk. I do most of my work on Windows, but some on (Ubuntu) Linux, and I'd like this to work in both environments. On Windows, I do something along the lines of this: startpoint="D:/" for (root, dirs, files) in os.walk(start