black console window of executing os.chmod() and os.access()

朱重八 88pigs at gmail.com
Mon Jul 5 11:01:02 EDT 2010


Sorry, I mean "\\\\1.1.1.1\\sharedfolder"

Seems os.chmod(), os.access() and os.makedirs() all have this problem when
the path is a remote path.

2010/7/5 Thomas Jollans <thomas at jollans.com>

> On 07/05/2010 04:19 PM, 朱重八 wrote:
> > Hi all,
> >     I want to use os.chmod or os.access to check the permission of a
> > folder on remote Windows computer:
> > os.chmod("\\1.1.1.1\sharedfolder", stat.S_IWRITE)
> > or
> > os.access("\\1.1.1.1\sharedfolder", os.W_OK)
>
> That won't work:
>
> >>> print("\\1.1.1.1\sharedfolder")
> \1.1.1.1\sharedfolder
> >>>
>
>
> >
> > I saved this python file as a.pyw, run it with pythonw.exe a.pyw, then a
> > black console window display one second.
> > Only remote folder has this problem, local folder has no this problem.
> >
> > Anybody know how to remove the black console window?
>
> Does the script actually work for remote folders? Does the same problem
> occur for other file operations on remote systems?
>
> Maybe someone else knows an answer, otherwise maybe my thoughts will be
> of some help.
>
> Thomas
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100705/a1b0d262/attachment-0001.html>


More information about the Python-list mailing list