wxPython
sparkes
sparkes at westmids.biz
Sat Jan 1 11:59:06 UTC 2005
Eamonn Sullivan wrote:
> I'm hoping to move some programs I wrote using wxPython from Windows
> to Ubuntu. First question (I'm at work and having trouble finding this
> information by googling): Is wxPython available in main, universe,
> whatever? I didn't see this when I checked at home last night (there
> is a libwxgtk2.4 or something like that, which is already installed),
> but it just occurred to me that I may have been searching wrong. I've
> also seen mention of wxWidgets on the list, but you'd have to hold me
> feet to hot coals to get me to write anything in C++ again...
>
`apt-cache search wxpython` will give you a nice list of packages
related to wxpython. It's one of those things long time Debianites
forget they once didn't know but it's a really useful command.
in hoary `apt-get install wxpython2.5.3 libwxgtk2.5.3-python` should do
the trick. I haven't done any wxpython stuff since I upgraded to hoary
but I have used tools written in it so it does seem to work.
> Second question/problem: I've been using the 2.5.* branch of wxPython
> for a year or more now and my code isn't easily back-portable to the
> 'stable' 2.4.* branch. I see Debian users bragging all over the place
> about being able to just do 'apt-get install wxPython2.5.3', but I'm
> assuming that's on Debian unstable or similar (and we're supposed to
> stick with Debian testing if it all, right?). How hard will it be for
> me (a long-time rpm user) to get that package and install it. Has
> anyone done this?
if you are running hoary you are running debian unstable with ubuntu
patches at least for a couple of days or so when I think the timeline
diverges. I can see some ubuntu developers having some sleepless nights
with Hoary and Sarge freezing so close together.
Add the lines for Universe and Multiverse in your /etc/apt/souces.list
(instructions on the wiki) and apt-get should install workable packages
for thousands of programs and libs.
I wouldn't attempt to mix ubuntu and debian sources unless you are
proficent in dpkg.
>
> Third: What do the Ubuntu developers use? I wouldn't rewrite thousands
> of lines of wxPython code, but it would be good to know for any future
> projects.
I'm not an ubuntu developer but I do use python a lot and I tend to use
wx for my own projects, lots of python people still use tk because they
know it's available. I think tk looks universally horrible where wx's
use of native (or gtk in linux's case) widgets makes it universally
native looking.
I have also used pyqt because one of my clients is a pyqt software house
and you have to be flexible about these things ;-) this is also quite a
cool toolkit but it's expensive to do non free stuff on windows (not
that anything I do is non-free these days however much I am paid) so
lots of people steer away from this option until they know it will pay
for itself.
>
> Finally: How would I get wxGlade to output python? Mine doesn't have
> that option. In general, I code even the user interface by hand (I
> understand what's going on much better that way), but it looks worth
> investigating. I haven't found a good user-interface constructor for
> wxPython.
you can load wxGlade xml files into python and create the interface
dynamically. This will work out better for large projects because
interface changes won't break your code. Unless you are one of those
people who develops and interface and then derives subclasses of it
adding an extra layer of complexity to the code ;-)
Personally I always load the glade file and use that to create the
interface much less fuss.
Boa-constructor (I think it's been a while since I used it, I remember
vi and wxGlade worked better for me) combines the interface editor and a
decent text editor with an idle style python shell so you might want to
try that. It was rebuilt for python2.4 last week so shouldn't give you
anyproblems
>
> P.S. -- I'm running Warty.
>
> -Eamonn
>
sparkes
--
<davee> "Sparkes, the Pete Best of LugRadio"
More information about the ubuntu-users
mailing list