PDA

View Full Version : PyGTKEditor


Khertan
08-27-2007, 10:46 AM
http://khertan.net/images/pygtkeditor1.png

PyGTKEditor is a text editor with a small screen footprint, fast syntax highlight based on GtkSourceView, fullscreen capable, regulars expressions search and many more other things specially designed for onboard developpers. PyGTKEditor was mainly an editor for python developper, but it s now open to all other language like c/c++, ruby, java, php and many more.

PyGTKEditor 2.0 is licenced under GPLv2 and work only with Chinook(ITOS 2008). This new version also require GtkSourceView and his binding for Python

PyGTKEditor 1.3.0 is licenced under GPLv2 and work with Chinook(ITOS 2008), Bora(ITOS 2007) and Gregale(ITOS 2006)

PyGTKEditor (http://khertan.net/softwares/pygtkeditor.php)

I'm open to any suggestions. :)

Aisu
08-28-2007, 06:25 AM
Yo!

I'd LOVE to try this out, but... I can't seem to find the download link... :)

Khertan
08-28-2007, 08:15 AM
Oups ... there is a problem with my web site ...

EDIT : Bug corrected. Thanks for the report.

Khertan
08-29-2007, 04:56 AM
A new version of PyGTKEditor is available (1.1.0).

CHANGES :

Many bugs fix and some improvements :

Bug fix : Launch toolbar button : pathfile was not quoted, so launching don t work with space in pathfile.
Bug fix : Recent Open menu refresh now correctly.
Bug fix : Parser are now working also when file contain unknow utf8 code.
Bug fix : close all windows by click on close button in the right hand corner does now register file to recents file
Optimization : copy/paste/cut do not relaunch syntax hilighting function for all the file, but only modified text.
Optimization : Better unsaved file handler
Feature : Added Open all menu item to open all files despite their location. Usefull to acces the home user directory and not home/MyDocs
Feature : Mac and Windows end line are now automatically converted to linux end line.

http://khertan.net/pygtkeditor.php

pipeline
09-01-2007, 01:10 PM
Khertan this looks like an excellent program. I have not had much time to use it but i think your program is one of the most valuable programs available.

Python/gtk is the closest thing the N800 has to a 'native' language and you have created a development environment for just that. You've got the gtk (not hildon) file browser which supports the full filesystem (not just home dir), you've got a 'Test/Run' command, and keyword highlighting.

I think the whole 'loading a VM with scratchbox dev environment' is really on neccessary for porting existing applications... new apps could much more easily be written in simply python/gtk script.

Not sure how much effort you are willing to continue development, but i would like to make some requests :

How difficult would it be to simulate a Python Repository within your program... perhaps on your website you could devote a Virtual directory for storing a library of python programs people could download/run and more importantly : view the source code for ideas about copy/pasting into their own programs. If you did not want to act as such an intermediary then others, including myself, could do this but might be good to just have 1 hardcoded repository at first.

Code clips : would be nice to store common used pieces of code to plug in to hombrew scripts. Each person could compile their own libraries... although possibly this could be web-enabled to pull from a http dir as well.

Glade? Dont know too much about this and this might be too much work for you but it could be another utility. I think Glade is a way to define screens layout using xml... a glade designer for n800 could allow you to layout a form by picking from a set of controls. This probably would not be wysiwyg but at least simple enough to see list of controls and properties (?) like control name and location.

Lastly, if you would be so kind could you recreate a simple example in Python script for invoking the GTK filechooserdialog (like your program uses in the open/all option) ? I have been trying to use the gtk.FileChooserDialog but have been unsuccessful. Perhaps a simple script to pick a file and message box the filename? Warning, the example i tried left the Dialog modal (wouldnt close) and it was system modal so i had to reboot to anything else (couldnt kill task).

Thanks again for this utility, even if you dont enhance it any further i think you have created a great utility to bring/unlock development capabilities on the 770/n800!

Khertan
09-06-2007, 11:06 AM
Hi,

I've just see your post. A bit late :)

How difficult would it be to simulate a Python Repository within your program... perhaps on your website you could devote a Virtual directory for storing a library of python programs people could download/run and more importantly : view the source code for ideas about copy/pasting into their own programs. If you did not want to act as such an intermediary then others, including myself, could do this but might be good to just have 1 hardcoded repository at first.

It's a great idea ... i ll thought about it when i ll get some times.

Code clips : would be nice to store common used pieces of code to plug in to hombrew scripts. Each person could compile their own libraries... although possibly this could be web-enabled to pull from a http dir as well.

I've ported a code snippet manager for maemo 'PySnippet'. You can found it on my web site too. But adding a pull/push to a web directory could be a good idea. But it will need some moderation. But why not ...

Glade? Dont know too much about this and this might be too much work for you but it could be another utility. I think Glade is a way to define screens layout using xml... a glade designer for n800 could allow you to layout a form by picking from a set of controls. This probably would not be wysiwyg but at least simple enough to see list of controls and properties (?) like control name and location.
Glade is coded in c ... and i don't have many time to port c application because i mainly code in the train. So i ven't all the library on my n800 to compile glade with gcc.

Lastly, if you would be so kind could you recreate a simple example in Python script for invoking the GTK filechooserdialog (like your program uses in the open/all option) ? I have been trying to use the gtk.FileChooserDialog but have been unsuccessful. Perhaps a simple script to pick a file and message box the filename? Warning, the example i tried left the Dialog modal (wouldnt close) and it was system modal so i had to reboot to anything else (couldnt kill task).

Hum ... how to say ... i'm at this time creating a small onboard packager and i have exactly the same problem ... the filechooser call is identical to the one on pygtkeditor. So i don't know why button ok and cancel doen't work. But i'm working on it, and once i ve the answer i ll post it. But you can cancel the dialog with the return hard key button.

Thanks again for this utility, even if you dont enhance it any further i think you have created a great utility to bring/unlock development capabilities on the 770/n800!


Thanks i'm happy that pygtkeditor is usefull for other people than me.

Ps : be carreful there are a bug on the syntax highlighter after the paste toolbutton. I ve fixed it for the next update wich will be available at last the 10 September.

Khertan
09-06-2007, 12:07 PM
Do you have close the dialog ?

With a dialog.destroy() after the dialog.run() ?

Because i ve forgotten this and this was my problem.

Khertan
09-10-2007, 06:02 AM
A new version of PyGTKEditor is available. It's mainly a bug fix release.

pipeline
09-10-2007, 07:18 AM
Thanks i'll try that later today, along with pysnippet and pygtkeditor update

Khertan
09-10-2007, 07:43 AM
Don't forget to try PyPackager once your dev is ready ;)

pipeline
09-10-2007, 07:55 AM
I just saw that.... that would be perfect...

I get this error on install of pypackager :
dpkg: error processing /var/tmp/pypackager-0.1.0.all.deb (--install):
trying to overwrite `/usr/share/applications/hildon/._pysnippet.desktop', which is also in package pygtkeditor

should i delete that file to workaround or is that a fix which goes in deb installer

Khertan
09-10-2007, 08:17 AM
Oups ... ****ing macosx' finder !!! Witch write ****ing hidden file everywhere !

I ll correct this when i ll get some times.

In fact it s a conflict with the package pysnippet ... so deleted the file will be useless.

pipeline
09-10-2007, 08:26 AM
k thx the world will just have to wait to admire my hello world :)

Khertan
09-11-2007, 04:01 AM
PyGTKEditor 1.1.2 is available. It s a package fix.
PyPackager 0.2.0 is available too :). Now PyPackager automatically remove macosx hidden file when making a package.

pipeline
09-11-2007, 06:49 AM
Thanks it installs now....

By the way what does the life preserver button/icon do in pygtkeditor? :)

Khertan
09-11-2007, 08:01 AM
Do you mean the help button ? (gtk-help)

It 's display the result of the dir command in python ...

select a piece of text like "gtk.Window" and it ll give you all the method of a gtk.Window :)

I would love to implement an help like in ipython. But 's it's not a priority.

For information you can increase and decrease text size with zoom+ and zoom- button :)

pipeline
09-11-2007, 11:09 AM
Ahh i see although i dont think that dir supports gtk objects.. still nice for python

The +- zoom is great! Didn't realize that was there.

Great program i've already recreated my simple test program to pick a file to launch with another.. the dlg.destroy worked great too.

I'll try to build up some good samples/snippets as i figure them out myself

pipeline
09-12-2007, 06:50 PM
This is the first app i am coding to build up my 'snippet' arsenal.

Its just a file runner so i can open any file with program like mplayer or leafpad (pygtkeditor doesnt support command line arguments?).

I'm a c# coder and this is my first program in python/gtk... but its copy/paste/run (correction: file save from browser.. then run) which is kinda new to maemo... but brings back nostalgia of older solid state computers with basic.

Hopefully theres something in there worth copy/pasting :) It uses the gtk file dialog, very simplistic use of gtk.ComboBoxEntry, and launching programs using os.system()

http://wardenclyffetower.com/MaemoFiles/SampleAssoc.txt

If someone sees anything wrong with it, let me know... wouldnt want someone to copy paste bad code.

Khertan
10-05-2007, 03:48 AM
PyGTKEditor has just been updated to :
1.2.0
Feature : create a new page on open if no page exist
Feature : jump to newly created page when a new page is created
Feature : added file menu item "save as"
Feature : goto line
Bug fix : osso note is now correctly displayed when launching pygtkeditor
Added : Package icon



pygtkeditor doesn't support command line arguments .... :( ... i ll do it in the next version :)

pipeline
10-05-2007, 11:20 AM
Great stuff.. thanks for continued enhancements... ill try this later

yep i noticed no command line arguments but since you support gtk filechooser i would only have use for that for editing hidden files or in directories.. not too common

Khertan
12-27-2007, 11:43 AM
PyGTKEditor has just been updated to Version 2.0.0 for Chinook only (sorry for IT2006 and IT2007 user i ll do my best).

It now use GtkSourceView and can hilight many language : ruby, sql, xml, css, html, java, javascript, perl, php, sh, gtkrc, awk, def, erlang, pascal, dtc, objc, haskel, c#, msil, chdr, hadock, yacc, vbnet, and more .... :)

It s a beta version and need that GtkSourceView is installed with his python binding. (Available on my website)

I ll try to do my best to create a repository with all in.

Fadsjeik
12-27-2007, 03:16 PM
Hi, I just tried installing. First installed LibGTKSourceView2-Common and then tried LibGtkSourceView2 from your website, however the second does not install. It does everything as normal, but then ends with installation failed. Did I do something wrong?

Khertan
12-27-2007, 03:30 PM
could you post the log from the journal ?

thx for your report

Fadsjeik
12-27-2007, 04:02 PM
Hi, the relevant line is:

dpkg: error processing /var/tmp/libgtksourceview2.0-0-2.0.0.armel.deb (--install):
trying to overwrite '/usr/lib/libgtksourceview-2.0.so.0', which is also in package libgtksourceview2.0-common
dpkg-deb: subprocess paste killed by signal (Broken pipe)

Khertan
12-27-2007, 05:07 PM
oups ... it seems there is a problem in my package ...
thanks ...

I ll post a new package tomorrow

Khertan
12-28-2007, 01:04 AM
Package fixed ... : you can found it here : http://khertan.net/downloads/Softwares/libgtksourceview2.0-common-2.0.1.armel.deb

Karel Jansens
12-29-2007, 09:14 AM
I tried out PyGTKEditor and it's a very nice editor.

One question though: Is it possible to enable wrap-to-screen when using higher zoom levels? I couldn't find how to do that.

Edit: I'm using a N800 on ITOS2007, so version 1.3.

conum
12-29-2007, 10:05 AM
How to save an edited file from filesystem (/usr/local/share/mis/google-search.xml) after editing it?
It doesn't work for me.
I then tried to open pygtkeditor in xterm after becoming root. There were some errors and aborting.
:confused:
edit: on N810 with newest os2008-update

Khertan
12-29-2007, 05:57 PM
One question though: Is it possible to enable wrap-to-screen
Not yet ... it should be available in the next release. With auto indent ...

How to save an edited file from filesystem (/usr/local/share/mis/google-search.xml) after editing it?
It doesn't work for me.
as this file isn't owned by your user ... it s normal that pygtkeditor can't save it.
But not that any message is displayed.
run pygtkeditor with it under root with 'run-standalone.sh pygtkeditor'

conum
12-30-2007, 06:37 AM
At first it worked, but after editing the xml-file (I changed google. com to google.de) the search applet didn't contain google-search anymore. In xterm I read this:
/home/user # run-standalone.sh pygtkeditor
/usr/lib/pygtkeditor/pygtkeditor:31: RuntimeWarning: Python C API version mismatch for module gtksourceview2: This Python has API version 1013, module gtksourceview2 has version 1012.
import gtksourceview2
Traceback (most recent call last):
File "/usr/lib/pygtkeditor/pygtkeditor", line 975, in cb_tb_undo
self.textview_list[self.notebook.get_current_page()].undo()
File "/usr/lib/pygtkeditor/pygtkeditor", line 162, in undo
undo_type_action = self.undo_type_action.pop()
IndexError: pop from empty list
Traceback (most recent call last):
File "/usr/lib/pygtkeditor/pygtkeditor", line 975, in cb_tb_undo
self.textview_list[self.notebook.get_current_page()].undo()
File "/usr/lib/pygtkeditor/pygtkeditor", line 162, in undo
undo_type_action = self.undo_type_action.pop()
IndexError: pop from empty list
Traceback (most recent call last):
File "/usr/lib/pygtkeditor/pygtkeditor", line 975, in cb_tb_undo
self.textview_list[self.notebook.get_current_page()].undo()
File "/usr/lib/pygtkeditor/pygtkeditor", line 162, in undo
undo_type_action = self.undo_type_action.pop()
IndexError: pop from empty list
Traceback (most recent call last):
File "/usr/lib/pygtkeditor/pygtkeditor", line 975, in cb_tb_undo
self.textview_list[self.notebook.get_current_page()].undo()
File "/usr/lib/pygtkeditor/pygtkeditor", line 162, in undo
undo_type_action = self.undo_type_action.pop()
IndexError: pop from empty list
/usr/lib/pygtkeditor/pygtkeditor:924: GtkWarning: gtksettings.c:965: an rc-data property "gtk-file-chooser-backend" already exists
dialog=hildon.FileChooserDialog(self, "save")
python[1378]: GLIB DEBUG ConIc - con_ic_connection_send_event(0x35cc10, Zuhause, WLAN_INFRA, 0)
/usr/lib/pygtkeditor/pygtkeditor:927: GtkWarning: gtk_tree_model_filter_row_has_child_toggled: assertion `elt->visible' failed
if(dialog.run()==gtk.RESPONSE_OK) and (dialog.get_filename()!=None):
LOCATION_PRESSED 1
/root/.osso/hildon-fm: Failed to create file '/root/.osso/hildon-fm.WY9B4T': No such file or directory
/root/.osso/hildon-fm: Failed to create file '/root/.osso/hildon-fm.8BV93T': No such file or directory

conum
12-30-2007, 06:51 AM
After that I tried to create a new file, but couldn't put it in filesystem (/usr/share/mis/...), as there are only the "open" directories to be seen.

dont
12-30-2007, 10:09 PM
Is there a way to edit hidden files in pygtkeditor?

I am trying to edit /home/user/.mozilla/microb/prefs.js but cannot get pygtkeditor to see the .mozilla directory.

TIA.

pipeline
01-06-2008, 06:04 PM
Khertan, can you add something like this to the end of the __init__ function (line 433 for me) :


argcount=0

for arg in sys.argv:
argcount = argcount + 1
if (argcount > 1):
self.open_file(arg)


(Edit : thanks cripes)

That would allow me to launch pygtkeditor with filename on command line and open it automatically.

cripes
01-06-2008, 06:28 PM
use the code tags


for arg in sys.argv:
argcount = argcount + 1
if (argcount > 1):
self.open_file(arg)

Khertan
01-07-2008, 03:18 AM
Thx for your patch,

I ll add this to the next release, as open from filemanager too.

ps : to report bug or new idea you can report it on my bug tracker. I'm noticed by email each time something is report ... (as i don't read itt every day).

Thanks

pipeline
04-10-2008, 06:28 PM
Not sure when it was added but open from command line works good now... thanks :)

Can you add or fix the preferences so that the default language setting is remembered?

If i change the default language setting in preferences it won't remember it.

Khertan
04-11-2008, 03:11 AM
If i change the default language setting in preferences it won't remember it.

I know, it s the last thing i try to fix for the next release ... but gtk combobox make me crazy !!! Stupid implementation !

pipeline
04-11-2008, 07:17 AM
Heh yea well if its any easier maybe you can just add code to auto switch based on extension (when they open a file) like :

when open file if filename.endswith()
.cs -> setlanguage c-sharp
.c -> setlanguage c
.cpp -> setlanguage cpp
.java -> setlanguage java
.sh -> setlanguage sh
.html -> setlanguage html

Khertan
04-11-2008, 12:44 PM
It s the case (maybe in 2.2.0) ... but ... if extension is not know ... it use the default language.

cmdowns
04-11-2008, 01:29 PM
Hello, can someone please tell me which apps are required in order to install the PyGTKEditor? From perusing the thread, it seems like I need:

python-pygtksourceview-2.0.0.armel.deb
libgtksourceview2.0-common-2.0.1.armel.deb
libgtksourceview2.0-0-2.0.0.armel.deb

I found and dl'ed them from Khertan's site, but I can't get any of them to install. So I guess I'm missing something else. Chances are it's something really basic that I should know about, but am too much of a noob to figure out.

Any help would be appreciated.

pipeline
04-11-2008, 01:50 PM
Hello, can someone please tell me which apps are required in order to install the PyGTKEditor? From perusing the thread, it seems like I need:

python-pygtksourceview-2.0.0.armel.deb
libgtksourceview2.0-common-2.0.1.armel.deb
libgtksourceview2.0-0-2.0.0.armel.deb

I found and dl'ed them from Khertan's site, but I can't get any of them to install. So I guess I'm missing something else. Chances are it's something really basic that I should know about, but am too much of a noob to figure out.

Any help would be appreciated.

What errors are shown in the application manager log? (Tools/Log...)

You do have python runtime installed right?

cmdowns
04-11-2008, 04:39 PM
What errors are shown in the application manager log? (Tools/Log...)

You do have python runtime installed right?

Hmmmm . . .I don't see runtime anywhere in my app manager. I must not have it installed. I'll need to wait till I get home to install it. Maybe that is what I've been missing.

codeMonkey
06-08-2008, 04:36 PM
Hello

I'm having some problems re-installing pygtkeditor from the repository.
One of the dependencies of python-pygtksourceview in http://repository.maemo.org/extras/dists/4.0/free/binary-armel/Packages is "libxml2juuiiii" - which looks suspect - I believe it's supposed to be just libxml2, but can't get around this at the moment.

From the repository:

Package: python-pygtksourceview
Priority: Optional
Section: user/other
Installed-Size: 163
Maintainer: Benoit HERVIER <khertan@khertan.net>
Architecture: armel
Version: 2.0.0
Depends: libatk1.0-0 (>= 1.12.2), libc6 (>= 2.5.0-1), libcairo2 (>= 1.4.10), libglib2.0-0 (>= 2.12.12-1osso3), libgtk2.0-0 (>= 2:2.10.12-0osso15), libgtksourceview2.0-0 (>= 1.90.4), libpango1.0-0 (>= 1.16.4), libxml2juuiiii
Filename: pool/chinook/free/p/python-pygtksourceview/python-pygtksourceview-2.0.0-1_armel.deb
Size: 28264
MD5sum: 2be8983adf40464088538fefa2c6c2dd
SHA1: 9843df1449998a5b33f947d10d7864b14f11c7a9
SHA256: 5ed0942ab54523cff6f16bbab36b574348ac6569a32e2d82d5 b983b493531446
Description: python bindings for the version 2 of the GtkSourceView library
GtkSourceView is a text widget that extends the standard GTK+ 2.x text widget GtkTextView. It improves GtkTextView by implementing syntax highlighting and other features typical of a source editor.

Can anyone help?

codeMonkey
06-08-2008, 04:49 PM
Never mind - I've managed to get around it by manually editing my dpkg status database and the cached repository info to change the libxml2juuiiii to libxml2 and it's installed. :)

stale
06-08-2008, 07:32 PM
Never mind - I've managed to get around it by manually editing my dpkg status database and the cached repository info to change the libxml2juuiiii to libxml and it's installed. :)

I have the same problem, maybe there is something to fix on the repository?

codeMonkey
06-09-2008, 02:32 AM
Yep, it certainly looks that way.

coleargol
06-11-2008, 02:01 AM
codeMonkey, can you explain me the manual editing you have made ? Do you have modified some files in /var /lib/dpkg ?

Thanks

codeMonkey
06-11-2008, 02:45 AM
Sure thing, apologies if any of this is too dumbed down.

I uninstalled pygtkeditor and python-pygtksourceview completely first.

You'll need to do the below as root so be careful.
Please make a backup of the below files first - just in case.

Then I had to edit:
/var/lib/apt/lists/repository.maemo.org_extras_dists_chinook_free_bin ary-armel_Packages
and
/var/lib/dpkg/status

(You can get the info for these by typing 'apt-cache showpkg python-pygtksourceview' as root in your terminal)

Search for the entry for python-pygtksourceview.
It's "Depends:" line lists libxml2juuiiii, change this to libxml2 in both of the files.

After you've done this, don't update the application list or it'll overwrite your changes.

Then install pygtkeditor. After it's installed, don't upgrade the python-pygtksourceview package or you'll be back to square one.

coleargol
06-11-2008, 05:55 PM
Thanks a lot for your help.
It works fine now, but I've had to install the 2.1 via the Kertan site, then to upgrade with the Application Manager... Direct install with the repository don't work.

Khertan
06-12-2008, 05:47 AM
I'm sorry it was a mistake i've made just before my n8x0 was sent to the Nokia Repair Center, now that it come back i ll be able to fix this once i ve have reinstalled my tools.

ferika
06-25-2008, 05:32 AM
@Khertan
Hi!
Yesterday i tryed to test PyGTKEditor from Maemo downloads, but the prob's with the lib are still actual. I wish install that editor from your site, but i still do not know what all i need to instal it. Like before:

Originally Posted by cmdowns View Post
Hello, can someone please tell me which apps are required in order to install the PyGTKEditor? From perusing the thread, it seems like I need:

python-pygtksourceview-2.0.0.armel.deb
libgtksourceview2.0-common-2.0.1.armel.deb
libgtksourceview2.0-0-2.0.0.armel.deb

I found and dl'ed them from Khertan's site, but I can't get any of them to install. So I guess I'm missing something else. Chances are it's something really basic that I should know about, but am too much of a noob to figure out.

Any help would be appreciated.

... what of this, may be more i need to instal it properly. Pls.

Thank you,
Feri

ferika
06-26-2008, 07:24 AM
Attention! I answer me myself!

Ok, i have installed it! From the Khertan's site i have downloaded pygtkeditor-2.1.0.all.deb - then i have dobleclicked it - and the application manager says to me, it were something others needed - but this "something" is described true and is on the Khertan's site to find too.
Also, i try first download and then install the needed file - python-pygtksourceview-2.0.0.armel.deb, then after it the pygtkeditor-2.1.0.all.deb. No error message, no prob's, all ok, the editor application is to find under menue in Extras and work very good. (I have made only simply changes on navit.xml, but the syntax highlighting, and other features of the editor looks very good.)

Please, important - not automaticaly installed, not from Maemo site, but downloaded directly from Khertan's site and with simply "windows " doubleclick installed on the N800.

Best thanks to autor and the other peaople, they have been working on this soft.
Feri

econprof
07-10-2008, 12:59 PM
I have libgtksourceview2.0-common (v 2.0.1), libgtksourceview2.0-0, python-pygtksourceview (v 2.0.0), and pygtkeditor (v 2.1.0). The last two packages were installed directly from khertan.net. All seemed to install successfully.

I can't get pygtkeditor to run. Running from the command line, I get a message:

Traceback (most recent call last):
File "/usr/lib/pygtkeditor/pygtkeditor", line 17, in ?
import gtk
ImportError: No module named gtk

Any idea what I am missing?

Thanks.

Lee
07-11-2008, 03:12 PM
It sounds like you are missing pygtk. As a test you can go into the 'x terminal' and enter 'python'. When python shell starts (you will see the '>>>' prompt) then type 'import gtk' and see if there are errors. If you are missing pygtk, try installing an application that uses pygtk should install the dependency. Not sure which programs will do that (I have lot of applications already installed so it is hard to tell).

PyGTKEditor has weird dependency problems, I had python25-gtksourceview installed and pygtkeditor wouldn't install with it, so I edited the pygtkeditor deb data files to remove the dependency and it installed and worked perfectly.

Lee
07-11-2008, 03:17 PM
You can try to install one of these maybe :

http://repository.maemo.org/extras/pool/diablo/free/p/python-gtk2/

econprof
07-11-2008, 04:44 PM
It appears that I had python2.4 installed as well as python2.5. Running python, I could not import gtk; but running python2.5, I could.

I uninstalled python2.4, but this doesn't solve the problem. Running pygtkeditor now gives me a message, "...python: not found."

I tried uninstalling and reinstalling pygtksourceview and pygtkeditor, but that didn't help.

Do I have to reinstall python? And reinstall all applications that depend on it?

Thanks.

econprof
07-11-2008, 05:06 PM
OK, I created python as a link to python2.5. Now pygtkeditor works from the command line. I get a message about a version mismatch with gtksourceview2 (1013 vs 1012), but that doesn't seem to cause any problems. The program doesn't run from the menu; I'll have to figure that out.

Thanks for your help.

taimishu23
07-17-2008, 12:47 PM
Then I had to edit:
/var/lib/apt/lists/repository.maemo.org_extras_dists_chinook_free_bin ary-armel_Packages
and
/var/lib/dpkg/status

(You can get the info for these by typing 'apt-cache showpkg python-pygtksourceview' as root in your terminal)

Search for the entry for python-pygtksourceview.
It's "Depends:" line lists libxml2juuiiii, change this to libxml2 in both of the files.

After you've done this, don't update the application list or it'll overwrite your changes.

Then install pygtkeditor. After it's installed, don't upgrade the python-pygtksourceview package or you'll be back to square one.

Hi codeMonkey,

How did you do the editing on these readonly lists? I've been toying around with VIM for the past hour but haven't been able to save any of the changes (or delete text for that matter). me <- not very good with terminal based text editing.

Thanks.

xopher_mc
07-20-2008, 06:48 PM
you need to be root to edit it. Also you should try nano to edit the file

codeMonkey
07-21-2008, 04:37 AM
From what I've seen, Khertan has fixed the problem so you shouldn't have to do the editing now anyway.

xopher_mc
07-21-2008, 05:47 AM
Hi codemonkey,

I tried downloading the file of the web page and from the repo. Had to edit the python interpreters dependencies (as mentioned earlier in this thread) to get it to install.

ps- its a great program

codeMonkey
07-22-2008, 08:58 AM
Yeah, I just checked myself, the repository is still referring to libxml2juuiii or something.
Glad that you got it working, hopefully Khertan will update the info at some point soon.

Khertan
07-22-2008, 10:58 AM
In fact the last version in repository don't referring to libxml2juuiii, but for some reason that i need to understand, Application Manager try to install a more older version from the repository .... ? ??

As you know upload to extras repository have some changes since Diablo, and i'm mainly working on this. And it should be available soon.

Thx

renanholanda
07-23-2008, 08:33 PM
Hi, I bought the N810 cuz I am trying to learn how to program, this way I would be able to practice anywhere.. I downloaded the pyGTKEditor and installed it,under edit>language I can choose what language I wanna code on right(which is C or C++)?? but then how do I compile it and run it on the N810(everything is being done on the n810), I played around a little on windows dev-c development environment and there once I am done writing the code I just push F9 it compiles and then F10 it runs and I see if what I did works or not.. so my question basically is once I am done how do I run it on the N810??is there a manual on that?? I stil havent figured out what each button on the bottom is for... Thanks for the help.. sorry for being a noob...

Khertan
07-24-2008, 08:23 AM
PyGTKEditor as his name say is an editor, not an IDE. So if you want to compile c code, install gcc and launch it from xterm.

of course interpreted language doesn't need this step.

For example create a python programm and click on the execute button. It ll be launched in a new xterm.

renanholanda
07-24-2008, 04:10 PM
so I guess it would be better if I chose python as my first programming language then, right? I mean, this way I would not have to go the extra steps to program on C... thanks again!

josiahg777
07-24-2008, 04:17 PM
Hmmm yeah, probably. There's a thread here called something like "getting started with python on maemo" that had a bunch of good resources to start programming in python :)

Omega
08-06-2008, 08:33 PM
I just tried installing pygtkeditor from the repository and have had no luck. It appears to be focing dependencies on flash-and-reboot amongst other things...

I'm wondering if this has something to do with the fact that I have a chinook repository stil set up? I've since removed it and now pygtkeditor is gone :(

I think the repository situation is in a bit of a mess. I did manage to get python installed though, which is a plus. No knowing how long that will last now that I've removed that repo though. Hopefully it didn't come from there...

Anyone able to help?

gowen
08-07-2008, 04:05 AM
I've just reflashed my N810 and wanted to reinstall pygtkeditor, but didn't want to have the python-pygtksourceview package permanently shown in the update list of package manager. So I created a dummy installer for libxml2juuiiii using pypackager that has libxml2 as a dependency. The package is very small as it only contains a text file with a short line of text.

With this installed the other missing dependencies (flash-and-reboot, etc) vanish and pygtkeditor can be installed solely from within application manager.

I've only tried it on the one tablet. Hopefully it will work for you.

abw
08-29-2008, 02:39 PM
I just installed pygtkeditor for writing latex docs. It's a nice package. Thanks for contributing it.

Does the "save/save as" dialog box jump around for other people, too? Also, is it possible to put it in fullscreen mode, or to increase the size of the font? Thanks in advance.

Crimson_Orguss
10-20-2008, 02:24 AM
Hi there everyone.
I was wondering if you guys (N810 users (DIABLO)) are having trouble with the Auto Indent feature in PyGTKEditor , specifically in v2.2.0 ?

Oh , abw , my save dialog box was jumping around but then I did something, I think it was the browse folder button which I clicked and then it was all good :)

It looked more like the screen was refreshing every line on the screen much slower and every new line that was refreshed was offset.

abw
10-25-2008, 12:39 AM
Hi there everyone.
I was wondering if you guys (N810 users (DIABLO)) are having trouble with the Auto Indent feature in PyGTKEditor , specifically in v2.2.0 ?


I'm not sure a lot of people read this thread, so I'll respond. I don't use that feature (I'm writing latex), so I can't help on that.


Oh , abw , my save dialog box was jumping around but then I did something, I think it was the browse folder button which I clicked and then it was all good :)


Thanks for the hint. I'll look into this.

Does anyone know how to change the font size? It's tiny.

shanti
10-25-2008, 07:50 AM
Does anyone know how to change the font size? It's tiny.

May be CTRL+ will help. Also I slightly change PyGtkEditor code in file /usr/lib/pygtkeditor/codeeditor.py:
you can locate lines where using code pango.FontDescription and there change definitions from "Monospace"+str(self.font_size) to "Monospace Bold "+str(self.font_size). It can increase readability very well!

Khertan
10-28-2008, 07:38 AM
You can use zoom in / out for size of font.

lcuk
10-28-2008, 07:53 AM
mmmmmmmmm py..GTKeditor

when can we expect pyQTeditor or pyLIQeditor ;)

TokyoDan
11-09-2008, 04:32 AM
Wow! 2.2.0? I'm using 1.3.0 and I just downloaded it from Maemo.org. Why did I get such an old version? Anyway it doesn't have auto-indent. I'm running Diablo on an N810.

Hi there everyone.

I was wondering if you guys (N810 users (DIABLO)) are having trouble with the Auto Indent feature in PyGTKEditor , specifically in v2.2.0 ?

Oh , abw , my save dialog box was jumping around but then I did something, I think it was the browse folder button which I clicked and then it was all good :)

It looked more like the screen was refreshing every line on the screen much slower and every new line that was refreshed was offset.

tz1
11-09-2008, 07:36 PM
I can't seem to get pygtksourceview - the downloads link on Khertan.net simply repaints the same page, and I get "forbidden" when I try to view the directories.

Can anyone post a COMPLETE set of links to the debs that I need to download manually first to get this working?

TokyoDan
11-09-2008, 07:59 PM
Hope this helps tz1. Let me know if it does...

This is where u can download the files: http://www.khertan.net/downloads.php

The files u need are:

1. libgtksourceview2.0-common-2.0.0.armel.deb
2. libgtksourceview2.0-0-2.0.0.armel.deb
3. python2.5-pygtksourceview-2.0.0-4_armel.deb
4. pygtkeditor-2.2.0-4_all.deb

I think that's the order u need to download and install them. 1 and 2 order might be reversed though. I got pyGTKEditor 2.2.0 installed and running by working BACKWARDS starting by dloading and installing 'pygtkeditor-2.2.0-4_all.deb' which failed because of a missing file.

I wrote down the missing file name, dloaded and installed it which again failed to install because of a different missing file.

I wrote down that missing file name, dloaded and installed ..... again, again in this sequence until I got to a file that installed correctly - 'libgtksourceview2.0-common-2.0.0.armel.deb' (I think). Then I continued FOEWARDS in the proper sequence.

Also pyGTKEditor 2.2.0 auto-indent feature is working on my Diable N810.

skatebiker
11-16-2008, 04:50 AM
[[This is where u can download the files: http://www.khertan.net/downloads.php]]
This page issues a 404 error.

Where can I find the files now ?

TokyoDan
11-16-2008, 08:13 AM
I have no idea. It worked when I sent u the message because I just installed it that day but something's changed at that website.

cripes
11-20-2008, 03:46 PM
yo khertan! I flashed to the latest Diablo and conveniently found pygtkeditor in the maemo extras repo, but I get package dependency errors (specific versions of kernel/system level packages + the missing libxml2juuiiii that others have reported). any workarounds or timeline for an update that will work with the latest OS?

cripes
11-21-2008, 10:16 AM
never mind. I found the hack provided by gowen a couple of pages back:
http://www.internettablettalk.com/forums/showpost.php?p=211110&postcount=69

would still be nice to get an update (nudge nudge)

bedii
12-29-2008, 09:45 AM
For those of us that don't want to have to learn PyPackager, could someone make this hacked file available for download? Thanks!

Khertan
12-30-2008, 03:52 AM
Hello,

Sorry for that trouble, the main problem to have pygtkeditor in repository is that i don't have the time to sit in front of my computer to successfully make a source package of gtksourceview for the maemo extras repository autobuilder.

FRZ
01-13-2009, 04:48 PM
problem installing: Application packages missing: libxml2juuiiii. Where do I get that from? Thanks

steffen800
03-07-2009, 07:17 AM
is this application (pygtkeditor) died? wanted to try it out but link on website is down. is there any other useful on-tablet python editor? (useful for me:highlighting,code-completion)
thanks,steffen

manda
03-07-2009, 11:15 AM
Try this PyGTKEditor (http://khertan.net/software_info.php?soft=PyGTKEditor)

steffen800
03-07-2009, 04:02 PM
i did (already), but:
"The requested URL /downloads/Softwares/pygtkeditor-2.1.0.all.deb was not found on this server."
sneaking in http://khertan.net/downloads/ shows that all directories are empty (including Maemo), except for this one:Unmaintained. and there is a file named pygtkeditor-1.2.0.all.deb. newest version seems to be 2.1 but is not available. or this a type missmatch (1.2.0 vs. 2.1.0)?

steffen800
03-07-2009, 04:15 PM
looking on this site http://maemo.org/downloads/product/OS2008/pygtkeditor/ shows me that the link was dead since at least 11/2008 (according to last message left there).
its realy a pity 'cause it sounds like what i was looking for.
i continue my search probably finishing in using an ordinary editor like leafpad .

steffen800
03-07-2009, 04:39 PM
found some links by googling and, good news, there is even a newer version than 2.1:
http://repository.maemo.org/extras/pool/4.0/free/p/python-pygtksourceview/python-pygtksourceview-2.0.0-4_armel.deb
http://repository.maemo.org/extras/pool/4.0/free/p/pygtkeditor/pygtkeditor-2.2.0-4_all.deb
i i'll try this

steffen800
03-07-2009, 05:13 PM
got it installed by installing those debs:
http://repository.maemo.org/extras/pool/4.0/free/libg/libgtksourceview2.0-common/libgtksourceview2.0-common-2.0.1-2_armel.deb
http://repository.maemo.org/extras/pool/4.0/free/libg/libgtksourceview2.0-0/libgtksourceview2.0-0-2.0.0-2_armel.deb
http://repository.maemo.org/extras/pool/4.0/free/p/python2.5-pygtksourceview/python2.5-pygtksourceview-2.0.0-4_armel.deb
http://repository.maemo.org/extras/pool/4.0/free/p/pygtkeditor/pygtkeditor-2.2.0-4_all.deb
now i have a look at it

dwforslund
03-19-2009, 11:40 AM
This did the install for me just fine. However, the application manager says that there is an update for pygtkeditor of version 2.2.0 (the same as the installed version) but that it can't be updated because the package python-pygtksourceview is missing. But I just installed it. What is going on?

steffen800
03-20-2009, 05:08 AM
probably a repository list problem. e.g. you should have no entries for diablo and chinook pointing to same repository. i just installed the debs above and app manager had nothing to mention. but i only have very few repositories, not those long lists as i have seen here often.

kkkkkbruce
03-29-2009, 04:12 PM
Wow, i inally got v 2.2 installed using the application manager! i had to read allmost the entire thread tho. at last the dummy lib file posted earlier in this fixed the depenency problems. thanks, it looks like it will be a great program!!

Cue
11-17-2010, 11:22 AM
Khertan I don't know if this project is still active but there are a few caveats which make this kind of difficult to use sometimes.

Any filenames with spaces I cannot open since it completely ignores quotes and escape characters on the commandline. The other is that pygtkeditor does not show on the "open with" menu. So I'm often forced to use other editors in these situations.

Khertan
11-17-2010, 11:37 AM
Hi !

This project isn't really alive.

If you are using a n900 or Maemo5 i ll suggest you to try KhtEditor which is a rewrite from scratch in Qt of PyGTKEditor much faster much better. But still in dev :) (http://khertan.net/khteditor). Available in extras-devel repository for the moment.

If you are still using Maemo 4. Maybe i should take a look to patch it, as from what i remember the 2.x line can open file with space in name from the command line, and i didn't have any problem on my n810 to open a file from the file manager.

fpp
11-17-2010, 11:38 AM
What are you using PyGtkEditor on ? If it's on N900/Maemo5, there is now KhtEditor,also from Khertan, which is the currently maintained version.

Cue
11-17-2010, 12:33 PM
Thanks khertan and fpp. Sorry, I should have pointed out that I'm using an N900. I'll give KhtEditor a go.

davide
11-20-2010, 05:47 AM
can anyone help me?

I often start pygtkeditor from terminal.
when I try to change settings I can see this in terminal:
~ $ pygtkeditor
python
Error in sys.excepthook:
Traceback (most recent call last):
File "/home/opt/pygtkeditor/pge_report.py", line 23, in my_excepthook
formatted_text = "%s Version %s\nTrace : %s\nComments : " (str(APP_NAME), str(APP_VERSION), s)
TypeError: 'str' object is not callable

Original exception was:
Traceback (most recent call last):
File "/home/opt/pygtkeditor/pge_window.py", line 492, in menu_button_clicked
prefs.edit(self)
File "/home/opt/pygtkeditor/pge_preferences.py", line 100, in edit
w_font.set_active(font_names.index(self.prefs_dict['font_name']))
ValueError: list.index(x): x not in list

The problem is that no more settings is available.


I also tried to install ktheditor but some application missing and conflict with pakages made it impossible.

PR1.2 is my firmware(i think...) since no update was possible directly from app manager neither ovi suite....:(
thanks for any suggestion.