EmEditor (text editor) Forum Index
   Beta Version Bug Reports
     [b17] Python macro error
Register To Post

Flat Previous Topic | Next Topic
Poster Thread
Vlad
Posted on: 10/17/2007 6:52 pm
Just popping in
Joined: 10/21/2006
From:
Posts: 19
[b17] Python macro error
This macro:
#language="Python"
Window.alert('ok')

results in error after successful alert display:
Traceback (most recent call last):
  File "<Script Block >", line 2, in <module>
    d
NameError: name 'd' is not defined

The macro file has Windows line endings and ends with a single newline (\r\n).

There is no error if the macro ends with two newlines.
If the macro has three newlines at the end, the error is:
Traceback (most recent call last):
  File "<Script Block >", line 4, in <module>
    c
NameError: name 'c' is not defined


Convert the last macro to Unix line endings. It ends with 3 newlines (\n). Error:
Traceback (most recent call last):
  File "<Script Block >", line 4, in <module>
    d
NameError: name 'd' is not defined
Flat Previous Topic | Next Topic


Subject Poster Date
 » [b17] Python macro error Vlad 10/17/2007 6:52 pm
     Re: [b17] Python macro error Yutaka 10/18/2007 9:19 am
       Re: [b17] Python macro error Vlad 10/18/2007 10:50 am
         Re: [b17] Python macro error Yutaka 10/19/2007 8:49 am

Register To Post
 
English čeština Deutsch español français italiano 日本語 한국어 Русский 简体中文 繁體中文