python issues

If reporting a bug with the Zeus editor please post the details here. Please do not post questions here.
abushne

python issues

Postby abushne » Thu Sep 22, 2005 8:06 pm

I am evaluating zeus for use on a large body of python code and have found what appears to be a couple of bugs/issues:

#1: It does not handle """ properly, it treats them as a single quoted string with the single quote character, so for example a python block as follows:
"""
Some comments etc.
"""

does not get syntax color highlited properly. Either treating it as a block comment or as a second type of string literal would be nice.

#2: auto-indentation does not seem to work when typing a block in python, so if I type the following:

if some_check:

after pressing return after typing the :, it indents at the beginning of the if I would expect it to indent 4 spaces or whatever my indent setting is set to.

Pardon if there are some settings to address these, I did not find any right away.

jussij
Site Admin
Posts: 2227
Joined: Fri Aug 13, 2004 5:10 pm

Postby jussij » Fri Sep 23, 2005 12:13 am

#1: It does not handle """ properly, it treats them as a single quoted string

Unfortunately at present Zeus does not support triple quoted string :(

#2: auto-indentation does not seem to work when typing a block in python

I did manage to configure this using the templates section of the Document Type.

This is what I did:
  1. Options, Document Types
  2. Edit the Python Document Type
  3. Change to the Templates section
  4. Delete Brace Prefix entry (ie {[(<)
  5. Delete Brace Postfix entry (ie }])>)
  6. Define : as the Brace Prefix String
  7. Apply the changes
Now if you enter this

Code: Select all

if some_check:

the cursor should be automatically indented by one tab space.

Pardon if there are some settings to address these, I did not find any right away.

You posting has highlighted a slight bug in the software :)

Unfortunately to get this to work the brace prefix and postfix strings need to be deleted which has the unfortunate side effect of breaking the auto indenting and brace matching for of these characters :(

This bug will be fixed in the next update :)

Cheers Jussi

jussij
Site Admin
Posts: 2227
Joined: Fri Aug 13, 2004 5:10 pm

Postby jussij » Mon Oct 31, 2005 3:50 am

The smart indenting bug is now fixed in the latest patch :)

Cheers Jussi

jussij
Site Admin
Posts: 2227
Joined: Fri Aug 13, 2004 5:10 pm

Postby jussij » Wed Dec 14, 2005 10:33 pm

The latest Zeus patch now has support for Python triple quotes :)

To enable this features you need to edit the Python document type and in the Keywords section, enable the triple quotes option.

Cheers Jussi

amix
Posts: 49
Joined: Wed Aug 22, 2007 1:26 pm

Postby amix » Wed Aug 22, 2007 4:31 pm

You said, that the problem is fixed. So I did not remove the Brace Prefixes/Postfixes but simply added : to the Brace Prefix String.

If I do the following construct:

Code: Select all

class MyClass:
  def __init__(self):

the cursor gets positioned allright after MyClass: but after (self): it gets positioned below the 'def'.
It should be intended by a full tab however. Did I miss something ?

Edit:
Persists with 3.96i, added : to the Prefix as seen in the 3.96i original settings. (I copied my old settings over).

jussij
Site Admin
Posts: 2227
Joined: Fri Aug 13, 2004 5:10 pm

Postby jussij » Fri Aug 24, 2007 5:12 am

It should be intended by a full tab however. Did I miss something ?

There is a bug in Zeus in that it is not correctly detecting the Python indent point :(

The indent point is define by the : character but unfortunately because there is no space before the : it is not being detected.

For example if the code had looked like this then the indenting would have worked just fine:

Code: Select all

class MyClass :
  def __init__(self) :


Alternatively if you remvoe the ( and ) characters from the delimiter list in the keyword section of the document type this will also fix the problem.

In any case this bug will be fixed in the Zeus next patch ;)

Cheers Jussi

amix
Posts: 49
Joined: Wed Aug 22, 2007 1:26 pm

Postby amix » Fri Aug 24, 2007 11:43 am

Allright, thanks ;)

jussij
Site Admin
Posts: 2227
Joined: Fri Aug 13, 2004 5:10 pm

Postby jussij » Mon Sep 17, 2007 1:04 am

This bug should be fixed in the latest Zeus 3.96j patch found here: http://www.zeusedit.com/forum/viewtopic.php?t=1251

Cheers Jussi


Return to “Reporting a Bug”

Who is online

Users browsing this forum: No registered users and 0 guests

cron