Changeset 4187

Show
Ignore:
Timestamp:
03/01/08 09:52:59 (5 months ago)
Author:
chrisz
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0/turbogears/command/base.py

    r4079 r4187  
    1 "Commands for the TurboGears command line tool.
     1"""Commands for the TurboGears command line tool.""
    22import optparse 
    33import sys 
     
    176176            using_sqlalchemy = True 
    177177            database.get_engine() 
    178             locals.update(session=database.session, 
    179                           metadata=database.metadata
     178            locals.update(dict(session=database.session, 
     179                metadata=database.metadata)
    180180        else: 
    181181            using_sqlalchemy = False 
     
    188188                def raw_input(self, *args, **kw): 
    189189                    try: 
    190                         return \ 
    191                          IPython.iplib.InteractiveShell.raw_input(self, 
    192                                                     *args, **kw) 
     190                        return IPython.iplib.InteractiveShell.raw_input(self, 
     191                            *args, **kw) # needs decoding (see below)? 
    193192                    except EOFError: 
    194193                        b = raw_input("Do you wish to commit your " 
     
    213212                    except ImportError: 
    214213                        pass 
    215  
    216214                    try: 
    217215                        return code.InteractiveConsole.raw_input(self, 
    218                                                         *args, **kw
     216                            *args, **kw).decode(sys.stdin.encoding
    219217                    except EOFError: 
    220218                        b = raw_input("Do you wish to commit your " 
  • branches/1.1/turbogears/command/base.py

    r4079 r4187  
    1 "Commands for the TurboGears command line tool.
     1"""Commands for the TurboGears command line tool.""
    22import optparse 
    33import sys 
     
    188188                def raw_input(self, *args, **kw): 
    189189                    try: 
    190                         return \ 
    191                          IPython.iplib.InteractiveShell.raw_input(self, 
    192                                                     *args, **kw) 
     190                        return IPython.iplib.InteractiveShell.raw_input(self, 
     191                            *args, **kw) # needs decoding (see below)? 
    193192                    except EOFError: 
    194193                        b = raw_input("Do you wish to commit your " 
     
    213212                    except ImportError: 
    214213                        pass 
    215  
    216214                    try: 
    217215                        return code.InteractiveConsole.raw_input(self, 
    218                                                         *args, **kw
     216                            *args, **kw).decode(sys.stdin.encoding
    219217                    except EOFError: 
    220218                        b = raw_input("Do you wish to commit your "