{ "info": { "author": "Jondy Zhao", "author_email": "jondy.zhao@nexedi.com", "bugtrack_url": null, "classifiers": [], "description": "NetDrive\r\n========\r\nA tool used to manage netdrive in Windows Platform.\r\n\r\nUsage\r\n=====\r\nThe mainly functions are found in the python extension: netuse\r\n\r\n python setup.py build\r\n\r\nOr you can use your prefer way to build netuse.c, get the extension\r\nnetuse. It exports the following functions:\r\n\r\n* autoConnect()\r\n\r\n Create mapped drive from shared folder, it uses the default user\r\n name. (provided by the user context for the process.)\r\n\r\n Raise exception if something is wrong.\r\n\r\n* listNetDrive()\r\n\r\n List all the net drives visible by current user. Return a list:\r\n \r\n [ (drive, remote, status, user), ... ] \r\n \r\n Not that if the calling application is running in a different\r\n logon session than the application that made the connection, it's\r\n unvisible for the current application. If the current user has\r\n administrator privilege, these connections could be shown, but the\r\n status is unavaliable or unconnect.\r\n \r\n Refer to Defining an MS-DOS Device Name\r\n\r\n http://msdn.microsoft.com/en-us/library/windows/desktop/aa363908(v=vs.85).aspx\r\n \r\n \r\n Refer to Local and Global MS-DOS Device Names\r\n\r\n http://msdn.microsoft.com/en-us/library/windows/hardware/ff554302(v=vs.85).aspx\r\n \r\n* mapNetDrive(remote, drive, user=None, password=None)\r\n\r\n Create net drive from remote folder, and return the assigned drive\r\n letter.\r\n \r\n It uses the default user which initialize this remote connection if\r\n user is None.\r\n \r\n When drive is an empty string, the system will automatically assigns\r\n network drive letters, letters are assigned beginning with Z:, then\r\n Y:, and ending with C:.\r\n \r\n For examples\r\n mapNetDrive(r'\\\\\\\\server\\\\data')\r\n\r\n mapNetDrive(r'\\\\\\\\server\\\\data', 'T:')\r\n\r\n mapNetDrive(r'\\\\\\\\server\\\\data', 'T:', r'\\\\\\\\server\\\\jack', 'abc')\r\n \r\n Raise exception if something is wrong.\r\n \r\n* removeNetDrive(drive, force=True)\r\n\r\n Remove mapped drive specified by drive, For example,\r\n \r\n removeNetDrive('X:')\r\n \r\n Parameter force specifies whether the disconnection should occur\r\n if there are open files or jobs on the connection. If this\r\n parameter is FALSE, the function fails if there are open files or\r\n jobs.\r\n \r\n Raise exception if something is wrong, otherwise return None.\r\n \r\n* usageReport(drive)\r\n\r\n Return a tuple to report the usage of the net drive:\r\n (available, total)\r\n \r\n For examples,\r\n usageReport('Z:')\r\n \r\n Raise exception if something is wrong.\r\n \r\n* userInfo()\r\n\r\n Get the logon user information, return a tuple:\r\n \r\n (server, domain, user)\r\n \r\n\r\nExamples\r\n========\r\n\r\nIt's easy to use, just like a common python library.\r\n\r\n import netuse\r\n \r\n # Get mapped net drive\r\n \r\n print netuse.listNetDrive()\r\n \r\n # Map a new drive, return the drive letter\r\n \r\n print netuse.mapNetDrive(r'\\\\server\\path')\r\n \r\n # Remove a mapped drive\r\n \r\n netuse.removeNetDrive('Z:')\r\n \r\n # Get the usage of net drive: ( free bytes, total bytes ) \r\n \r\n print netuse.usageReport('Z:')", "description_content_type": null, "docs_url": null, "download_url": "http://dashingsoft.com/products/slapos/netdrive-0.2.0.tar.gz#md5=56577f646c629c65e12a4a13fbbcfe38", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jondy/netdrive/", "keywords": "netdrive", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "netdrive", "package_url": "https://pypi.org/project/netdrive/", "platform": "Windows", "project_url": "https://pypi.org/project/netdrive/", "project_urls": { "Download": "http://dashingsoft.com/products/slapos/netdrive-0.2.0.tar.gz#md5=56577f646c629c65e12a4a13fbbcfe38", "Homepage": "https://github.com/jondy/netdrive/" }, "release_url": "https://pypi.org/project/netdrive/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "A tool used to manage net drive in Windows platform.", "version": "0.2.0" }, "last_serial": 867471, "releases": { "0.1.3": [ { "comment_text": "", "digests": { "md5": "fd9223d7f030fd5e4df963a5e6b24bbf", "sha256": "33cf18a32ee47e8ca84da763fe2803bfff2cfa6048c7ef43d8ab06658e66b116" }, "downloads": -1, "filename": "netdrive-0.1.3.tar.gz", "has_sig": false, "md5_digest": "fd9223d7f030fd5e4df963a5e6b24bbf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8437, "upload_time": "2013-09-13T06:04:29", "url": "https://files.pythonhosted.org/packages/28/cd/0760c90799dd495d37b9ad96701b638a8e849662572f1cd60fa39373c874/netdrive-0.1.3.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "17abcf22b7d21a20b4ae3f8aab128db2", "sha256": "58fb672a75e694a71f1aafb52188c66d9e4e7729a5d8cc79f9ab52d308baf217" }, "downloads": -1, "filename": "netdrive-0.2.0.tar.gz", "has_sig": false, "md5_digest": "17abcf22b7d21a20b4ae3f8aab128db2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11904, "upload_time": "2013-09-17T06:13:50", "url": "https://files.pythonhosted.org/packages/5c/98/e7130ea4c3089bd03c55db1ce4242794d8b6594cbd55e6315c0d08679537/netdrive-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "17abcf22b7d21a20b4ae3f8aab128db2", "sha256": "58fb672a75e694a71f1aafb52188c66d9e4e7729a5d8cc79f9ab52d308baf217" }, "downloads": -1, "filename": "netdrive-0.2.0.tar.gz", "has_sig": false, "md5_digest": "17abcf22b7d21a20b4ae3f8aab128db2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11904, "upload_time": "2013-09-17T06:13:50", "url": "https://files.pythonhosted.org/packages/5c/98/e7130ea4c3089bd03c55db1ce4242794d8b6594cbd55e6315c0d08679537/netdrive-0.2.0.tar.gz" } ] }