Hi,

Is there a Python 3.x library that does mostly what a File Manager (Nautilus, Windows Explorer, PCmanFM, etc) does?

I would like the typical features, mime programs launch in the native os, navigation and some GUI file pickers provide some of this. I don't think I can just invoke a file manager app from the system since they don't provide any indication when the user closes the window (on 2nd or any subsequent launch) or feedback if I need it to know which files they touched. I've tried some of that already and I don't think it is going to work for me. I'd like to intervene in the user actions selectively, but not always.

I'm familar with tkinter GUI file pickers, and I could do all this myself I guess, but if there is something more extensive and portable I would like to take a look at it. I probably will use QT in the end, but not familiar with all its widgets yet.

Ideally I'd like the library be able to operate on the user's whim as the OS file picker does, but also give me control. I might like to restrict them to a particular directory for example, or enforce an inactivity timeout. Some of the user freedom and program control wishes might conflict such that I have to make a tradeoff of course.

I'm thinking it is kind of like a super filepicker that can run the corresponding OS app relating to filetypes without any program backup until they exit the window or do something I want to see. If there isn't a lib I'll just do a more minimal implementation myself. Just don't want to reinvent the wheel.

Thanks for any suggestions.

rich

Linux Code Fragment:

#!/usr/bin/python3.3

import sys
import os
import subprocess

from PySide.QtCore import *
from PySide.QtGui import *

app = QApplication(sys.argv)
temp = QDialog()
filename = QFileDialog.getOpenFileName(temp, 'My Directory', '/home/rich','PDF Only (*.pdf)',options=QFileDialog.DontUseNativeDialog)
subprocess.call("evince " + filename[0], shell=True)
app.exec_()
sys.exit()
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.