On Thu, Jan 30, 2014 at 8:13 AM, danz wrote:
> I apologize to all, but my above code won't work with paths that have
> embedded spaces. It also turns out that the "net use" command inserts a
> carriage-return/line-feed between the Path and Network fields when the last
> character position of the
w this message in context:
http://python.6.x6.nabble.com/Tutor-getUncPath-mappedDrive-tp4652304p5045785.html
Sent from the Python - tutor mailing list archive at Nabble.com.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change su
On 30/01/2014 11:39, Tim Golden wrote:
> On 29/01/2014 21:58, danz wrote:
>> Tim.
>>
>> I came across your code while searching for a similar need. Your post was
>> the best I could find on the subject. Perhaps more importantly, you showed
>> me that going down the ctypes rabbit hole can be less
On 29/01/2014 21:58, danz wrote:
> Tim.
>
> I came across your code while searching for a similar need. Your post was
> the best I could find on the subject. Perhaps more importantly, you showed
> me that going down the ctypes rabbit hole can be less intimidating than I
> assumed. Thanks!
[The
if line.startswith('OK'):
fields = line.split()
net_drives[fields[1]] = fields[2] # [1] == key, [2] ==
net_path
return net_drives
print available_network_drives()
--
View this message in context:
http://python.6.x6.nabble.com/Tutor-getUncPath-mappedDrive-tp465230
On 25/03/2012 09:12, Albert-Jan Roskam wrote:
Thank you so much for this! I think this would also be a valuable
addition to os.path (where I'd expect it to be).
You call WNetGetConnection twice: one time with a 'dummy' string
buffer, and one time with a buffer of the exact require
>
> From: Tim Golden
>To: Albert-Jan Roskam
>Cc: Python Mailing List
>Sent: Saturday, March 24, 2012 11:25 PM
>Subject: Re: [Tutor] getUncPath(mappedDrive)
>
>On 24/03/2012 21:29, Albert-Jan Roskam wrote:
>> Thanks! Thi
On 24/03/2012 21:29, Albert-Jan Roskam wrote:
Thanks! This seems a feasible approach. I have found this Python
project that exposes some of the functions of mpr.dll:
http://sourceforge.net/projects/wnetconnect/ WNetGetConnection is
not among the functions, but the code will help.
From: Tim Golden
>To:
>Cc: Python Mailing List
>Sent: Saturday, March 24, 2012 9:22 PM
>Subject: Re: [Tutor] getUncPath(mappedDrive)
>
>On 24/03/2012 20:13, Albert-Jan Roskam wrote:
>> Hi,
>>
>> Is there a function that takes a file path with a mappe
On 24/03/2012 20:13, Albert-Jan Roskam wrote:
Hi,
Is there a function that takes a file path with a mapped drive
(z:\blah) and returns the associated UNC path
(\\server\share\ding\dang\dong\blah)? I looked in os.path, but it
doesn't seem to have this. The link below seems to be a solution
(code
Hi,
Is there a function that takes a file path with a mapped drive (z:\blah) and
returns the associated UNC path (\\server\share\ding\dang\dong\blah)? I looked
in os.path, but it doesn't seem to have this. The link below seems to be a
solution (code in the bottom of the page), but I can't insta
11 matches
Mail list logo