From: Kevin A. <ka...@us...> - 2004-08-16 23:34:54
|
Update of /cvsroot/pythoncard/PythonCard/samples/pysshed In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9234/samples/pysshed Modified Files: pysshed.py Log Message: added Mac support Index: pysshed.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/pysshed/pysshed.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** pysshed.py 12 Aug 2004 19:18:57 -0000 1.11 --- pysshed.py 16 Aug 2004 21:45:00 -0000 1.12 *************** *** 41,45 **** # pwd only exists on *NIX ! if sys.platform.startswith('linux'): CONFIG_FILE = os.path.join(os.path.expanduser('~'), '.pysshedrc') import pwd --- 41,45 ---- # pwd only exists on *NIX ! if sys.platform.startswith('linux') or sys.platform.startswith('darwin'): CONFIG_FILE = os.path.join(os.path.expanduser('~'), '.pysshedrc') import pwd *************** *** 67,71 **** # set some (hopefully!) reasonable defaults self.cfg.set('Defaults', 'port', '22') ! if sys.platform.startswith('linux'): self.cfg.set('Defaults', 'user', pwd.getpwuid(os.getuid())[0]) self.cfg.set('Defaults', 'identityfile', os.path.join(os.path.join(os.path.expanduser('~'), '.ssh'), 'identity')) --- 67,71 ---- # set some (hopefully!) reasonable defaults self.cfg.set('Defaults', 'port', '22') ! if sys.platform.startswith('linux') or sys.platform.startswith('darwin'): self.cfg.set('Defaults', 'user', pwd.getpwuid(os.getuid())[0]) self.cfg.set('Defaults', 'identityfile', os.path.join(os.path.join(os.path.expanduser('~'), '.ssh'), 'identity')) *************** *** 92,96 **** if section != '': cmd = self.cfg.get(section, 'command') ! if sys.platform.startswith('linux'): cmd += ' -p %s' % self.cfg.get(section, 'port') cmd += ' -l %s' % self.cfg.get(section, 'user') --- 92,96 ---- if section != '': cmd = self.cfg.get(section, 'command') ! if sys.platform.startswith('linux') or sys.platform.startswith('darwin'): cmd += ' -p %s' % self.cfg.get(section, 'port') cmd += ' -l %s' % self.cfg.get(section, 'user') |