Ignore:
Timestamp:
20/02/08 10:22:55 (14 years ago)
Author:
mkochan
Message:

Changed the utils.wget() function -- switched to quicker implementation (urllib2), corrected exception handling, updated testUtils.py.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DPPP/kml/csml2kml/python/csml2kml/csml2kml/tests/testUtils.py

    r3439 r3464  
    11import utils 
    22 
    3 print utils.toDegreesMinutesSeconds( 123.5375675435435345) 
    4 print utils.toDegreesMinutesSeconds(- 43.0000100000000000) 
    5 print utils.toDegreesMinutesSeconds(  23.3333333333333433) 
     3# print utils.toDegreesMinutesSeconds( 123.5375675435435345) 
     4# print utils.toDegreesMinutesSeconds(- 43.0000100000000000) 
     5# print utils.toDegreesMinutesSeconds(  23.3333333333333433) 
     6 
     7print 'Script loaded. Testing utils.wget() only.' 
     8n = 10 
     9print 'Retrieving ' + str(n) + ' times.' 
     10for i in range(n): 
     11    content = utils.wget('http://bond.badc.rl.ac.uk:8089/dummyGeoServer/GetStationCSMLFeatures?gml_id=TWL1') 
     12    if content: 
     13        # print content 
     14        print 'Retrieval successful (edit testUtils.py to see it).' 
     15    else: 
     16        print 'Retrieval error.' 
Note: See TracChangeset for help on using the changeset viewer.