Python中文
首页
教程
问答
标签
搜索
登录
注册
如何获取充当stdin/stdout的文件名?
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我有以下问题。我想用Fortran90编写一个程序,我希望能够这样调用:</p> <pre><code>./program.x < main.in > main.out </code></pre> <p>除了“main.out”(调用程序时可以设置其名称)之外,还必须编写辅助输出,我希望它们具有与“main.in”或“main.out”类似的名称(它们实际上不被称为“main”);但是,当我使用:</p> <pre><code>INQUIRE(UNIT=5,NAME=sInputName) </code></pre> <p>sInputName的内容变为“Stdin”,而不是文件名。在调用程序时,是否有方法获取链接到stdin/stdout的文件名</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>可能内部子例程<code>get_command</code>和/或<code>get_command_argument</code>会有所帮助。它们是在fortran 2003中引入的,要么返回用于调用程序的完整命令行,要么返回指定的参数</p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
如何在乒乓球比赛中预测球的轨迹,对于AI球拍预测?
10 回答
如何在乒乓球游戏中阻止球
10 回答
如何在乘法和模中不乘空间?
9 回答
如何在乘法和除以2个不同的数字之间进行交换?
7 回答
如何在也是数据一部分的单个字符上拆分大字符串
8 回答
如何在乾草堆中找到針,有更好的解決方案嗎?
6 回答
如何在事件wxWidgets中传递自定义数据
8 回答
如何在事件中使用lambda i=i?
5 回答
如何在事件中心只接收最近的数据
8 回答
如何在事件发生之前保持云函数运行?
7 回答
如何在事件发生后使页面重定向到同一页面
9 回答
如何在事件回调之间保持python生成器的状态
3 回答
如何在事件处理程序(pythonsocket、sphinx)中保留docstring
10 回答
如何在事件处理程序中更改wxRichTextCtrl的光标位置?
10 回答
如何在事件处理程序中访问外部对象?
10 回答
如何在事件循环中将协程打包为正常函数?
1 回答
如何在事件循环之外运行协同程序?
4 回答
如何在事件循环结束时为并发未来的所有线程调用类方法?
2 回答
如何在事件文件中只保留一份摘要?
3 回答
如何在事件模板中添加事件
2 回答