Article View: pl.comp.lang.python
Article #15781Re: partycja w trybie ro/rw
From: Tomasz Wendlandt
Date: Sun, 18 Jun 2006 13:02
Date: Sun, 18 Jun 2006 13:02
16 lines
1356 bytes
1356 bytes
Tomasz Wendlandt napisaล(a):
> import os
> os.path.ismount.isreadonly()
>
> gdyby oczywiscie cos takiego istnialo;)
Czesciowe rozwiazanie problemu:
import os
print os.access('/',os.W_OK)
Sprawdza czy dostep do "/" jest "writable". Musi byc wykonywane z roota,
w przeciwnym wypadku zwroci False.
Ktos ma lepszy pomysl?
Technical Details
Message-ID:
<e73j10$br1$1@nemesis.news.tpi.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.internetia.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mailReferences:
<e71enr$dk8$1@atlantis.news.tpi.pl> <874pyj7h5w.fsf@smsnet.pl> <slrne98krk.2s9b.spam_nie@rsc.pl> <87fyi3h4mz.fsf@smsnet.pl> <e73gi4$8nn$1@nemesis.news.tpi.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.internetia.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail From: Tomasz Wendlandt <juggler@7thguard.net> Newsgroups: pl.comp.lang.python Subject: Re: partycja w trybie ro/rw Date: Sun, 18 Jun 2006 15:02:10 +0200 Organization: tp.internet - http://www.tpi.pl/ Lines: 16 Message-ID: <e73j10$br1$1@nemesis.news.tpi.pl> References: <e71enr$dk8$1@atlantis.news.tpi.pl> <874pyj7h5w.fsf@smsnet.pl> <slrne98krk.2s9b.spam_nie@rsc.pl> <87fyi3h4mz.fsf@smsnet.pl> <e73gi4$8nn$1@nemesis.news.tpi.pl> NNTP-Posting-Host: amc230.internetdsl.tpnet.pl Mime-Version: 1.0 X-Trace: nemesis.news.tpi.pl 1150635872 12129 83.17.58.230 (18 Jun 2006 13:04:32 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Sun, 18 Jun 2006 13:04:32 +0000 (UTC) User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) In-Reply-To: <e73gi4$8nn$1@nemesis.news.tpi.pl> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit