Core dumps from simple programs was Re: [pygtk] Gnome 1.4 breaks my program!
Me too, I had perfectly running pygnome apps (real simple ones) and now they simply dump core at startup. Anyone knows about this? On 30 Apr 2001 17:23:45 +0200, Michele Campeotto wrote: Does anybody can give me an hint? Is this a problem with my software, with PyGtk+ or with something else? This happens on Debian 2.2 / Ximian Gnome 1.4 / python-gnome-1.4.0 Thanks, Michele Inizio trasmissione messaggio: Date: Sun, 29 Apr 2001 12:45:40 -0400 From: Michael Kohler [EMAIL PROTECTED] To: [EMAIL PROTECTED] X-Mailer: bug-buddy 2.0.1 Subject: Moleskine can not run on Gnome 1.4 Package: general Severity: blocker Version: 0.6.5 Synopsis: Moleskine can not run on Gnome 1.4 Bugzilla-Product: general Bugzilla-Component: general Description: This crash occurs upon starting moleskine, either from the menu or the command line. To reproduce this bug, try and run moleskine on gnome 1.4. Debugging Information: (no debugging symbols found)...[New Thread 1024 (LWP 3263)] 0x4010a869 in __wait4 () from /lib/libc.so.6 #0 0x4010a869 in __wait4 () from /lib/libc.so.6 #1 0x401761c8 in __DTOR_END__ () from /lib/libc.so.6 #2 0x4003170a in waitpid (pid=3264, stat_loc=0xb0a0, options=0) at wrapsyscall.c:174 #3 0x405f228a in gnome_segv_handle (signum=11) at gnome-init.c:659 #4 0x4002f329 in pthread_sighandler (signo=11, ctx={gs = 0, __gsh = 0, fs = 0, __fsh = 0, es = 43, __esh = 0, ds = 43, __dsh = 0, edi = 1080353524, esi = 1079675192, ebp = 3221221976, esp = 3221221952, ebx = 1079522624, edx = 0, ecx = 1, eax = 1079675192, trapno = 14, err = 7, eip = 1079396987, cs = 35, __csh = 0, eflags = 66118, esp_at_signal = 3221221952, ss = 43, __ssh = 0, fpstate = 0xb1c0, oldmask = 2147483648, cr2 = 1079675192}) at signals.c:97 #5 signal handler called #6 0x40564a7b in PyGnome_UISignalConnect () from /usr/lib/python1.5/site-packages/_gnomeuimodule.so #7 0x405a9f71 in create_menu_item (menu_shell=0x82ab580, uiinfo=0x4064e2f4, is_radio=0, radio_group=0x0, uibdata=0x40581450, accel_group=0x827f788, uline_accels=1, pos=0) at gnome-app-helper.c:1153 #8 0x405aa750 in gnome_app_fill_menu_custom (menu_shell=0x82ab580, uiinfo=0x4064e2f4, uibdata=0x40581450, accel_group=0x827f788, uline_accels=1, pos=0) at gnome-app-helper.c:1457 #9 0x405a9a66 in create_menu_item (menu_shell=0x82ab580, uiinfo=0x81e3050, is_radio=0, radio_group=0x0, uibdata=0x40581450, accel_group=0x827f788, uline_accels=1, pos=0) at gnome-app-helper.c:986 #10 0x405aa750 in gnome_app_fill_menu_custom (menu_shell=0x82ab580, uiinfo=0x81e3050, uibdata=0x40581450, accel_group=0x827f788, uline_accels=1, pos=0) at gnome-app-helper.c:1457 #11 0x405aa7d8 in gnome_app_fill_menu_custom (menu_shell=0x81e38d8, uiinfo=0x81e2840, uibdata=0x40581450, accel_group=0x827f788, uline_accels=1, pos=4) at gnome-app-helper.c:1472 #12 0x405aaded in gnome_app_create_menus_custom (app=0x8271780, uiinfo=0x81e2840, uibdata=0x40581450) at gnome-app-helper.c:1647 #13 0x40565616 in _wrap_gnome_app_create_menus () from /usr/lib/python1.5/site-packages/_gnomeuimodule.so #14 0x80547a8 in PyEval_CallObjectWithKeywords () #15 0x80546ad in PyEval_CallObjectWithKeywords () #16 0x805368a in PyEval_EvalCode () #17 0x8053568 in PyEval_EvalCode () #18 0x8054ad1 in PyEval_CallObjectWithKeywords () #19 0x805469f in PyEval_CallObjectWithKeywords () #20 0x8068b17 in PyInstance_New () #21 0x80546ad in PyEval_CallObjectWithKeywords () #22 0x805368a in PyEval_EvalCode () #23 0x805154e in PyEval_EvalCode () #24 0x8061698 in PyRun_File () #25 0x8060d41 in PyRun_SimpleFile () #26 0x804fde8 in Py_Main () #27 0x40075b5c in __libc_start_main (main=0x804f87c main, argc=2, ubp_av=0xb984, init=0x804ee50 _init, fini=0x80891cc _fini, rtld_fini=0x4000d634 _dl_fini, stack_end=0xb97c) at ../sysdeps/generic/libc-start.c:129 #0 0x4010a869 in __wait4 () from /lib/libc.so.6 No locals. #1 0x401761c8 in __DTOR_END__ () from /lib/libc.so.6 No symbol table info available. #2 0x4003170a in waitpid (pid=3264, stat_loc=0xb0a0, options=0) at wrapsyscall.c:174 stat_loc = (int *) 0xb0a0 options = 0 result = 0 oldtype = 0 #3 0x405f228a in gnome_segv_handle (signum=11) at gnome-init.c:659 estatus = 1075268240 in_segv = 1 pid = 0 #4 0x4002f329 in pthread_sighandler (signo=11, ctx={gs = 0, __gsh = 0, fs = 0, __fsh = 0, es = 43, __esh = 0, ds = 43, __dsh = 0, edi = 1080353524, esi = 1079675192, ebp = 3221221976, esp = 3221221952, ebx = 1079522624, edx = 0, ecx = 1, eax = 1079675192, trapno = 14, err = 7, eip = 1079396987, cs = 35, __csh = 0, eflags = 66118, esp_at_signal = 3221221952, ss = 43, __ssh = 0, fpstate = 0xb1c0, oldmask = 2147483648, cr2 = 1079675192}) at signals.c:97 self = 0x40038280 in_sighandler = 0x0 self =
Updated response was Re: [pygtk] Autocompletion help (code anyone?)
The correct module to look at for example is the rlcompleter.py module. It is an example of using the set_completer function from readline module. On 08 Feb 2001 17:17:42 -0500, LF11 wrote: I'm having a hell of a time trying to put together GtkEntry auto-completion code. How do I go about doing this, and *especially* does anyone have code examples? By auto-completion, I mean the program takes what you've entered, tries to find a suitable match, and adds its guess into the GtkEntry. The program's guess is selected, so when the user types another character, the guess is deleted and the program tries again with the new user input. Thank you Very Much! -lf11 ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Hassan Aurag CAE Electronics Ltd. Aircraft Systems Specialist - Update Group Email: [EMAIL PROTECTED] Everyone is a genius. It's just that some people are too stupid to realize it.
Re: [pygtk] Spam problems...
[EMAIL PROTECTED] wrote: [...] Do we need to start moderating the list? I would gladly help moderating the list if there is a wish for people doing so, and if there are more people than me doing so. (The amount of posts are after all so few that moderating this list will take a maximum of 2 minutes per day. :) How are the messages getting here? Does the list only accept messages from subscribed members? If not, it should --- this is the best way of preventing spam. I'm sure Mailman should do this. -- +- David Given ---McQ-+ "[SF is not about predicting the future.] | Work: [EMAIL PROTECTED] | We are not prophets; in fact, if we were | Play: [EMAIL PROTECTED] | much worse at it, we'd be economists." --- +- http://wired.st-and.ac.uk/~dg -+ Stephen Dedman ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk The basic behind enabling posting from non-members was to avoid having legitimate mails from legitimate subscribers refused because they use a different from address (like when you have many accounts). But maybe this should be revised if spam keeps getting up this fast begin:vcard n:Aurag;Hassan x-mozilla-html:FALSE org:CAE Electronics Ltd. adr:;; version:2.1 email;internet:[EMAIL PROTECTED] title:Simulator Update Specialist x-mozilla-cpt:;0 fn:Hassan Aurag end:vcard
Re: Got the solution was Re: [pygtk] A few quickies (IMPORTANT)
Can't say I am not waiting. It's a pity GtkText is so bad and your bindings are so easy to use. On 4 Nov 2000, Hassan Aurag wrote: Ok here is the deal: The text showing weirdly is realted to font choice as I discovered today. Using fixed fonts corrected the problem. It's weird as far as I am concerned but this is how it works. As for the position part, it was my mistake as I also discovered today. I forgot to count newlines when scrolling to that position. This is one of the places where the new text widget, it is much easier to navigate through the text buffer using GtkTextIter objects. James. -- -- -- Hassan Aurag -- CAE Electronics Ltd | Universite de Montreal System update specialist| Centre de Recherches Mathematiques ++ Maximum Linux Magazine | Universite de Montreal Contributing Editor | Departement de Maths/Stat ++ EMAIL: [EMAIL PROTECTED], [EMAIL PROTECTED], -- -- My nose feels like a bad Ronald Reagan movie ... -- ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk
Got the solution was Re: [pygtk] A few quickies (IMPORTANT)
Ok here is the deal: The text showing weirdly is realted to font choice as I discovered today. Using fixed fonts corrected the problem. It's weird as far as I am concerned but this is how it works. As for the position part, it was my mistake as I also discovered today. I forgot to count newlines when scrolling to that position. Anyway, your answer helped track down the bug and understand the color part, so thanks a lot. On 3 Nov 2000, Hassan Aurag wrote: Hi, I'm writing a tool for internal use. Anyway, I build up a GtkCTree containing info and where to find that info in the file (the char positions) on a text file that I display in a GtkText. The goal is to be able to click on a tree node and "jump" to its place in the text file. Grabbing the info and connecting to the selection event goes normal, but there are some problems I know GtkText is going to die, but for it's the only one I can use. Anyway, I'll shoot my quickies: 1- For some unknown reason, insert_defaults(text) would change the format of my text. Do you know why and how to prevent this? As far as I guess, it has to do with empty spaces. And btw, there are no tabs in my text file. I read the file using python and it prints ok (the read text) on anything from terminal to emacs ... but not in the damn widget. The other option would be to use the insert_text() method inherited from the GtkEditable interface. It might work better for you. 2-When I use set_position (or the other one, can't remember) to jump, it jumps ok for the top parts of the file but fails miserably later. I think it may have to do with point 1. The crazy part is that it still reports the correct position and when I print that part of the string on Python nothing is wrong, but all is in the widget. Any help? I don't know about this one. 3-What is a GdkColor? How can I get red, white, black ... and turn it into a GdkColor? A GdkColor represents a colour :). You can create colours with a GdkColormap (such as the one returned by widget.get_colormap()). You just call its alloc() method: colour = cmap.alloc("red") or: colour = cmap.alloc(0x, 0, 0) James. ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk -- -- ---------- Hassan Aurag -- CAE Electronics Ltd | Universite de Montreal System update specialist| Centre de Recherches Mathematiques ++ Maximum Linux Magazine | Universite de Montreal Contributing Editor | Departement de Maths/Stat ++ EMAIL: [EMAIL PROTECTED] -- -- Most people deserve each other. -- Shirley -- ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk
[pygtk] A few quickies (IMPORTANT)
Hi, I'm writing a tool for internal use. Anyway, I build up a GtkCTree containing info and where to find that info in the file (the char positions) on a text file that I display in a GtkText. The goal is to be able to click on a tree node and jump to its place in the text file. Grabbing the info and connecting to the selection event goes normal, but there are some problems I know GtkText is going to die, but for it's the only one I can use. Anyway, I'll shoot my quickies: 1- For some unknown reason, insert_defaults(text) would change the format of my text. Do you know why and how to prevent this? As far as I guess, it has to do with empty spaces. And btw, there are no tabs in my text file. I read the file using python and it prints ok (the read text) on anything from terminal to emacs ... but not in the damn widget. 2-When I use set_position (or the other one, can't remember) to jump, it jumps ok for the top parts of the file but fails miserably later. I think it may have to do with point 1. The crazy part is that it still reports the correct position and when I print that part of the string on Python nothing is wrong, but all is in the widget. Any help? 3-What is a GdkColor? How can I get red, white, black ... and turn it into a GdkColor? Thanks a lot for reading thus far ;) -- -- -- Hassan Aurag -- CAE Electronics Ltd | Universite de Montreal System update specialist| Centre de Recherches Mathematiques ++ Maximum Linux Magazine | Universite de Montreal Contributing Editor | Departement de Maths/Stat ++ EMAIL: [EMAIL PROTECTED] -- -- Drew's Law of Highway Biology: The first bug to hit a clean windshield lands directly in front of your eyes. --
Re: [pygtk] pygtk for gtk+-2.0 snapshot
Ok This is off-topic, but any timeline about next major gtk/gnome/pygtk/pygnome release? In case anyone is interested, I have put up a snapshot of pygtk for the HEAD branch of CVS gtk+,glib and pango. You can get it at: http://www.gnome.org/~james/pygtk2-SNAP-20001030.tar.gz You will need a fairly recent version of gtk+ and glib from CVS, as it uses the GSignal code that Tim Janik checked in a week ago. I don't think it will be too difficult to add support for creating new GObject subclasses from python, and adding new signals to GObjects. As the GObject code is split off into a separate module (gobject), you may find it useful as a general purpose notification framework for non GUI apps. You will probably run into dynamic linker problems at first. It is necessary to relink the pango modules and gdk-imlib modules so that they link against the libraries they use. Alternatively, you can modify your python sources so that extension modules are loaded with the RTLD_GLOBAL flag. You can almost test out the new text widget with these bindings. The problem is with signal handlers, as the GtkTextIter arguments are not identified as such, so you only get opaque cobjects instead. You will need python 2.0 (or maybe 1.6) as some of the unicode features. When importing the gtk module, it will set the default encoding to UTF8, so you can pass unicode strings to most parts of gtk, and they will convert to UTF8 and display correctly. Thread support is disabled at present because I haven't worked out how to get things working with the GObject system. With pygtk-0.6.x, we used some hacks that relied on the global GDK lock to synchronise access to the python lock. If there are any threading gurus on the list, I could use some help working out how to get things working without the benefit of this lock. I can post some notes on the requirements to get things working if that would be helpful. James. ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk -- -- -- Hassan Aurag -- CAE Electronics Ltd | Universite de Montreal System update specialist| Centre de Recherches Mathematiques ++ Maximum Linux Magazine | Universite de Montreal Contributing Editor | Departement de Maths/Stat ++ EMAIL: [EMAIL PROTECTED], [EMAIL PROTECTED], -- -- History is the version of past events that people have decided to agree on. -- Napoleon Bonaparte, "Maxims" -- ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk
Re: [pygtk] GNOME control center python bindings
Control center apps are capplets. Capplet.py isn't very helpful, but test with it, by showing any type of dialog for instance. Running it would launch control-center Original Message On 7/8/00, 12:53:54 PM, Christian Schaller [EMAIL PROTECTED] wrote regarding [pygtk] GNOME control center python bindings: Hi, Anyone have or know where I can find a python app /example that uses the GNOME control-center bindings? Sincerely, Christian ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk
Re: [pygtk] gtk-1.3 work
Title: Re: [pygtk] gtk-1.3 work This is really cool. Any ideas when one will be able to get gtk 1.4, gnome 2.0, python 2.0 and all those nifty things? I'd really like to start using them, but am not yet hack-fluent enough to just dive in. And while you are at it, can anyone point me to a nice tutorial on how to use Extension class? Something a la Learning Python Original Message On 7/3/00, 8:08:16 AM, James Henstridge [EMAIL PROTECTED] wrote regarding [pygtk] gtk-1.3 work: A few days ago, I branched the gnome-python module in CVS. The gtk/gnome 1.2 branch is gtk-gnome-1-2 if people are interested. I just quickly generated the wrappers for GtkLabel and GtkWindow to try things out a little. I have attached a simple example that shows how easy it is to do multilingual output with gtk-1.3. Python-2.0 unicode strings fit nicely with gtk, as they convert to UTF8 automatically when you use the s format code with PyArg_ParseTuple. So it is possible to just pass a unicode string to GtkLabel and have things Just Work(TM) Python-2.0 makes it very easy to create unicode strings if your text is in a different encoding. You can just do: ustr = unicode('a string in encoding xyz', 'xyz') Now when you pass ustr to gtk, it should be able to display it. As unicode strings can be used to represent any other encoding string, you can now have more than one language in a single GUI. Lets see you do that in Tkinter :) James. -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ http://www.daa.com.au/~james/
Re: [pygtk] New snapshot
[EMAIL PROTECTED] (James Henstridge) wrote: On Thu, 29 Jun 2000, Deirdre Saoirse wrote: On Tue, 20 Jun 2000, Aaron Optimizer Digulla wrote: I, for example, cannot use gnome but I use pygtk. Therefore, I depend on an independend pygtk package (a .tar.gz to be precise). The reason for this is: I'm developing in a tight/secure environment and I must restrict myself to the smallest set of tools possible. Many of us are not enamored with the way gnome has been headed, so I also prefer a gnome-less gtk option. There will always be a gtk only pygtk. What I was wondering about was whether it would be a good idea to stop including pygtk inside gnome-python as well. James. -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Ok I think I already gave my answer. Yes, gnome-python should include pygtk. I, for example, am writing an app that uses both. I'd prefer to write all in gnomelibs, but they still don't have all the widgets I need. Desperatly waiting for full bonobo and their bindings. It's already pretty boring to ask users to have gnome-libs, gtk+. Adding pygtk and pygnome would be bad IMHO. I also forgot I use gtkextra, and their bindings, gtkhtml which means one needs to rebuild gnome-python at least the pygnome part. Well to sum it all up. The less number of packages there are out there, the happier I will be. Of course, this means pygtk, gnome-python(=pygtk, pygnome) and any type of bindings you can muster. While at it, would it be possible for a user to easily build bindings for something like gtkextra if they use the new extension class pygtk/pygnome. And I already know those have bindings, I am really talking generic gtk/gnome-based libraries. ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk
Re: [pygtk] New snapshot
Ok even though I have those headers at the place it expects them, I get this error when running configure. checking local Python configuration... looks good checking for headers required to compile python extensions... not found configure: error: could not find Python headers I think it has something to with the test run at line 1775 of configure script. I do not understand all those ac_* stuff, so I am sorry I can't just help. Original Message On 6/23/00, 5:05:36 AM, James Henstridge [EMAIL PROTECTED] wrote regarding [pygtk] New snapshot: I have put a new snapshot of pygtk available at: ftp://ftp.daa.com.au/pub/james/python/pygtk-0.7.0-unstable-dont-use.tar.gz This version adds support for GtkGLArea and libglade. These were pretty easy add using the new code generator. In future, it should be very easy to add support for new libraries in pygtk and gnome-python. I also changed things a little bit so arguments that are supposed to accept only GtkObjects that are subclasses of a particular type accept only python objects of that type. This means that you can't add non GtkWidgets to a container for instance. This is important for when I start doing gtk-1.4 support, as almost all types in gtk and gdk are subclasses of GObject. I am at a stage where the extension based pygtk can do most things the old system could. I haven't done any speed tests on it, but it doesn't seem slower (it is probably a bit faster). At this point, it is only worth continuing the gtk-1.2 based work if we are going to release it. The problem with releasing this version is that it causes some breakage, and when gtk-1.4 comes out there will be some more breakage. It may be better to have only one lot of breakage. I am interested if this newest snapshot has any problems that cause portability problems to windows (pygtk-0.6.x has some problems). I think I fixed them so that only makefiles need changing, but I may be wrong. James. -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ http://www.daa.com.au/~james/ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk
Re: [pygtk] gnome-python 1.2 ?
Original Message On 6/17/00, 4:33:59 PM, Matt Wilson [EMAIL PROTECTED] wrote regarding Re: [pygtk] gnome-python 1.2 ?: On Sat, Jun 17, 2000 at 10:19:55PM +, Hassan Aurag wrote: Hi, I am not sure about that, but no one here has complained about lack of gnome-python 1.2 that is compatible with gnome 1.2. gnome-python is completely compatible with 1.2 I knew about this one. It was just a poor scheme trying to get your attention on gtkhtml which is not part of gnome 1.2 I am waiting impatiently for gnome-python release that has support for gtkhtml 0.4, since I really use this exclusively for GmatH. gtkhtml isn't a part of gnome 1.2. I'll be fixing the gtkhtml bindings shortly, though. Great news. I can't wait. My app started core dumping as soon as I moved to gtkhtml 0.4. And I am stuck Please help! And thanks. PS: I am whining but for a good cause. Also, if I could help with C bindings I'd have done it. Cheers, Matt ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk
[pygtk] Next version of gnome-python
Hi, I am exclusively using gnome-python in an app I build, and as such would like to know a bit more about the road map of this great package. I know James and others have been moving to Extension Class, which would make it easier to have python bindings for everything. However, I'd like to know about rough schedules regarding: -First Extension class release. And will it have the new tktext widget. -the move to gnome 2.0/ gtk+ 1.4, and if it will be trivial to add things like bonobo support. Thanks again - To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
Re: [pygtk] gtkhtml_demo.py
I think I might have made a mistake. You need latest gnome-python, but it will only work with gtkhtml 0.1 and not 0.2. On Thu, 25 May 2000, Hassan Aurag wrote: You need to recompile the whole gnome-python package with --with-gtkhtml After recompiling I still have a problem: - $ ./gtkhtml_demo.py Traceback (innermost last): File "./gtkhtml_demo.py", line 7, in ? from gtkhtml import * File "/usr/lib/python1.5/site-packages/gtkhtml.py", line 2, in ? import _gtkhtml ImportError: /usr/lib/python1.5/site-packages/_gtkhtmlmodule.so: undefined symbol: gtk_html_write $ - What's the next step? -- Attila Bicsak [EMAIL PROTECTED] HP: http://www.ohsh.u-szeged.hu/~bicsi - To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED] - To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
Re: [pygtk] gtkhtml_demo.py
You need to recompile the whole gnome-python package with --with-gtkhtml This in essence means you need to : download gtkhtml 0.2 from gnome.org sources/unstable install it then do ./configure --with-gtkhtml; make; make install Hi! I have tried gtkhtml_demo.py from the pygnome-1.0.53 package: = [bicsi@nova examples]$ ./gtkhtml_demo.py Traceback (innermost last): File "./gtkhtml_demo.py", line 7, in ? from gtkhtml import * ImportError: No module named gtkhtml [bicsi@nova examples]$ = How can I solve this problem? (I'm a beginner in python gtk.) -- Bicsak, Attila [EMAIL PROTECTED] HP: http://www.ohsh.u-szeged.hu/~bicsi - To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED] - To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] gnome_app_fill_menu?
Hi, Under gnome one usually uses GnomeApp().create_menus and toolbars to get those from UIINFO things. But in Havoc's book, they talk about a gnome_app_fill_menu and toolbar that is supposed to give you a toolbar/menu for any UIINFO whether in GnomeApp or not. I thought this was great, as UIINFO is much easier to use than any gtk equivalent. However it does not seem to be in gnome-python. Any plans, thoughts, whys about the matter? Could someone implement it if it is not? - To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] Yet another stupid question
Hi, When you want to test whether /dev/dsp is properly configured you just "cat somewave /dev/dsp" Now what do I do if I want to test a /dev/ttyS(0-3). I tried to cat AT and read if there is an OK answer, but it doesn't seem to work this way. Even though this is not strictly gnome related, I am writing this for gnome. And no wvdial won't do because it tries to configure everything while all I need is to test the "comm port" for an OK. Thanks - To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] GtkHTML 0.1 question, bug?!?!
Hi, I am using gnome-python the latest. Gtkhmtl works fine until you load urls. I am not sure how the python bindings use gtkhtml or python urllib stuff, but all relative urls are scrapped somehow. Which means that it will look for img src="gifs/whatever.png" locally instead of relatively to the base url I gave it. I have used the gtkhtml_demo.py stuff as basic ingredient. For python illiterates you usually use something like urllib.urlopen(url) which returns the whole page as raw data that you then feed to gtkhtml using its write method. And this where I don't know how things go, but relative urls don't work, and believe me when I say all out there are usually relative stuff. - To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] Re: ANNOUNCE: gnome-python-1.0.53
This is great news, as I have been waiting for gtkhtml to work for a while now. My question is simple. Is the gnome-python.spec up-to-date or is it better to simply build the thing and install it. Original Message On 4/7/00, 11:44:53 AM, James Henstridge [EMAIL PROTECTED] wrote regarding ANNOUNCE: gnome-python-1.0.53: I have just released gnome-python-1.0.53. Gnome-python is a set of bindings that allow you to write gnome programs in the Python language (see www.python.org for details). It is available at: ftp://ftp.gnome.org/pub/GNOME/stable/sources/gnome-python/ Here are the main changes in this release: - libtool and the CVS version of automake are now used to build gnome-python, rather than automake-1.4 with my python patches. If you have troubles with the extension modules it builds now, it is a libtool defficiency, and should be fixed there. - The GtkHTML wrapper should work with the released gtkhtml-0.1. - some other bug fixes. See the change log for details. I also released pygtk-0.6.6, which will be available from ftp.gtk.org soon (you don't need pygtk to use gnome-python, as gnome-python includes it). James. -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ http://www.daa.com.au/~james/ -- FAQ: Frequently-Asked Questions at http://www.gnome.org/gnomefaq To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject. - To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] Fwd: Gtkhtml 0.1 (II)
Just forgot to forward this to this list in case it has something to do with bindings. Original Message On 3/28/00, 8:33:12 PM, Hassan Aurag [EMAIL PROTECTED] wrote regarding Gtkhtml 0.1 (II): Ok, I fixed the bonobo.h problem by just copying this file over to /usr/include from bonobo.tar.gz. I couldn't fix the spec file yet. Anyway, gtkhtml compiled and all and I then recompiled gnome-python packages with --with-gtkhtml and all went well. But then when I try to execute the example gtkhtml.py in the gnome-python examples I get the following which looks like a gtkhtml problem to me. If it is not please someone enlighten me! #TraceBack on execution on gtkhtml.py Traceback (innermost last): File "./gtkhtml_demo.py", line 7, in ? from gtkhtml import * File "/var/tmp/gnome-python-root/usr/lib/python1.5/site-packages/gtkhtml.p y", line 2, in ? import _gtkhtml ImportError: /usr/lib/libgtkhtml.so.0: undefined symbol: gnome_print_newpath End of traceback As you see there is an undefined symbol in libgtkhtml. -- To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject. - To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
Re: [pygtk] label button
I don't know the context but you usually keep a reference to your button and then change it with its methods whenever you like Original Message On 3/16/00, 3:02:12 PM, Javi Roman [EMAIL PROTECTED] wrote regarding [pygtk] label button: How can I change label button in run-time? Thanks. Javi R. To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED] To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] gtkhtml question: undefined reference.....
Ok, I downloaded gtkhtml from cvs (checkout) and compiled it and installed it. So far it's fine. Next I compiled gnome-python with -with-gtkhtml and again it compiles fine. Next I do a from gtkhtml import * and I get an undefined reference. I am not home so I can't remember exactly, but it had to do with gnome-print-new or something. I have all the latest gnome helix packages, that is gnome-print and gnome-print-devel among others are there. I understand this is CVS gtkhtml and it might not work or even compile, so if this is not a trivial bug, can someone point me to the latest stable gtkhtml that worked with gnome-python bindings of this widget? Also, when I build the rpm and add all the gtkhtml files, I get a failed dependency for libgtkhtml.so.0 even though it's there and has ldconfigured. Any ideas? To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
Re: [pygtk] GnomePopupMenu please?
It is indeed when I click on the menu which means when I call the callback function that I get a crash. I have always been wondering why there isn't an independent GnomeMenu widget and GnomeToolbar widget not tied to GnomeApp. Would that be too difficult to add? I have already done it for toolbar and will post it asap. Original Message On 3/3/00, 10:16:45 PM, James Henstridge [EMAIL PROTECTED] wrote regarding Re: [pygtk] GnomePopupMenu please?: GnomePopupMenu in its current state is a bit of a hack. It tries to overwrite the user_data field for each entry in the popup menu, which is used by gnome-python to store pointers to the python callback functions. I thought I had fixed the problem, but I guess I had missed it. I will have a look at the problem, but I don't know if I can fix the problem fully. Apparently the whole gnome menus stuff is being rewritten for gnome-libs-2, so you don't have to use the current C structure interface for building menus. James. -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ http://www.daa.com.au/~james/ On Fri, 3 Mar 2000, Hassan Aurag wrote: It crashes my app. Simple as that. Is it broken? To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED] To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED] To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
Re: [pygtk] GnomePopupMenu please?
Hassan Aurag wrote: It crashes my app. Simple as that. Is it broken? Not getting an answer, eh? ;-) Actually now I got one. I will automagically add Please at the end of all subjects from now on. The problem would then be that people will get used to it and start ignoring them. So one will have to add more pleas :) Gnome popup menus were crashing my app many moons ago, so I switched to Gtk popups. I can't say what the problem is, but it's not your app. Good to know I am not alone, I will switch to gtk pop-ups then. Btw, any have thought of writing a couple of functions to get gtkmenus and toolbars from gnome uiinfo? I mean to write clones of GnomeApp.create_menus(uiinfo) and GnomeApp.create_toolbar(uiinfo). I have already done one with toolbars and I will post it here in a next installment since I have on computer at home! Jeff To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED] To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] Howto to tear a notebook page?
Hi, I was wondering if any had any ideas on how to easily implement the tearing of a notebook page so that it can become a top-level window. I am using pygnome so the guys on pygtk list can help me better I think, but in case no pygtk guys/garls have any ideas, I also sent the same question to gnome-devel for implementation discussion. Thanks in advance H. Aurag To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] Is GnomePopupmenu broken
Hi, Is it broken again. My app keeps segfaulting if I ever use those menus. And it's not a problem with the menus since they were used correctly if added as normal menus. H. Aurag To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] I am pissed off
Hi, I am not sure if I am dumb or it's a bug and then if it is with pygnome bindings. What is wrong with the following: BEGIN CODE file_menu = [ UIINFO_MENU_NEW_ITEM(label="Numerical Python Session", tip="Start a New Numerical Python Session", cb=start_new_numpy), UIINFO_MENU_NEW_ITEM(label="Yacas Session", tip="Start a New Yacas Session", cb=start_new_yacas), UIINFO_MENU_NEW_ITEM(label="Other Session", tip="Start Unsupported Session", cb=start_new_other), UIINFO_SEPARATOR, UIINFO_MENU_PREFERENCES_ITEM(cb=do_pref), UIINFO_SEPARATOR, UIINFO_MENU_EXIT_ITEM(cb=mymainquit) ] help_menu = [ UIINFO_HELP("GMatH"), UIINFO_MENU_ABOUT_ITEM(cb=about), UIINFO_SEPARATOR, UIINFO_ITEM_STOCK("GMatH Online", tip="GMatH Related Web Sites",cb=connect_gmath, stock=STOCK_MENU_HOME), ] menus = [ UIINFO_SUBTREE('Sessions', file_menu), UIINFO_SUBTREE('Help', help_menu) ] gmath = GnomeMDI(appname="GMatH", title="GMatH") gmath.set_menubar_template(menus) CHILD = GnomeMDIGenericChild("Welcome to GMatH") CHILD.set_view_creator(mycreate_view) gmath.add_child(CHILD) gmath.add_view(CHILD) ##END OF CODE Now when I try to use any of the menu stuff it segfaults without explanation. Thanks in advance PS: I am pissed because I have been trying to use with no success MDI for a while. To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
Re: [pygtk] Bindings for GtkExtra
I do use file_select I think from GtkExtra.py. But then we could change it easily. Btw, I have not been able to compile gtkextra package. The instructions seem to be wacky! Original Message On 2/22/00, 9:24:53 AM, James Henstridge [EMAIL PROTECTED] wrote regarding Re: [pygtk] Bindings for GtkExtra: It is probably best to use gtkextra.py as the name. Out of interest, does anyone actually use the GtkExtra.py module? People should probably be using GtkItemFactory instead of the python implementation of GtkMenuFactory found in GtkExtra. The only bit that may be in use at the moment is the dialog routines, but they are very simple and not very pretty. James. -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ http://www.daa.com.au/~james/ On 22 Feb 2000, Andreas Voegele wrote: I'm currently writing Python bindings for the GtkExtra widget set which is available at http://magnet.fsu.edu/~feiguin/gtk/. Most of the work is done but I have two questions. 1. The C header file is called gtkextra.h therefore I called the Python module gtkextra.py. On non-posix systems this name may conlict with GtkExtra.py. Should I use gtkextra.py or should I use libgtkextra.py? 2. Like gtk_clist_get_selection_info(w, x, y) the function gtk_sheet_get_pixel_info(w, x, y) returns None if the user clicked outside of the cells. On the other hand the functions gtk_sheet_get_active_cell(w) and gtk_color_combo_find_color(w, color) return (-1, -1) as row and column if no cell is active or the specified colour could not be found. The C prototypes of the functions mentioned are: void gint gtk_sheet_get_pixel_info(GtkSheet *, gint x, gint y, gint *row, gint *col); void gtk_sheet_get_active_cell(GtkSheet *, gint *row, gint *col); void gtk_color_combo_find_color(GtkColorCombo *, GdkColor *, gint *row, gint *col); I'm wondering if it wasn't better to return None instead of (-1, -1) in order to be consistent with gtk_clist_get_selection_info(). What do you think? To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED] To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED] To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
Re: [pygtk] Still an MDI bug in gnome-python 1.0.51?
No problem! It's just a small typo after all! But when will be next release. I will make my release of GmatH after it so people could use the new MDI look of the thing I am doing! However if it's long, I could still tell them to replace aa by a and all would be set! Original Message On 2/19/00, 10:33:24 PM, James Henstridge [EMAIL PROTECTED] wrote regarding Re: [pygtk] Still an MDI bug in gnome-python 1.0.51?: Sorry about not mentioning it, but I included this fix in my last commit. It will be included in the next release. James. -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ http://www.daa.com.au/~james/ On Sun, 20 Feb 2000, Hassan Aurag wrote: File "/var/tmp/gnome-python-root/usr/lib/python1.5/site-packages/gnome/ui. py", line 1163, in __call__ aa[i] = _obj2inst(args[i]) NameError: aa I think this is an error! To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED] To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
pygnome 1.0.51 was Re: [pygtk] 2 Typos in gtk.py
Btw, Any news of redhat rpms srpms for the new package? I think we should have a repository of srpms (no rpms needed since many arch's) kept up-to-date by rhlabs if possible? I really don't like to use tar.gz for file tracking reasons, like : what the heck is this file doing here? What does it do? Thanks H. Aurag To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] Still an MDI bug in gnome-python 1.0.51?
Title: Still an MDI bug in gnome-python 1.0.51? File /var/tmp/gnome-python-root/usr/lib/python1.5/site-packages/gnome/ui.py, line 1163, in __call__ aa[i] = _obj2inst(args[i]) NameError: aa I think this is an error!
Re: [pygtk] ANNOUNCE: pygtk-0.6.4, gnome-python-1.0.51
Hi I have a question for the GtkHtml widget thing. What is the most stable version of gnome that has it? I have just released pygtk-0.6.4 and gnome-python-1.0.51. Most of the work for this release was done by Matt Wilson (thanks Matt :). This release fixes a lot of reference leaks, so your programs may use less memory. One offshoot of this is that pygtk now uses some parts of the C API that were only introduced in python-1.5.2. If you have an earlier version, you will need to upgrade. There is a number of other bug fixes and improvements. See the ChangeLogs for details. Pygtk-0.6.4 will be available shortly from: ftp://ftp.gtk.org/pub/gtk/python/ gnome-python-1.0.51 is available from: ftp://ftp.gnome.org/pub/GNOME/stable/sources/gnome-python/ Both are available from: ftp://ftp.daa.com.au/pub/james/pygtk/ (please use one of the other sites though). James. -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED] To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
Re: [pygtk] Width of a widget?
In gtk.py, there is a get_window() method for GtkWidget class. Then you should be able to use all gdkwindow attributes described in description.py in pygtk package. Now, you can do a widget.size_request() Does this help? Original Message On 2/11/00, 6:09:47 PM, "Stephan R.A. Deibel" [EMAIL PROTECTED] wrote regarding [pygtk] Width of a widget?: OK, this is pretty basic, but if I have an instance of gtk.GtkVBox I can't say x.width... it says Attribute Error. Shouldn't this be defined for all GtkWidgets? Is there some other way to get at this info? Thanks, - Stephan To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED] To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] Help with GnomeMDI/GtkPlug, GtkSocket
Hi, I am working with pygnome 1.0.50 Now, for a long time, I have been trying to work with MDI without success. For example, what's wrong with the following: ###START CODE from gtk import GtkCurve, mainloop from gnome.ui import GnomeMDIGenericChild, GnomeMDI from _gnomeui import gnome_mdi_generic_child_set_view_creator mdi = GnomeMDI('some-app', 'Title') def my_create_view(child, whatever=None): return GtkHBox() # not a toplevel widget child = GnomeMDIGenericChild('some-name') ##Without the child._o it complains that it needs a gtkobject and not an ##instance. With the object it segfaults gnome_mdi_generic_child_set_view_creator(child._o,my_create_view, 1) mdi.add_child(child) # create a view for the child: mdi.create_view(child) mainloop() ENDCODE So can someone out there please write a simple and useless: mdi=GnomeMDI(...) child=GnomeMDIChild or GenericChild with just one empty GtkHBox in it or any other widget that works. By working, I mean: a MDI.py file that works with python MDI.py I am really despairing here. Also, for the GtkPlug and Socket part. I just read (in Havoc's book) one can't really make multiple inheritance. That was after I unsuccessfully tried to create a: class Session(GnomeApp, GtkPlug): def __init__(self, title and stuff): GnomeApp.__init__(self, ) GtkPlug.__init__(self,) ... Well actually it never crashed, but I discovered it won't work with GtkSocket in another window. Anyway, I'd really also like a stupid example of the pairing, how to make them work! Thank you H. Aurag To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
Re: [pygtk] Help with GnomeMDI/GtkPlug, GtkSocket
Ok, I will ditch MDI once and for all. Now what about GtkPlug/GtkSocket? Do they work? A nice stupid example, with one GtkLabel in a GtkPlug inside a GtkSocket in a another 2-GtkBox GtkWindow?? I have not been able to successfully do it. Original Message On 1/17/00, 2:23:59 PM, Deirdre Saoirse [EMAIL PROTECTED] wrote regarding Re: [pygtk] Help with GnomeMDI/GtkPlug, GtkSocket: On Mon, 17 Jan 2000, Hassan Aurag wrote: For example, what's wrong with the following: You're using the MDI interface, the lamest interface known to mankind. :) Seriously, I don't know what the problem is, but I want to register my disparagement of this human interface abomination. -- _Deirdre * http://www.linuxcabal.net * http://www.deirdre.net "Mars has been a tough target" -- Peter G. Neumann, Risks Digest Moderator "That's because the Martians keep shooting things down." -- Harlan Rosenthal [EMAIL PROTECTED], retorting in Risks Digest 20.60 To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED] To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
Re: [pygtk] Help with GnomeMDI/GtkPlug, GtkSocket
Notice I have used the self._o in this script but it crashes! I don't think the typos below solve the problem. Have you tried this script with the patched wrapper? Thank you again Original Message On 1/17/00, 9:39:42 PM, ChiDeok Hwang [EMAIL PROTECTED] wrote regarding Re: [pygtk] Help with GnomeMDI/GtkPlug, GtkSocket: There are some typos in mdi wrapper of pygnome. With the attached patch, you will get the better chance to succeed to use mdi. I never used mdi, so can't help you no more. On Mon, Jan 17, 2000 at 06:59:02PM +, Hassan Aurag wrote: Hi, I am working with pygnome 1.0.50 Now, for a long time, I have been trying to work with MDI without success. For example, what's wrong with the following: ###START CODE from gtk import GtkCurve, mainloop from gnome.ui import GnomeMDIGenericChild, GnomeMDI from _gnomeui import gnome_mdi_generic_child_set_view_creator mdi = GnomeMDI('some-app', 'Title') def my_create_view(child, whatever=None): return GtkHBox() # not a toplevel widget child = GnomeMDIGenericChild('some-name') ##Without the child._o it complains that it needs a gtkobject and not an ##instance. With the object it segfaults gnome_mdi_generic_child_set_view_creator(child._o,my_create_view, 1) mdi.add_child(child) # create a view for the child: mdi.create_view(child) mainloop() ENDCODE So can someone out there please write a simple and useless: mdi=GnomeMDI(...) child=GnomeMDIChild or GenericChild with just one empty GtkHBox in it or any other widget that works. By working, I mean: a MDI.py file that works with python MDI.py To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
Excellent was Re: [pygtk] [script] Interactive console
Hi, I have been wanting something like this for GmatH for a while now! Do you have any idea how you can create a canvas on which cells would appear successively. One for input, then one for output, then one for input and so on? And still have it work like the Interactive interpreter attached! This would mean a nice Interactive Interpreter a la Mathematica, and attaching dynamically file_descriptors associated with those cells to sys.stdin and sys.stdout! Anyone that does that would get (not a million dollars) but, for it is worth his name on the author list of GmatH that you might find at: http://gmath.sourceforge.net Original Message On 1/11/00, 12:48:38 PM, Mirko Nasato [EMAIL PROTECTED] wrote regarding [pygtk] [script] Interactive console: Hi everyone, I am new here. I have written a simple interactive console. The attempt is to overcome the line-by-line approach of other shells, allowing insertion and execution of multiple statements at once. You can think of it as a sort of compromise between a shell and an editor. Or, better, you can check it out; it's attached here. Bye! -- Mirko Nasato # A generic class to build line-oriented command interpreters # # Interpreters constructed with this class obey the following conventions: # # 1. End of file on input is processed as the command 'EOF'. # 2. A command is parsed out of each line by collecting the prefix composed #of characters in the identchars member. # 3. A command `foo' is dispatched to a method 'do_foo()'; the do_ method #is passed a single argument consisting of the remainder of the line. # 4. Typing an empty line repeats the last command. (Actually, it calls the #method `emptyline', which may be overridden in a subclass.) # 5. There is a predefined `help' method. Given an argument `topic', it #calls the command `help_topic'. With no arguments, it lists all topics #with defined help_ functions, broken into up to three topics; documented #commands, miscellaneous help topics, and undocumented commands. # 6. The command '?' is a synonym for `help'. The command '!' is a synonym #for `shell', if a do_shell method exists. # # The `default' method may be overridden to intercept commands for which there # is no do_ method. # # The data member `self.ruler' sets the character used to draw separator lines # in the help messages. If empty, no ruler line is drawn. It defaults to "=". # # If the value of `self.intro' is nonempty when the cmdloop method is called, # it is printed out on interpreter startup. This value may be overridden # via an optional argument to the cmdloop() method. # # The data members `self.doc_header', `self.misc_header', and # `self.undoc_header' set the headers used for the help function's # listings of documented functions, miscellaneous topics, and undocumented # functions respectively. # # These interpreters use raw_input; thus, if the readline module is loaded, # they automatically support Emacs-like command history and editing features. # ## 1999-2000: H. Aurag: I just modified, for now, the default behavior, ## and added by default emacs-like stuff, plus some mixing with Interactive ## Interpreter. Also added some history tracking for session Saving import string, os, readline import sys import linecache from code import InteractiveInterpreter PROMPT = '(Cmd) ' IDENTCHARS = string.letters + string.digits + '_' class Cmd(InteractiveInterpreter): prompt = PROMPT identchars = IDENTCHARS ruler = '=' lastcmd = '' cmdqueue = [] intro = None doc_leader = "" doc_header = "Documented commands (type help topic):" misc_header = "Miscellaneous help topics:" undoc_header = "Undocumented commands:" nohelp = "*** No help on %s" def __init__(self): self.BUFFER = [] pass def resetbuffer(self): """Reset the input buffer.""" self.buffer = [] def cmdloop(self, intro=None): self.preloop() if intro != None: self.intro = intro if self.intro: print self.intro stop = None while not stop: if self.cmdqueue: line = self.cmdqueue[0] del self.cmdqueue[0] else: try: line = self.raw_input(self.prompt) except EOFError: line = 'EOF' except KeyboardInterrupt: print "\nKeyboardInterrupt\n" self.resetbuffer() line = "##" line =
Re: [pygtk] misc bug fixes
I will take this opportunity to ask you: Will there be any gnome-print support in next pygtk, pygnome release? Original Message On 1/9/00, 7:35:14 PM, Matt Wilson [EMAIL PROTECTED] wrote regarding Re: [pygtk] misc bug fixes: Very good - I noticed the incorrect int v/s short problems before - but I forgot to fix them. Anyone else get a chance to try PyGTK with my earlier patch? I examined the refcounting with some Python debugging tools I've been playing with, and all seems well with the refcounts after using my patch. If I don't hear otherwise, I'll be committing this to CVS sometime next week. Matt On Mon, Jan 10, 2000 at 09:03:15AM +0900, ChiDeok Hwang wrote: Hi! I found some more bugs in pygtk which are not critical. Patch is made after msw's recent patch is applied. To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED] To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] Stupid focus question
Hi, Ok here goes: I have a GnomeApp, which contains with set_content a term done with zvt and has a GtkTree inside a VBOX added to it using add_docked. Now, I haven't been able (duh!) to make this thing understand that when I click or move in term space, I want it to get focus. Each time, I have to use arrows to get back to term! Needless to say, it IS annoying! How do I tell GnomeApp or term that whenever someone clicks on it or enters it with the mouse to grab focus. I haven't found a "clicked" signal for term or its container. So my stupid question is simple. How in heavens can I make this work? What is the signal? And how to use it? Also, in the term I launch a onecmd() type app by forking the term. All goes well, except that the first line of input eats itself whenever the line goes to second line, but everything is ok with 3rd You can check the behavior and look at code by getting http://www.crm.umontreal.ca/~aurag/mine/gmath-0.0.5.tar.gz Any help is appreciated! H. Aurag To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
Re: [pygtk] Stupid focus question
Thanks, It works, actually by unset_flags(CAN_FOCUS) in all other boxes and sub-boxes since zvt is added to GnomeApp by a set_contents, It seems to give it default focus. Now it works, thanx again! Btw, zvt.match_add seems to miss a third argument. It is defined as _zvt.zvt_match_add(regex, highlight, None). What would happen if I changed that to support callbacks or whatever they are so that people can right click and do something with them! More importantly, how to change them? An example of callback, signal whatever would be nice. Example like: click on it will open netscape with that url?!?!?!?!?!? I am working with pygnome-1.0.50-1, and pygtk-0.6.3-1 from october-gnome. Original Message On 11/17/99, 8:17:29 PM, James Henstridge [EMAIL PROTECTED] wrote regarding Re: [pygtk] Stupid focus question: There is a GtkWidget.grab_focus() method to grab the focus for a widget. You may want to connect to the enter_notify_event to make the terminal grab focus when the cursor enters the terminal window. The other option is to remove focusability of some other widgets with GtkWidget.unset_flags(CAN_FOCUS) (this would mean you can't use tab to change focus to those widgets -- you have to use the mouse). The ZvtTerm widget is a bit weird with respect to focus. James. -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ http://www.daa.com.au/~james/ On Wed, 17 Nov 1999, Hassan Aurag wrote: Hi, Ok here goes: I have a GnomeApp, which contains with set_content a term done with zvt and has a GtkTree inside a VBOX added to it using add_docked. Now, I haven't been able (duh!) to make this thing understand that when I click or move in term space, I want it to get focus. Each time, I have to use arrows to get back to term! Needless to say, it IS annoying! How do I tell GnomeApp or term that whenever someone clicks on it or enters it with the mouse to grab focus. I haven't found a "clicked" signal for term or its container. So my stupid question is simple. How in heavens can I make this work? What is the signal? And how to use it? Also, in the term I launch a onecmd() type app by forking the term. All goes well, except that the first line of input eats itself whenever the line goes to second line, but everything is ok with 3rd You can check the behavior and look at code by getting http://www.crm.umontreal.ca/~aurag/mine/gmath-0.0.5.tar.gz Any help is appreciated! H. Aurag To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED] To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED] To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] A weird problem with raw_input and zvt
Hi, I have an app that creates a zvt term in a gnome-app and forks and calls another python script that handles input ouput etc The way I handle input is by using raw_input(prompt) Now if I type a line long enough to go onto the next line, it won't and instead will overwrite the first line. This happens only in the first line and it gets redrawn if I use the left arrow (I have imported readline to be able to do that). For all other lines of the same input, everything is ok. Now, I haven't been able to reproduce this even with the zterm.py example provided with pygnome package. I even used raw_input there and all is fine. The only difference between zterm.py and my thinggy is that one is in a Gtkwindow and the other is in a GtkHBox which itself is in a GnomeApp Any idea why this happens? H. Aurag To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] Re: Help with _zvt term match_add
Sorry, I was relying on my system docs which didn't include any mention of this function. From now on I promise to check gnome's site docs before complaining! However, you pointed to the fact that match_add needs 3 arguments. Well, it doesn't seem to accept more than 2. So I guess this is either a bug in pygtk or I am stupid (any can be true)! If it is not a bug please enlighten me! Anyway, I am a happy man cuz I learned by error and trial how to use FIFO's and pthreads in Python. Cool! Original Message On 11/9/99, 6:37:44 PM, [EMAIL PROTECTED] (NotZed) wrote regarding Re: Help with _zvt term match_add: Hi, I really need help with this one since it is driving me crazy! How the heck does it work. In pygnome it asks for a regex (this is=20 fine by me) and then a highlight mask, but nowhere in this universe=20 does it say what this means? I looked through gnome docs, used emacs=20 to search for highlight in all pygnome pygtk modules to no avail. All I could learn is that it needs numbers (why though?) From the MANUAL: http://developer.gnome.org/doc/API/zvtterm/zvtterm-reference.html#AEN674 "Add a new auto-match regular expression. The zvt_term_match_check() function can be used to check for matches using screen coordinates. Each regular expression regex will be matched against each line in the visible buffer. The highlight_mask is taken from the VTATTR_* bits, as defined in vt.h. These include VTATTR_BOLD, VTATTR_UNDERLINE, etc, but not the colours." These are the relevant bitmasks: #define VTATTR_BOLD 0x4000 #define VTATTR_UNDERLINE 0x2000 #define VTATTR_REVERSE0x0800 It can also be 0, in which case you get no visual indication apart from the pointing hand. I also learned that if you do a match_add('def', 1) for instance, in=20 your terminal app your cursor will become a small hand that points,=20 like in html. There should definetly be a third argument to the function. That is how you reference your regular experssions when a match occurs. Now, how can I use this nifty hand to actually enable anyone to CLICK=20 IT and thus make it do something! You have to check the click yourself. zvt will just render it and change the mouse pointer appropriately. Check zvt_term_match_check from that same page above. Michael -- To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject. To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] A question for Python Gurus
Hi, My question is simple but I can't yet answer it myself. I am still at the point where I use 'Learning Python'. Ok, so I have a terminal and I want to catch the input, and I am not talking about raw_input. I am talking about sys.stdin It seems one can override sys.stdout and sys.stdin to redefine in the first case the print method and the second case the read method. The problem is I don't know how to use them. My goal is to color input depending on text input, eg: in 'def f(x): return x' I want def and return to be colored. I know how to color the string, but I don't know how to make sys.stdin color it! Same thing for sys.stdout where I want it in some cases to format the stuff in some way! Any help is appreciated, and please a small example, like def read(): return whatever Also, my app is a child process of a zvt (done by fork). Now from whithin the app I want to call a parent's method (in this case, get _size or something to get size of terminal) and since people can resize the terminal I want it to be checked dynamically. How do I do this? Do I get the pid of parent and call its method like: getppid().getsize() or something? Thank you for your time H. Aurag To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] Glade and pygnome
Hi, I just wanted to know if there are any plans to make a python mode for glade, that would create a source directory instead of the present runtime thing. I am the kind of guy that doesn't really understand glade, but would like to use it to make windows, then I'd code in the callbacks signals etc.. using pygnome or pygtk. I think other people would like it too! For now however, I would like to have an example of how to use pyglade to actually make a glade built app work. An .glade file with a script that would make this run would be fine. Anything, just a hello world or something please! Thanks in advance H. Aurag To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]