pythonshell(用的IDIE)程序编辑器中、菜单Edit→怎么没有RunScript选项、快捷键Ctrl+F5也没有、?

发布时间:2019-08-02 16:34:29

python shell(用的IDIE)程序编辑器中、菜单Edit→怎么没有Run Script选项、快捷键Ctrl+F5也没有、?

推荐回答

Python源文件通常用.py扩展名。当源文件被解释器加载或者显式地进行字节码编译的时候会被编译成字节码。由于调用解释器的方式不同,源文件会被编译成带有.pyc或.pyo扩展名的文件,您可以在第十二章“模块”中找到更多的关于扩展名的知识。1.4Downloading and Installing Python下载和安装PythonThe most obvious place to get all Python-related software is at the main Web site at . For your convenience, you can also go to the book’s Web siteat and click on the “Install Python” link to the left—we have organized a grid with most contemporary versions of Python for the most platforms, with a focus, of course, on the “Big Three.” Unix, Win 32, MacOS X. 有三种不同的办法来启动Python。最简单的方式就是交互式的启动解释器,每次输入一行Python代码来执行。另外一种启动Python的方法是运行用Python写的脚本程序。这样会调用相关的脚本解释器。最后一种办法就是从集成开发环境中的图形用户界面中运行Python。集成开发环境通常带有其他的工具,例如集成的排错器、文本编辑器和支持大量源代码管理的工具CVS等。Command-Line Options命令行选项When starting Python from the mand-line, additional options may be provided to the interpreter. Here are some of the options to choose from:当从命令行启动Python的时候,附加的选项可以提供给解释器。下面是供您使用的一些选项:-dProvide debug output-OGenerate optimized bytecode (resulting in .pyo files)-SDo not run importsite to look for Python paths on startup-vVerbose output (detailed trace on import statements)-m modrun (library) module as a script-Q optdivision options (see documentation)-c cmdRun Python script sent in as cmd stringfileRun Python script from given file (see later)-d输出排错(debug)信息-O生成优化的字节码(以.pyo文件形式)-SDo not run importsite to look for Python paths on startup-vVerbose output (detailed trace on import statements)-m modrun (library) module as a script-Q optdivision options (see documentation)-c cmdRun Python script sent in as cmd string file从给定的文件运行Python脚本(下面会提到) PythonWin是第一个为Python开发的Windows接口界面,并且是一个带有图形用户界面的集成开发环境。PythonWin发行版本中包含Windows API和COM扩展。PythonWin本身是针对MFC库编写的,它可以被用作开发您自己的Windows应用程序的开发环境。您可以从下面给出的网页中下载并安装它。PythonWin通常被安装在和Python
以上问题属网友观点,不代表本站立场,仅供参考!