Re: Python supports LSP, does it?

2005-08-10 Thread en.karpachov
On Thu, 11 Aug 2005 01:19:19 +0100 phil hunt wrote: > According to Wikipedia, the Liskov substitution principle is: > > Let q(x) be a property provable about objects x of type T. Then > q(y) should be true for objects y of type S where S is a subtype of T > > To me, this is nonsense. Under

Unicode regular expressions -- buggy?

2005-08-10 Thread Christopher Subich
I don't think the python regular expression module correctly handles combining marks; it gives inconsistent results between equivalent forms of some regular expressions: >>> sys.version '2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)]' >>>re.match('\w',unicodedata.normalize('NFD

Re: Pre-PEP Proposal: Codetags

2005-08-10 Thread Martin v. Löwis
Micah Elliott wrote: > I also have this living as a wiki > if people would like to add comments there. I might try to capture there > feedback from this group anyway. First try at a PEP -- thanks for any > feedback! I think you somewhat misunderstood the purpos

Re: signals (again)

2005-08-10 Thread bill
How does that help? I interpret "use asynchronous calls" to mean "use fcntl to set an FN_NOTIFY on the directory in order to be alerted when something needs to be done." But the method of doing that which I outlined above has a critical section in which the incoming signal will not be noticed.

Re: what's the exactly newsgroup url of python-list?

2005-08-10 Thread Erik Max Francis
Ben Finney wrote: > You may be confused. > > news:comp.lang.python> is a URL to a Usenet newsgroup, as > evidenced by the 'news:' schema part. If your web browser is > configured properly to invoke a newsreader (such as Thunderbird) for > 'news:' URLs, your newsrreader will then attempt to get th

Re: new python debugger

2005-08-10 Thread nir1408
Thanks for the compliments. I really believe Winpdb is not just another Python debugger, and that it will be a real step forward in the quality of Python debuggers once it matures. Also, don't worry about the .com url, it is a GPL debugger. Winpdb is still a BETA despite the version number which

Re: Python-2.4.1 Build error on AIX

2005-08-10 Thread Martin v. Löwis
Srinivasan TK wrote: > I get the below error when trying to build python on > AIX. > > Is there a way to ignore _tkinter. Yes. Just ignore these error messages. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Pre-PEP Proposal: Codetags

2005-08-10 Thread Micah Elliott
I also have this living as a wiki if people would like to add comments there. I might try to capture there feedback from this group anyway. First try at a PEP -- thanks for any feedback! Please add **NOTE:** comments to the bottom of this wiki document using `

Re: Oreilly CodeZoo

2005-08-10 Thread richard
Jorge Godoy wrote: > richard wrote: >> That's a good idea. Unfortunately, changing the sorting of the >> classifiers will be fun. Could I ask you to submit an RFE "bug" via the >> link on the pypi page? > > I'll do that tomorrow morning. Thanks! >> Yep, this is related to your other comment re

Re: What is Python?!

2005-08-10 Thread Jeff Schwab
bruno modulix wrote: > bash is a scripting language, Bash is a shell. It is frequently used for scripting, but that is only a secondary purpose. > javascript is a scripting language, Yes, but it's a particularly specialized one. > perl is a scripting language, Blasphemy! Perl is a dynamic l

wanna stop by my homemade glory hole?

2005-08-10 Thread Jennifer
my husband is installing an extra bathroom poolside. there is a perfect size hole (unless you have a huge cock) to stick your dick through into the adjoing room. come around the side of my house(perfect if you look like a repair man) enter into the unfisnished bathroom and I'll service you fro

Re: Python supports LSP, does it?

2005-08-10 Thread Gregory Bond
phil hunt wrote: > To me, this is nonsense. Under this definition any subtype must > behave the same as its parent type, becausde if it doesn't there > will be some q(y) that are different to q(x). Not necessarily. the set of operations on y could be a superset of the set of operations on

datagram queue length

2005-08-10 Thread Jonathan Ellis
I seem to be running into a limit of 64 queued datagrams. This isn't a data buffer size; varying the size of the datagram makes no difference in the observed queue size. If more datagrams are sent before some are read, they are silently dropped. (By "silently," I mean, "tcpdump doesn't record th

performance of recursive generator

2005-08-10 Thread aurora
I love generator and I use it a lot. Lately I've been writing some recursive generator to traverse tree structures. After taking closer look I have some concern on its performance. Let's take the inorder traversal from http://www.python.org/peps/pep-0255.html as an example. def inorder(t):

Interface type checking

2005-08-10 Thread Paddy
Hi, I read a blog entry by GVR on interfaces in which he mentioned that you had to be able to state the type signature of, say, a function. That got me thinking along the lines of: If you have some typical data, then transform it into a string showing its sub-types. Could not a regular expre

Re: what's the exactly newsgroup url of python-list?

2005-08-10 Thread Ben Finney
He, Aspk <[EMAIL PROTECTED]> wrote: > My thunderbir cant connect to comp.lang.python as the python.org page > saying. You may be confused. news:comp.lang.python> is a URL to a Usenet newsgroup, as evidenced by the 'news:' schema part. If your web browser is configured properly to invoke a newsrea

Re: What is Python?!

2005-08-10 Thread Evil Bastard
bruno modulix wrote: > You can tell buy the most common use. bash is a scripting language, > javascript is a scripting language, perl is a scripting language, php is > a scripting language, Python is *not* a scripting language !-) Perhaps a better definition - the term 'scripting language' is incr

Re: PEP 328, absolute/relative import

2005-08-10 Thread Ben Finney
Aahz <[EMAIL PROTECTED]> wrote: > Ben Finney <[EMAIL PROTECTED]> wrote: > >So, under PEP 328 rules, the original poster's current-directory > >module could only be imported (a) if the current directory was in > >sys.path, or (b) if the code specified a relative import. The > >accidental shadowing

looking to GIVE my first oral favor

2005-08-10 Thread Casee
im new to this, i guess you can say im still curious about having extra marital lovers. i've only had 1 encounter with a married man and I loved it so much. its such a strong burning desire now. when I look at men, i'm always wondering how they look nude, or their cock size. basically, i want

Re: regex help

2005-08-10 Thread Christopher Subich
jeff sacksteder wrote: > Regex questions seem to be rather resistant to googling. > > My regex currently looks like - 'FOO:.*\n\n' > > The chunk of text I am attempting to locate is a line beginning with > "FOO:", followed by an unknown number of lines, terminating with a > blank line. Clearly th

Re: Short term project

2005-08-10 Thread Peter Olsen
I'd like to hear more. Michael Seeley wrote: > To: [EMAIL PROTECTED] > From: "Michael Seeley" <[EMAIL PROTECTED]> > Subject: Short term project > Date: Mon, 01 Aug 2005 20:18:47 GMT > > I have a client in Fort Worth, TX that needs a Python programmer for a > short > project. This could be a te

what's the exactly newsgroup url of python-list?

2005-08-10 Thread He, Aspk
My thunderbir cant connect to comp.lang.python as the python.org page saying. -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 328, absolute/relative import (was: Re: Bizarre error from help())

2005-08-10 Thread Aahz
In article <[EMAIL PROTECTED]>, Ben Finney <[EMAIL PROTECTED]> wrote: > >So, under PEP 328 rules, the original poster's current-directory >module could only be imported (a) if the current directory was in >sys.path, or (b) if the code specified a relative import. The >accidental shadowing of the s

regex help

2005-08-10 Thread jeff sacksteder
Regex questions seem to be rather resistant to googling. My regex currently looks like - 'FOO:.*\n\n' The chunk of text I am attempting to locate is a line beginning with "FOO:", followed by an unknown number of lines, terminating with a blank line. Clearly the ".*" phrase does not match the sing

Re: "Compile time" checking?

2005-08-10 Thread Bengt Richter
On Wed, 10 Aug 2005 20:39:03 +0100, [EMAIL PROTECTED] (phil hunt) wrote: [...] > >I've not personally had problems with the wrong number of argumnets >to a function call -- they get caught at run-time and are easy >enough to fix -- but I do sometimes get errors because a varialbe is >the wrong t

Tiny Python interpreter

2005-08-10 Thread Lucas Correia Villa Real
Hello, I'm working with an ARM cpu which has only 64MB of flash memory available for storing applications. This system is running with an X server, some office applications and now I need to have a small Python interpreter, too (Python 2.2 is fine). I've googled a bit for the subject, but the

Re: Creating Palm OS programs with python?

2005-08-10 Thread Casey Hawthorne
Apparently there is a PVM (Python Virtual Machine) for the Palm OS, but it is several versions back! Jython, might be better, but it is also a few versions back! [EMAIL PROTECTED] wrote: >QUick question: > >Is it possible to create a palm os program to use on a PDA with >python? > > >THanks -- R

Re: What are modules really for?

2005-08-10 Thread Mike Meyer
Peter Hansen <[EMAIL PROTECTED]> writes: > Dan wrote: >> You might think of modules in Python as like packages in Java. However, >> putting classes in the same module doesn't give them any additional >> powers to interact with each other. (At least, not that I know of.) > > Use of "global" to rebi

Re: Python supports LSP, does it?

2005-08-10 Thread phil hunt
On Tue, 09 Aug 2005 18:36:56 -0500, Andy Leszczynski wrote: >wikipedia >(http://en.wikipedia.org/wiki/Python_programming_language#Object-oriented_programming) > >says: >""" >Python's support for object oriented programming paradigm is vast. It >supports polymorphism [...] fully in the Liskov s

Re: Is there a way of executing a command in a string?

2005-08-10 Thread Mike Meyer
Jeff Schwab <[EMAIL PROTECTED]> writes: > Jerry He wrote: >> Hi, suppose I have the following string >> cmdstr = "b = lambda s: s*s" >> Is there a way to execute this string other than >> copying it onto a file and then importing it? > > >>> exec "b = lambda s: s*s" > >>> b Jeff forgot to w

Re: "Compile time" checking?

2005-08-10 Thread Grant Edwards
On 2005-08-11, Qopit <[EMAIL PROTECTED]> wrote: > >> if debug: print "v=%s" % (v,) > > Not that important, but I assume the first one was supposed to be: > > if debug: print "v=", s > > right? http://docs.python.org/tut/node9.html#SECTION00910 -- Grant Edwards

Re: Recommendations for CVS systems

2005-08-10 Thread Mike Meyer
[EMAIL PROTECTED] (Aahz) writes: > In article <[EMAIL PROTECTED]>, > Erik Max Francis <[EMAIL PROTECTED]> wrote: >> >>It also is free for personal use (up to 2 clients, 2 users) and open >>soruce projects can get free licenses. Or at least it was so the last I >>checked. > > For anything missi

Re: Python supports LSP, does it?

2005-08-10 Thread Mike Meyer
bruno modulix <[EMAIL PROTECTED]> writes: > Clearly, somethingElse is a subtype of baseClass, when derivedClass is > not. Don't confuse suclassing with subtyping. issinstance() let you > check for subclassing, not for subtyping. The only language-level > mechanism I know of that more or less inforc

Re: how to write a line in a text file

2005-08-10 Thread James Dennett
Calvin Spealman wrote: > On 7/31/05, James Dennett <[EMAIL PROTECTED]> wrote: > >>Peter Hansen wrote: >> >> >>>Steven D'Aprano wrote: >>> >>>Given that ZODB and PySQLite are simply Python extension modules, which >>>get bundled by your builder tool and are therefore installed >>>transparently alon

Weekly Python Patch/Bug Summary

2005-08-10 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 352 open ( -2) / 2896 closed ( +8) / 3248 total ( +6) Bugs: 913 open ( +4) / 5162 closed (+10) / 6075 total (+14) RFE : 191 open ( +0) / 178 closed ( +0) / 369 total ( +0) New / Reopened Patches __ compiler

Re: What is Python?!

2005-08-10 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "Jason Drew" <[EMAIL PROTECTED]> wrote: > Roy Smith wrote: "there's a system called Jython, which lets you > compile Java source to Python byte code." > > Don't you have that the wrong way 'round? Duh, of course I do! Thanks for the correction. -- http://mail.p

Re: "Compile time" checking?

2005-08-10 Thread Qopit
> if debug: print "v=%s" % (v,) Not that important, but I assume the first one was supposed to be: if debug: print "v=", s right? -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 328, absolute/relative import (was: Re: Bizarre error from help())

2005-08-10 Thread Roy Smith
Ben Finney <[EMAIL PROTECTED]> wrote: > Once PEP 328 is fully implemented, all bare 'import foo' statements > specify absolute imports (i.e. from sys.path only). To perform a > relative import (e.g. from current directory) will require different > syntax. It seems like this will break lots of exis

Re: signals (again)

2005-08-10 Thread Paul Rubin
"bill" <[EMAIL PROTECTED]> writes: > What's the pythonic thing to do here? How can I > guarantee timely response to the creation of a file in the directory > referenced by fd? Use asynchronous calls and/or a separate thread. -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 328, absolute/relative import

2005-08-10 Thread Christopher Subich
Ben Finney wrote: > Once PEP 328 is fully implemented, all bare 'import foo' statements > specify absolute imports (i.e. from sys.path only). To perform a > relative import (e.g. from current directory) will require different > syntax. I'm not completely familiar with either, but how will that inf

Re: wxPython and threads again

2005-08-10 Thread Christopher Subich
David E. Konerding DSD staff wrote: > The easiest approach, though, is to use the threadedselectreactor in Twisted > (you need > to check the HEAD branch out with subversion, because that reactor isn't > included in any releases). > With threadedselectreactor, it's easy to incorporate both the GU

Re: FTP over SSL (explicit encryption)

2005-08-10 Thread Andrew MacIntyre
David Isaac wrote: > I am looking for a pure Python secure ftp solution. > Does it exist? I recall coming across an extension package (pretty sure it wasn't pure Python anyway, certainly not for the SSL bits) with SFTP - I think the name was Paramiko or something like that. --

PEP 328, absolute/relative import (was: Re: Bizarre error from help())

2005-08-10 Thread Ben Finney
Peter Hansen <[EMAIL PROTECTED]> wrote: > Ben Finney wrote: > > Roy Smith <[EMAIL PROTECTED]> wrote: > >>[current-directory module shadowing a system module] > > > > All hail the coming of PEP 328: > > http://www.python.org/peps/pep-0328.html> > > Which, unless I misunderstand, would do nothi

Re: "Compile time" checking?

2005-08-10 Thread phil hunt
On 10 Aug 2005 12:01:01 -0700, Qopit <[EMAIL PROTECTED]> wrote: >> Why not just find out, by trying to compile it? :-) > >This will likely certify me as a python newbie, but... how do you mean? > How do you compile a .py file? At the command prompt: $ python yourfile.py This compiles it, then ru

Creating Palm OS programs with python?

2005-08-10 Thread djanvk
QUick question: Is it possible to create a palm os program to use on a PDA with python? THanks -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython and threads again

2005-08-10 Thread Bryan Olson
Peter Hansen wrote: > David E. Konerding DSD staff wrote: >> Further, calling wx from a thread other than the one running the >> event loop is deep voodoo and should typically be avoided. > > "Typically"? Let's just say "always" and maybe use the phrase "certain > to corrupt wx and crash the

Re: Recommendations for CVS systems

2005-08-10 Thread François Pinard
[Aahz] > For anything mission-critical, I wouldn't want to rely on a free license. For anything mission-critical, I wouldn't want to rely on closed sources... Could the best be open source and non-free license? :-) -- François Pinard http://pinard.progiciels-bpi.ca -- http://mail.python.org

Re: interpreter frame

2005-08-10 Thread Bengt Richter
On 10 Aug 2005 15:08:21 -0700, "Leo" <[EMAIL PROTECTED]> wrote: >Good try, but that doesn't seem to work either. Maybe I should have >emphasized that what I really want is the line of code, as opposed to >the entire frame. Here is the output of sys._getframe() on my system: > >Python 2.3.4 (#1, Fe

Re: Recommendations for CVS systems

2005-08-10 Thread Terry Reedy
"Aahz" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In article <[EMAIL PROTECTED]>, > Terry Reedy <[EMAIL PROTECTED]> wrote: >>For what it is worth, the Python developers are discussing moving the >>Python codebase to subversion, though other options were discussed. The >>result

signals (again)

2005-08-10 Thread bill
I see this (or similar) question occasionally looking back through the archive, but haven't yet seen a definitive answer, so I'm going to ask it again. Consider the following: while True: do_something_to_files_in_directory(fd) fcntl(fd, F_NOTFIY, DN_CREATE) signal.pause() How do you

Re: interpreter frame

2005-08-10 Thread Leo
Good try, but that doesn't seem to work either. Maybe I should have emphasized that what I really want is the line of code, as opposed to the entire frame. Here is the output of sys._getframe() on my system: Python 2.3.4 (#1, Feb 2 2005, 12:11:53) [GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)] on lin

Re: wxPython and threads again

2005-08-10 Thread perchef
thanks for all these advices. I think a custom event will be the way to go. for the moment I use something _really_ ugly : a mix between GUI, threads and recursive fonctions. -- http://mail.python.org/mailman/listinfo/python-list

Python-based system wins 2005 Australian Eureka Science Prize

2005-08-10 Thread Tim Churches
See http://www.amonline.net.au/eureka/communications_technology/2005_winner.htm A Google search on "scamseek python" reveals the nexus with Python - see for example http://www.cs.usyd.edu.au/~lkmrl/Scamseek-Project-data-mining-conf-v0.pdf Congratulations to Prof Jon Patrick and team on their win,

Re: "Compile time" checking?

2005-08-10 Thread Qopit
> if __name__ == '__main__': Yep - that does it... should have thought of that. Thanks. This works fine for pychecker with no hangage: #--- if __name__ == "__main__": while 1: x = raw_input("meh:") #--- -- http://mail.python.org/mailman/listinfo/python-list

Re: "Compile time" checking?

2005-08-10 Thread Qopit
> def tester(a, b, c): > global tester > print "bogus test function", a, b, c > def tester(a, b): > print "other test function", a, b > > tester(1, 2, 3) # This runs fine. > tester(1, 2)# This too. Interesting example. In that case, pychecker does spit out a warning

Re: providing arguments to base.__init__

2005-08-10 Thread Daniel Schüle
Rob Conner schrieb: > seems like you are not running the correct wavePlayer. make sure you > don't have 2 wavePlayer vars. > I am not sure I understand right wavePlayer.py is a module I wrote myself and placed to site-packages so there is no other wavePlayer module I put a class wavePlayer into i

Re: Python supports LSP, does it?

2005-08-10 Thread Andy Leszczynski
Mike Meyer wrote: [...] > The wikipedia was really abusing the phrase LSP. I've corrected the > wikipedia. > http://mail.python.org/mailman/listinfo/python-list

Re: providing arguments to base.__init__

2005-08-10 Thread Rob Conner
seems like you are not running the correct wavePlayer. make sure you don't have 2 wavePlayer vars. -- http://mail.python.org/mailman/listinfo/python-list

Re: providing arguments to base.__init__

2005-08-10 Thread [EMAIL PROTECTED]
I only have an answer to the last one: you do not call the 'destructors' of the base classes, so they are not executed. -- http://mail.python.org/mailman/listinfo/python-list

Re: Point and click GUI builder for Python

2005-08-10 Thread McBooCzech
Don't forget Eric3 + PyQt + Qt designer? I think they are great tools. -- http://mail.python.org/mailman/listinfo/python-list

Re: FTP over SSL (explicit encryption)

2005-08-10 Thread David Isaac
"Eric Nieuwland" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Do you want SFTP or FTP/S? The latter. > I'm having a look at FTP/S right now. That's a little > more complicated, but it seems doable. > If I succeed, I guess I'll donate the stuff as an extension to ftplib. Great!

Re: "Compile time" checking?

2005-08-10 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Qopit wrote: > Now I'm running into another snag when checking some other code I have. > Pychecker gets hung up on raw_input... it actually executes code > rather than just checking it, it seems. For example, the snippet below > hangs pychecker:: > > #--- > while 1: >

RE: "Ordered" dicts

2005-08-10 Thread Delaney, Timothy (Tim)
Martin Miller wrote: > To avoid continued reinvention of this wheel, I'd also vote to have > this functionality be at least included in a standard module, if not > built-in. This has been discussed on python-dev (I proposed it actually). The final consensus was that no such implementation would b

Re: What is Python?!

2005-08-10 Thread Jason Drew
Roy Smith wrote: "there's a system called Jython, which lets you compile Java source to Python byte code." Don't you have that the wrong way 'round? From the Jython website: "Jython is an implementation of the high-level, dynamic, object-oriented language Python written in 100% Pure Java, and seam

providing arguments to base.__init__

2005-08-10 Thread Daniel Schüle
Hello Ng, I was playing around with pymedia module and I succeeded when I used complementation instead of inheritance .. but then I was forced to wrap simple methods of sound.Output like pause/unpause/stop. It works, but seems to me unnecessary .. and I would like to grasp why the code below doesn

Re: "Compile time" checking?

2005-08-10 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Qopit wrote: > Hi there, > > I'm pretty new to Python and am trying to figure out how to get "will > this code compile?"-like code checking. To me this is a pretty basic > language/environment requirement, especially when working with large > projects. It is *much* bette

Re: Help with Regular Expressions

2005-08-10 Thread Paul McGuire
The pyparsing distribution includes epydoc-generated class documentation, and a few example programs. Dave Kuhlman has a nice HOWTO at http://www.rexx.com/~dkuhlman/python_201/python_201.html#SECTION00760 Drop me a note if you are looking for some specific tips or techniques. (I'

Re: help in algorithm

2005-08-10 Thread gene tani
this sounds like LSI / singular value decomposition (?) http://javelina.cet.middlebury.edu/lsa/out/lsa_explanation.htm -- http://mail.python.org/mailman/listinfo/python-list

Re: "Compile time" checking?

2005-08-10 Thread Qopit
How embarassing... thanks, jk. I grabbed a copy of pychecker v0.8.14 directly (not the one in SPE) and it catches it exactly as you showed. Now I wonder why the SPE one doesn't catch it (and why it is sooo comparatively slow)! Now I'm running into another snag when checking some other code I have

Re: Why does __init__ not get called?

2005-08-10 Thread Rob Conner
I'm out of my league too. I don't know enough about __new__ and __init__. I just went another route and did a wrapper for datetime, and didn't extend it. Thanks for the effort. By chance... does anyone know, if I wrote a class, and just wanted to override __new__ just for the fun of it. What would

Re: interpreter frame

2005-08-10 Thread Peter Hansen
Leo wrote: > Why is it not possible to get the frame from the interpreter using the > inspect library? Because sys._getframe() does the job instead? -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython and threads again

2005-08-10 Thread Peter Hansen
David E. Konerding DSD staff wrote: > Further, calling wx from a thread other than the one running the event > loop is deep voodoo and should typically be avoided. "Typically"? Let's just say "always" and maybe use the phrase "certain to corrupt wx and crash the app" instead of "deep voodoo".

Re: Recommendations for CVS systems

2005-08-10 Thread Erik Max Francis
Aahz wrote: > For anything mission-critical, I wouldn't want to rely on a free license. If it's mission critical, in the worst case scenario you can just pay for a modest license. And, as I said, it's free for use for personal use -- no license is required, it just works. They can't force up

Re: "Ordered" dicts

2005-08-10 Thread gene tani
More ways to do it, from the FAQ http://www.python.org/doc/faq/programming.html#how-can-i-get-a-dictionary-to-display-its-keys-in-a-consistent-order Also look at the recipe, page 222 of Cookbook2, that allows you to rank key values by their associated values, and demonstrate the power of mixins.

Re: What is Python?!

2005-08-10 Thread bruno modulix
Roy Smith wrote: > Robert Wierschke <[EMAIL PROTECTED]> wrote: > >> a scripting language or a "normal" language like C++ etc. > > > It is difficult to define exactly what a "scripting language" is and isn't, You can tell buy the most common use. bash is a scripting language, javascript is

Re: Catching stderr output from graphical apps

2005-08-10 Thread Bryan Olson
gry@ll.mit.edu wrote: > Python 2.3.3, Tkinter.__version__'$Revision: 1.177 $' > > Hmm, the error window pops up with appropriate title, but contains no > text. > I stuck an unbuffered write to a log file in ErrorPipe.write and got > only one line: Traceback (most recent call last):$ > > Any

Python-2.4.1 Build error on AIX

2005-08-10 Thread Srinivasan TK
All, I get the below error when trying to build python on AIX. Is there a way to ignore _tkinter. Please help Sri I do the following in my command line. export CC=gcc ld: 0706-006 Cannot find or open library file: -l tk8.3 ld:open(): A file or directory in the path name does not exis

Re: "Compile time" checking?

2005-08-10 Thread Qopit
> Why not just find out, by trying to compile it? :-) This will likely certify me as a python newbie, but... how do you mean? How do you compile a .py file? If you mean to .pyc by doing an import on it, that may work fine for the simple example I typed up earlier, but that is easy to bypass by s

Re: Putting function references in a Queue

2005-08-10 Thread Richard Townsend
On Tue, 09 Aug 2005 23:46:22 GMT, Bryan Olson wrote: > I think that's a good thing to do. The tricky part is getting an > event loop to wait on both the queue and other kinds of events. > Periodic polling works, but kind of sucks. > > What's the 'done' argument? A lock maybe? 'done' is just a bo

Re: Help with Regular Expressions

2005-08-10 Thread Christopher Subich
Paul McGuire wrote: > If your re demands get more complicated, you could take a look at > pyparsing. The code is a bit more verbose, but many find it easier to > compose their expressions using pyparsing's classes, such as Literal, > OneOrMore, Optional, etc., plus a number of built-in helper func

Re: wxPython and threads again

2005-08-10 Thread Bryan Olson
David E. Konerding DSD staff wrote: [...] > You need another way to pass completion information between the downloader > thread and the main thread; the simplest way is to define a custom wx > Event, and wxPostEvent from the downloader thread when it completes ( > and when the gauge should be

Re: FTP over SSL (explicit encryption)

2005-08-10 Thread Eric Nieuwland
David Isaac wrote: > I am looking for a pure Python secure ftp solution. > Does it exist? Do you want SFTP or FTP/S? > I would have thought that the existence of OpenSSL > would imply "yes" but I cannot find anything. > > ftplib does not seem to provide any secure services. Indeed. If you want SFT

Re: Syntax error after upgrading to Python 2.4

2005-08-10 Thread Walter Dörwald
[EMAIL PROTECTED] wrote: > Hi, > > After upgrading to 2.4 (from 2.3), I'm getting a weird syntax error: > > import themes > > Traceback (most recent call last): > File "", line 1, in ? > File "themes.py", line 564 > font = self.font.makeBlackAndWhite(), >

Re: "Compile time" checking?

2005-08-10 Thread en.karpachov
On 10 Aug 2005 08:53:15 -0700 Qopit wrote: > def tester(a,b,c): > print "bogus test function",a,b,c > tester(1,2,3) #this runs fine > tester(1,2)#this obviously causes a run-time TypeError exception /tmp% cat >a.py def tester(a,b,c): print "bogus test function",a,b,c tester(1,2,3) #this

Re: Catching stderr output from graphical apps

2005-08-10 Thread gry
Python 2.3.3, Tkinter.__version__'$Revision: 1.177 $' Hmm, the error window pops up with appropriate title, but contains no text. I stuck an unbuffered write to a log file in ErrorPipe.write and got only one line: Traceback (most recent call last):$ Any idea what's wrong? -- George -- http://m

Re: Does any one recognize this binary data storage format

2005-08-10 Thread Christopher Subich
Calvin Spealman wrote: > > Original Poster should send this off to thedailywtf.com I absolutely agree. This is a terrible programming practice. -- http://mail.python.org/mailman/listinfo/python-list

Re: What are modules really for?

2005-08-10 Thread en.karpachov
On Wed, 10 Aug 2005 09:36:13 +0100 N.Davis wrote: > As for multiple inheritance, yes I've always been aware of it being > available in C++, but I learned C++ at a company which banned multiple > inheritance in their coding standards, with comments about "The GOTO of > the 1990s". Looks like so

Re: Help with Regular Expressions

2005-08-10 Thread Cappy2112
Be careful with that book though, it's RE examples are Perl-centric and not exactly the same implementation that Python uses. However, it's a good place to start This will also be useful http://www.amk.ca/python/howto/regex/ -- http://mail.python.org/mailman/listinfo/python-list

Re: What are modules really for?

2005-08-10 Thread bruno modulix
Tito wrote: >> [1] 'aName' => public, '_aName' => protected, '__aName' => private > > > I didn't know this one, as I am quite new to Python. Is it really > general use? Yes, it's the convention. Well, to be more exact, this is: name => interface (intended for public use) _name => implementati

Re: MainThread blocks all others

2005-08-10 Thread Nodir Gulyamov
Hello Dennis and Bryan! You were absolutely right. I should show you real code instead of brain fucking. I am very sorry. Please find below real code. Sorry for amount of sources. Main aspect of program is all process should be in one determined sequence containing 3 stages. They are defined

Re: wxPython and threads again

2005-08-10 Thread David E. Konerding DSD staff
In article <[EMAIL PROTECTED]>, perchef wrote: > Hi, > > I have several files to download and a GUI to update. I know this is a > frequently asked question but i can't find an appropriate solution. > My Downloader extends threading.Thread and update a wx.Gauge in GUI > during the process. > > for

Re: Module Extension C/CPI Question

2005-08-10 Thread Martin v. Löwis
Jeremy Moles wrote: > typedef struct Foo { > int x; > int y; > int z; > char xyz[100]; > } Foo; > > Is there an "accepted" way of propagating this upstream? I was thinking > one of these two: It really depends on the struct. Would a C programmer automatically be able to li

Re: Does any one recognize this binary data storage format

2005-08-10 Thread Calvin Spealman
On 8/10/05, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2005-08-10, John Machin <[EMAIL PROTECTED]> wrote: > > Perhaps the one bit is an exponent -- some kind of floating point > based format? That matches the doubling of all digits. > >>> > >>>That would just be sick. I can't imagine

Re: "Compile time" checking?

2005-08-10 Thread phil hunt
On 10 Aug 2005 08:53:15 -0700, Qopit <[EMAIL PROTECTED]> wrote: >Hi there, > >I'm pretty new to Python and am trying to figure out how to get "will >this code compile?"-like code checking. Why not just find out, by trying to compile it? :-) -- Email: zen19725 at zen dot co dot uk -- http://m

Re: how to write a line in a text file

2005-08-10 Thread Jeff Schwab
Calvin Spealman wrote: > On 7/31/05, James Dennett <[EMAIL PROTECTED]> wrote: > >>Peter Hansen wrote: >> >> >>>Steven D'Aprano wrote: >>> >>>Given that ZODB and PySQLite are simply Python extension modules, which >>>get bundled by your builder tool and are therefore installed >>>transparently alon

Re: "Compile time" checking?

2005-08-10 Thread Benjamin Niemann
Qopit wrote: > [snip] > > My questions are: > - Am I missing something with my tester example? > - Are there other code-checking options other than PyChecker? Try pylint -- Benjamin Niemann Email: pink at odahoda dot de WWW: http://www.odahoda.de/ -- http://mail.python.org/mailman/listinfo/pyt

Re: Recommendations for CVS systems

2005-08-10 Thread skip
>> For a python newsgroup, you are required to consider mercurial. It's >> not ready for production use yet, but is making rapid progress, ... aahz> Why do you say "required" when the next sentence you say it's not aahz> ready for production? I believe "consider" != "adopt". Di

Re: PyOpenGL

2005-08-10 Thread Mike C. Fletcher
[EMAIL PROTECTED] wrote: >Hey I'm a programmer looking to port some of my opengl ...although >limited into a python app I've made... I'd like to know where to find >any python/opengl source or a tutorial etc.. whatever I'd like to get a >series of points that represent a 3d slope presented to the

Memory leak in PyImport_ReloadModule - URGENT

2005-08-10 Thread ben . held
Having recently upgraded to Python 2.4, I am having a large memory leak with the following code built with VC++ 6.0: PyObject *pName, *pModule; Py_Initialize(); pName = PyString_FromString(argv[1]); pModule = PyImport_Import(pName);

Re: What are modules really for?

2005-08-10 Thread Tito
> [1] 'aName' => public, '_aName' => protected, '__aName' => private I didn't know this one, as I am quite new to Python. Is it really general use? Regards, Tito -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >