Commits

Haim Ashkenazi committed 10ef25c

Added the option to specify wether or not to suppress bpython's output.

Although I would prefer using '-q' it's already used for something else.

Comments (0)

Files changed (1)

pylons/commands.py

                       dest='use_bpython',
                       help="Try to use bpython (instead of ipython)")
 
+    parser.add_option('-o', '--bpython-quiet',
+                      action='store_true',
+                      dest='bpython_quiet',
+                      help="Supress bpython output (bpython's -q)")
+
     parser.add_option('-d', '--disable-ipython',
                       action='store_true',
                       dest='disable_ipython',
                 # in bpython 0.9.6.2 bpython.embed doesn't pass 
                 # the banner to the shell.
                 from bpython import cli
+                
+                bpython_args = ['-i']
+                if self.options.bpython_quiet:
+                    bpython_args.append('-q')
+                
                 try:
-                    cli.main(locals_=locs, args=['-i', '-q'], banner=banner)
+                    cli.main(locals_=locs, args=bpython_args, banner=banner)
                 finally:
                     paste.registry.restorer.restoration_end()
             else: