You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by aj...@apache.org on 2007/02/23 16:33:35 UTC

svn commit: r510982 - in /incubator/tuscany/cpp/sca/samples/RestYahoo: sample.yahoo.client/runclient.bat sample.yahoo/YahooWebSearchImpl.py

Author: ajborley
Date: Fri Feb 23 07:33:34 2007
New Revision: 510982

URL: http://svn.apache.org/viewvc?view=rev&rev=510982
Log:
Support pre-Python2.5 elementtree package

Modified:
    incubator/tuscany/cpp/sca/samples/RestYahoo/sample.yahoo.client/runclient.bat
    incubator/tuscany/cpp/sca/samples/RestYahoo/sample.yahoo/YahooWebSearchImpl.py

Modified: incubator/tuscany/cpp/sca/samples/RestYahoo/sample.yahoo.client/runclient.bat
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RestYahoo/sample.yahoo.client/runclient.bat?view=diff&rev=510982&r1=510981&r2=510982
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RestYahoo/sample.yahoo.client/runclient.bat (original)
+++ incubator/tuscany/cpp/sca/samples/RestYahoo/sample.yahoo.client/runclient.bat Fri Feb 23 07:33:34 2007
@@ -37,7 +37,7 @@
 )
 echo using Libcurl installed at %LIBCURL_HOME%
 
-set PATH=%LIBCURL_HOME%\lib;%TUSCANY_SCACPP%\extensions\rest\interface\bin;%TUSCANY_SCACPP%\extensions\rest\reference\bin;%TUSCANY_SCACPP%\bin;%TUSCANY_SDOCPP%\bin;%PATH%
+set PATH=%LIBCURL_HOME%\lib;%TUSCANY_SCACPP%\extensions\rest\interface\bin;%TUSCANY_SCACPP%\extensions\ruby\bin;%TUSCANY_SCACPP%\extensions\rest\reference\bin;%TUSCANY_SCACPP%\bin;%TUSCANY_SDOCPP%\bin;%PATH%
 set PYTHONPATH=%TUSCANY_SCACPP%\extensions\python\bin
 
 set TUSCANY_SCACPP_ROOT=%~d0%~p0\..\

Modified: incubator/tuscany/cpp/sca/samples/RestYahoo/sample.yahoo/YahooWebSearchImpl.py
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RestYahoo/sample.yahoo/YahooWebSearchImpl.py?view=diff&rev=510982&r1=510981&r2=510982
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RestYahoo/sample.yahoo/YahooWebSearchImpl.py (original)
+++ incubator/tuscany/cpp/sca/samples/RestYahoo/sample.yahoo/YahooWebSearchImpl.py Fri Feb 23 07:33:34 2007
@@ -17,7 +17,15 @@
 #
 #
 
-import xml.etree.ElementTree
+try:
+    import xml.etree.ElementTree
+except ImportError:
+    # Running under a pre-Python2.5 
+    try:
+        import elementtree.ElementTree
+    except ImportError:
+        print "The RestYahoo sample requires the ElementTree package"
+        
 
 def search(searchText):
 



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org