I am not sure if it is valid question. Is it possible to detect type of stdout or stdin of python script? I wanted to check if stdin/ stdout is a folder/ derectory or data or binary types.
Basically I am trying to extract files from archive using python script. However, instead of extracting, the script I use write in to stdout. I just want to manipulate this stdout to find directory then create in the destination then find data/file/bin and extract from archive to destination directory.
Is it possible to do that?
Updtate
Here is what the scripts lists from iso container where /BOOT/GRUB2_EF
is a directory.
C:\Users\Sundar\Documents\multibootusb>iso9660.py i:\home\sundar\openSUSE-13.1-K
DE-Live-x86_64.iso
/
/BOOT
/BOOT/0XA89369.
/BOOT/BOOTPART.CFG
/BOOT/GRUB2_EF
/BOOT/GRUB2_EF/GRUB.CFG
I tryid to create directory using this command:-
C:\Users\Sundar\Documents\multibootusb>iso9660.py i:\home\sundar\openSUSE-13.1-K
DE-Live-x86_64.iso /BOOT/GRUB2_EF/THEMES > dir
However, this is what i got and it is not a directory...
C:\Users\Sundar\Documents\multibootusb>dir
.
.
23/02/2014 11:52 AM 5,000 detect_iso.py
23/02/2014 11:53 AM 3,152 detect_iso.pyc
23/02/2014 06:07 PM 2,048 dir
16/02/2014 07:30 PM <DIR> dist
08/12/2013 06:31 AM 230 install_distro.py
Update2
C:\Users\Sundar\Documents\multibootusb>iso9660.py i:\home\sundar\openSUSE-13.1-K
DE-Live-x86_64.iso /ISOLINUX.CFG > file.cfg
Here is the content of file.cfg
default openSUSE_13.1_KDE_Live
implicit 1
display isolinux.msg
.
.