[Tutor] crash when importing random or sys module, in my embedded python

R. Alan Monroe R. Alan Monroe" <amonroe@columbus.rr.com
Wed Jun 18 19:41:01 2003


> Are you importing a random.py in your current directory?
Nope, the normal one from the standard library. Just like struct.

> import actually executes the lines that start at the left margin.  These are
> typically def, class, and import statements.  Some assignment statements are
> also common.  Normally these simply create the classes and function definitions
> that your program will be using.
That's all I'm doing, trying to set up a list of random integers that
will be used as global variable, nothing more. The only reason I
bothered wrapping the "import random" in a try block was because the
host app in which I was embedding, starting segfaulting, after I added
the "import random" statement.

Alan