Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
e3c39ae5
Kaydet (Commit)
e3c39ae5
authored
Agu 15, 2010
tarafından
Florent Xicluna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Replace readfp() with read_file() in configparser documentation.
üst
dc692740
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
configparser.rst
Doc/library/configparser.rst
+3
-3
No files found.
Doc/library/configparser.rst
Dosyayı görüntüle @
e3c39ae5
...
@@ -322,13 +322,13 @@ RawConfigParser Objects
...
@@ -322,13 +322,13 @@ RawConfigParser Objects
configuration files in the list will be read. If none of the named files
configuration files in the list will be read. If none of the named files
exist, the :class:`ConfigParser` instance will contain an empty dataset. An
exist, the :class:`ConfigParser` instance will contain an empty dataset. An
application which requires initial values to be loaded from a file should
application which requires initial values to be loaded from a file should
load the required file or files using :meth:`read
fp
` before calling
load the required file or files using :meth:`read
_file
` before calling
:meth:`read` for any optional files::
:meth:`read` for any optional files::
import configparser, os
import configparser, os
config = configparser.ConfigParser()
config = configparser.ConfigParser()
config.read
fp
(open('defaults.cfg'))
config.read
_file
(open('defaults.cfg'))
config.read(['site.cfg', os.path.expanduser('~/.myapp.cfg')], encoding='cp1250')
config.read(['site.cfg', os.path.expanduser('~/.myapp.cfg')], encoding='cp1250')
.. versionadded:: 3.2
.. versionadded:: 3.2
...
@@ -614,7 +614,7 @@ indicate that such values should be accepted:
...
@@ -614,7 +614,7 @@ indicate that such values should be accepted:
... skip-innodb # we don't need ACID today
... skip-innodb # we don't need ACID today
... """
... """
>>> config = configparser.RawConfigParser(allow_no_value=True)
>>> config = configparser.RawConfigParser(allow_no_value=True)
>>> config.read
fp
(io.BytesIO(sample_config))
>>> config.read
_file
(io.BytesIO(sample_config))
>>> # Settings with values are treated as before:
>>> # Settings with values are treated as before:
>>> config.get("mysqld", "user")
>>> config.get("mysqld", "user")
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment