Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Python library for handling UNC connections on Windows
Python
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
win_unc
.gitattributes
.gitignore
.travis.yml
LICENSE.txt
MANIFEST.in
README.rst
setup.py

README.rst

win_unc

Python library for handling UNC mounting on Windows. - TravisBadge

Installation

To install:

$ pip install win_unc

Documentation

Full documentation is available at covenanteyes.github.com/py_win_unc.

Basic Examples

Below is a simple example:

from win_unc import UncDirectoryMount, UncDirectory, DiskDrive

conn = UncDirectoryMount(UncDirectory(r'\\home\shared'), DiskDrive('Z:'))
conn.mount()
print 'Drive connected:', conn.is_mounted()
conn.unmount()

You can also provide credentials like this:

from win_unc import UncCredentials

unc = UncDirectory(r'\\home\shared', UncCredentials('user', 'pwd'))
conn = UncDirectoryMount(unc, DiskDrive('Z:'))

Or just connect the path without mounting it:

from win_unc import UncDirectoryConnection

conn = UncDirectoryConnection(r'\\home\shared')
conn.connect()

Unit Testing

To run the unit tests, do the following:

$ python test/run_tests.py

For all the tests to run, you must perform them on a Windows machine:

> python test\run_tests.py

License

This package is released under the MIT License. (See LICENSE.txt.)

Something went wrong with that request. Please try again.