Message18953
When using Python as an extension to another program,
giving a warning message attempts to access sys.argv
while it doesn't exist.
The problem can be reproduced with Vim when compiled
with Python 2.3. Use these two commands:
:py import sys
:py print sys.maxint + 1
The problem is caused by the warnings module. In line
53 it accesses sys.argv[0], but for an embedded
interpreter this doesn't exist.
The suggested fix does an explicit test for the
existence of sys.argv. That seems to be the cleanest
solution to me.
This problem also existed in Python 2.2. I didn't try
other versions. |
|
Date |
User |
Action |
Args |
2007-08-23 14:18:11 | admin | link | issue839151 messages |
2007-08-23 14:18:11 | admin | create | |
|