Skip to main content

Platform-independent server-share path discovery.

Project description

Platform-independent server-share path discovery.

To install:

pip install serverpath

Examples:

from serverpath import get_path

# from Windows machine without mapped network drive
get_path("server", "share")
>>> \\server\share

# from Windows machine with mapped network drive X
get_path("server", "share")
>>> X:\\

# from Windows machine where server is local machine and drive D is shared over network 
get_path("my-computer", "share")
>>> D:\\

# from Unix machine with Samba mount in /mnt without share
get_path("server")
>>> /mnt/server

# from Unix machine with Samba mount in /mnt with share
get_path("server", "share")
>>> /mnt/server/share

# from Unix machine with mount in custom path
get_path("server", "share", unix_path_prefix="/mymount")
>>> /mymount/server/share

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

serverpath-0.1.2-py3-none-any.whl (3.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page