You are not logged in.

#26 2006-06-15 10:14:54

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: My little pet project -- a text editor

isn't it fun Dusty?

Offline

#27 2006-06-15 16:36:12

barebones
Member
Registered: 2006-04-30
Posts: 235

Re: My little pet project -- a text editor

Dusty, would you mind doing a

pacman -Qs python 

and posting that so I can see what python packages you have installed?

Offline

#28 2006-06-15 18:21:56

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: My little pet project -- a text editor

My pleasure:

local/fpconst 0.7.2-1
    This python module implements constants and functions for working with
    IEEE754 double-precision special values.
local/gnome-python 2.12.3-1
    gnome-python is a set of interfaces to gnome-libs.
local/gnome-python-desktop 2.14.0-2
    Gnome Python interfaces for libraries not part of the core platform
local/gnome-python-extras 2.14.0-1
    Gnome Python interfaces for libraries not part of the core platform
local/pycairo 1.0.0-1
    Python bindings for the cairo graphics library
local/pygtk 2.8.5-1
    PyGTK is a set of python bindings for the GTK widget set.
local/pyorbit 2.0.1-3
    Python Orbit.
local/pyrex 0.9.3.1-2
    Language for writing Python extension modules
local/python 2.4.3-1
    A high-level scripting language
local/python-pygoogle 0.6-1
    Python wrapper for the Google web API.
local/python-soappy 0.12.0-2
    Client-server library for web programming using SOAP and related protocols
    (WSDL, UDDI, etc).
local/pyxml 0.8.4-2
    Python XML parsing library.

I'm guessing that the problem is in gtksourceview python bindings, which I am liking less and less. Unfortunately, I can't find another decent gtk source editor for python. So my options are to switch to curses or QT, to implement my own source buffer, to revive pygtkscintilla, or to try to create a pluggable system for managing the UI. Anybody have any thoughts on this?

Dusty

Offline

#29 2006-06-15 19:42:01

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: My little pet project -- a text editor

I think you've created a great app that I hope will carry on growing?  Does that count?

Offline

#30 2006-06-16 01:59:10

twiistedkaos
Member
Registered: 2006-05-20
Posts: 666

Re: My little pet project -- a text editor

Dusty; Why not just use wxpython, it's pretty easy to learn and is very cross-platform. I use it for when I program GUI applications in python.

Offline

#31 2006-06-16 03:58:10

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: My little pet project -- a text editor

twiistedkaos wrote:

Dusty; Why not just use wxpython, it's pretty easy to learn and is very cross-platform. I use it for when I program GUI applications in python.

Mostly cause I hate the API -- I love gtk. The problem here is that I'm using a source-editor widget that gives me free syntax highlighting, undo, etc. So I don't have to do it. Does wxpython have anything to match that?  I know scintilla has QT bindings, but the gtk bindings in python are out of date. sad

Dusty

Offline

#32 2006-06-16 04:22:12

twiistedkaos
Member
Registered: 2006-05-20
Posts: 666

Re: My little pet project -- a text editor

Dusty wrote:
twiistedkaos wrote:

Dusty; Why not just use wxpython, it's pretty easy to learn and is very cross-platform. I use it for when I program GUI applications in python.

Mostly cause I hate the API -- I love gtk. The problem here is that I'm using a source-editor widget that gives me free syntax highlighting, undo, etc. So I don't have to do it. Does wxpython have anything to match that?  I know scintilla has QT bindings, but the gtk bindings in python are out of date. sad

Dusty

For syntax highlighting there's always the wxStyledTextCtrl, I'm not completely sure of all it's features since I've only ever touched the basis of it. I have used the syntax highlighting part of it though. I do bleive it does support undo / redo objects as I've seen a friend of mine use them with a project we're working on. more infotmation here:
http://www.wxwidgets.org/wiki/index.php … edTextCtrl

it's actually very easy to use.

Offline

#33 2006-06-16 05:32:43

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: My little pet project -- a text editor

twiistedkaos wrote:

For syntax highlighting there's always the wxStyledTextCtrl

Hmmm, its scintilla based. I certainly am interested in that. I'll investigate it. If nothing else it may be yet another option if I pursue the pluggable look and feel route. Thanks for the suggestion!

Dusty

Offline

#34 2006-06-16 05:45:46

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: My little pet project -- a text editor

The medit text editor claims that it uses libxml2 for syntax highlighting, unless I am mis-understanding its website. But take a look http://mooedit.sourceforge.net/installation.html.


I am a gated community.

Offline

#35 2006-06-23 17:17:33

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: My little pet project -- a text editor

I think medit just uses libxml2 to parse syntax files, but I'm not sure.

I'm curious to know if the editor works any better since the big move from testing, pygtk was updated. I'm guessing not.

I've decided that I will go with wxpython as suggested. Always good to learn a new toolkit! Its going to entail rewriting a lot of code including some plugins, so I'm going to take the opportunity to make it a little more extensible in case I want to go with the pluggable toolkits idea later.

Before I do that, I think I'll try to change the existing code to allow it to run properly with a configuration file in the home directory and plugins in multiple places like a "real" program and make a 0.1 release. However, I doubt it will work any better for people than the current svn does though. I'm stumped as to the problem, and I'm starting to feel restricted by gtk, so lets try something else. The current code will always be in svn if I want to go back to it, so nothing to lose. ;-)

Problem is, I'm really short on time right now. I'm working on silly stuff I don't care much about instead of cool stuff like this. How depressive!

Cheers folks,
Dusty

Offline

#36 2006-07-17 02:19:05

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: My little pet project -- a text editor

Hey guys,

I just released the gtk version of this thing on sf.net, its got all the bugs you may have found before, I just wanted a release before I start rewriting. The question of when I start rewriting is up in the air, I'm busy with much less interesting stuff. :-/

Dusty

Offline

#37 2006-08-21 23:07:46

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: My little pet project -- a text editor

Hey all,

Been sick as hell this weekend (I'm praying its bronchitis, cause otherwise its pnemonia...) with no gumption for the work I am supposed to be doing. So I worked on this rewrite off and on. Pretty much retyped every character, although a lot of it looks similar to before.

Using wx made the whole thing a lot shorter, StyledTextControl is amazing, though the two wxpyhton editors I've been developing in while writing this (pyalamode and pype) tend to crash on copy and paste, so hopefully that's not related.

The current SVN code has support for syntax highlighting of python, java, and html (its easy to add more, just haven't gotten around to it), multiple buffers (including a split pane that can be split with the mouse), configurable size and styles, and the same plugin interface as before.

Anyone interested is welcome to check out the SVN code, I'll try to make sure I don't commit anything that leaves it broken for a while. I'm looking to release 0.2 soon, so bug reports at this time are a blessing. I think it'll work substantially better than the gtk based version.

Only dependency is wxpython, which of course depends on python and wxwidgets and maybe scintilla.

Again, I just got it to the point where I feel comfortable working in it and to be honest, I don't intend to add much to the core at this time, just plugins. I may even move the syntax highlighting code to a plugin, though I can hardly imagine anyone not wanting highlighting. Eventually I do want to add optional dock-window support so that plugins can be created to make it behave like an IDE.

For 0.2, I will probably enable macros, and possibly add optional menu- and tool-bars (personally I hate them, but if I have the plugins there, people can use them, right?).

Let me know what you break.

Dusty

PS: Twiisted -- I'm really starting to like the wx API now that I've gotten used to it. They've made the event architecture more object-oriented since I last tried it.

Offline

#38 2006-08-22 01:15:33

Askadar
Member
Registered: 2004-08-10
Posts: 10

Re: My little pet project -- a text editor

Hey Dusty,

I checked out the current version from SVN and gave it a try. I like the idea of an uncluttered editor, but scrolling in a syntax high-lighted pyhton file is just incredibly slow, you can see a noticeable delay when the page wraps. It takes almost 100% CPU on 1800Mhz Pentium-M!

- Askadar

Offline

#39 2006-08-22 02:18:59

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: My little pet project -- a text editor

Hmmmmmm... Is that scroll using the scroll wheel or the scroll bar?

I tested it here and it does use a considerable amount of CPU when scrolling. I was quite dissatisfied. But then I tried some other apps and found they all use quite a bit -- open office, firefox and (surprisingly) gvim. My test was to scroll up and down as fast as possible. I decided that on my system, Pallavi is only marginally slower than these other apps, perhaps due to python overhead. I was testing on fairly large files in all cases.

Also, rather than scroll slowly, the scroll position seems to "fall behind" the scroll wheel for me. So after all that, I've kind of decided I'm not experiencing the same issue. :-(

Do you have any problems scrolling if you open a non-python file of similar size?

Thing I'm trying to decide is if its a problem inherent to the StyledTextControl or if its some setting in my code.

Hey that's an idea: could you also try opening the file in pyalamode (comes with wxpython) and see if you get the same problem.

Dusty

Offline

#40 2006-08-22 03:23:16

barebones
Member
Registered: 2006-04-30
Posts: 235

Re: My little pet project -- a text editor

Looking good dusty. I haven't had much time to play around with it yet, but it looks like all the problems I was having with the gtk version have been cleared up. I tried to duplicate the scrolling problem mentioned above, but I had no really noticable slow down while scrolling. I did have a cpu spike though. I opened the same file in gvim and while I did have a little bit of a spike while scrolling, it was only about a third as large as from pallavi.

Offline

#41 2006-08-22 11:57:45

Askadar
Member
Registered: 2004-08-10
Posts: 10

Re: My little pet project -- a text editor

I scroll using the keyboard. If I use the scroll wheel, I am not fast enough to reproduce the problem.

The lag/CPU spike occurs when wrapping a page, e.g. when the cursor is in the last row and I keep going down.

Pyalamode shows the same problem. Just to make sure I checked with KWrite. No problem at all, very smooth scrolling.

Anything else that you would like me to check?

- Askadar

Offline

#42 2006-08-22 17:43:00

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: My little pet project -- a text editor

I was sort of able to reproduce this. If I use the down arrow key and the page starts scrolling, it hits 100% for me, and much more irritating, it doesn't stop scrolling when I release the key. GVim doesn't show anything like this, so I'd say its not a 'typical' response for a text editor. ;-)

I also tried it using a non-syntax highlighted file and found the same problem. That indicates that its not a function of the lexers not being able to keep up.

The only workaround I can suggest for now is to use page up and page down when scrolling long distances (do you find a problem when scrolling just a few lines -- I find no lag there). I'll maybe context the wxpython list to see if there is something I can do to fix it. Thanks for the bug report.

Dusty

Offline

#43 2006-08-23 03:53:32

barebones
Member
Registered: 2006-04-30
Posts: 235

Re: My little pet project -- a text editor

Here's and idea for you dusty. It looks like your main goal for pallavi is to create a text editor that is very easily plugable. I think then, before you start creating any fancy plugin's you might want to look into creating a integrated plugin installation system. It's not like your system is hard to add a plugin to, but some integrated system  would make installing, managing plugins, and actually remembering what you have installed much easier. It could perhaps be extended to some sort of pallavi config-backup system where you tell pallavi to export plugins for easy setup on a reinstall or on another system.

Here's my idea: It doesn't need to be fancy, just something that retreives the plugin from the net, puts it in the right directory and then updates pallavi_config.py. The implimentation I'm thinking of, is a command-line option, something like this:

pallavi -p http://path.to.plugin

That could use python's url lib to grab the file and put it where it belongs. That could also be as simple as this, I think

import urllib
urlget = urllib.urlopen(http://path.to.plugin)
newplug = open('path/to/plugins/pluginname.py', 'w')
newplug.write(urlget)
urlget.close()
newplug.close()

updating pallavi_config.py is something that I can't do off the top of my head, unfortunatly. If this idea interests you, I bet you could take care of that pretty quickly though.

Hopefully I was clear enough with this idea, if you have any questions, of course feel free to ask. Also, I'm sorry if the code above is sloppy, I'm not that great of a programmer (plus it's late right now).

Offline

#44 2006-08-23 05:49:48

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: My little pet project -- a text editor

Askadar: Could you possibly try running Pallavi in Windows? (I don't have it installed) and see if it acts the same? If not, I'll try it in my lab sometime, just going to be a problem since I don't have python or anything installed on anything up there.  One of the wxpython guys asked me to try in windows, which is a good idea. Also, if you have time, could you tell me if you get the same problem using the Scite editor? This would indicate its a scintilla problem, not wxpython, and not mine! :-)

barebones:
At first, I didn't like your idea, as maintaining a plugin manager with dependency checking (yes, there will be dependencies between plugins) is a project in itself. I am actually basing a lot of my ideas on the well-designed jEdit text editor and it has an integrated plugin manager that... I hate working with. The idea had crossed my mind before, but my plan was to allow plugins to be shipped as separate packages, and that would mean pacman could take care of all the installation issues. BUT that doesn't work for single users installing plugins to their home directory.

But then looking at your code, I saw what you're asking (no dep checks smile) is pretty simple and pretty elegant. Most importantly, its possible to implement the whole works as a plugin so if somebody doesn't like it they don't have to load it, and if somebody thinks its not good enough (no dep checks!) they can write an alternative. So I added it to my TODO list. :-) It won't be in the next release, which isn't far off.

I already have a two tier approach to plugins; default plugins will be shipped with the core, and other plugins can be shipped by third parties. The default plugins will be ones that I expect anyone to want to enable, though they may turn it off. And if third party programmers create cooler plugins that do the same thing as default ones but better, I hope to be able to move them into the core to replace the others... Kind of like [current] and [extra] :-D

I'm glad you picked up on the "main goal ... create a text editor that is very easily plugable". That's exactly my main goal, and I'm happy to have it recognized.

To everyone In general: I just added a simple menubar plugin with a file and edit menu, so if people like menubars, they can have it. Or not. I love this editor! :-D

Thanks for the feedback everyone! I am supposed to be busy, but the project has gripped me, I may have a release sometime this weekend!

Dusty

Offline

#45 2006-08-23 23:10:15

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: My little pet project -- a text editor

I just pushed out a beta release. Not much documentation, but for those wishing to experiment, it is now much user -- grab the PKGBUILD from AUR! :-)

Probably the place to start is to run Pallavi and then open ~/.pallavi/pallavi_config.py. Its well documented and should be a starting point. I'll rewrite the web page to describe the new version later.

I'd be delighted to have windows or mac users testing this thing, since its a cross-platform API now. Yeah I know this isn't the best place to advertise such.

Also, if anybody is interested in contributing plugins or joining me in development, let me know.

Dusty

Offline

#46 2006-08-24 00:19:16

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: My little pet project -- a text editor

Oh, one other thing, would anybody be interested in making an icon for the editor? I'd like something that looks like a twig of a tree with a small leaf and a couple of not quite budding leaves growing off it.

Dusty

Offline

#47 2006-08-24 02:52:20

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: My little pet project -- a text editor

I tried to run in on Windows for ya but didn't have much luck.  Admittedly I'm not much of a Python man and didn't know what else I'd have to install aside from just Python.  Will I need BASH too in order to execute the <code>run-pallavi</code> script?

Offline

#48 2006-08-24 02:53:56

barebones
Member
Registered: 2006-04-30
Posts: 235

Re: My little pet project -- a text editor

Elastic, did you have wxpython installed? Thats pretty much the only other dependency.

Offline

#49 2006-08-24 04:05:56

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: My little pet project -- a text editor

elasticdog wrote:

IWill I need BASH too in order to execute the <code>run-pallavi</code> script?

Run-pallavi is coded in python too. Deps should be python and wxpython and I suppose I should add a dependencies section to the web page I just wrote! :-) Thanks for trying it out under Windows. Let me know if it comes up.

For those interested, I just added a couple of screenshots:
http://sourceforge.net/project/screensh … _id=167671

Thanks!!

Dusty

Offline

#50 2006-08-24 06:54:05

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: My little pet project -- a text editor

I had the opportunity to test it on Windows at a friend's place today. There were a couple issues with the setup.py, and one cross-platform issue with the Choice widget came up. I fixed them and checked the changes into Subversion. It seems to work ok on Windows now, though the font was kind of strange.

Dusty

Offline

Board footer

Powered by FluxBB