Hi,

The documentation for SafeConfigParser
(http://docs.python.org/library/configparser.html) indicates that it was
added in Python V2.3.  STAX uses Jython V2.1 (which is a Java
implementation of Python V2.1), and that is why the import fails.  So, you
can try to find a different way to implement parsing the config file (that
works with Python 2.1), or you could try the STAX V3.5.0 Beta 1 which has
support for Jython 2.5.2 (http://staf.sourceforge.net/getstax.php).

Thanks,
David


                                                                       
 David Bender          11501 Burnet Rd.   Phone (T/L): 1-512-286-5315  
 STAF/STAX Development Bldg. 903-5B002    (363-5315)                   
                       Austin, TX         ITN: 23635315                
 IBM Software Group,   78758-3400         Email: bda...@us.ibm.com     
 WPLC                                                                  
                                                                       
                                                                       






                                                                       
  From:       "Raja Narayanan" <v_rajnara...@rediffmail.com>           
                                                                       
  To:         <staf-users@lists.sourceforge.net>                       
                                                                       
  Date:       04/20/2011 04:50 PM                                      
                                                                       
  Subject:    [staf-users] import python module - issue                
                                                                       





Hi Staf users,

I'm trying to parse a configuration file using the following python code in
STAX XML program:



When attempt to run the code through STAX xml program. It fails to run
showing the python error code "importerror: Cannot import name
SafeConfigParser".

Note: When run the same code through Python terminal, everything works
fine.

Please suggest on this.

Thanks,
V Raja


                                                                       
                                                                       
                                                                       


------------------------------------------------------------------------------

Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve
application availability and disaster protection. Learn more about boosting

the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

<<inline: graycol.gif>>

<<inline: ecblank.gif>>

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to