-2
的字符串表示的子我有一个字符串如下,这是在JSON格式:红宝石更换JSON
test_geometry_profile =
'{
"geometryProfile": {
"SPEEDSeedModel0.osm": {
"WWR": 0.5,
"Orientation": 0.0
},
"SPEEDSeedModel1.osm": {
"WWR": 0.6,
"Orientation": 0.0
}
}
}'
我想与'TestOSM_radiantDOAS.osm'
替换子SPEEDSeedModel1.osm
在此字符串。
我使用的代码:
test_geometry_profile.sub("SPEEDSeedModel1.osm", 'TestOSM_radiantDOAS.osm')
然而,这无法工作。有什么我在这里失踪?