You are not logged in.
I hate long threads, so I'm starting a new one for this new release. The original discussion is here:
http://bbs.archlinux.org/viewtopic.php?t=22135
Here's a package in AUR
http://aur.archlinux.org/packages.php?d … =1&ID=6037
And here's the home page and source forge project pages:
http://pallavi.sourceforge.net
http://sourceforge.net/projects/pallavi
Enough links! Pallavi is my personal project in pursuit of having a text editor I like with the features I need written in a language I love. Several editors cover the first two criteria, but I hate configuring vim (the syntax is aweful), and I'm not too fond of jEdit's beanshell configuration either. I like python, it makes me feel good. I like to feel good, and I want an editor that I feel good using. So I wrote one.
Ok, its not so great as vim or jEdit. Right now its a very simple clean interface with a nice pluggable interface. I'm trying to make all components replaceable or optional. For example, I don't much care for toolbars or menubars, so I don't enable the plugins that use them, but if somebody wanted to, they could enable them. They could even write new menubar and toolbar plugins to replace the existing ones with something more robust or customizeable. I've already written a second keybinding plugin for my personal use. And so on.
I've been using Pallavi pretty regularly lately and it seems to be pretty stable, as long as you don't do too much copy/pasting (seems to be an issue with wxwidgets, but it only shows up on arch linux. Go figure). I don't know if anybody else would be interested in using it as their actual text editor, but you are certainly welcome to try it out and give me feedback. Even criticism. Or code. Or new plugins to distribute. Its all welcome. 8)
Dusty
Offline
Very nice editor, have to play around with this. Vim-styled shortcuts for one.
Oh, wrong md5sum in PKGBUILD.
Sebastian A. Liem
Offline
My god, man! Screenshots! You need screenshots!
Offline
My god, man! Screenshots! You need screenshots!
some like these ?
Offline
Oh, wrong md5sum in PKGBUILD.
Thanks, fixed it. Not sure how that happened. :-S
Yeah, the screenshots are on the sf page.
Dusty
Offline
How about print support?
Jan
Offline
Dusty,
I've been fiddling around with wx these for the past week or so, trying to figure out somesort of plugin to enable themeing for pallavi (its much easier for me to type against a black background than a white one). After running into wall after wall trying to make a plugin for it I've sorta found a way to do it by editing Views.py. Would this sort of feature be kosher to add into the core like that or should I go back to trying to plugin-ificate it?
By the way, if you know anything about implementing this I would really like to hear it, since I've kinda been running around in circles here for a while.
Offline
Would this sort of feature be kosher to add into the core like that or should I go back to trying to plugin-ificate it?
Good question. This is the sort of thing I'd definately like to see in a plugin, but I would not be at all surprised if all the functionality that a plugin would need to access is not yet available in the core. So if you need to make a few modifications to the core to make the plugin happy (submit a patch :-)), that would be the best solution. I imagine such modifications would not be something like a function that the plugin needs to access, but would be a method to retrieve some property or something.
By the way, if you know anything about implementing this I would really like to hear it, since I've kinda been running around in circles here for a while.
Oh, ideas... everything bouncing around my head and me getting excited about code when I'm supposed to be working on a paper. Oopsie. Oh well. Too late now! :-D
First, have you tried playing with the styles in pallavi_config? I don't know for sure if it would work, but ideally if you can set them all there, life would be better. Second, I suspect you've already seen this page for the methods you would need to call to adjust styles and ... well, everything in the STC, actually: http://www.wxpython.org/docs/api/wx.stc … class.html. Third, if I were developing a plugin to do this, I would have the setup() method in the plugin listen for "TextViewAdded" events (these are sent by the view whenever one is created), and would then set the styling properties on that textview when it is added. See the Keybinding plugin to see how this is done. Fourth, I have no idea, but it may be possible to set styling for the scintilla widget separately from within the actual code, using some kind of configuration. I looked at Scite and PyPe sources for this, but I find styling and lexing in scintilla to be a bit more complicated than I would like it to be.
How about print support?
Er... it never crossed my mind. I've never printed source code in my life. :-D I'll think about it, I'm sure wx has an easy-to-use print API, so its probably not that hard. Its kind of hard for me to test though because I don't have a printer and I wouldn't want to test buggy printing software on the printers in my lab, Tech might get upset if I print 1000 pages of badly formatted postscript or something.
One thing is certain, since its something I don't need, whether I or someone else develops it, it should be developed as a plugin. :-) I added a feature request here for you, but I don't know if or when I'll implement it myself: http://sourceforge.net/tracker/index.ph … _id=167671
Dusty
Offline
First off, that link you gave was bad
Second off, I agree, the styling in scintilla is ridiculously hard. It appears that colors and such are hard coded for each different lexer (from what I've seen, at least) and have to be changed individually. I got most of this from here. Adding lines like this to Views.TextView.ResetLexMode, before actually setting the lexer will change colors:
self.StyleSetSpec(stc.STC_P_COMMENTLINE, "fore:#000066")
. I haven't been able to change it after the lexer is set though. I was thinking about adding another function in Views.TextView that would be called from ResetLexMode that would deterime what lexer is being used, and then change the approiate attributes based on some settings in the config file. It wouldn't be so bad if the values didn't have to be set individually for each property of each lexer. I'll try out some stuff tonight (maybe) and see what works.
Offline
link issue:
phpbb added a period. silly phpbb
http://www.wxpython.org/docs/api/wx.stc … class.html
Perhaps it would be interesting to add something to ResetLexMode that issues an action when the lexmode is changed. This way any plugin can take advantage of it?
This is getting a bit technical for a AL.org forum post, would you be interested in a pallavi mailing list? SF also has online forums, but I hate the interface... OTOH, I hate mailing lists too. ;-)
Dusty
Offline
Just a quick note here, Robin Dunn, creator of wxpython suggests that the copy/paste error (not the middle click one) might be fixed in the latest CVS release of wxpython. He also suggested the latest 2.7 development build ( http://starship.python.net/crew/robind/ … /20060902/ ) I don't have time to test it, but if anyone is interested, it may be worth the trouble of creating a package.
Dusty
Offline
Sure, I'd be up for a mailing list. School just started up again, however, so I don't know how active I'll be. I'm sure I'll find time somewhere though, pallavi is too cool for school.
Offline
Dusty, just so you know, I'm a total liar and it looks like it's not hard at all to change the styling from a plugin. See, the problem lies in the fact that I can't read code properly . I might be able to have something working by the end of this week.
Offline
How you get menu bar to show?
Mr Green I like Landuke!
Offline
barebones: Will be glad to see it! :-)
Mr Greeeeeeeeeeeen:
Enable menubar
1) open ~/.pallavi/pallavi_config.py
2) scroll down to the first uncommented section: default_plugins = [
3) insert "SimpleMenubar", (including quotes) at the end of the list.
4) restart pallavi
You can do the same with "SimpleToolbar" to turn the toolbar on.
Dusty
Offline
I haven't actually tried using it yet, and I'm not sure whether it is already present or not, but is it possible to specify the wanted plugins from the command line?
This way you can have aliases/scripts for development mode and notepad mode, for example, without having to mess with configuration files all the time.
If that's already possible, I apologize.
Some PKGBUILDs: http://members.lycos.co.uk/sweiss3
Offline
I haven't actually tried using it yet, and I'm not sure whether it is already present or not, but is it possible to specify the wanted plugins from the command line?
This way you can have aliases/scripts for development mode and notepad mode, for example, without having to mess with configuration files all the time.
If that's already possible, I apologize.
Its not possible, but a neat idea, probably not too hard to implement, so I made a feature request:
http://sourceforge.net/tracker/index.ph … tid=843886
To do this right now, I would probably have a different configuration file for each "mode" you want to use. Since the config files are python modules themselves, you can have a config for each mode, and have them import any common functionality from a third file.
Dusty
Offline
Dusty,
Instead of having seperate config files for each mode, why not have a list of lists of modules in the one conf file. Something like this:
noteplugs = ["plug1", "plug2", "plug3"]
codeplugs = ["plug1", "plug4", "plug5"]
plugins = [noteplugs, codeplugs]
Then when the user puts in a command line switch pallavi can grab the specified one and load those plugins.
P.S. Still no themes, been a busier week than I thought.
Offline
I haven't decided if I like this idea or not. I'll have to think about it some more. It seems like its going to add unnecessary clutter somewhere, but I can't think of a more elegant way to do it off the top of my head. Right now I'm a bit indecisive about whether I should provide an integrated system for passing command-line arguments to plugins or not.
Now, since conversation here is once again getting a bit too technical and I don't want to abuse the arch linux forums, I've set up a mailing list for Pallavi: http://sourceforge.net/mail/?group_id=167671 Anybody interested in the editor is encouraged to subscribe, I don't think its going to be terribly high-traffic or anything.
Dusty
Offline
Another option would be adding an ability to specify the configuration module. This is probably the simplest way to implement.
EDIT: Err, you just said that. Sorry.
Some PKGBUILDs: http://members.lycos.co.uk/sweiss3
Offline
Another option would be adding an ability to specify the configuration module. This is probably the simplest way to implement.
that's done:
pallavi -c "path/to/your_config.py"
I needed it when testing so I didn't keep clobbering my personal configuration. :-D
Dusty
Offline
majikstreet@oreo:~/ffoxdownloads/Pallavi-0.2$ ./run-pallavi
/home/majikstreet/.gtkrc-2.0:2: Unable to find include file: "(null)/Clearlooks/gtk-2.0/gtkrc"
Traceback (most recent call last):
File "./run-pallavi", line 60, in ?
view = Views.View(pallavi_config, eventBus, actions)
File "/home/majikstreet/ffoxdownloads/Pallavi-0.2/pallavi/Views.py", line 38, in __init__
wx.Frame.__init__(self, None, size=configuration.window_default_size, title="Pallavi Text Editor", name="Pallavi")
AttributeError: 'module' object has no attribute 'window_default_size'
majikstreet@oreo:~/ffoxdownloads/Pallavi-0.2$
(ignore the GTK line)
*wonders* (this is from ubuntu btw)
I also tried it in windows (through a VM) and I got some error about not being able to import the config...
majikstreet
syd wrote:Here in NZ we cant spell words with more than 5 letters. So color will have to do.
You must be very special then because "letters" has 7
Offline
*wonders* (this is from ubuntu btw)
Interesting, I've run it on Ubuntu just fine. Have you run a previous version of Pallavi before? If so, I would suggest deleting ~/.pallavi and trying again. It looks like its not finding the configuration size in the module.
I also tried it in windows (through a VM) and I got some error about not being able to import the config...
Try passing the config directory directly:
./run-pallavi -c config
Alternatively, you can copy the config file somewhere in windows C:Documents and Settingssomething or other, I think, wherever python thinks $HOME is on Windows... I did have it running on Windows, but I had to fuss a bit and didn't test it much.
Dusty
Offline
it worked! (the .pallavi thing)
I built a windows exe for pallavi installation.. I'll go into the VM and upload it somewhere and tell you where it is here.. Also, the command has a _ in it instead of a -
I shall let you know if that works in windows.
Seemed to work in windows......
Windows exe: http://majikstreet.org/pallavi/Pallavi-0.2.win32.exe
syd wrote:Here in NZ we cant spell words with more than 5 letters. So color will have to do.
You must be very special then because "letters" has 7
Offline
Windows exe: http://majikstreet.org/pallavi/Pallavi-0.2.win32.exe
So you built this with python setup.py bdist_wininst? Did it install properly and create the correct site-config such that running pallavi doesn't give the config error?
Thanks for creating it, I'll upload it to sourceforge when I get the chance and credit you!
Dusty
Offline