Re: Questions on using Qt or wxWindows with Python and OS X

2005-06-09 Thread Tim Jarman
Hi Kenneth! In article <[EMAIL PROTECTED]>, Kenneth McDonald <[EMAIL PROTECTED]> wrote: > If this is not an appropriate newsgroup for this type of posting, > please let me know and (if possible) suggest an alternative. I've > done a fair bit of research on the net, but information is scattered >

Re: How to detect if file is a directory

2005-04-09 Thread Tim Jarman
César Leonardo Blum Silveira wrote: > Hello all, I'm new to this list. > > How can I detect if a file is a directory or not? > > Thanks > > César The os module contains many helpful tools for working with files, directories, links and so forth. Check out the docs and marvel. The following snip

Re: How to reload local namespace definitions in the python interpreter?

2005-04-02 Thread Tim Jarman
[EMAIL PROTECTED] wrote: > Hi, > > I am a beginner using the python interpreter. To reduce typing effort, > I created a module called "aliases.py" containing some aliases for > objects I commonly use like - > > aliases.py : > > > import filecmp, os, commands > > op = os.path > go = commands.g

Re: [Tkinter] LONG POST ALERT: Setting application icon on Linux

2005-03-31 Thread Tim Jarman
Jeff Epler wrote: > I have written a rather hackish extension to use NET_WM_ICON to set > full-color icons in Tkinter apps. You can read about it here: > http://craie.unpy.net/aether/index.cgi/software/01112237744 > you'll probably need to take a look at the EWMH spec, too. If KDE > supports

Re: redundant imports

2005-03-30 Thread Tim Jarman
max(01)* wrote: > hi everybody. > > suppose that code-1.py imports code-2.py and code-3.py (because it uses > names from both), and that code-2.py imports code-3.py. > > if python were c, code-1.c should only *include* code-2.c, because the > latter in turns includes code-3.c. > > inclusion of

Re: [Newbie] How do I get better at Python programming?

2005-03-29 Thread Tim Jarman
Roy Smith wrote: > keep in mind, however, that not all problems in life can be solved with > software. +1 QOTW -- Website: www DOT jarmania FULLSTOP com -- http://mail.python.org/mailman/listinfo/python-list

Re: [Tkinter] LONG POST ALERT: Setting application icon on Linux

2005-03-27 Thread Tim Jarman
Jeff Epler wrote: > Here is a short program that sets Tk's window icon on Linux. My window > manager is icewm, and it uses a scaled version of the "flagup" image > both at the upper-left corner of the window and on the task bar entry > for the window. > > import Tkinter > app = Tkinter.T

[Tkinter] LONG POST ALERT: Setting application icon on Linux

2005-03-27 Thread Tim Jarman
Apologies in advance for the long post - I wanted to be sure I included all the relevant details. The answer is probably very, very simple. I am doing something stupid here, but I don't know what it is. I'm writing an application with a Tkinter GUI (Python 2.4, Tcl/Tk 8.4.) and I want to put a cus

Re: Cpickle module... not in Lib installs

2005-03-25 Thread Tim Jarman
Marcus Lowland wrote: > Thanks Marc, but... I've searched the file directories for cpickle (not > specifying file type) and only came up with test_cpickle.py. Also, if > cPickle.so were the correct file and existed in my lib then the > following would not happen. > import cpickle > > Traceb

Re: Data types

2005-03-24 Thread Tim Jarman
[EMAIL PROTECTED] wrote: > I am new to python and learning it. Can you please give me a simple > example of user defined type through class mechanism. Python 2.4 (#1, Dec 31 2004, 17:21:43) [GCC 3.3.2 (Mandrake Linux 10.0 3.3.2-6mdk)] on linux2 Type "help", "copyright", "credits" or "license" for

Re: Submission for Python Limmerick Contest

2005-03-23 Thread Tim Jarman
[EMAIL PROTECTED] wrote: > My submission for P.L.C. > > > A mathematican named van Rossum > went hunting for opossum > he could not find one > all eaten by Python > to her his language he named as a blossum > > > > wish me luck > > Harald At the prompt, when I type "import this", it Invite

Re: importing two modules with the same name

2005-03-19 Thread Tim Jarman
Francisco Borges wrote: > Hello, > > This is not stricly necessary but it would be nice if I could get it > done. Here is what I want to do: > > There are 2 "foo" named modules, 'std foo' and 'my foo'. I want to be > able to import 'my foo' and then from within my foo, import 'std > foo'. Anyone

Re: Simple XML-to-Python conversion

2005-03-17 Thread Tim Jarman
[EMAIL PROTECTED] wrote: > Amara does indeed make it effortless to transform an XML document into > a Python structure. Unfortunately this suggestion requires the 3rd > party software, Amara, _and_ a 4Suite installation according to the > website. > > The reason I can't expect users to have 3rd

Re: Iterate using tuple as index

2005-03-10 Thread Tim Jarman
James Stroud wrote: > Hello, > > Its not obvious to me how to do this. I would like to iterate using a > tuple as an index. Say I have two equivalently sized arrays, what I do now > seems inelegant: > > for index, list1_item in enumerate(firstlist): > do_something(list1_item, secondlist[index]

Re: Web framework

2005-03-10 Thread Tim Jarman
Gianluca Sartori wrote: > Hi Christian, thanks for your replay. I gave a quick look at cherryPy > too, but I had the impression it wasn't enought to be used in a real > world contest. What about performances? Can I safely consider it to > develop an Intranet/Extranet? My main concern is with scala

Re: Need help running external program

2005-03-02 Thread Tim Jarman
Rigga wrote: (snip) >> > This is the command I am trying to run: > > feed is a list of web addresses > > output, input = popen2("wget -q %s -O - | tr '\r' '\n' | tr \' \" | sed -n > 's/.*url="\([^"]*\)".*/\1/p'" % feed[counter]) > > But it does not work, if I escape the string using r""" and

Re: Distributing applications

2005-03-02 Thread Tim Jarman
Jaime Wyant wrote: > Sneaky! I like it. Now if there was only a subversion python module... > > jw > GIYF: http://pysvn.tigris.org/ -- Website: www DOT jarmania FULLSTOP com -- http://mail.python.org/mailman/listinfo/python-list

Re: Need help running external program

2005-03-02 Thread Tim Jarman
Rigga wrote: > Brian van den Broek wrote: > >> Rigga said unto the world upon 2005-02-27 15:04: (snip stuff about raw strings) > Thanks for all your help with this it is appreciated, one further question > though, how do I pass a variable to the external program while using the > r""" > > Than

Re: Need help running external program

2005-02-27 Thread Tim Jarman
Rigga wrote: > Pink wrote: > >> Rigga wrote: >> >>> Hi, >>> >>> I am running the line of code below from a shell script and it works >>> fine, however I am at a total loss on how i can run it from within a >>> Python script as every option I have tried fails and it appears to be >>> down to the

Re: PyQt documentation

2005-02-11 Thread Tim Jarman
Eric Jardim wrote: > Hi, > > Is there any site that gather all the documentation about PyQt? > > The docs of the Riverbank site is poor, and I have found separate > tutorials on the net. > Check out http://www.opendocs.org/pyqt/ > I know that the Kompany have made a "Qtdoc"-like to PyQt. But

Re: dynamic func. call

2005-02-04 Thread Tim Jarman
Aljosa Mohorovic wrote: > can i do something like this: > > s = "myFunction" > a = s() # equals to: a = myFunction() Functions are first-class objects in Python, so you can do: def myFunction(): # whatever which creates a function object and binds the name myFunction to it. Then: s = myFu

Re: simultaneous multiple requests to very simple database

2005-01-19 Thread Tim Jarman
Olaf Zetanien wrote: > > Use Firebird as sql backend. Is designed as you request (readers not lock > writers and writers not lock readers). Google for "firebird optimistic > lock". > > Off course, you have python driver: http://kinterbasdb.sf.net and can > deploy on windows and linux with a ver

Re: python and macros (again) [Was: python3: 'where' keyword]

2005-01-14 Thread Tim Jarman
Skip Montanaro wrote: > > Fredrik> no, expressions CAN BE USED as statements. that doesn't mean > Fredrik> that they ARE statements, unless you're applying belgian > logic. > > Hmmm... I'd never heard the term "belgian logic" before. Googling > provided a few uses, but no formal d

Re: How to make executable file ?

2005-01-02 Thread Tim Jarman
Maurice LING wrote: > Hi all, > > This may be OT but is there a way to do the same for *nix type of > system? Like cast a python interpreter with scripts together? > > I'm running Mac OSX here. > For OSX, google for py2app - for *nix in general, I believe freeze is your mman, although so many

Re: Koolaid (was Re: Optional Static Typing)

2004-12-24 Thread Tim Jarman
In article <[EMAIL PROTECTED]>, Peter Hansen <[EMAIL PROTECTED]> wrote: > > P.S.: The ironic thing about all this is that it was > actually something called "Flavor Aid", made by a > company called Jel Sert (http://www.jelsert.com), > and not Kool-Aid at all. What would be even funnier > is if

Re: BASIC vs Python

2004-12-23 Thread Tim Jarman
In article <[EMAIL PROTECTED]>, Alan Gauld <[EMAIL PROTECTED]> wrote: > I dunno. Here in the UK there was a small home computer called (I > think) the Oric(*) which had a membrane keyboard, 4K or RAM and > ran Forth.It had a small cult following before dying out. It > looked a bit like the early

Re: Civilization IV uses Python for scripting

2004-12-11 Thread Tim Jarman
In article <[EMAIL PROTECTED]>, "Carl Banks" <[EMAIL PROTECTED]> wrote: > > Advancement: PYTHON > Requires: Computers, Mythology > Effect: > * Increases revenue generated by capitalization by 300% > * Makes two unhappy citizens happy > * Renders all Wonders of the World in all other countries co