[yt-svn] commit/yt: chummels: Merged in ngoldbaum/yt (pull request #1276)

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Fri Oct 24 14:40:04 PDT 2014


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/9dd19b71e068/
Changeset:   9dd19b71e068
Branch:      yt
User:        chummels
Date:        2014-10-24 21:39:49+00:00
Summary:     Merged in ngoldbaum/yt (pull request #1276)

[bugfix] Two minor docs and config updates
Affected #:  3 files

diff -r 89f43c999bf661261f2ccac2571f9e966d51a481 -r 9dd19b71e068de9beb89189f61e07a60aa24969b doc/source/reference/configuration.rst
--- a/doc/source/reference/configuration.rst
+++ b/doc/source/reference/configuration.rst
@@ -40,14 +40,15 @@
 
 .. code-block:: python
 
-   from yt.config import ytcfg
-   ytcfg["yt", "loglevel"] = "1"
+   import yt
+   yt.funcs.mylog.setLevel(1)
 
-   from yt.mods import *
-   ds = load("my_data0001")
+   ds = yt.load("my_data0001")
    ds.print_stats()
 
-This has the same effect as setting ``loglevel = 1`` in the configuration file.
+This has the same effect as setting ``loglevel = 1`` in the configuration
+file. Note that a log level of 1 means that all log messages are printed to
+stdout.  To disable logging, set the log level to 50.
 
 Setting Configuration On the Command Line
 -----------------------------------------

diff -r 89f43c999bf661261f2ccac2571f9e966d51a481 -r 9dd19b71e068de9beb89189f61e07a60aa24969b yt/config.py
--- a/yt/config.py
+++ b/yt/config.py
@@ -98,6 +98,8 @@
 class YTConfigParser(ConfigParser.ConfigParser):
     def __setitem__(self, key, val):
         self.set(key[0], key[1], val)
+    def __getitem__(self, key):
+        self.get(key[0], key[1])
 
 if os.path.exists(os.path.expanduser("~/.yt/config")):
     ytcfg = YTConfigParser(ytcfg_defaults)

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list