Stan, The simplest solution for the moment is to take out that test. If one calls activate with a non-generator parameter, it will just bomb out later. No problem!
Klaus > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Stanislas Pinte > Sent: Wednesday, December 21, 2005 10:28 AM > To: users@lists.ironpython.com > Cc: [EMAIL PROTECTED] > Subject: [Simpy-users] Simpy not working on IronPython > because of type(generator) problem > > Hello, > > Internally we use a wonderful simulation framework written in > python: http://simpy.sourceforge.net/ > > I cannot make it work on python because it rests on generators... > > the main loop of simpy uses type(myFunction) == > types.GeneratorType) to determine if it is a generator or not... > > > if not (type(process) == types.GeneratorType): > > raise Simerror("Fatal SimPy error: activating > function which"+ > > " is not a generator (contains no 'yield')") > > However, in IronPython: > > >>> import types > >>> def gentest(): > for i in range(0,10): > yield i > >>> print type(gentest) > > <type '__main__+gentest0'> > > whereas in CPython it returns > > <type 'generator'> > > Any idea if we can fix this easely? > > thanks, > > Stan. > > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep > through log files for problems? Stop! Download the new AJAX > search engine that makes searching your log files as easy as > surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ > Simpy-users mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/simpy-users >
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com