XML, JSON, or what?

2006-06-07 Thread Frank Millman
Hi all I am writing a multi-user accounting/business application, which uses sockets to communicate between server and client. The server contains all the business logic. It has no direct knowledge of the client. I have devised a simple message format to exchange information between the two. At f

Re: python socket proxy

2006-06-07 Thread jstobbs
cool, nice one, thanks. Jeethu Rao wrote: > Simplest way would be to rename your python file with a .pyw extension > instead of a .py extension. > If you're looking for windows services, checkout > win32serviceutil.ServiceFramework in pywin32. > > Jeethu Rao > > [EMAIL PROTECTED] wrote: > > Hi >

Re: language-x-isms

2006-06-07 Thread Fredrik Lundh
Bryan wrote: > for example, i've noticed several java developers i know write python code > like > this: > > foo_list = [...] > for i in range(len(foo_list)): > print '%d %s' % (i, foo_list[i]) which is a perfectly valid way of doing things if you're targeting older Python platforms as we

Re: what are you using python language for?

2006-06-07 Thread jean-michel bain-cornu
This is my main development tool. I use it for business specific applications (with wx, cherrypy and mysql), mail server administration (in console mode and with cherrypy), and utilities. Regards jm -- http://mail.python.org/mailman/listinfo/python-list

Re: follow-up to FieldStorage

2006-06-07 Thread Tim Roberts
John Salerno <[EMAIL PROTECTED]> wrote: >Bruno Desthuilliers wrote: >> John Salerno a écrit : >>> If I want to get all the values that are entered into an HTML form and >>> write them to a file, is there some way to handle them all at the same >>> time, or must FieldStorage be indexed by each sp

Re: Download .jpg from web

2006-06-07 Thread Mark rainess
GMane Python wrote: > Hello All. > Using a network camera with built-in webserver, I'd like to have a python > program download .jpg files on a local lan. the location is > http:///jpg/image.jpg. > > Currently, I'm importing urllib and using urlopen to the address, then > read()-ing it, savin

Re: xml processing speed test

2006-06-07 Thread K.S.Sreeram
Fredrik Lundh wrote: > by using it to split your document into reasonably-sized chunks (one > record, one expression, one text block, one paragraph, etc), and using > Python code to process the chunks. I've updated cElementTree/iterparse implementation to build one full expression at a time. htt

ctypes for IronPython (preliminary)

2006-06-07 Thread Sanghyeon Seo
ctypes is a popular CPython extension planned for inclusion in Python 2.5. It is a foreign function interface library. Homepage: http://starship.python.net/crew/theller/ctypes/ Documentation: http://docs.python.org/dev/lib/module-ctypes.html I would like to announce a preliminary implementation o

Re: Regular Expression question

2006-06-07 Thread Paul McGuire
"Frank Potter" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > pyparsing is cool. > but use only re is also OK > # -*- coding: UTF-8 -*- > import urllib2 > html=urllib2.urlopen(ur"http://www.yahoo.com/";).read() > > import re > r=re.compile('[^"]+)"[^>]*>',re.IGNORECASE) > for m in r.

Test tool for python code.

2006-06-07 Thread jnair
Is there any tool available that will tell me what are the different test paths for any python code? thnaks regards Jitu -- http://mail.python.org/mailman/listinfo/python-list

Re: Select hangs after some reads

2006-06-07 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Hi, > > I'm building a multithreaded application and I encountered a tiny and > annoying problem. I use a select to wait for data to be read from a > socket, after some reads, the select simply blocks and stays that way > until I close the connection on the other side of

language-x-isms

2006-06-07 Thread Bryan
does anyone know if there is a collection somewhere of common python mistakes or inefficiencies or unpythonic code that java developers make when first starting out writing python code? if not, maybe we could start a thread on this. for example, i've noticed several java developers i know write

Select hangs after some reads

2006-06-07 Thread [EMAIL PROTECTED]
Hi, I'm building a multithreaded application and I encountered a tiny and annoying problem. I use a select to wait for data to be read from a socket, after some reads, the select simply blocks and stays that way until I close the connection on the other side of the socket. When the socket is close

How to generate k+1 length strings from a list of k length strings?

2006-06-07 Thread Girish Sahani
I have a list of strings all of length k. For every pair of k length strings which have k-1 characters in common, i want to generate a k+1 length string(the k-1 common characters + 2 not common characters). e.g i want to join 'abcd' with bcde' to get 'abcde' but i dont want to join 'abcd' with 'c

Re: The Nature of the “Unix Philosophy”

2006-06-07 Thread Keith Thompson
"Xah Lee" <[EMAIL PROTECTED]> writes: > The Nature of the “Unix Philosophy” > > Xah Lee, 2006-05 ___ /| /| | | ||__|| | Please do | / O O\__

Re: Python language problem

2006-06-07 Thread ripley
Thanks all, you all are nice man. Dennis Lee Bieber 写道: > while len(lst): #list is a built-in function, don't use as a name > del lst[0] #delete the first item IN the lst > I found Dennis 's code is usefull that is a way to solve my problem. -- http://mail.python.org

Re: Debugging a pickle

2006-06-07 Thread Steve Holden
Jeffrey Barish wrote: > I use cPickle to serialize some data so that I can read it back later. It > works sometimes, but other times I get an EOFError at the > > data = cPickle.load(fileobj) > > statement. I assume that this error indicates that cPickle is not able to > retrieve as much data fr

Debugging a pickle

2006-06-07 Thread Jeffrey Barish
I use cPickle to serialize some data so that I can read it back later. It works sometimes, but other times I get an EOFError at the data = cPickle.load(fileobj) statement. I assume that this error indicates that cPickle is not able to retrieve as much data from the file as it expects -- or that

Re: The Nature of the “Unix Philosophy”

2006-06-07 Thread Frank Silvermann
Xah Lee wrote: > The Nature of the “Unix Philosophy” > > Xah Lee, 2006-05 > > In the computing industry, especially among unix community, we often > hear that there's a “Unix Philosophy”. In this essay, i dissect the > nature and characterization of such “unix philosophy”, as have been > describe

Re: what are you using python language for?

2006-06-07 Thread Frank Potter
I use python to grab imformations and embed it in my delphi app. I gather what I am intereted in so I can read them faster. And I also use python to do some othere everyday jobs, such as periodically copying and zipping a directory into another computer to backup the comtent. On 7 Jun 2006 16:11:

The Nature of the “Unix Philosophy”

2006-06-07 Thread Xah Lee
The Nature of the “Unix Philosophy” Xah Lee, 2006-05 In the computing industry, especially among unix community, we often hear that there's a “Unix Philosophy”. In this essay, i dissect the nature and characterization of such “unix philosophy”, as have been described by Brian Kernighan, Rob Pike,

Re: Regular Expression question

2006-06-07 Thread Frank Potter
pyparsing is cool. but use only re is also OK # -*- coding: UTF-8 -*- import urllib2 html=urllib2.urlopen(ur"http://www.yahoo.com/";).read() import re r=re.compile('[^"]+)"[^>]*>',re.IGNORECASE) for m in r.finditer(html): print m.group('image') I got these rusults: http://us.i1.yimg.com/us.yi

image sequence to Quicktime movie

2006-06-07 Thread Noah Gift
Hi, I am new to python and was interested in writing some python code that converts image sequences, for example tiff, into Quicktime movies, for example animation codec.  Can anyone point me in the right direction to begin my research?  It would be nice to not use pyobjc as I am trying to focus o

Re: Using C struct in Python

2006-06-07 Thread Sudheer Gupta
Hi, Thanks a lot for your responses. It cleared up a lot for me !! Its a superglue developed and used in house and cannot be revealed .. sorry for that !! I am only extending to the existing glue. Have contacted the author regarding the problem. Sorry for confusion -Sudheer John Machin wr

Re: Using C struct in Python

2006-06-07 Thread John Machin
On 8/06/2006 7:35 AM, Sudheer Gupta wrote: > Hi, Hi. Your later "correction" doesn't clear up the confusion below. Quick eye-balling revealed no difference. If you have to correct a minor typo in a posting, please consider saying "change X to Y" instead of reposting the whole thing. > > I am

Re: Regular Expression question

2006-06-07 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > I am new to python regular expression, I would like to use it to get an > attribute of an html element from an html file? > > for example, I was able to read the html file using this: >req = urllib2.Request(url=acaURL) > f

Re: what are you using python language for?

2006-06-07 Thread Petr Jakes
hacker1017 wrote: > im just asking out of curiosity. a vending machine controlled from the PC (peripherals connected using I2C bus (SMBus) and the MDB coin change-giver and the bill acceptor connected to the serial port). Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: CENSORSHIP - Django Project (Schema Evolution Support)

2006-06-07 Thread Just
In article <[EMAIL PROTECTED]>, Erik Max Francis <[EMAIL PROTECTED]> wrote: > Thorsten Kampe wrote: > > > I think I have a deja-vu... Did someone say "Xah"?! > > With a hint of Brandon. And a slice of Timothy Rue. Just -- http://mail.python.org/mailman/listinfo/python-list

Re: what are you using python language for?

2006-06-07 Thread Jason
I've been working on an RPG character generator for consistent (yet varied) set of role-playing systems. Nothing like a pen-and-pencil RPG to throw in tons of special cases and strange rulesets. Python's turned out to be very useful for this project: 1. Fast prototyping and testing. I'm not sta

Re: Re: Regular Expression question

2006-06-07 Thread 李政
I'm sorry! I mean pattern is an argument of the function, in this case, how I process special charactors.    patter = 'www.'   # not this     if re.compile(pattern).match(string) is not None:     ..   but not:       if re.compile(r'www.').match(string) is not None

Re: How do I get the process id when starting a process using os.popen2 or os.popen3 on linux?

2006-06-07 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Is there a way to get the process id when starting a process using > os.popen2 or os.popen3 on linux? on Unix, os.popen2/popen3 uses functions and classes from the popen2 module. they return file objects attached to the process, but there's no (non-hacky) way to get a

Re: Re: Regular expression - dot problem!

2006-06-07 Thread 李政
Fredrik Lundh <[EMAIL PROTECTED]> wrote:李政 wrote:> I've a problem with regular express(dot problem). I checked Python > Library Reference, but i can't find any infomation that is useful.like what a dot means in a regular _expression_? you really need to workon your google fu ;-)in the meantime,

How do I get the process id when starting a process using os.popen2 or os.popen3 on linux?

2006-06-07 Thread mikem76
Is there a way to get the process id when starting a process using os.popen2 or os.popen3 on linux? Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Using C struct in Python** corrected

2006-06-07 Thread Fredrik Lundh
Sudheer Gupta wrote: > I am having trouble using C struct in python. Hope anyone can help me > out ... > > Say, I have my C struct as > > typedef struct call > { > struct call *next; > // . > > } call_t; > > I have a global variable, namely call_pool, which is of type call_t *

Using C struct in Python

2006-06-07 Thread Sudheer Gupta
Hi, I am having trouble using C struct in python. Hope anyone can help me out ... Say, I have my C struct as typedef struct call { struct call *next; // . } call_t; I have a global variable, namely call_pool, which is of type call_t * My python program: cp = call_pool #

Re: creating and naming objects

2006-06-07 Thread Brian
Maarten van Veen wrote: Hi Brian, > > If you would do it like this: > Class Student: > def setName(self, name) > self.name = name > def setId(self, id) > self.id = id > > > def createStudent(): > foo = Student() > foo.setName("Brian") > foo = Student() >

Re: Mutual interdependency problem

2006-06-07 Thread AdSR
Jeremy Sanders wrote: > I'm getting problems with modules with interdependencies when using the > import form "import foo.bar as bar". > > [snip] > > Maybe the "from foo import *" style in __init__.py is a bad idea, but it > allows you to expose a flat namespace without having to put all the code >

Using C struct in Python** corrected

2006-06-07 Thread Sudheer Gupta
Hi, I am having trouble using C struct in python. Hope anyone can help me out ... Say, I have my C struct as typedef struct call { struct call *next; // . } call_t; I have a global variable, namely call_pool, which is of type call_t * My python program: cp = call_pool # no

Re: tempfile Question

2006-06-07 Thread John Machin
On 8/06/2006 2:57 AM, Dennis Lee Bieber wrote: > On Wed, 07 Jun 2006 21:53:02 +1000, John Machin <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > >> I passed over mkstemp() because (according to my reading of the manual), >> mkstemp() requires an *extra* step (close the file),

Re: Regular Expression question

2006-06-07 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I am new to python regular expression, I would like to use it to get an > attribute of an html element from an html file? if you want to parse HTML, use an HTML parser. if you want to parse sloppy HTML, use a tolerant HTML parser: http://www.crummy.com/software/

Re: Convert Date to Short formate

2006-06-07 Thread John Machin
On 8/06/2006 5:50 AM, aqmaiya wrote: > Hello, > there is string value 'Dec 06, 2000' I want to convert that string > date to SHORT FORMAT like '2000-12-06-. Please help me how do I do > that? I'm new in Jython. > Thanks, > aqmaiya > Two ways (at least): (1) check out the strptime and strftime (

Regular Expression question

2006-06-07 Thread ken . carlino
Hi, I am new to python regular expression, I would like to use it to get an attribute of an html element from an html file? for example, I was able to read the html file using this: req = urllib2.Request(url=acaURL) f = urllib2.urlopen(req) data = f.read() my question is how can I jus

[ANN] Firedrop 0.2.2

2006-06-07 Thread Fuzzyman
`Firedrop 2 0.2.2 `_ is now available. You can download it from : `Firedrop-0.2.2.zip `_ This is an important release with several new features, and contributions

Re: Regular expression - dot problem!

2006-06-07 Thread Fredrik Lundh
李政 wrote: > I've a problem with regular express(dot problem). I checked Python > Library Reference, but i can't find any infomation that is useful. like what a dot means in a regular expression? you really need to work on your google fu ;-) in the meantime, look under "The special characters a

Re: what are you using python language for?

2006-06-07 Thread AdSR
I'm using Python for: * log analysis * test tools * data massaging * prototyping -- http://mail.python.org/mailman/listinfo/python-list

Regular expression - dot problem!

2006-06-07 Thread 李政
Hi,   I've a problem with regular express(dot problem). I checked Python Library Reference, but i can't find any infomation that is useful . Nor did Google. They have the same way:     re.compile(''www").match(string).   It always works better. But my pattern string must be an arg

Re: Convert Date to Short formate

2006-06-07 Thread Fredrik Lundh
aqmaiya wrote: > there is string value 'Dec 06, 2000' I want to convert that string > date to SHORT FORMAT like '2000-12-06-. Please help me how do I do > that? you mean ISO format, right? the easiest way is probably to use the time.strptime module to parse the original string into a time tupl

Re: creating and naming objects

2006-06-07 Thread Maarten van Veen
In article <[EMAIL PROTECTED]>, "Brian" <[EMAIL PROTECTED]> wrote: > I have a question that some may consider silly, but it has me a bit > stuck and I would appreciate some help in understanding what is going > on. > > For example, lets say that I have a class that creates a student > object. >

Re: os.system and command output

2006-06-07 Thread Fredrik Lundh
A.M wrote: > Is there anyway I can get the exit code (what os.system returns) from > os.popen? you'd rather kill yourself than read the documentation, right? http://www.python.org/doc/lib/os-newstreams.html#os-newstreams "The exit status of the command (encoded in the format specifie

Re: os.system and command output

2006-06-07 Thread A.M
> Try: > > s = os.popen("DIR").read() > Thanks Steve. Is there anyway I can get the exit code (what os.system returns) from os.popen? -- http://mail.python.org/mailman/listinfo/python-list

Convert Date to Short formate

2006-06-07 Thread aqmaiya
Hello, there is string value 'Dec 06, 2000' I want to convert that string date to SHORT FORMAT like '2000-12-06-. Please help me how do I do that? I'm new in Jython. Thanks, aqmaiya -- http://mail.python.org/mailman/listinfo/python-list

Re: wxpython wxgrid question

2006-06-07 Thread jean-michel bain-cornu
[EMAIL PROTECTED] a écrit : > Tim Roberts wrote: >> [EMAIL PROTECTED] wrote: >>> I am looking for example code that consists of just a frame and a >>> grid(10x2). The grid must fill the its parent even if the frame is >>> resized. >> Have you gone through the wxPython demo application? It contai

Re: Converting binary sid's to a hex string

2006-06-07 Thread Roger Upole
You can use the binascii module to convert the raw bytes of the sid to hex. binascii.b2a_hex(buffer(MySid)) Roger "LittlePython" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I am trying to create a hexstring of a NT4 user account sid which I can in > turn use to query an e

Re: Python to C converter

2006-06-07 Thread Chance Ginger
Isn't Pyrex for writing extensions to Python? As for PyPy, I didn't scroll down far enough to see the compiler info. It does say it is Python written in Python at the top. Shedskin is nothing but a compiler. On Wed, 07 Jun 2006 19:13:27 +0200, Carl Friedrich Bolz wrote: > Chance Ginger wrote: >

Re: Need pixie dust for building Python 2.4 curses module on Solaris 8

2006-06-07 Thread Thomas Dickey
[EMAIL PROTECTED] wrote: > I'm having no success building the curses module on Solaris 8 (yes, I know > it's ancient - advancing the state-of-the-art is not yet an option) for > Python 2.4. Sun provides an apparently ancient version of curses in > /usr/lib, so I downloaded and installed ncurses 5

Re: os.system and command output

2006-06-07 Thread Steve Holden
A.M wrote: > Hi, > > > > How can I run an OS command and have the command's output (to stdout) in my > string variable? > > > > For example in windows, this command should return a list of files within > directory: > > > > os.system("DIR") > > > > I am looking for an alternative funct

Re: Use of Python in .NET

2006-06-07 Thread Gerard Flanagan
[EMAIL PROTECTED] wrote: > Hi, > I am developing a code which has MVC (Model - View - Controler) > architecture.My view is in .NET. And my controller is in Python.So can > i call Python script from .NET? If yes, > Can anybody tell me method or related documentation? > Thanks in Advamce h

os.system and command output

2006-06-07 Thread A.M
Hi, How can I run an OS command and have the command's output (to stdout) in my string variable? For example in windows, this command should return a list of files within directory: os.system("DIR") I am looking for an alternative function that returns the DIR command output in a str

Re: How do I automatically redirect stdout and stderr when using os.popen2?

2006-06-07 Thread mikem76
Here is what I ended up doing: si = file('/dev/null', 'r') so = file('/dev/null', 'a+') i,o = os.popen2('some_command_that_prints_a_lot_to_stdout') os.dup2(so.fileno(), o.fileno()) os.dup2(si.fileno(), i.fileno()) Thanks for your help, Mike Grant Edwards wrote: > On 2006-06-07, [EMAIL PROTECTED]

Re: tkinter: native look to windows?

2006-06-07 Thread John Salerno
Fredrik Lundh wrote: > John Salerno wrote: > >> I'm a little confused. I was under the impression (perhaps >> incorrectly) that Tkinter will create GUI widgets that are native to >> your OS > > only for some widgets; some native widgets are not flexible enough. > > and even native widgets don'

Mutual interdependency problem

2006-06-07 Thread Jeremy Sanders
I'm getting problems with modules with interdependencies when using the import form "import foo.bar as bar". Here are a set of files which replicate the problem :: importproblem/__init__.py :: # This is blank :: importproblem/dir1/__init__.py :: fr

Re: CENSORSHIP - Django Project (Schema Evolution Support)

2006-06-07 Thread John Bokma
Ilias Lazaridis <[EMAIL PROTECTED]> wrote: > Diez B. Roggisch wrote: >> http://en.wikipedia.org/wiki/Ilias_Lazaridis > > What has this "wikipedia" entry to do with the topic here? > > What is the credibility and value of the provided "wikipedia" entry? And what's yours? And which source do you

Re: tkinter: native look to windows?

2006-06-07 Thread Fredrik Lundh
John Salerno wrote: > I'm a little confused. I was under the impression (perhaps incorrectly) > that Tkinter will create GUI widgets that are native to your OS only for some widgets; some native widgets are not flexible enough. and even native widgets don't always look like XP widgets (windows

tkinter: native look to windows?

2006-06-07 Thread John Salerno
I'm a little confused. I was under the impression (perhaps incorrectly) that Tkinter will create GUI widgets that are native to your OS, so I should have an XPish looking application. But when I create buttons (and even the text fields look a bit different), they are not the 'fancy' Windows but

Re: printing backslash

2006-06-07 Thread Steve Holden
[EMAIL PROTECTED] wrote: > hi > how can i sucessfully print |\| in the output of a print command > > a = "|\|" > print a > > but it gives me "|\\|" > No it doesn't: >>> a = "|\|" >>> print a |\| >>> > i tried raw strings too, but it doesn't print |\| . It prints |\\| > instead > > eventu

Re: Writing to a certain line?

2006-06-07 Thread Jack Diederich
On Wed, Jun 07, 2006 at 08:17:22PM +0200, Fredrik Lundh wrote: > Christophe wrote: > > > Use /dev/zero as source and /dev/null as destination :D > > have you tried looping over an endless null-byte stream? > > on a random Linux server, this statement > > >>> for line in open("/dev/zero"): > ..

Re: [0T]Use of Python in .NET

2006-06-07 Thread bruno at modulix
[EMAIL PROTECTED] wrote: > Hi, > I am developing a code which has MVC (Model - View - Controler) > architecture.My view is in .NET. And my controller is in Python.So can > i call Python script from .NET? This is a question that I would have asked myself before actually trying to do anything el

Re: CENSORSHIP - Django Project (Schema Evolution Support)

2006-06-07 Thread Aahz
In article <[EMAIL PROTECTED]>, Erik Max Francis <[EMAIL PROTECTED]> wrote: >Rene Pijlman wrote: >> >> Wikipedia always tells the Absolute Truth, because if it doesn't, we can >> edit it and fix it right away. > >Tell that to John Seigenthaler. Rene was making a joke, I think. -- Aahz ([EMAIL PR

Re: xml processing speed test

2006-06-07 Thread Fredrik Lundh
K.S.Sreeram wrote: > From what i understand, the iterparse interface constructs the xml tree, > but gives you hooks into the tree construction process itself, so that > the programmer can control how much state he wants to retain and how > much state he can discard. > > I wanted the test program

Re: creating and naming objects

2006-06-07 Thread bruno at modulix
Brian wrote: > Thank you all for your response. I think that I am getting it. Based > on those responses, would I be correct in thinking that this would be > the way to initialize my Student object and return the values? > > class Student: Do yourself a favour: use new-style classes class Stud

Re: 10GB XML Blows out Memory, Suggestions?

2006-06-07 Thread Fredrik Lundh
Ralf Muschall wrote: > In the DOM, it contracts to 3 integers and a few pointers - > essentially the same as needed in a reasonably written > data structure. what kind of magic DWIM DOM is this? -- http://mail.python.org/mailman/listinfo/python-list

Re: Very nice python IDE (windows only)

2006-06-07 Thread ago
Bernard Lebel wrote: > Not me. I'll probably sound pedantic but > - the editor text looks awful, changing the editor options had no effect at > all > - there is no network access of UNC paths other than through File > > Open and Python Paths. all of my code is on a network location > - expand

Re: xml processing speed test

2006-06-07 Thread K.S.Sreeram
Fredrik Lundh wrote: > your celementtree example isn't exactly optimal, though... are you sure > you understand how iterparse works? From what i understand, the iterparse interface constructs the xml tree, but gives you hooks into the tree construction process itself, so that the programmer can

Re: Writing to a certain line?

2006-06-07 Thread Fredrik Lundh
Christophe wrote: > Use /dev/zero as source and /dev/null as destination :D have you tried looping over an endless null-byte stream? on a random Linux server, this statement >>> for line in open("/dev/zero"): ... print len(line) ... terminates without printing anything after about three s

Re: Matplotlib 0.87.2 incompatible with numpy 0.9.8

2006-06-07 Thread ago
ago wrote: > I was not able to make matplotlib 0.87.2 work with numpy 0.9.8 (there > is an error in multiarray.pyd that crashes python). I have noticed that > there is a new version 0.87.3, but I was waiting for the windows > egg/exe version for python 2.4. I tried to compile from sources with > l

Re: CENSORSHIP - Django Project (Schema Evolution Support)

2006-06-07 Thread Erik Max Francis
Thorsten Kampe wrote: > I think I have a deja-vu... Did someone say "Xah"?! With a hint of Brandon. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis Too much agreement kills a chat. -- Eldridge Cleaver --

Re: CENSORSHIP - Django Project (Schema Evolution Support)

2006-06-07 Thread Erik Max Francis
Rene Pijlman wrote: > Wikipedia always tells the Absolute Truth, because if it doesn't, we can > edit it and fix it right away. Tell that to John Seigenthaler. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis

Re: 10GB XML Blows out Memory, Suggestions?

2006-06-07 Thread Ralf Muschall
Paul McGuire schrieb: > meat of the data can be relatively small. Note also that this XML overhead > is directly related to the verbosity of the XML designer's choice of tag > names, and whether the designer was predisposed to using XML elements over > attributes. Imagine a record structure for

Re: creating and naming objects

2006-06-07 Thread Gerard Flanagan
Brian wrote: > Thank you all for your response. I think that I am getting it. Based > on those responses, would I be correct in thinking that this would be > the way to initialize my Student object and return the values? > > class Student: > def __init__(self, name, id): > self.name

Matplotlib 0.87.2 incompatible with numpy 0.9.8

2006-06-07 Thread ago
I was not able to make matplotlib 0.87.2 work with numpy 0.9.8 (there is an error in multiarray.pyd that crashes python). I have noticed that there is a new version 0.87.3, but I was waiting for the windows egg/exe version for python 2.4. I tried to compile from sources with little luck. Does the v

Re: Writing to a certain line?

2006-06-07 Thread bruno at modulix
Christophe wrote: > bruno at modulix a écrit : (snip) >> Wrong guess - unless, as Fredrik suggested, you have an infinite disk >> with an infinite file on it. If so, please share with, we would be >> *very* interested !-) > > > Use /dev/zero as source and /dev/null as destination :D Lol !-) --

SpinCtrl events problem

2006-06-07 Thread mardif
Hi, I've a problem with wx.SpinCtrl Here we go with my source code: import wx import traceback class TextPage(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, -1, "") box = wx.BoxSizer(wx.VERTICAL) self.spin = wx.SpinCtrl(self, -1) box.Add(self.

Re: xml processing speed test

2006-06-07 Thread Fredrik Lundh
K.S.Sreeram wrote: > All the recent discussions on xml parsing performance got me curious, > and i put together a small speed test for xml processing. your celementtree example isn't exactly optimal, though... are you sure you understand how iterparse works? -- http://mail.python.org/mailma

Re: 10GB XML Blows out Memory, Suggestions?

2006-06-07 Thread Paul Boddie
gregarican wrote: > Am I missing something? I don't read where the poster mentioned the > operation as being CPU intensive. He does mention that the entirety of > a 10 GB file cannot be loaded into memory. If you discount physical > swapfile paging and base this assumption on a "normal" PC that mig

Re: Very nice python IDE (windows only)

2006-06-07 Thread Bernard Lebel
Not me. I'll probably sound pedantic but - the editor text looks awful, changing the editor options had no effect at all - there is no network access of UNC paths other than through File > Open and Python Paths. all of my code is on a network location - expanding and collapsing directories is d

Re: GUI Program Error

2006-06-07 Thread jmdeschamps
Byte wrote: > Thanks, this works. Now, since the tutorial I was using is clearly > rubbish, any better ones? For a (relative) newbie please. Also, how do > I code a GUI Hello World program? > > -- /usr/bin/byte How does John Salerno previous code NOT fit the bill? >> John Salerno wrote: >> ...

xml processing speed test

2006-06-07 Thread K.S.Sreeram
All the recent discussions on xml parsing performance got me curious, and i put together a small speed test for xml processing. The test program was designed to have as minimal state requirements as possible so that efficient 'stream' processing can be done using sax style events. Here's the quic

Re: GUI Program Error

2006-06-07 Thread John Salerno
Byte wrote: > Also, how do > I code a GUI Hello World program? P.S. The link I supplied begins with two versions of a Hello World app. -- http://mail.python.org/mailman/listinfo/python-list

Re: GUI Program Error

2006-06-07 Thread John Salerno
Byte wrote: > Thanks, this works. Now, since the tutorial I was using is clearly > rubbish, any better ones? For a (relative) newbie please. Also, how do > I code a GUI Hello World program? > > -- /usr/bin/byte > Actually, that site is generally considered to be a pretty good place to start fo

Re: Very nice python IDE (windows only)

2006-06-07 Thread sam
Very interesting, I have downloaded it,and I like what I see. ago wrote: > I have just discovered Python Scripter by Kiriakos Vlahos and it was a > pleasant surprise. I thought that it deserved to be signalled. It is > slim and fairly fast, with embedded graphical debugger, class browser, > file b

Converting binary sid's to a hex string

2006-06-07 Thread LittlePython
I am trying to create a hexstring of a NT4 user account sid which I can in turn use to query an exchange 55 database. I believe I need to convert a binary sid to a hex string. ADsSID com object will do this for me however it is a little slow. Can anybody point me in the right direction to converti

Re: printing backslash

2006-06-07 Thread micklee74
Tim Chase wrote: > > i want to print something like this > > > > |\| > > > > first i tried it as string > > > > a = "|\|" > > > > it prints ok > > > > but when i put it to a list > > > > a = ["|\|"] > > > > it gives me '|\\|' .there are 2 back slashes...i only want one.. how > > can i properly es

Re: GUI Program Error

2006-06-07 Thread Byte
Thanks, this works. Now, since the tutorial I was using is clearly rubbish, any better ones? For a (relative) newbie please. Also, how do I code a GUI Hello World program? -- /usr/bin/byte -- http://mail.python.org/mailman/listinfo/python-list

Re: creating and naming objects

2006-06-07 Thread Brian
Thank you all for your response. I think that I am getting it. Based on those responses, would I be correct in thinking that this would be the way to initialize my Student object and return the values? class Student: def __init__(self, name, id): self.name = name self.id = id

printing backslash

2006-06-07 Thread micklee74
hi how can i sucessfully print |\| in the output of a print command a = "|\|" print a but it gives me "|\\|" i tried raw strings too, but it doesn't print |\| . It prints |\\| instead eventually, i also want |\| to be inside a list: alist = ["|\|", 'blah', 'blah'] . How can i put |\| inside a

Re: printing backslash

2006-06-07 Thread Tim Chase
> i want to print something like this > > |\| > > first i tried it as string > > a = "|\|" > > it prints ok > > but when i put it to a list > > a = ["|\|"] > > it gives me '|\\|' .there are 2 back slashes...i only want one.. how > can i properly escape it? > I have tried [r"|\|"] , [r'\\'] b

Re: 10GB XML Blows out Memory, Suggestions?

2006-06-07 Thread gregarican
Point for Fredrik. If someone doesn't recognize the inherent performance differences between different XML parsers they haven't experienced the pain (and eventual victory) of trying to optimize their techniques for working with the albatross that XML can be :-) Fredrik Lundh wrote: > fuzzylollipop

Re: printing backslash

2006-06-07 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > i want to print something like this > > |\| > > first i tried it as string > > a = "|\|" > > it prints ok > > but when i put it to a list > > a = ["|\|"] > > it gives me '|\\|'. if you want to print "|\|", why are you printing the list? > there are 2 back slashe

printing backslash

2006-06-07 Thread micklee74
hi i want to print something like this |\| first i tried it as string a = "|\|" it prints ok but when i put it to a list a = ["|\|"] it gives me '|\\|' .there are 2 back slashes...i only want one.. how can i properly escape it? I have tried [r"|\|"] , [r'\\'] but they do not work... thanks

Re: creating and naming objects

2006-06-07 Thread Steve Holden
Brian wrote: > I have a question that some may consider silly, but it has me a bit > stuck and I would appreciate some help in understanding what is going > on. > > For example, lets say that I have a class that creates a student > object. > > Class Student: > def setName(self, name) >

  1   2   >