Re: py2exe, pyparallel

2005-11-13 Thread Chris Mellon
On 13 Nov 2005 10:03:52 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I'm using py2exe to create a standalone program that uses pyparallel. > When I run the created program an error occurs and a message directs me > to > the log file which contains: > > Traceback (most recent call last): >

Re: extend

2005-11-14 Thread Chris Mellon
On 11/14/05, Ben Bush <[EMAIL PROTECTED]> wrote: > is there any python code doing this: > there are two line segments (2x+y-1=0 with the coordinates of two ending > points are (1,-1) and (-1,3); > x+y+6=0 with the coordinates of two ending points are (-3,-3) and > (-4,-2);). They extend and when th

Re: Addressing the last element of a list

2005-11-15 Thread Chris Mellon
On 11/14/05, Bengt Richter <[EMAIL PROTECTED]> wrote: > On 14 Nov 2005 11:20:53 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote: > > >Op 2005-11-14, Paul Rubin schreef : > >> Antoon Pardon <[EMAIL PROTECTED]> writes: > >>> We could then have something like the following. > >>> > >>> a = 5 > >>> b = a

Re: Python obfuscation

2005-11-15 Thread Chris Mellon
On 11/15/05, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > The Eternal Squire a écrit : > > Without copyright, how could one possibly earn a living writing a > > novel? > > Without copyright, how could one possibly earn a living writing programs?-) > -- I don't know about you, but I own the cop

Re: Python obfuscation

2005-11-17 Thread Chris Mellon
On 17 Nov 2005 01:29:23 -0800, Ben Sizer <[EMAIL PROTECTED]> wrote: > Mike Meyer wrote: > > > Are you claiming therefore that it's more acceptable to you to have to > > > access the data remotely every time you use the software than once per > > > install? > > > > Alex's solution doesn't require sp

Re: Python gui

2005-11-17 Thread Chris Mellon
On 11/16/05, batfree <[EMAIL PROTECTED]> wrote: > Now GTK can use the local theme.You can choose the local theme to make > your application windows style on Winodws and Mac likely on mac os. > -- > http://mail.python.org/mailman/listinfo/python-list > This is true only in an very, very loose sense

Re: stringified cPickle

2005-11-17 Thread Chris Mellon
On 11/17/05, David Bear <[EMAIL PROTECTED]> wrote: > I'm rather new to pickling but I have some dictionaries and lists I want to > package and send to another process (on another machine). > > I was hoping I could just send a stringified pickle. However, the examples > in the doc have: > > >>> impo

Re: check if com api is still available

2005-11-18 Thread Chris Mellon
On 11/18/05, Neil Hodgson <[EMAIL PROTECTED]> wrote: > Hermann Maier: > > > i am using the com api of a program and if this program is shut down and > > my program calls a method of the api, it crashs. that means, i need to > > check, if the com server is still available, before i can call for it.

Re: examining python objects

2005-11-18 Thread Chris Mellon
On 18 Nov 2005 14:05:05 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > __repr__ almost always only prints a summary of it's > object, not the detailed internal structure that I want to > see. When it prints values, that are not pretty-printed, > nor are the objects that constitute the value

Re: Confused about namespaces

2005-11-18 Thread Chris Mellon
On 18 Nov 2005 15:04:23 -0800, KvS <[EMAIL PROTECTED]> wrote: > Hi all, > > to start with, excuse me, I'm still learning programming alltogether, > probably I'm making some fundamental mistake here... > > I have the files settings.py, GUIclasses.py and main.py in the same > directory. In the file m

Re: Web-based client code execution

2005-11-18 Thread Chris Mellon
On 11/18/05, Paul Watson <[EMAIL PROTECTED]> wrote: > Steve wrote: > > AJAX works because browsers can execute javascript. I don't know of a > > browser that can execute python. Basically your stuck with java or > > javascript because everything else really isn't cross platform. > > Well, I guess

Re: Confused about namespaces

2005-11-18 Thread Chris Mellon
On 18 Nov 2005 15:29:43 -0800, KvS <[EMAIL PROTECTED]> wrote: > Ok, makes sense but didn't seem "natural" to me, although it is an > obvious consequence of what you just pointed out, namely that modules > are evaluated in their own namespace, something to keep in mind... On > the other hand it does

Re: Confused about namespaces

2005-11-18 Thread Chris Mellon
On 18 Nov 2005 16:09:44 -0800, KvS <[EMAIL PROTECTED]> wrote: > Hmm. But actually I was doing this import from GUIclasses with exactly > this in mind, namely that it would make wx also available at top level. There's no reason not to just "import wx" if you want that. > I (in my naive understandi

Re: Guification of console app

2005-11-25 Thread Chris Mellon
On 11/25/05, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > "metiu" wrote: > > > you have a compression utility that works as a standard *nix filter, so > > it takes something from stdin and gives it back compressed to stdout > > you like to use it as such, because it's nice to call it from the > > com

Re: General question about Python design goals

2005-11-30 Thread Chris Mellon
On 11/30/05, Christoph Zwerschke <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Paul Rubin wrote: > >>Look at the list.count() example at the start of this thread. > >>Diagnosing it isn't hard. Curing it isn't hard. It doesn't bloat > >>Python by an order of magnitude. A suitably fact

Re: Is Python string immutable?

2005-11-30 Thread Chris Mellon
On 11/30/05, could ildg <[EMAIL PROTECTED]> wrote: > In java and C# String is immutable, str=str+"some more" will return a new > string and leave some gargabe. > so in java and C# if there are some frequent string operation, > StringBuilder/StringBuffer is recommanded. > > Will string operation in

Re: wxPython installation issues on Debian

2005-11-30 Thread Chris Mellon
On 11/30/05, Robert Kern <[EMAIL PROTECTED]> wrote: > Paul McNett wrote: > > Robert Kern wrote: > > > >>Although Ubuntu is a Debian derivative, it does have different packages. > >>At the moment, Debian's default Python is 2.3 although one can also > >>install Python 2.4, and most Python packages i

Re: General question about Python design goals

2005-11-30 Thread Chris Mellon
On 11/30/05, Christoph Zwerschke <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > Paul Rubin wrote: > Look at the list.count() example at the start of this thread. > Diagnosing it isn't hard. Curing it isn't hard. It doesn't bloat > Python by an order of magnitude. A suitably factored imp

Re: General question about Python design goals

2005-12-01 Thread Chris Mellon
On 12/1/05, Christoph Zwerschke <[EMAIL PROTECTED]> wrote: > I think this all boils down to the following: > > * In their most frequent use case where tuples are used as lightweight > data structures keeping together heterogenous values (values with > different types or meanings), index() and count

Re: Which License Should I Use?

2005-12-01 Thread Chris Mellon
On 11/30/05, Robert Kern <[EMAIL PROTECTED]> wrote: > Paul Boddie wrote: > > Paul Rubin wrote: > > > >>That is the guy who claims it is impossible to release anything into > >>the public domain, other than by dying and then waiting 70 years. > > > > Is that an indirect reference to the following ar

Re: register keyevent in wxpython

2005-12-09 Thread Chris Mellon
On 9 Dec 2005 01:52:27 -0800, ash <[EMAIL PROTECTED]> wrote: > hi, > is there a way to register application wide hotkey in wxpython? > i tried wxWindow::RegisterHotKey(). but the problem is it registers the > hotkey as a system wide hotkey. this causes problems in other > applications running concu

Re: Managing import statements

2005-12-10 Thread Chris Mellon
On 12/10/05, Shane Hathaway <[EMAIL PROTECTED]> wrote: > Let's talk about the problem I really want help with. I brought up a > proposal earlier, but it was only half serious. I realize Python is too > sacred to accept such a heretical change. ;-) > > Here's the real problem: maintaining import s

Re: lambda (and reduce) are valuable

2005-12-10 Thread Chris Mellon
On 12/9/05, David Isaac <[EMAIL PROTECTED]> wrote: > >>> Jibes against the lambda-clingers lead eventually to serious > >>> questions of style in regard to variable namespacing, > >>> lifespan, cleanup, and so on: > >>> > http://groups.google.com/group/comp.lang.python/browse_thread/thr

Re: OO in Python? ^^

2005-12-11 Thread Chris Mellon
On 12/11/05, Matthias Kaeppler <[EMAIL PROTECTED]> wrote: > Brian Beck wrote: > > def foo(self): > > raise NotImplementedError("Subclasses must implement foo") > > That's actually a good idea, though not as nice as a check at > "compile-time" (jesus, I'm probably talking in C++ speech again, is

Re: "0 in [True,False]" returns True

2005-12-13 Thread Chris Mellon
On 13 Dec 2005 11:29:10 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote: > Op 2005-12-13, Steve Holden schreef <[EMAIL PROTECTED]>: > > Antoon Pardon wrote: > >> Op 2005-12-13, Steve Holden schreef <[EMAIL PROTECTED]>: > >> > >>>Pierre Quentel wrote: > >>> > Hi all, > > In some program I

Re: Why and how "there is only one way to do something"?

2005-12-15 Thread Chris Mellon
On 15 Dec 2005 04:32:39 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] wrote: > > Tolga wrote: > > > As far as I know, Perl is known as "there are many ways to do > > > something" and Python is known as "there is only one way". Could you > > > please explain this? How is

Re: Why and how "there is only one way to do something"?

2005-12-15 Thread Chris Mellon
On 15 Dec 2005 05:08:02 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Chris Mellon wrote: > > On 15 Dec 2005 04:32:39 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > > [EMAIL PROTECTED] wrote: > > > > Tolga wrote: > &

Re: IsString

2005-12-15 Thread Chris Mellon
> Terminology is important, because we understand the world through > language. If your language is confused or misleading, your understanding > will also be confused or incomplete. I think the issue is pretty simple, myself: With mutable objects, Python has the semantics normally associated wit

Re: IsString

2005-12-15 Thread Chris Mellon
On 12/15/05, Chris Mellon <[EMAIL PROTECTED]> wrote: > > > Terminology is important, because we understand the world through > > language. If your language is confused or misleading, your understanding > > will also be confused or incomplete. > > I think t

Re: Python obfuscation

2005-12-25 Thread Chris Mellon
On 12/25/05, Peter Maas <[EMAIL PROTECTED]> wrote: > yepp schrieb: > > Once you got the model of free and open source software you can't but shake > > your head at obfuscating people treating their users as enemies. > > Sorry but this is naive nonsense. Open source is a good model but > it can't be

Re: OOP: method overriding works in mysterious ways?

2006-01-03 Thread Chris Mellon
On 1/2/06, Mike Meyer <[EMAIL PROTECTED]> wrote: > "John M. Gabriele" <[EMAIL PROTECTED]> writes: > > > Consider the following: > > > > #!/usr/bin/python > > > > #- > > class Grand_parent( object ): > > > > def speak( self ): > >

Re: Problems with WX and program loop...

2006-01-11 Thread Chris Mellon
On 11 Jan 2006 10:33:08 -0800, Mr BigSmoke <[EMAIL PROTECTED]> wrote: > Hi everybody... I have an app that has to controll some ascii files > every 10/30 seconds... I was planning to have an GUI using wxpython. > The problems is that i wasn't able to manage my application loop and > the wxApp loop,

Re: Implied instance attribute creation when referencing a class attribute

2006-01-16 Thread Chris Mellon
On 16 Jan 2006 14:11:25 -0800, Russell Warren <[EMAIL PROTECTED]> wrote: > I just ran across a case which seems like an odd exception to either > what I understand as the "normal" variable lookup scheme in an > instance/object heirarchy, or to the rules regarding variable usage > before creation.

Re: Python code written in 1998, how to improve/change it?

2006-01-19 Thread Chris Mellon
On 19 Jan 2006 15:53:54 -0800, Petr Jakes <[EMAIL PROTECTED]> wrote: > Thanks for your comments, > The mentioned "8 years old" code actually works somehow. > > I am trying to solve very similar problem about FSM as the code in the > example does and I do not want to be overburden by the if/elif stu

Re: Having trouble using CTypes with a custom function

2006-10-04 Thread Chris Mellon
On 4 Oct 2006 11:18:16 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi all. > > I just started looking at Python's ctypes lib and I am having trouble > using it for a function. > > For starters, here's my Python code: > > > from ctypes import*; > myStringDLL= cdll.LoadLibrary("myStringDLL.

Re: Having trouble using CTypes with a custom function

2006-10-04 Thread Chris Mellon
On 4 Oct 2006 11:35:11 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Would you have any example of a wrapper for such data types? > > Thanks. > > Chris Mellon wrote: > > On 4 Oct 2006 11:18:16 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > &g

Re: Initialization of variables using no-arg constructor

2006-10-09 Thread Chris Mellon
On 10/9/06, Edward Waugh <[EMAIL PROTECTED]> wrote: > Consider the following (working) Python code: > > import sys > > def sum(list): > # total = 0 does not work for non-numeric types > total = list[0].__class__() > for v in list: > total += v > return total > > l = [1, 2, 3

Re: Can I use decorators to manipulate return type or create methods?

2006-10-19 Thread Chris Mellon
On 19 Oct 2006 06:43:49 -0700, WakeBdr <[EMAIL PROTECTED]> wrote: > I'm writing a class that will query a database for some data and return > the result to the caller. I need to be able to return the result of > the query in several different ways: list, xml, dictionary, etc. I was > wondering if

Re: Sending Dictionary via Network

2006-10-25 Thread Chris Mellon
On 24 Oct 2006 16:56:43 -0700, Simon Forman <[EMAIL PROTECTED]> wrote: > > mumebuhi wrote: > > Thank you very much for the reply. > > > > Can pickle work directly with socket? The way I am doing right now is > > to pickle the object to a file then send the file content through the > > socket. > > P

Re: ini files and plugins

2006-11-16 Thread Chris Mellon
On 11/16/06, tool69 <[EMAIL PROTECTED]> wrote: > Hi, > I've made a basic LaTeX file editor in wxPython, but now I wanted to add > it some features : > > 1 - create a sort of ini file where I can put the user configuration > that will load itself on the application startup ; wxPython includes a co

Re: Ctypes and freeing memory

2006-10-03 Thread Chris Mellon
On 10/3/06, Oliver Andrich <[EMAIL PROTECTED]> wrote: > Hi everybody, > > I am currently playing around with ctypes and a C library (libWand > from ImageMagick), and as I want to easily deploy it on Mac, Linux and > Windows, I prefer a ctypes solution over a C module. At least on > windows, I would

Re: PyQt app in seperate thread

2006-11-22 Thread Chris Mellon
On 22 Nov 2006 06:43:55 -0800, anders <[EMAIL PROTECTED]> wrote: > > Phil Thompson wrote: > > On Wednesday 22 November 2006 2:06 pm, anders wrote: > > > Phil Thompson wrote: > > > > On Wednesday 22 November 2006 12:37 pm, anders wrote: > > > > > I am writing a plugin for a piece of software in pyth

Re: Abelson and Python

2006-11-24 Thread Chris Mellon
On 11/23/06, Scott David Daniels <[EMAIL PROTECTED]> wrote: > markscottwright wrote: > > Fredrik Lundh wrote: > >> markscottwright wrote: > >> > >> > If it were that easy, the PyPy guys would be done by now. > >> > >> if the PyPy guys had focused on writing a Python interpreter in Python, > >> the

Re: How good is CORBA?

2006-11-27 Thread Chris Mellon
On 11/24/06, Piet van Oostrum <[EMAIL PROTECTED]> wrote: > >>>>> "Chris Mellon" <[EMAIL PROTECTED]> (CM) wrote: > > >CM> FYI: Ice is available under the GPL, so if by "pay" you mean "pay > >CM> money" that

super() and type()

2006-11-27 Thread Chris Mellon
I see super documented, and in use, as below (from the Python documentation) class C(B): def meth(self, arg): super(C, self).meth(arg) I'd like to not write C all the time, so is there any problem with writing: class C(B): def meth(self, arg): super(type(self), self).meth

Re: type(foo) == function ?

2006-11-29 Thread Chris Mellon
On 11/29/06, Tom Plunket <[EMAIL PROTECTED]> wrote: > I'd like to figure out if a given parameter is a function or not. > > E.g. > > >>> type(1) > > >>> type(1) == int > True > > implies: > > >>> def foo(): > ... pass > ... > >>> type(foo) > > >>> type(foo) == function > Traceback (most recent

Re: type(foo) == function ?

2006-11-29 Thread Chris Mellon
y. The three sorts of things that I will deal with in the UI > are callable things (e.g. functions, for which Chris Mellon reminds me > about callable()), mappings (e.g. dictionaries, used similarly to the > top-level one), and sequences of strings. > > So I think callable() works f

Re: Is there an easier way to express this list slicing?

2006-11-30 Thread Chris Mellon
On 11/30/06, Thomas Ploch <[EMAIL PROTECTED]> wrote: > John Henry schrieb: > > If I have a list of say, 10 elements and I need to slice it into > > irregular size list, I would have to create a bunch of temporary > > variables and then regroup them afterwords, like: > > > > # Just for illustration.

Re: Beautiful Soup Question: Filtering Images based on their width and height attributes

2006-11-30 Thread Chris Mellon
On 30 Nov 2006 12:43:45 -0800, PicURLPy <[EMAIL PROTECTED]> wrote: > Hello, > > I want to extract some image links from different html pages, in > particular i want extract those image tags which height values are > greater than 200. Is there an elegant way in BeautifulSoup to do this? > Most imag

Re: WxPython

2006-12-04 Thread Chris Mellon
On 3 Dec 2006 04:14:08 -0800, Raja <[EMAIL PROTECTED]> wrote: > Hi, > I am trying to develop an application which would mainly do the > following 2 things . I would like to know how it can be achieved and > also the libraries needed for it . > > i) active window tracking > In this s

Re: Factory pattern implementation in Python

2006-12-04 Thread Chris Mellon
On 4 Dec 2006 08:39:17 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, > > I need to parse a binary file produced by an embedded system, whose > content consists in a set of events laid-out like this: > > ... > > Every "event" is a single byte in size, and it indicates how long is >

Re: Async callback in python

2006-12-06 Thread Chris Mellon
On 12/4/06, Calvin Spealman <[EMAIL PROTECTED]> wrote: > On 4 Dec 2006 20:18:22 -0800, Linan <[EMAIL PROTECTED]> wrote: > > Hi, > > > > In javascript, code could be written like this: > > > > ... > > > > var _p=XMLHttpRequest(); > > _p.open('GET',url,true); > > _p.send(null)

Re: merits of Lisp vs Python

2006-12-08 Thread Chris Mellon
On 8 Dec 2006 12:23:54 -0800, Stephen Eilert <[EMAIL PROTECTED]> wrote: > > Alex Mizrahi escreveu: > > > > > > we should feed this text to the query-builder. > > then we should bind ?dept to our variable departament (i'm not sure how this > > is done in SPARQL, but there should be a way). > > then

Re: Conditional iteration

2006-12-13 Thread Chris Mellon
On 13 Dec 2006 07:47:23 -0800, Paul Rubin <"http://phr.cx"@nospam.invalid> wrote: > at <[EMAIL PROTECTED]> writes: > > I have a lot times the following code: > > > > for x in [-2, -1, 0, 1, 2, 3, 4]: > > if x > 0: > > ... more code... > > Use: > > for x in (x in [-2, -1, 0,

Re: merits of Lisp vs Python

2006-12-14 Thread Chris Mellon
On 12/14/06, Ken Tilton <[EMAIL PROTECTED]> wrote: > > > Andrew Reilly wrote: > >> Each skill seems to have a title, a > > list of annotations, and a list of hints (and a reverse, which I don't > > understand). > > There's the problem. > > > That all looks like data. > > No, not reverse, the part

Re: Good Looking UI for a stand alone application

2006-12-18 Thread Chris Mellon
On 12/17/06, Christophe Cavalaria <[EMAIL PROTECTED]> wrote: > Sandra-24 wrote: > > > On 12/16/06, The Night Blogger <[EMAIL PROTECTED]> wrote: > >> Can someone recommend me a good API for writing a sexy looking (Rich UI > >> like WinForms) shrink wrap application > > > >> My requirement is that th

Re: Good Looking UI for a stand alone application

2006-12-19 Thread Chris Mellon
> Ok, now here's a question for you: if crossplatform toolkits/frameworks > are so great and automagically allow to produce superlickable and > native-looking/feeling applications on all three major platforms, why is > there so few of those applications on OS X ? > > "Because Mac users are elit

Re: Fall of Roman Empire

2006-12-20 Thread Chris Mellon
On 12/20/06, Ben Finney <[EMAIL PROTECTED]> wrote: > "John Machin" <[EMAIL PROTECTED]> writes: > > > Ben Finney wrote: > > > > > \ "...one of the main causes of the fall of the Roman Empire was | > > > `\that, lacking zero, they had no way to indicate successful | > > > _o__)

PIL broken on win32?

2006-12-20 Thread Chris Mellon
PIL 1.1.5 and 1.1.6 both seem to be broken, in different ways, on win32. 1.1.5 will load and access images, but ImageDraw fails: i = Image.open("good.jpg") d = ImageDraw.Draw(i) d.line((10,10,20,20)) Traceback (most recent call last): File "", line 1, in ? File "C:\Python24\Lib\site-packages\

Re: Good Looking UI for a stand alone application

2006-12-21 Thread Chris Mellon
On 12/20/06, Vincent Delporte <[EMAIL PROTECTED]> wrote: > On Tue, 19 Dec 2006 08:15:18 -0600, "Chris Mellon" <[EMAIL PROTECTED]> > wrote: > >There's a few more caveats I haven't addressed, and there are places > >where wx isn't perfect. >

Re: some OT: how to solve this kind of problem in our program?

2006-12-26 Thread Chris Mellon
On 12/26/06, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > At Monday 25/12/2006 21:24, Paul McGuire wrote: > > >For example, for all the complexity in writing Sudoku solvers, there are > >fewer than 3.3 million possible permutations of 9 rows of the digits 1-9, > >and far fewer permutations that m

Re: __getattr__ possible loop

2006-12-28 Thread Chris Mellon
On 28 Dec 2006 07:45:05 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Maksim Kasimov: > > how to improve the situation depends on what do you expect to get by > > calling "T().method()" > > You are right, sorry for being cryptic. I think that's a kind of bug of > Python (produced maybe by

Re: per interpreter storage for C extensions

2006-12-28 Thread Chris Mellon
On 12/28/06, Robin Becker <[EMAIL PROTECTED]> wrote: > As part of some django usage I need to get some ReportLab C extensions into a > state where they can be safely used with mod_python. > > Unfortunately we have C code that seems incompatible with mod_python and I'm > looking for ways to improve

Re: __getattr__ possible loop

2006-12-28 Thread Chris Mellon
On 12/28/06, Chris Mellon <[EMAIL PROTECTED]> wrote: > On 28 Dec 2006 07:45:05 -0800, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > > Maksim Kasimov: > > > how to improve the situation depends on what do you expect to get by > > > calling "T().m

Re: db access

2006-12-28 Thread Chris Mellon
On 12/28/06, Martin P. Hellwig <[EMAIL PROTECTED]> wrote: > king kikapu wrote: > > Hey Martin, > > > > thanks for the fast reply! > > > > I have already seen that link and i just downloaded the pyodbc module > > but isn't Python already containing a "built-in" odbc module so to > > allow for db com

Re: Some basic newbie questions...

2006-12-28 Thread Chris Mellon
On 28 Dec 2006 08:40:02 -0800, jonathan.beckett <[EMAIL PROTECTED]> wrote: > Hi all, > > While working on support at work, I have been picking away at Python - > because I think it could be a valuable scripting tool for building > utilities from. I have been reading the python.org tutorials, and >

Re: per interpreter storage for C extensions

2006-12-28 Thread Chris Mellon
On 12/28/06, Robin Becker <[EMAIL PROTECTED]> wrote: > Robin Becker wrote: > > Chris Mellon wrote: > >> On 12/28/06, Robin Becker <[EMAIL PROTECTED]> wrote: > >>> As part of some django usage I need to get some ReportLab C extensions > >>>

Re: how to serve image files without disk use?

2006-12-29 Thread Chris Mellon
On 12/28/06, Ray Schumacher <[EMAIL PROTECTED]> wrote: > I'm trying to make a small camera server using VideoCapture.py and > socket. I needed to construct a complete image file with headers etc > for a browser to recognize it, but I couldn't find a combination of > StringIO and wx image methods to

Re: Python-list Digest, Vol 39, Issue 465

2006-12-29 Thread Chris Mellon
On 12/29/06, Ray Schumacher <[EMAIL PROTECTED]> wrote: > > At 10:50 AM 12/29/2006, you wrote: > > In addition to what Chris said, is there a reason why you're reinventing > the wheel instead of using available components? > Hi Carsten, > The eventual goal here is towards a streaming two-way ser

Re: Packaging up a Python/Twisted Matrix application...

2007-01-04 Thread Chris Mellon
On 1/4/07, Chaz Ginger <[EMAIL PROTECTED]> wrote: > I have a rather large Python/Twisted Matrix application that will be run > on Windows, Linux and perhaps Macs. I was wondering if there are any > tools that can be used to create an installer that will bring in Python, > Twisted Matrix, my applica

Re: Using External Libraries with python?

2007-01-04 Thread Chris Mellon
On 1/4/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Ognjen Bezanov schrieb: > > I have some external C libraries I would like to use with python. > > > > I have been searching on the internet and found many such > > modules/bindings for libraries (e.g. Py-Lame) but have not yet > > come acros

Re: MySQLdb windows binaries for Python 2.5?? Yes, but from a World of Warcraft guild.

2007-01-05 Thread Chris Mellon
On 1/5/07, John Nagle <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Anyone have a binary they want to share? > > > > /Martin > > > Somebody has an untested one. See > > http://sourceforge.net/forum/forum.php?thread_id=1571110&forum_id=70461 > > You have to ask for a copy; they don't wa

Re: PDF rendering toolkit?

2007-01-08 Thread Chris Mellon
On 1/5/07, Jorge Vargas <[EMAIL PROTECTED]> wrote: > Hi > > I'm looking for a tool to take an actual .pdf file and display it in a > window (I'm using wxwidgets at the moment) > > I have found several project but none seem to do what I need. > > http://sourceforge.net/projects/pdfplayground seems l

Re: Suitability for long-running text processing?

2007-01-08 Thread Chris Mellon
On 1/8/07, Felipe Almeida Lessa <[EMAIL PROTECTED]> wrote: > On 1/8/07, tsuraan <[EMAIL PROTECTED]> wrote: > > > > > > > I just tried on my system > > > > > > (Python is using 2.9 MiB) > > > >>> a = ['a' * (1 << 20) for i in xrange(300)] > > > (Python is using 304.1 MiB) > > > >>> del a > > > (Pyth

Re: Suitability for long-running text processing?

2007-01-08 Thread Chris Mellon
On 1/8/07, tsuraan <[EMAIL PROTECTED]> wrote: > > > > My first thought was that interned strings were causing the growth, > > but that doesn't seem to be the case. > > Interned strings, as of 2.3, are no longer immortal, right? The intern doc > says you have to keep a reference around to the strin

Re: Why less emphasis on private data?

2007-01-08 Thread Chris Mellon
Private data in the C++ and Java OO worlds is so taught so much and emphasized so often that people have started thinking of it as being desirable for its own sake. But the primary motivation for it grew out of the need to maintain compatible interfaces. These languages rely on a great deal of shar

Fwd: Execute binary code

2007-01-08 Thread Chris Mellon
On 8 Jan 2007 12:45:45 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Larry Bates wrote: > > > What you are asking is a virus/trojan "like" program. There's no reason > > you shouldn't be able to write the code to TEMP directory and execute it. > > > > -Larry > > > No, it is not about a tro

Re: Fwd: Execute binary code

2007-01-08 Thread Chris Mellon
On 1/8/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > At Monday 8/1/2007 18:01, [EMAIL PROTECTED] wrote: > > >Chris Mellon wrote: > > > Writing to a temp file will be at least 3 times as easy and twice as > > > reliable as any other method you come up with.

Re: Execute binary code

2007-01-09 Thread Chris Mellon
On 9 Jan 2007 07:04:11 -0800, sturlamolden <[EMAIL PROTECTED]> wrote: > > Jorgen Grahn wrote: > > > For what it's worth[1], under Unix it /is/ impossible. The only way to > > bring in > > new code (short of dynamic libraries) is to call exec(2) or its variations, > > and all need a file system obj

Re: Yet another GUI toolkit question...

2006-02-11 Thread Chris Mellon
On 2/10/06, Kevin Walzer <[EMAIL PROTECTED]> wrote: > ...with a twist. > > I'm undertaking my first semi-substantial Python GUI application after a > long time dabbling with the language. > > I'm fairly experienced with Tcl/Tk, so Tkinter seems the obvious choice > to reduce my Python learning curv

Re: Yet another GUI toolkit question...

2006-02-11 Thread Chris Mellon
On 2/11/06, Kevin Walzer <[EMAIL PROTECTED]> wrote: > Chris Mellon wrote: > > > > > If you're planning on selling an application, especially to OS X > > users, then Tk is absolutely out of the question. It doesn't have even > > the slightest resemblenc

Re: Legality of using Fonts

2006-02-11 Thread Chris Mellon
On 2/11/06, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Fri, 10 Feb 2006 20:24:34 -0800, Ross Ridge wrote: > > > Steven D'Aprano wrote: > >> It is highly unlikely that any judge will be fooled by a mere change in > >> format ("but Your Honour, I converted the TTF file into a bitmap"). > > > > I

Re: Python vs. Lisp -- please explain

2006-02-21 Thread Chris Mellon
On 2/20/06, Donn Cave <[EMAIL PROTECTED]> wrote: > Quoth Steven D'Aprano <[EMAIL PROTECTED]>: > ... > | Nobody denies that Python code running with no optimization tricks is > | (currently) slower than compiled C code. That's a matter of objective > | fact. Nobody denies that Python can be easily r

Re: Python vs. Lisp -- please explain

2006-02-21 Thread Chris Mellon
On 21 Feb 2006 08:30:04 -0800, Paul Boddie <[EMAIL PROTECTED]> wrote: > Chris Mellon wrote: > > > > You're correct as far as it goes, but can you provide a reasonable > > definition for "interpreted" that matches the common usage? Most > > people ca

Re: wxPython memory footprint? - Re: Write a GUI for a python script?

2006-03-02 Thread Chris Mellon
On 3/2/06, robert <[EMAIL PROTECTED]> wrote: > ianaré wrote: > > > wxPython is another good option, especially since there is > > boa-constructor, which is a great GUI builder, almost makes it too easy > > to make a nice looking app in no time at all. > > > > http://www.wxpython.org/download.php >

Re: XP rich text cut-n-paste

2006-03-04 Thread Chris Mellon
On 4 Mar 2006 11:39:11 -0800, Paddy <[EMAIL PROTECTED]> wrote: > Hi, > Is their a colourized editor/shell that allows you to cut and paste the > colourized text? > > Idle, SPE, Eclipse, and pythonwin all seem to nicely colourize both > command line input as well as editor windows but when I cut and

Re: Python memory handling

2007-05-31 Thread Chris Mellon
On 5/31/07, Thorsten Kampe <[EMAIL PROTECTED]> wrote: > * Chris Mellon (Thu, 31 May 2007 12:10:07 -0500) > > > Like: > > > import pool > > > pool.free() > > > pool.limit(size in megabytes) > > > > > > Why not letting the user choosing

Re: python for EE CAD program

2007-06-04 Thread Chris Mellon
On 6/4/07, chewie54 <[EMAIL PROTECTED]> wrote: > On Jun 4, 10:58 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > > Hello Diez, > > > > > I did look at PythonCad but the distribution and install methods for > > > Windows is not user freindly. Since the public domain software, I > > > don't th

Re: which "GUI module" you suggest me to use?

2007-06-06 Thread Chris Mellon
On 6/6/07, Samuel <[EMAIL PROTECTED]> wrote: > On Wed, 06 Jun 2007 00:22:40 +, Grant Edwards wrote: > > >> I know that WxPython work only under Windows and PyGTK work only under > >> Linux... > > > > You 'know' wrong. > > > > wxPython works fine under Windows, Linux and OSX. > > wxPython emulat

Re: which "GUI module" you suggest me to use?

2007-06-06 Thread Chris Mellon
On 6/6/07, Samuel <[EMAIL PROTECTED]> wrote: > On Wed, 06 Jun 2007 14:43:35 +, Grant Edwards wrote: > > > On 2007-06-06, Samuel <[EMAIL PROTECTED]> wrote: > >> On Wed, 06 Jun 2007 00:22:40 +, Grant Edwards wrote: > >>> wxPython works fine under Windows, Linux and OSX. > >> > >> wxPython emu

Re: which "GUI module" you suggest me to use?

2007-06-06 Thread Chris Mellon
On 6/6/07, Samuel <[EMAIL PROTECTED]> wrote: > On Wed, 06 Jun 2007 09:45:48 -0500, Chris Mellon wrote: > > > On 6/6/07, Samuel <[EMAIL PROTECTED]> wrote: > > In the general case, wxWidgets wraps (not emulates) Gtk. I don't believe > > that there are

Re: wxPython / Dabo demo shell ?

2007-06-08 Thread Chris Mellon
On 6/8/07, stef <[EMAIL PROTECTED]> wrote: > hello, > > I was impressed by the demo shell of wxPython, > and a few days ago (finally getting Dabo to work), > I saw Dabo uses the same demo shell. > > Is there any more information available about this shell, > because it seems a very nice / good way

Re: Python editors again (it's not the same old request)

2007-06-10 Thread Chris Mellon
On 6/10/07, Eric S. Johansson <[EMAIL PROTECTED]> wrote: > I upgraded to version 9.5 and all of my tools which enabled me to program by > voice in Emacs are broken. it's one of those dagnabbit a moment's of life. > > What I am looking for is a Windows based Python Smart editor that uses > specifi

Re: for ... else ?

2007-06-12 Thread Chris Mellon
On 6/12/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Tue, 12 Jun 2007 06:34:49 -0300, exhuma.twn <[EMAIL PROTECTED]> escribió: > > > On Jun 12, 6:57 am, "Gabriel Genellina" <[EMAIL PROTECTED]> > > wrote: > >> for number in range(10,100): > >> for divisor in range(2,number): > >>

Re: List sequential initialization

2007-06-12 Thread Chris Mellon
On 6/12/07, HMS Surprise <[EMAIL PROTECTED]> wrote: > Thanks for the explaination. It didn't seem natural and from the > tutorial I read: > > A value can be assigned to several variables simultaneously: > > >>> x = y = z = 0 # Zero x, y and z > > > Maybe I infer too much > And yet, yo

Re: Method much slower than function?

2007-06-14 Thread Chris Mellon
On 6/14/07, Peter Otten <[EMAIL PROTECTED]> wrote: > Peter Otten wrote: > > > Leo Kislov wrote: > > > >> On Jun 13, 5:40 pm, [EMAIL PROTECTED] wrote: > >>> Hi all, > >>> > >>> I am running Python 2.5 on Feisty Ubuntu. I came across some code that > >>> is substantially slower when in a method than

Re: Problem with wxPython

2007-06-26 Thread Chris Mellon
On 6/26/07, Ali <[EMAIL PROTECTED]> wrote: > Hi > > I'm not sure if this is the right place to post, pardon me if it's not. > I'm having a problem with an application written with wxpython. The frame > seems only to refresh when moving my mouse of it, though i frequently call: > frame.Refresh(True)

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-26 Thread Chris Mellon
On 6/26/07, paul <[EMAIL PROTECTED]> wrote: > Bruno Desthuilliers schrieb: > > Stephen R Laniel a écrit : > >> On Wed, Jun 20, 2007 at 09:41:09PM +0100, Michael Hoffman wrote: > >>> If you asked Java programmers why you couldn't turn *off* Java's static > >>> type checking if you wanted to, you'd p

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-27 Thread Chris Mellon
On 6/27/07, Andy Freeman <[EMAIL PROTECTED]> wrote: > On Jun 26, 10:03 am, Paul Rubin wrote: > > > Map doesn't work on generators or iterators because they're not part > > > of the common lisp spec, but if someone implemented them as a library, > > > said library could ea

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-27 Thread Chris Mellon
On 6/27/07, Douglas Alan <[EMAIL PROTECTED]> wrote: > Paul Rubin writes: > > Gee, that's back to the future with 1975 Lisp technology. Destructors > are a much better model for dealing with such things (see not *all* > good ideas come from Lisp -- a few come from C++) a

  1   2   3   4   5   6   >