从提示中提供输入文件名 [英] Giving the input file name from the prompt

查看:94
本文介绍了从提示中提供输入文件名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI,


我有一个Samplescript。当我运行这个脚本时,它会弹出消息说是否要运行Batch或Interactive


I / P:

SampleScript.py或SampleScript.pyc


>>> SampleScript.py - >从提示符运行脚本

>>> ''消息 - 你想以互动方式运行' - >程序将提示消息

>>>是的---> (用户将输入是或否)

>>> SampleData.txt ---> (文本文件作为输入)

申请开始运行


(或)


>> ;>否

弹出图形用户界面

用户将输入数据

应用程序开始运行


有没有人可以为我提供示例代码


谢谢

PSB



I have a Samplescript.When I run this Script,it should pop up message saying that whether to run Batch or Interactive

I/P:
SampleScript.py or SampleScript.pyc

>>> SampleScript.py --> Run the script from the prompt
>>> ''Message-Do you want to run as Interactive'' --> Program will prompt the message
>>> Yes ---> ( user will type ''Yes'' or ''No'')
>>> SampleData.txt ---> ( Text file is given as a input)
Application start running

(or )

>>> No
Graphical user interface is pop up
User will input the data
Application start running

Could anybody hlep me in providing the sample code for this

Thanks
PSB

推荐答案

如何从提示中获取输入?


像文件名或任何标志


-PSB
How to get the inputs from the prompt?

Like filename or any flags


-PSB



如何从提示中获取输入?


像文件名或任何标志



-PSB
How to get the inputs from the prompt?

Like filename or any flags


-PSB



我不认为有一种内置方式可以弹出标准的python shell。许多优秀的工具包(如wxPython)在窗口中重新定向,可以通过应用程序进行控制。在任何一种情况下:

I don''t think that there is a built-in way to "pop up" the standard python shell. Many good toolkits (like wxPython) have shell re-direction in a window that can be controled by the app. In either case:

展开 | 选择 | Wrap | 行号



我不认为有一个内置的 - 以弹出的方式标准的python shell。许多优秀的工具包(如wxPython)在窗口中重新定向,可以通过应用程序进行控制。在任何一种情况下:
I don''t think that there is a built-in way to "pop up" the standard python shell. Many good toolkits (like wxPython) have shell re-direction in a window that can be controled by the app. In either case:
展开 | 选择 | Wrap | 行号


这篇关于从提示中提供输入文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆