[IronPython] Error while porting Linux code to IronPython

Anthony Raj anthony_raj at persistent.co.in
Mon May 28 12:53:44 CEST 2007


Hi All,

 

Currently have an error while porting code from Linux to Windows
environment.

We have the code working as web calls on linux. Now we're trying to do a
performance

analysis of the same code running on windows using ironpython.

 

Basically we are trying to integrate our linux product with a Windows
counterpart and 

facing some errors in the Python code.

 

The error is in the class having global variables defined -

>>> 

class parser:

    leafNodesDict = dict()

    usedInNodesDict = dict()

    requiredNodesDict = dict()

    optionalNodesDict = dict()

>>> 

 

C:\IronPython-1.1>ipy.exe Lib/ast/parser.py

Traceback (most recent call last):

  File C:\IronPython-1.1\Lib\ast\parser.py, line 36, in Initialize

  File C:\IronPython-1.1\Lib\ast\parser.py, line 37, in parser

TypeError: Dictionary object is not callable

 

Now line 37 is "leafNodesDict = dict()"

 

The same code works perfectly in linux. 

Tried moving the global variables inside def __init__() method.

It still breaks with the same error.

 

Another point - the error is the same when run using CPython.

 

Iron Python Version

C:\IronPython-1.1>ipy.exe

IronPython 1.1 (1.1) on .NET 2.0.50727.42

Copyright (c) Microsoft Corporation. All rights reserved.

>>> 

CPython Version

 

C:\IronPython-1.1>ipy.exe

IronPython 1.1 (1.1) on .NET 2.0.50727.42

Copyright (c) Microsoft Corporation. All rights reserved.

>>> 

 

Some pointers would be very helpful.

 

TIA,

Anthony


DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Pvt. Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Pvt. Ltd. does not accept any liability for virus infected mails.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20070528/49bd3c93/attachment.html>


More information about the Ironpython-users mailing list