Mercurial > python-cmd2
comparison cmd2.py @ 229:caa475678e24
synch to dellzilla
author | catherine@Elli.myhome.westell.com |
---|---|
date | Mon, 23 Mar 2009 10:02:32 -0400 |
parents | 68b444aeaf8b |
children | fea183146819 |
comparison
equal
deleted
inserted
replaced
228:68b444aeaf8b | 229:caa475678e24 |
---|---|
887 urlre = re.compile('(https?://[-\\w\\./]+)') | 887 urlre = re.compile('(https?://[-\\w\\./]+)') |
888 def do_load(self, fname=None): | 888 def do_load(self, fname=None): |
889 """Runs script of command(s) from a file or URL.""" | 889 """Runs script of command(s) from a file or URL.""" |
890 if fname is None: | 890 if fname is None: |
891 fname = self.default_file_name | 891 fname = self.default_file_name |
892 #keepstate = Statekeeper(self, ('stdin','use_rawinput','prompt','continuation_prompt')) | 892 keepstate = Statekeeper(self, ('stdin','use_rawinput','prompt','continuation_prompt')) |
893 keepstate = Statekeeper(self, ('stdin','use_rawinput','continuation_prompt')) | |
894 try: | 893 try: |
895 if isinstance(fname, file): | 894 if isinstance(fname, file): |
896 target = open(fname, 'r') | 895 target = open(fname, 'r') |
897 else: | 896 else: |
898 match = self.urlre.match(fname) | 897 match = self.urlre.match(fname) |