Dec-18-2017, 09:04 AM
Okay, I get that now but if I run either version of the example I get the directory listing but then I get a single character '0' on the last line. What is that?
Also I was hoping that I could completely replace os with subprocess but one of the things I want to do is write a utility ( just for practise initially ) which would allow any user to access a USB stick and find a file which would give instructions as to which mp3's or mp4's need to be copied and where to put them.
with os I can use expanduser to extract the username and glob to find theĀ Stick and file.
In Linux Sticks are mounted under /media/username but what the stick is called can be just about anything. I have done this part successfully using os calls and can handle every stick or SD card I have tried so far.
Is it actually possible to do without os and just use subprocess?
Also I was hoping that I could completely replace os with subprocess but one of the things I want to do is write a utility ( just for practise initially ) which would allow any user to access a USB stick and find a file which would give instructions as to which mp3's or mp4's need to be copied and where to put them.
with os I can use expanduser to extract the username and glob to find theĀ Stick and file.
In Linux Sticks are mounted under /media/username but what the stick is called can be just about anything. I have done this part successfully using os calls and can handle every stick or SD card I have tried so far.
Is it actually possible to do without os and just use subprocess?