Author: mattip <[email protected]>
Branch: release-2.3.x
Changeset: r71324:3b1a6d6b096e
Date: 2014-05-06 12:23 +0300
http://bitbucket.org/pypy/pypy/changeset/3b1a6d6b096e/

Log:    only print IRC topics when PYPY_IRC_TOPIC exists and is not empty

diff --git a/pypy/doc/getting-started-dev.rst b/pypy/doc/getting-started-dev.rst
--- a/pypy/doc/getting-started-dev.rst
+++ b/pypy/doc/getting-started-dev.rst
@@ -373,6 +373,12 @@
 You don't necessarily need to install these two libraries because
 we also ship them inlined in the PyPy source tree.
 
+PYPY_IRC_TOPIC
++++++++++++++++
+
+Set the ``PYPY_IRC_TOPIC`` environment variable to a non-empty string
+to print a random #pypy IRC topic at startup of interactive mode.
+
 Getting involved
 -----------------
 
diff --git a/pypy/doc/man/pypy.1.rst b/pypy/doc/man/pypy.1.rst
--- a/pypy/doc/man/pypy.1.rst
+++ b/pypy/doc/man/pypy.1.rst
@@ -113,6 +113,11 @@
     generate a log suitable for *jitviewer*, a tool for debugging
     performance issues under PyPy.
 
+``PYPY_IRC_TOPIC``
+    If set to a non-empty value, print a random #pypy IRC
+    topic at startup of interactive mode.
+
+
 .. include:: ../gc_info.rst
    :start-line: 7
 
diff --git a/pypy/interpreter/app_main.py b/pypy/interpreter/app_main.py
--- a/pypy/interpreter/app_main.py
+++ b/pypy/interpreter/app_main.py
@@ -35,6 +35,9 @@
 PYTHONPATH   : %r-separated list of directories prefixed to the
                default module search path.  The result is sys.path.
 PYTHONIOENCODING: Encoding[:errors] used for stdin/stdout/stderr.
+PYPY_IRC_TOPIC: if set to a non-empty value, print a random #pypy IRC
+               topic at startup of interactive mode.
+PYPYLOG: If set to a non-empty value, enable logging.
 """
 
 import sys
@@ -668,7 +671,9 @@
     if inspect_requested():
         try:
             from _pypy_interact import interactive_console
-            success = run_toplevel(interactive_console, mainmodule)
+            irc_topic = readenv and os.getenv('PYPY_IRC_TOPIC')
+            success = run_toplevel(interactive_console, mainmodule,
+                                   quiet=not irc_topic)
         except SystemExit, e:
             status = e.code
         else:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to