2009-07-02 9 views
0

私はWingIDE tutorialに従ってIDEでスクリプトを作成しようとしています。edit.editorという名前のモジュールは使用できません。

この次の例のスクリプトは常にエラーをスロー:

import wingapi 
def test_script(test_str): 
    app = wingapi.gApplication 
    v = "Product info is: " + str(app.GetProductInfo()) 
    v += "\nAnd you typed: %s" % test_str 
    wingapi.gApplication.ShowMessageDialog("Test Message", v) 

トレースバック(最新の呼び出しの最後): ファイル "C:\ウイング-π\スクリプト\ test.py"、行1、 でインポートwingapi ファイル "C:¥Program Files¥Development¥Wing IDE 3.1¥bin¥wingapi.py"、行18、 にインポートedit.editor ImportError:編集されたモジュールがありませんedit.editor プロセスは終了コードで終了しました。 1

私はWing IDEのスクリプトを使ってみてください。しかし、私は同じ結果を得ています。

答えて

1

回答はWind IDEを開発しているWingware社のStephan Deibelからの電子メールに基づいています。

Scripts are not launched in Wing's debugger. If you're editing them within Wing, they get reloaded as soon as you save and you should be able to use Command By Name in the edit menu to type test-script, which will execute the above script. This is described in more detail on the page you found the example:

あなたはウィングソースを持っていなければは、デバッグモードでスクリプトを実行することはできません。 Wing IDE内からスクリプトを正常に起動できます。

関連する問題