[IPython-user] Various questions re: IPython on Windows
Robin Siebler
robinsiebler@321....
Fri Jul 13 13:58:36 CDT 2007
I'm having a few problems and I don't know if these are bugs, or simply
user error. Any help would be appreciated. :)
1. When I try to run the %edit command, I always get the below error.
The error occurs *before* my editor has even launched!
Editing... done. Executing edited code...
Could not open file
<c:\docume~1\rsiebler\locals~1\temp\ipython_edit_zo5me2.py>
for safe execution.
WARNING: File not found. Did you forget to save?
2. When I try to use the %run command on a script, I always get this error:
In [3]: %run save_song_list.py
---------------------------------------------------------------------------
exceptions.SystemExit Traceback (most
recent call
last)
c:\temp\save_song_list.py
83 db.close()
84
---> 85 if __name__== '__main__': main()
86
87
c:\temp\save_song_list.py in main()
50 last_song = db['last_song']
51 if song in last_song:
---> 52 sys.exit()
53 else:
54 if len(last_song) == 3:
SystemExit:
WARNING: Failure executing file: <save_song_list.py>
---------------------------------------------------------------------------
exceptions.AttributeError Traceback (most
recent call
last)
c:\temp\<ipython console>
C:\Python\Lib\site-packages\IPython\iplib.py in ipmagic(self, arg_s)
962 else:
963 magic_args = self.var_expand(magic_args,1)
--> 964 return fn(magic_args)
965
966 def ipalias(self,arg_s):
C:\Python\Lib\site-packages\IPython\Magic.py in magic_run(self,
parameter_s, run
ner)
1679 if restore_main:
1680 sys.modules['__main__'] = restore_main
-> 1681 self.shell.reloadhist()
1682
1683 return stats
C:\Python\Lib\site-packages\IPython\iplib.py in reloadhist(self)
1262
1263 if self.has_readline:
-> 1264 self.readline.clear_history()
1265 self.readline.read_history_file(self.shell.histfile)
1266
AttributeError: 'module' object has no attribute 'clear_history'
3. For pysh, if I try to use $var=cmd or $$var=cmd as shown in the docs,
I get the following error:
[Documents and Settings\rsiebler]|15> $foo = !dir
-----------------------------------------------------
File "<ipython console>", line 1
$foo = !dir
^
SyntaxError: invalid syntax
--
Robin Siebler
-------------------
Happiness is laced with shards of pain
More information about the IPython-user
mailing list