On Thursday, September 11, 2014 10:15:57 PM UTC-7, Viet Nguyen wrote:
> Can anyone give me hint or reason why same command behaves differently in 
> debugger mode from interactive mode:
> 
> 
> 
> From interactive mode:
> 
> 
> 
> >>> import os
> 
> >>> p = os.popen('date')
> 
> >>> p.read()
> 
> 'Thu Sep 11 11:18:07 PDT 2014\n'
> 
> 
> 
> But from debugger mode in a script:
> 
> >>> import os
> 
> (Pdb) p = os.popen('date')
> 
> *** SyntaxError: SyntaxError('invalid syntax', ('<string>', 1, 1, "= 
> os.popen('date')"))
> 
> 
> 
> 
> 
> Can anyone help me why there is syntax here?
> 
> 
> 
> Thanks,
> 
> Viet

Thank you for your help.  That resolved the issue.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to