Python IDE:测试脚本
是否有任何 IDE 允许在测试模式下运行脚本,允许在运行时替换某些值,例如文件夹或其他值? 我有一个程序必须在网络上运行,我无法访问我开发的地方。由于它将使用一些特定的文件夹来获取文件,我想知道我是否可以使用一个 IDE,使用一些参数将 \corporate\disk-c\myfolder 等所有内容转换为 ac:\myfolder。
谢谢!
中号
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?
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 i.e. I could use an IDE that using some parameters will translate all that is like \corporate\disk-c\myfolder into a c:\myfolder.
Thanks!
M
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在没有其他基于文件的配置的情况下,您可以将变量定义保留在主脚本中导入的文件中(例如,
config.py
),然后拥有该文件的两个不同版本具有适当设置的“打开”和“关闭”网络(或“开发”和“生产”等)。无需 IDE。In absence of some other file based config, you could just keep the variable definitions in a a file that you import in the main script (e.g,
config.py
), then have two different versions of that file for 'on' and 'off' network, (or ' development' and 'production', whatever) with the appropriate settings. No IDE needed.