Show More
@@ -3210,7 +3210,7 b' Defaulting color scheme to \'NoColor\'"""' | |||
|
3210 | 3210 | This assigns the pasted block to variable 'foo' as string, without |
|
3211 | 3211 | dedenting or executing it (preceding >>> and + is still stripped) |
|
3212 | 3212 | |
|
3213 |
'%cpaste r |
|
|
3213 | '%cpaste -r' re-executes the block previously entered by cpaste. | |
|
3214 | 3214 | |
|
3215 | 3215 | Do not be alarmed by garbled output on Windows (it's a readline bug). |
|
3216 | 3216 | Just press enter and type -- (and press enter again) and the block |
@@ -3218,15 +3218,14 b' Defaulting color scheme to \'NoColor\'"""' | |||
|
3218 | 3218 | |
|
3219 | 3219 | IPython statements (magics, shell escapes) are not supported (yet). |
|
3220 | 3220 | """ |
|
3221 | opts,args = self.parse_options(parameter_s,'s:',mode='string') | |
|
3221 | opts,args = self.parse_options(parameter_s,'rs:',mode='string') | |
|
3222 | 3222 | par = args.strip() |
|
3223 |
if |
|
|
3223 | if opts.has_key('r'): | |
|
3224 | 3224 | b = self.user_ns.get('pasted_block', None) |
|
3225 | 3225 | if b is None: |
|
3226 | 3226 | raise UsageError('No previous pasted block available') |
|
3227 | 3227 | print "Re-executing '%s...' (%d chars)"% (b.split('\n',1)[0], len(b)) |
|
3228 | 3228 | exec b in self.user_ns |
|
3229 | ||
|
3230 | 3229 | return |
|
3231 | 3230 | |
|
3232 | 3231 | sentinel = opts.get('s','--') |
@@ -104,6 +104,7 b' New features' | |||
|
104 | 104 | * 'cd --foo' searches directory history for string foo, and jumps to that dir. |
|
105 | 105 | Last part of dir name is checked first. If no matches for that are found, |
|
106 | 106 | look at the whole path. |
|
107 | * '%cpaste -r' re-executes the block previously executed by cpaste. | |
|
107 | 108 | |
|
108 | 109 | Bug fixes |
|
109 | 110 | --------- |
General Comments 0
You need to be logged in to leave comments.
Login now