简体   繁体   English

适用于Python的IDE:测试脚本

[英]IDE for Python: test a script

Is there any IDE that allows to run a script in testing mode, allowing to replace at runtime, some values, like a folder or else? 是否有任何IDE允许以测试模式运行脚本,并允许在运行时替换某些值(例如文件夹或其他值)? I have a program that will have to run on a network i have no access to where I develop. 我有一个必须在网络上运行的程序,但我无法访问开发的地方。 Since it will use some specific folders to pick up files, I was wondering if ie I could use an IDE that using some parameters will translate all that is like \\corporate\\disk-c\\myfolder into ac:\\myfolder. 由于它将使用一些特定的文件夹来拾取文件,所以我想知道是否可以使用IDE使用某些参数将\\ corporate \\ disk-c \\ myfolder之类的所有内容转换为ac:\\ myfolder。

Thanks! 谢谢!

M 中号

In absence of some other file based config, you could just keep the variable definitions in aa file that you import in the main script (eg, config.py ), then have two different versions of that file for 'on' and 'off' network, (or ' development' and 'production', whatever) with the appropriate settings. 在没有其他基于文件的配置的情况下,您可以仅将变量定义保存在主脚本中导入的一个文件中(例如config.py ),然后对该文件使用“ on”和“ off”两个不同版本网络(或“开发”和“生产”等)进行适当的设置。 No IDE needed. 不需要IDE。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM