问题标签 [wing-ide]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
222 浏览

javascript - Wing IDE 中咖啡脚本的语法高亮显示

有没有人知道在 Wing IDE 中为咖啡脚本文件高亮显示语法的方法?我已经将它设置为突出显示,就好像它是一个 javascript 文件一样,它工作正常,但是它缺少一些东西,特别是注释。有人为此编写了词法分析器。我将使用咖啡脚本很长一段时间,让突出显示正确工作会非常有帮助。

谢谢你的帮助

0 投票
2 回答
3814 浏览

python - Importing data from dbf to excel spreadsheet using Wing IDE

I am trying to move a column of data (mean values) from a dbf file to an excel spreadsheet. I have been trying this with Wing IDE with no success so far. I am not a progamming student and this is a short term assignment. I am stuck on the part where I have to retrieve the file from the specific network drive and copy the data onto my local excel sheet. Help would be great. Thanks

0 投票
1 回答
236 浏览

python - Wing IDE 101 说某些值无效

在 WingIDE 101 中:

当我转到源-当前文件属性-调试-每次运行前显示此对话框-应用:我收到错误:

某些值无效:

  • Python 可执行文件“C:\Program Files\Common Files\Microsoft Shared\Windows Live\”不是文件
  • 初始目录 '' 不存在

请更正这些值并重试。

问题是什么?

0 投票
2 回答
33209 浏览

python - 程序在 python 中运行时如何打印到控制台?

我有一个我正在运行的算法需要一段时间,所以我想通过打印到控制台来跟踪它的进度。

所以像:

如何在运行时而不是在结束时打印此打印件?

编辑,解决方案: - 发布修改后的代码。当您在 linux 终端中运行此代码时,它可以正常工作

但是当我在 Wing 101 IDE 中运行它时——通过按下绿色播放按钮('在 python shell 中运行编辑器的内容')——它会等到程序完成后再输出。

显然不可能在 Wing IDE 中刷新标准输出。

0 投票
1 回答
949 浏览

python - Wing IDE 中的 Matlab 样式变量编辑器

我正在考虑从 Matlab 迁移到 Python。我正在尝试 Wing IDE。我发现它非常方便,但现在我正在寻找一些功能,例如 Matlab 中的命令 Windows 和变量浏览器。我知道如果我启动调试过程,我可以使用 Debug Probe 调整内存中的变量,因此 Debug Probe 的行为非常类似于 Matlab 命令窗口。但是每次都先启动一个调试过程很不方便。我更愿意为此使用 Python Shell 选项卡。所以我有两个问题:

  1. 是否可以像 Matlab 中的命令 Windows 一样使用 Python Shell 选项卡?
  2. 我可以在 Wing IDE 中浏览 Python Shell 堆栈中的变量,最好使用 GUI 工具吗?
0 投票
2 回答
532 浏览

python - Debugging Python bottle apps with WingIDE

I'm writing an Python Bottle application (Python 2.7.2 and Bottle 0.10.9) and developing it in the WingIDE (3.2.8-1) Professional for Linux. This all works well, except when I want to debug the Bottle application. I have it running in standalone mode within WingIDE, but it won't stop at any of my break points in the code, even if I set Bottle.debug(False). Does anyone have any suggestions/ideas about how I can setup Bottle so it will stop on breakpoints within WingIDE?

0 投票
1 回答
1819 浏览

python - 使用wing IDE时如何为python设置运行参数?

使用wing IDE时如何为python设置运行参数?

我使用wingIDE创建了一个项目,并保存到文件夹D:\TEST\djgprj,但是models,,manage.py程序在文件夹中D:\TEST\djgprj\testdjg。当我尝试使用wingIDE 运行manage.py 时,我不知道在哪里设置参数。我知道有一个地方是Debug->Run Arguments,但效果不好。

0 投票
1 回答
7244 浏览

python - Python:使用 Wing IDE 导入模块

我是 Python 新手,无法使用 Wing IDE/Python 2.7/Mac OS 导入模块

我已阅读: 从 Wing Ide 中的其他目录导入模块

和: http ://docs.python.org/2/tutorial/modules.html

但我还是不明白。

如果如第二个链接中所示,我创建了一个 fibo.py 脚本并将其保存在我的 Python 路径中,那么当我尝试导入它时,我会遇到以下错误:

虽然 fibo 在我输入时可用于自动完成

我错过了什么?感谢您的回答

0 投票
0 回答
686 浏览

python - Wing Python 单元测试:我可以在 tearDownClass 中失败测试吗?

我有一堆方法需要测试。我想实施检查以确保我已经为每种方法编写了测试。如果我保持运行测试列表,我可以在我的 tearDownClass() 中检查这一点,但我无法从那里找到失败的方法。

如果我尝试这样做:

我得到一个类型错误:unbound method fail() must be called with TestAB instance as first argument (got type instance instead)

这样做的正确方法是什么?即使只是打印一条消息也可以(如果不理想的话),但据我所知,wing 不会通过设置和拆卸方法输出“打印”消息。

这个问题很相似,但我不希望测试崩溃,只是失败。

0 投票
2 回答
1017 浏览

python - Python 战斗序列

我正在尝试构建一个简单的战斗序列,其中用户选择他们的“职业”(战士、弓箭手、法师)以及他们想要战斗的怪物(地精、巨魔、兽人)。

我到目前为止的代码是:

我得到这个错误:

Traceback(最近一次调用最后):文件“C:\Program Files (x86)\Wing IDE 101 4.1\src\debug\tserver_sandbox.py”,第 109 行,在文件“C:\Program Files (x86)\Wing IDE 101 4.1\src\debug\tserver_sandbox.py”,第 102 行,fightSequence 文件“C:\Program Files (x86)\Wing IDE 101 4.1\src\debug\tserver_sandbox.py”,第 63 行,humanAttack builtins.NameError :未定义全局名称“Monster”

谢谢!