How to use the pysmb.smbc.WORKGROUP function in pysmb

To help you get started, we’ve selected a few pysmb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OpenPrinting / system-config-printer / newprinter.py View on Github external
def on_tvSMBBrowser_row_expanded (self, view, iter, path):
        """Handler for expanding a row in the SMB tree view."""
        model = view.get_model ()
        entry = model.get_value (iter, 0)
        if entry == None:
            return

        if entry.smbc_type == pysmb.smbc.WORKGROUP:
            # Workgroup
            # Be careful though: if there is a server with the
            # same name as the workgroup we will get a list of its
            # shares, not the workgroup's servers.
            try:
                if self.expanding_row:
                    return
            except:
                self.expanding_row = 1

            busy (self.SMBBrowseDialog)
            uri = "smb://%s/" % entry.name
            debug = 0
            if get_debugging ():
                debug = 10
            smbc_auth = pysmb.AuthContext (self.SMBBrowseDialog)

pysmb

pysmb is an experimental SMB/CIFS library written in Python to support file sharing between Windows and Linux machines

(Libpng OR Zlib)
Latest version published 1 month ago

Package Health Score

82 / 100
Full package analysis

Similar packages