我正在尝试使用以下代码加入PLF路径以构建位置,但我注意到构建位置上的plf名称被覆盖,请参阅下面的详细信息,我在这里缺少什么?
rPlf = os.path.join(buildLocation,'au_connect_build.plf')
print rPlf
print rPlf
实际输出:-
rPlf
au_connect_build.plfNTEGRATIONM1234BAAAANAA120080.1
预期产出:-
\Locationbuilds435INTEGRATIONM1234BAAAANAA120080.1au_connect_build.plf
buildLocation
包含一个r
字符 - 运行print repr(rPlf)
,你会看到发生了什么。您可以通过以下方式解决此问题:
buildLocation = buildLocation.strip('r')