python - Usage examples show input to a python function that isn't separated by commas?
问题描述
I am trying to get a bit of code that I found online to work with the usage examples given in the README.md file. The intention of the tools are to synthesize an audio scene out of separate events.I cannot figure out how to run the usage examples given, which are:
* ./simscene.py -h
Displays command line syntax and option descriptions.
* ./simscene.py example/sound/ output/ 10 -e example/forest_events.xls -b example/forest_backgrounds.xls -N 10 -v
Creates wavefiles and plots of 10 instances of scenes for which events are described in example/forest_events.xls and
background sounds in example/forest_backgrounds.xls
I've tried running these lines on the terminal (I am using PyCharm) but the error is that "simscene.py is not recognized as an internal or external command, operable program or batch file", even if I try to run "simscene.py" alone with no inputs.
I've been able to get the function simscene to run from another script by importing it, but then run into errors. It looks like the file simscene.py uses lines of argparse
to prompt the user, but I can't seem to activate these prompts to start running.
How do the usage examples relay the specified inputs to the function, and how might I be able to run the usage examples?
The link to the entire project is here: https://bitbucket.org/mlagrange/simscene/src/master/python/
解决方案
It's probably asking you to run the file with the python interpreter, i.e. if you are in the directory,
python simscene.py -h
should probably run the first example. I assume they didn't include the python
part, because people could have different variants (python3
, numba
, etc)
推荐阅读
- c# - 使用 ConfuserEx 时 Newtonsoft JSON 反序列化不起作用
- python - 如何在创建散点图矩阵时更改seaborn中的颜色优先级
- python-3.x - 图片从 url 到 PDF
- postgresql - 高postgresql负载CPU到docker
- python - Python:根据模式创建多个新列
- android - 更新assetlinks.json以处理动态链接而不提示在android中使用浏览器
- c# - Unity Firebase 实时数据库内部异常
- visual-studio - 是否可以让 VS2017 使用子目录中的 tsconfig.json 文件?
- css - jekyll 项目没有对齐
- pivot - Power Pivot/Power BI 处理 Power Pivot/PowerBI 中的空白