-2

when i add get_events_devices.py to the ironpython and import it at namespace it gave me error "No module named optparse" and take me to hilight that error in its code "get_events_devices.py" at this line (from optparse import OptionParser) please help me out

Regards,

syed raza
  • 51
  • 1
  • 2
  • 6

1 Answers1

1

The latest version of optparse from 2.6.x

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
  • That one you're not getting around. You're going to have to port either `optparse` or `get_events_devices.py` to IronPython. – Ignacio Vazquez-Abrams Jun 16 '11 at 11:04
  • i have imported get_event_device.py when i get the error for which i did this post now when you told me to import optparse then my second post is the answer i want to import get_events_devices.py then how do i debug it ??? i havnt understand your post @ignacio -Mohsin – syed raza Jun 16 '11 at 11:10
  • As a side note: If you are going to go through the trouble of porting, you should take a quick look and see if it would be the same effort to port over argparse, as it has some better-nicer features : http://docs.python.org/dev/library/argparse.html : – pyInTheSky Jun 16 '11 at 12:02
  • The reason for porting `optparse` isn't to parse command line arguments, it's to get get_events_devices.py working. – Ignacio Vazquez-Abrams Jun 16 '11 at 12:03
  • @syed: Ignacio said 'port', not 'import'. Porting means changing the code so that it runs. But I think he may be wrong - see this question: http://stackoverflow.com/questions/3904374/ironpython-cannot-import-module-os – Thomas K Jun 16 '11 at 12:03