Python Forum
moving from os to subprocess
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
moving from os to subprocess
#8
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?
Reply


Messages In This Thread
moving from os to subprocess - by Barrowman - Dec-17-2017, 04:11 PM
RE: moving from os to subprocess - by wavic - Dec-17-2017, 05:59 PM
RE: moving from os to subprocess - by Barrowman - Dec-17-2017, 06:19 PM
RE: moving from os to subprocess - by Barrowman - Dec-17-2017, 07:59 PM
RE: moving from os to subprocess - by wavic - Dec-17-2017, 10:35 PM
RE: moving from os to subprocess - by Barrowman - Dec-17-2017, 11:02 PM
RE: moving from os to subprocess - by wavic - Dec-17-2017, 11:28 PM
RE: moving from os to subprocess - by Barrowman - Dec-18-2017, 09:04 AM
RE: moving from os to subprocess - by wavic - Dec-19-2017, 10:20 PM
RE: moving from os to subprocess - by ezdev - Dec-20-2017, 01:02 AM
RE: moving from os to subprocess - by Barrowman - Dec-20-2017, 09:08 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020