Mercurial > python-cmd2
changeset 200:05c0e28306d3
expanding ~ in file names
author | catherine@Elli.myhome.westell.com |
---|---|
date | Fri, 27 Feb 2009 21:08:10 -0500 |
parents | 12c2d23caf19 |
children | 6cdf53ce84f5 |
files | cmd2.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/cmd2.py Thu Feb 26 12:50:22 2009 -0500 +++ b/cmd2.py Fri Feb 27 21:08:10 2009 -0500 @@ -744,7 +744,8 @@ def do_load(self, fname=None): """Runs command(s) from a file.""" if fname is None: - fname = self.defaultFileName + fname = self.defaultFileName + fname = os.path.expanduser(fname) keepstate = Statekeeper(self, ('stdin','use_rawinput','prompt','continuationPrompt')) if isinstance(fname, file): self.stdin = fname