Re: [Tutor] Different Command Result Executing in Shell vs. Program

2009-05-10 Thread robert mcquirt
@alan: Thank you very much for the information you provided and also for suggesting your tutorial. I am now studying the subprocess module. I was impressed with the depth of your tutorial and am studying it as well (and not just for my current problem). Thanks again. @dave: Thanks for your repl

Re: [Tutor] Different Command Result Executing in Shell vs. Program

2009-05-09 Thread Dave Angel
robert mcquirt wrote: Hi. I've not been working with Python very long and have run into a puzzling thing. I'm working on a program that needs to identify the filetype of files without extensions. Using the file command in the shell works fantastic, as in: rob...@ubuntu:~$ file -b linu

Re: [Tutor] Different Command Result Executing in Shell vs. Program

2009-05-09 Thread Alan Gauld
"robert mcquirt" wrote import os os.system('file -b /home/robert/linuxlogotag') This also works fine. The problem is that when I try to replace the hard coded path/name with a string variable for looping, the results are not the same as the shell's. import os, glob path = '/home/robert

[Tutor] Different Command Result Executing in Shell vs. Program

2009-05-09 Thread robert mcquirt
Hi. I've not been working with Python very long and have run into a puzzling thing. I'm working on a program that needs to identify the filetype of files without extensions. Using the file command in the shell works fantastic, as in: rob...@ubuntu:~$ file