Re: Debugging

2006-10-24 Thread Fulvio
*** Your mail has been scanned by InterScan MSS. *** On Monday 23 October 2006 19:10, Bruno Desthuilliers wrote: > ignore bpnumber [count] Sorry, I ignored this command :-) > > > timed > > saw nothing about this one... but perhaps with There's tbreak FYI,

Re: Debugging

2006-10-24 Thread Fulvio
*** Your mail has been scanned by InterScan MSS. *** On Tuesday 24 October 2006 00:59, R. Bernstein wrote: > analogous the command of the same name in gdb. That's available as pdb in the same directory. I didn't try it yet. About pydb, I may say that trigg

Re: python GUIs comparison (want)

2006-10-24 Thread Fredrik Lundh
Christophe wrote: > Also, the Tkinter API is far less elegant than the others. huh? create object, display object, create object, display object. sure looks like plain old Python to me... -- http://mail.python.org/mailman/listinfo/python-list

Re: python GUIs comparison (want)

2006-10-24 Thread shawn
Ron Stevens of the Python411 podcast(1) has some good info on these. He did an entire podcast(2) comparing different Python GUI tools, and did several others in greater detail, including specifically on wyPython and Tkinter. You can also subscribe to the RSS feed(3). The main page has titles for al

Re: Current stackdepth outside PyEval_EvalFrameEx

2006-10-24 Thread Fabiano Sidler
On Monday 23 October 2006 02:20, I wrote: > I'm trying to implement a python function that returns the current stack > depth of its frame. Unfortunately, I don't see any possibility to get this > value outside of PyEval_EvalFrameEx. Inside of it, I'd use the STACK_LEVEL > macro. How do I do it? No

Re: Visibility against an unknown background

2006-10-24 Thread Sergei Organov
Fredrik Lundh <[EMAIL PROTECTED]> writes: > Sergei Organov wrote: > >> There is a better way to do it. Check if the toolkit has line drawing >> mode that XORs the line color with the background, then draw using this >> mode and white color of the line. > > which means that the selection looks like

Re: python servlet engine

2006-10-24 Thread makerjoe
hi bruno according to the one most used over the python developers community and/or the one who has the easier implementation method makerjoe Bruno Desthuilliers ha escrito: > makerjoe wrote: > > hi, all > > i would like to know which is the best PSE > > "best" according to what metrics ? > >

Re: python servlet engine

2006-10-24 Thread makerjoe
hi bruno according to the one most used over the python developers community and/or the one who has the easier implementation method makerjoe Bruno Desthuilliers ha escrito: > makerjoe wrote: > > hi, all > > i would like to know which is the best PSE > > "best" according to what metrics ? > >

Re: Obtaining SSL certificate info from SSL object - BUG?

2006-10-24 Thread Donn Cave
In article <[EMAIL PROTECTED]>, John Nagle <[EMAIL PROTECTED]> wrote: > The Python SSL object offers two methods from obtaining > the info from an SSL certificate, "server()" and "issuer()". > The actual values in the certificate are a series of name/value > pairs in ASN.1 binary format. Bu

Re: Current stackdepth outside PyEval_EvalFrameEx

2006-10-24 Thread skip
>> I'm trying to implement a python function that returns the current >> stack depth of its frame. Maybe sys._getframe() or traceback.extract_stack()? Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Help: Python2.3 & Python2.4 on RHEL4 x86_64

2006-10-24 Thread Christopher Taylor
> Ah, I see. The reason is pretty simple: Makefile.pre.in has > > LIBDIR= $(exec_prefix)/lib > > so it seems that LIBDIR isn't configurable. So you would agree that this is a bug? I'll post on Python-Dev for further advice. I'd like to fix this for the x86_64 community. > You will have

Re: Current stackdepth outside PyEval_EvalFrameEx

2006-10-24 Thread Neil Cerutti
On 2006-10-24, Fabiano Sidler <[EMAIL PROTECTED]> wrote: > On Monday 23 October 2006 02:20, I wrote: >> I'm trying to implement a python function that returns the >> current stack depth of its frame. Unfortunately, I don't see >> any possibility to get this value outside of >> PyEval_EvalFrameEx. I

Re: Talks at PyCon that Teach How to Be Better Programmers

2006-10-24 Thread Paul Rubin
"Robert Brewer" <[EMAIL PROTECTED]> writes: > 2. Dynamic languages naturally more lang-maven oriented? >See http://osteele.com/archives/2004/11/ides Not sure what you mean by this, even after reading that (interesting) article. These days Haskell (which has static types) seems to be all the r

Re: Help: Python2.3 & Python2.4 on RHEL4 x86_64

2006-10-24 Thread Martin v. Löwis
Christopher Taylor schrieb: >> Ah, I see. The reason is pretty simple: Makefile.pre.in has >> >> LIBDIR= $(exec_prefix)/lib >> >> so it seems that LIBDIR isn't configurable. > > So you would agree that this is a bug? I personally think this is a bug in AMD64-Linux. Libraries should be s

Re: python GUIs comparison (want)

2006-10-24 Thread Kevin Walzer
Christophe wrote: > Kevin Walzer a écrit : >> Christophe wrote: >> >>> Since when is "based on C++ toolkit" a con? >>> >> >> If you don't know C++ (as is the case with me), then it's difficult to >> do a C++-to-Python translation in looking at code examples. > > As if a toolkit based on C would be

Re: using mmap on large (> 2 Gig) files

2006-10-24 Thread Martin v. Löwis
sturlamolden schrieb: > Martin v. Löwis wrote: > >> What architecture are you on? On a 32-bit architecture, it's likely >> impossible to map in 2GiB, anyway (since it likely won't fit into >> the available address space). > > Indeed. But why does Python's memory mapping need to be flushed? It d

Re: using mmap on large (> 2 Gig) files

2006-10-24 Thread Martin v. Löwis
sturlamolden schrieb: > Looking at Python's source (mmapmodule.c), it seems that "mmap.mmap" > always sets the offset argument in Windows MapViewOfFile and UNIX to 0. > This means that it is always mapping from the beginning of the file. > Thus, Python's mmap module is useless for large files. This

Re: Python 2.5 ; Effbot console ; thank ; pb release.

2006-10-24 Thread Martin v. Löwis
Ben Finney schrieb: >> "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: >>> some days, I ask myself why I shouldn't just use GPL for >>> everything I do, and ship it as source code only. >> because then you would deny your work to thousands of ungrateful, >> unmotivated lazy buggers like me... > > Not

Python and SSL enabled

2006-10-24 Thread matey
I am have version 2.3.4. I want to write a python script to access a secure HTTPS. I tried the following: import urllib urllib.urlopen("https://somesecuresite.com";) s = f.read() f.close() I get the following: IOError [Errno url error] unknown url type: 'https' 1. How do I know if SSL is ena

Ctypes Error: Why can't it find the DLL.

2006-10-24 Thread Mudcat
Hi, I can't figure out why ctypes won't load the DLL I need to use. I've tried everything I can find (and the ctypes website is down at the moment). Here's what I've seen so far. I've added the file arapi51.dll to the system32 directory. However when I tried to access it I see this: >>> print w

Re: ANN compiler2 : Produce bytecode from Python 2.5 Abstract Syntax Trees

2006-10-24 Thread Martin v. Löwis
Paul Boddie schrieb: >> Let me second this. The compiler package is largely unmaintained and >> was known to be broken (and perhaps still is). A replacement >> implementation, especially if it comes with a new maintainer, would >> be welcome. > > I don't agree entirely with the "broken" assessment

Re: Visibility against an unknown background

2006-10-24 Thread Grant Edwards
On 2006-10-24, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Sergei Organov wrote: > >> There is a better way to do it. Check if the toolkit has line >> drawing mode that XORs the line color with the background, >> then draw using this mode and white color of the line. > > which means that the selecti

Re: Obtaining SSL certificate info from SSL object - BUG?

2006-10-24 Thread John Nagle
Donn Cave wrote: > In article <[EMAIL PROTECTED]>, > John Nagle <[EMAIL PROTECTED]> wrote: > > >> The Python SSL object offers two methods from obtaining >>the info from an SSL certificate, "server()" and "issuer()". >>The actual values in the certificate are a series of name/value >>pairs i

Re: Help: Python2.3 & Python2.4 on RHEL4 x86_64

2006-10-24 Thread Christopher Taylor
> I personally think this is a bug in AMD64-Linux. Libraries should > be stored in /usr/lib, binaries in /usr/bin, etc. If they need > simultaneous installation of 32-bit binaries for compatibility, > they should store them in architecture-specific directories. I disagree. From what I see, the err

Re: return same type of object

2006-10-24 Thread David Isaac
Bruno wrote: > This is usually known as a 'factory method'. You do realise that both solutions are *not* strictky equilavent, do you? Your point I believe is that after inheritance the factory method in the subclass will still return MyClass() but will return an instance of the subclass if I retu

Re: Python 2.5 ; Effbot console ; thank ; pb release.

2006-10-24 Thread Istvan Albert
Martin v. Löwis wrote: > People certainly build it themselves, but then never share. I don't > know why that is - probably, it takes a different mindset to be on > the giving end than on the receiving end of free software. I've seen people share binary builds, for example you can get the windows

Re: Obtaining SSL certificate info from SSL object - BUG?

2006-10-24 Thread Paul Rubin
John Nagle <[EMAIL PROTECTED]> writes: > The reason this now matters is that new "high assurance" certs, > the ones that tell you how much a site can be trusted, are now being > deployed, Oh my, I hadn't heard about this. They come up with new scams all the time. I guess I'll check for info. It

Re: Help: Python2.3 & Python2.4 on RHEL4 x86_64

2006-10-24 Thread Martin v. Löwis
Christopher Taylor schrieb: > I disagree. From what I see, the error, as far as python is > considered, is not being able to specify the location where libs are > put, despite the fact that the --LIBDIR= option is listed. It just > happens to manifest itself in AMD64/EM64T Linux, specifically RH

Re: mean ans std dev of an array?

2006-10-24 Thread SpreadTooThin
Paul Rubin wrote: > "SpreadTooThin" <[EMAIL PROTECTED]> writes: > > print a.mean() > > print a.std_dev() > > > > Is there a way to calculate the mean and standard deviation on array data? > > Well, you could use numpy or whatever. If you want to calculate directly, > you could do something like (

Re: ANN compiler2 : Produce bytecode from Python 2.5 Abstract Syntax Trees

2006-10-24 Thread Michael Spencer
Paul Boddie wrote: > Martin v. Löwis wrote: ...The compiler package is largely unmaintained and >> was known to be broken (and perhaps still is). > > I don't agree entirely with the "broken" assessment. Although I'm not > chasing the latest language constructs, the AST construction part of > the p

Re: ANN compiler2 : Produce bytecode from Python 2.5 Abstract Syntax Trees

2006-10-24 Thread Michael Spencer
Martin v. Löwis wrote: > Georg Brandl schrieb: >> Perhaps you can bring up a discussion on python-dev about your improvements >> and how they could be integrated into the standard library... > > Let me second this. The compiler package is largely unmaintained and > was known to be broken (and perh

Re: Help: Python2.3 & Python2.4 on RHEL4 x86_64

2006-10-24 Thread Christopher Taylor
> Ok. One solution might be to remove the libdir option, then. Python > attempts to be "movable", i.e. the libraries are found relative to > the executable (via dirname(sys.executable)+"../lib/..."). If > libdir is supported, this approach must be given up - or libdir must > be given up. Well, hon

Re: The format of filename

2006-10-24 Thread [EMAIL PROTECTED]
Tim Chase wrote: > > C:\temp> REM try the same filename convention from dos prompt > C:\temp> type subdir/test.txt > The syntax of the command is incorrect. > C:\temp> REM try with quotes, just in case... > C:\temp> type "subdir/test.txt" > The syntax of the command is incorrect. > C:\temp> notep

Re: mean ans std dev of an array?

2006-10-24 Thread skip
>> n = len(a) >> mean = sum(a) / n >> sd = sqrt(sum((x-mean)**2 for x in a) / n) ... >> If there is a faster way... like transferring the array to a >> different container class... but what? Perhaps: >>> import scipy >>> print scipy.mean([1,2,3,4,5,6]) 3.5

default python when multiple python installation on the box

2006-10-24 Thread j_nwb
HI I have multiple python installations. 2.2, 2.3, 2.4. When I install a new package (pygtk2) , it always install in python 2.3. I changed the /usr/bin/python to be 2.4 binary. Still the same behavior. How does rpms, determine which installation to update ? Is there a file somewhere ? I a

The status of Python and SOAP?

2006-10-24 Thread Thomas W
I'm going to give a presentation of python to my co-workers at a very pro-microsoft workplace. Almost everything we need is currently supported by the standard distro + the win32all package, but we also need support for SOAP. I've tried SOAPpy ( didn't get it to compile, needed a library from a dea

Re: python GUIs comparison (want)

2006-10-24 Thread Peter Decker
On 10/24/06, Kevin Walzer <[EMAIL PROTECTED]> wrote: > wxPython: > Pro: Popular, actively developed, wraps native widgets, looks great on > Windows, commercial-friendly license > Con: Based on C++ toolkit; docs assume knowledge of C++; some think > coding style is too much like C++; complex to bui

Re: mean ans std dev of an array?

2006-10-24 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > >>> n = len(a) >>> mean = sum(a) / n >>> sd = sqrt(sum((x-mean)**2 for x in a) / n) >... >>> If there is a faster way... like transferring the array to a >>> different container class... but what? > > Perhaps: >

Re: Help: Python2.3 & Python2.4 on RHEL4 x86_64

2006-10-24 Thread Martin v. Löwis
Christopher Taylor schrieb: >> The Linux distributions already provide Python binaries (I believe >> Redhat does, too). You could study what they do to achieve that. > > Yes, this is true ... but they do not package the most up-to-date > version .. which I need. Sure. However, I still think they

Re: The status of Python and SOAP?

2006-10-24 Thread Martin v. Löwis
Thomas W schrieb: > I'm going to give a presentation of python to my co-workers at a very > pro-microsoft workplace. Almost everything we need is currently > supported by the standard distro + the win32all package, but we also > need support for SOAP. I've tried SOAPpy ( didn't get it to compile, >

Re: Visibility against an unknown background

2006-10-24 Thread Filip Salomonsson
On 10/24/06, Sergei Organov <[EMAIL PROTECTED]> wrote: > I'd be very upset to see, say, 5-6 highly intersecting > scientific plots on the same picture drawn using the > "marching ants" approach. I'd be a bit upset to see scientific plots *on a picture* at all, regardless of approach. -- filip sal

Re: default python when multiple python installation on the box

2006-10-24 Thread Martin v. Löwis
j_nwb schrieb: >I have multiple python installations. 2.2, 2.3, 2.4. When I install a > new package (pygtk2) , it always install in python 2.3. >I changed the /usr/bin/python to be 2.4 binary. Still the same behavior. >How does rpms, determine which installation to update ? Is there a >

Re: The status of Python and SOAP?

2006-10-24 Thread Larry Bates
I would venture to guess that this is the one I would lean towards if I needed SOAP support: http://www.effbot.org/downloads/#elementsoap I know is says "experimental" but Fredrik Lundh's idea of experimental always seems to be everyone else's idea of a shipping product (e.g his code just seems t

Re: The status of Python and SOAP?

2006-10-24 Thread Steven Bethard
Larry Bates wrote: > I would venture to guess that this is the one I would lean towards > if I needed SOAP support: > > http://www.effbot.org/downloads/#elementsoap > > I know is says "experimental" but Fredrik Lundh's idea of experimental > always seems to be everyone else's idea of a shipping p

Help: Python2.3 & Python2.4 on RHEL4 x86_64

2006-10-24 Thread Christopher Taylor
Does anyone have any comments on my proposed solution? > However, I would like to propose a more flexible solution: Perhaps a > ./configure parameter called LIBLOC or something like that so that > LIBDIR = $(EXEC_PREFIX)/$(LIBLOC). Of course, LIBLOC should default > to "lib". This way the flexib

Re: forcing a definition to be called on attribute change

2006-10-24 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Rob Williscroft wrote: > Bruno Desthuilliers wrote in news:[EMAIL PROTECTED] in > comp.lang.python: > >>> class cSphere() : >> >> OT : prefixing classes names with 'c' is totally unpythonic. > > My understanding of "pythonic" is that its about how you use the > languag

Re: Visibility against an unknown background

2006-10-24 Thread Fredrik Lundh
Sergei Organov wrote: > > and doesn't work at all on medium gray or b/w dithered patterns. > > Yes, every method has its pros and cons, but XOR is probably most > efficient. back in the days when backing store was expensive, and memory bandwidth was limited, maybe. contemporary graphics har

Re: Attempting to parse free-form ANSI text.

2006-10-24 Thread Michael B. Trausch
Jean-Paul Calderone wrote: > On Sun, 22 Oct 2006 00:34:14 -0400, "Michael B. Trausch" > wrote: >> Alright... I am attempting to find a way to parse ANSI text from a >> telnet application. However, I am experiencing a bit of trouble. >> >> What I want to do is have all ANSI sequences _removed_ fro

Simple python + html + from --> to python script

2006-10-24 Thread flit
Hello All, I am trying to get information from a form and send it to a python script without success.. Here is my objective: User enters data in form --> form send variables to python script --> script runs and output result. the form code Entre com os dados Entre com os dados Vai magraum

Re: The status of Python and SOAP?

2006-10-24 Thread Paul Boddie
Thomas W wrote: > I'm going to give a presentation of python to my co-workers at a very > pro-microsoft workplace. Almost everything we need is currently > supported by the standard distro + the win32all package, but we also > need support for SOAP. I've tried SOAPpy ( didn't get it to compile, > n

Re: default python when multiple python installation on the box

2006-10-24 Thread j_nwb
Does not help my immediate situation, but this understanding definitely helps. Thanks /J Martin v. Löwis wrote: > j_nwb schrieb: >>I have multiple python installations. 2.2, 2.3, 2.4. When I install a >> new package (pygtk2) , it always install in python 2.3. >>I changed the /usr/bin/pyth

Re: Simple python + html + from --> to python script

2006-10-24 Thread Steve Holden
flit wrote: > Hello All, > > I am trying to get information from a form and send it to a python > script without success.. > Here is my objective: > > User enters data in form --> form send variables to python script --> > script runs and output result. > > the form code > > Entre com > os dado

Re: Simple python + html + from --> to python script

2006-10-24 Thread flit
Man Very thanks... I really try to find some source of good and simple and nothing.. Many thanks you are a great help! Steve Holden wrote: > flit wrote: > > Hello All, > > > > I am trying to get information from a form and send it to a python > > script without success.. > > Here is my objecti

Re: Simple python + html + from --> to python script

2006-10-24 Thread J. Clifford Dyer
A good starting place would be the documentation on python.org. In this case, the python library reference would have been helpful: http://docs.python.org/lib/lib.html Cheers, Cliff flit wrote: > Man > Very thanks... > I really try to find some source of good and simple and nothing.. > Man

RE: Sorting by item_in_another_list

2006-10-24 Thread Delaney, Timothy (Tim)
Carsten Haese wrote: > The current documentation states that "Starting with Python 2.3, the > sort() method is guaranteed to be stable." However, it's not clear > whether this specifies language behavior that all implementations must > adhere to, or whether it simply documents an implementation de

strange problem

2006-10-24 Thread ken
This file has 1,000,000+ lines in it, yet when I print the counter 'cin' at EOF I get around 10,000 less lines. Any ideas? lineIn = csv.reader(file("rits_feed\\rits_feed_US.csv",'rb'),delimiter='|') for emp in lineIn: cin=cin+1 print cin -- http://mail.python.org/mailman/

Re: Simple python + html + from --> to python script

2006-10-24 Thread flit
Sorry but for a totally newbie the lib doccumentation doesnt help.. The target audience for the docs are for "grown ups" programmers.. I think I will do some tutorial, in baby steps... J. Clifford Dyer wrote: > A good starting place would be the documentation on python.org. > > In this case, the p

Re: strange problem

2006-10-24 Thread Tim Chase
> This file has 1,000,000+ lines in it, yet when I print the counter 'cin' > at EOF I get around 10,000 less lines. Any ideas? > > lineIn = > csv.reader(file("rits_feed\\rits_feed_US.csv",'rb'),delimiter='|') > for emp in lineIn: > cin=cin+1 > print cin What happens if yo

Re: Getting a lot of SPAM from this list

2006-10-24 Thread Colin J. Williams
[EMAIL PROTECTED] wrote: > >> Get a better spam filter? > > Colin> Any suggestions for Firefox? > > You can try SpamBayes (http://www.spambayes.org/). It has both POP3 and > IMAP filters that sit between your mail client and mail server. You control > and train them via a local web inte

Re: using mmap on large (> 2 Gig) files

2006-10-24 Thread sturlamolden
Fredrik Lundh wrote: > > to large to fit in a 32 address space. Thus, mmapmodule.c needs to be > > fixed before it can be used for large files. > > if you've gotten that far, maybe you could come up with a patch, instead > of stating that someone else "needs to fix it" ? I did not say "someone e

Re: Debugging

2006-10-24 Thread Bruno Desthuilliers
Fulvio a écrit : > > On Monday 23 October 2006 19:10, Bruno Desthuilliers wrote: > > >>condition bpnumber [condition] >> >>Condition is an expression which must evaluate to true before the >>breakpoint is honored. If condition is absent, any existing condition is >>removed; i.e., the breakpo

Re: forcing a definition to be called on attribute change

2006-10-24 Thread Bruno Desthuilliers
Rob Williscroft a écrit : > Bruno Desthuilliers wrote in news:[EMAIL PROTECTED] in > comp.lang.python: > > >>>class cSphere() : >> >>OT : prefixing classes names with 'c' is totally unpythonic. > > > My understanding of "pythonic" is that its about how you use the > language not what style yo

Re: using mmap on large (> 2 Gig) files

2006-10-24 Thread Martin v. Löwis
sturlamolden schrieb: > A patch would involve an new object, say, "mmap.mmap2" that thakes the > additional offeset parameter. I don't want it to break any code > dependent on the existing "mmap.mmap" object. Also, I think mmap.mmap2 > should allow the file object to be None, and in that case retu

Re: return same type of object

2006-10-24 Thread Bruno Desthuilliers
David Isaac a écrit : > Bruno wrote: > >>This is usually known as a 'factory method'. You do realise that both > > solutions are *not* strictky equilavent, do you? > > Your point I believe is that after inheritance the factory method > in the subclass will still > return MyClass() > but will ret

Re: using mmap on large (> 2 Gig) files

2006-10-24 Thread sturlamolden
Martin v. Löwis wrote: > You know this isn't true in general. It is true for a 32-bit address > space only. Yes, but there are two other aspects: 1. Many of us use 32-bit architectures. The one who wrote the module should have considered why UNIX' mmap and Windows' MapViewOfFile takes an offset

[0T] Re: Simple python + html + from --> to python script

2006-10-24 Thread Bruno Desthuilliers
flit a écrit : > Hello All, > > I am trying to get information from a form and send it to a python > script without success.. > Here is my objective: > > User enters data in form --> form send variables to python script --> > script runs and output result. If the script has side-effects (adding

return tuple from C to python (extending python)

2006-10-24 Thread Kiran
Hi all, I want to make python call some C functions, process them and return them. Ok, I got all the wrapper functions and everything setup right. Here is my problem. What I need to do is to return a tuple from C to python. To go about doing this, I first create a tuple object in C doing the fo

Re: strange problem

2006-10-24 Thread Bruno Desthuilliers
ken a écrit : > This file has 1,000,000+ lines in it, yet when I print the counter 'cin' > at EOF I get around 10,000 less lines. Any ideas? Not without seeing the file. But I'm not sure I want to see it !-) >lineIn = > csv.reader(file("rits_feed\\rits_feed_US.csv",'rb'),delimiter='|') >

Re: using mmap on large (> 2 Gig) files

2006-10-24 Thread sturlamolden
Donn Cave wrote: > Wow, you're sure a wizard! Most people would need to look before > making statements like that. I know, but your news-server doesn't honour cancel messages. :) Python's mmap does indeed memory map the file into the process image. It does not fake memory mapping by means of fi

Sending Dictionary via Network

2006-10-24 Thread mumebuhi
Hi, Is it possible to send a non-string object from a Python program to another? I particularly need to send a dictionary over to the other program. However, this is not possible using the socket object's send() function. Help? Buhi -- http://mail.python.org/mailman/listinfo/python-list

Re: Sending Dictionary via Network

2006-10-24 Thread Larry Bates
mumebuhi wrote: > Hi, > > Is it possible to send a non-string object from a Python program to > another? I particularly need to send a dictionary over to the other > program. However, this is not possible using the socket object's send() > function. > > Help? > > > Buhi > You will need to pick

Stylesheet not respected

2006-10-24 Thread Suren
I was able to the see weird stylesheet behavior on opera, IE and mozilla under mod_python. Here is some python code that exhibited the behavior. I have the body.css in the same folder as this file and the background is set to blue. When I access it at http://localhost/test.py, the html page shows

Re: using mmap on large (> 2 Gig) files

2006-10-24 Thread sturlamolden
Martin v. Löwis wrote: Your news server doesn't honour cancel as well... > It doesn't need to, why do you think it does? This was an extremely stupid question on my side. It needs to be flushed after a write because that's how the memory pages mapping the file is synchronized with the file. Wri

Re: Sending Dictionary via Network

2006-10-24 Thread Bruno Desthuilliers
mumebuhi a écrit : > Hi, > > Is it possible to send a non-string object from a Python program to > another? I particularly need to send a dictionary over to the other > program. However, this is not possible using the socket object's send() > function. > > Help? >>> d = dict(one=1, two="three",

Re: Stylesheet not respected

2006-10-24 Thread Irmen de Jong
Suren wrote: > I was able to the see weird stylesheet behavior on opera, IE and > mozilla under > mod_python. [snip] I'm 99% sure this has nothing to do with Python but is just an error in your CSS file. Show the CSS so we might be able to see the problem. One thing to check for though is that y

Re: Sending Dictionary via Network

2006-10-24 Thread mumebuhi
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. -- http://mail.python.org/mailman/listinfo/python-list

Re: Ctypes Error: Why can't it find the DLL.

2006-10-24 Thread Bruno Desthuilliers
Mudcat a écrit : > Hi, > > I can't figure out why ctypes won't load the DLL I need to use. I've > tried everything I can find (and the ctypes website is down at the > moment). Here's what I've seen so far. > > I've added the file arapi51.dll to the system32 directory. However > when I tried to a

Re: return tuple from C to python (extending python)

2006-10-24 Thread Simon Forman
Kiran wrote: > Hi all, I want to make python call some C functions, process them and > return them. > > Ok, I got all the wrapper functions and everything setup right. Here > is my problem. What I need to do is to return a tuple from C to > python. > > To go about doing this, I first create a tup

Re: Stylesheet not respected

2006-10-24 Thread Suren
It was nothing related to python but how my httpd.conf was setup. My apache conf was set to handle files under this. When I said href="body.css", it was looking under test\body.css. My project src was way deeper and I was assuming that it would like for the css file where the python source is.

Re: Sending Dictionary via Network

2006-10-24 Thread mumebuhi
The simplejson module is really cool and simple to use. This is great! For others who are just starting to use Python (like myself), simply download and decompress the source bundle then copy the simplejson directory to your sys.path (e.g. /usr/lib/python2.4/). Thanks so much, Bruno. Buhi Bru

Re: Visibility against an unknown background

2006-10-24 Thread Ben Finney
Grant Edwards <[EMAIL PROTECTED]> writes: > The traditional way to draw lines on something with varying colors > is to use the "xor" operator when drawing the lines. But first, negotiate a patent license for this highly innovative and non-obvious technique that is "owned" as US Patent #4,197,590.

Re: python GUIs comparison (want)

2006-10-24 Thread [EMAIL PROTECTED]
I have to say that py-gtk is a pain to install. You have copywrites with the various parts of the library when you install all of it with apple and the people that do the pill library. I am looking at wxwindows and maybe vpython for graphics (If it will do what I want). wx.grid is a pain thus far

How to find out the directory that the py file is in?

2006-10-24 Thread [EMAIL PROTECTED]
I have the following python script and some_command in the same directory. I have to call the python script from that directory. Otherwise, some_command won't be found. I'm wondering how to make the following script working no matter what the working directory is. Thanks, Peng #!/usr/bin/env pyth

Re: mean ans std dev of an array?

2006-10-24 Thread Robert Kern
Paul McGuire wrote: > <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >>>> n = len(a) >>>> mean = sum(a) / n >>>> sd = sqrt(sum((x-mean)**2 for x in a) / n) >>... >>>> If there is a faster way... like transferring the array to a >>>> different container class.

Re: Python 2.5 ; Effbot console ; thank ; pb release.

2006-10-24 Thread Ben Finney
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > In my experience [...] it's either the original author who provides > binaries, or none are provided. People certainly build it > themselves, but then never share. IIRC, the early days of Mozilla (after the code was released as free software) had t

Re: using mmap on large (> 2 Gig) files

2006-10-24 Thread Steve Holden
sturlamolden wrote: [...] > This was an extremely stupid question on my side. I take my hat off to anyone who's prepared to admit this. We all do it, but most of us try to ignore the fact. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http:/

Re: Sending Dictionary via Network

2006-10-24 Thread Ben Finney
Larry Bates <[EMAIL PROTECTED]> writes: > mumebuhi wrote: > > Is it possible to send a non-string object from a Python program > > to another? I particularly need to send a dictionary over to the > > other program. However, this is not possible using the socket > > object's send() function. You w

Re: Sending Dictionary via Network

2006-10-24 Thread Simon Forman
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. Pickle aso has dumps() and loads() to work with strings rather than files. Peace, ~Simo

Re: return same type of object

2006-10-24 Thread Steve Holden
Bruno Desthuilliers wrote: > David Isaac a écrit : [...] > >>But Steve suggests going with the latter. > > > That's what I'd do too a priori. > Believe it or not, I wasn't at the priory when I wrote that. Sorry. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden W

Re: How to find out the directory that the py file is in?

2006-10-24 Thread Gabriel Genellina
At Tuesday 24/10/2006 20:39, [EMAIL PROTECTED] wrote: I have the following python script and some_command in the same directory. I have to call the python script from that directory. Otherwise, some_command won't be found. I'm wondering how to make the following script working no matter what the

Re: The status of Python and SOAP?

2006-10-24 Thread Waldemar Osuch
Thomas W wrote: > I'm going to give a presentation of python to my co-workers at a very > pro-microsoft workplace. Almost everything we need is currently > supported by the standard distro + the win32all package, but we also > need support for SOAP. I've tried SOAPpy ( didn't get it to compile, >

Re: [0T] Re: Simple python + html + from --> to python script

2006-10-24 Thread Steve Holden
Bruno Desthuilliers wrote: > flit a écrit : > >>Hello All, >> >>I am trying to get information from a form and send it to a python >>script without success.. >>Here is my objective: >> >>User enters data in form --> form send variables to python script --> >>script runs and output result. > > >

Re: return tuple from C to python (extending python)

2006-10-24 Thread Farshid Lashkari
Simon Forman wrote: > I have not done a great deal of extension work with python, however, I > do not believe you can simply cast an int (or pointer to int, which is > what you say dat is declared as, unless my C is /really/ rusty) to > PyObject*. > > I think you need to do something like Py_Build

Re: strange problem

2006-10-24 Thread Steve Holden
ken wrote: > This file has 1,000,000+ lines in it, yet when I print the counter 'cin' > at EOF I get around 10,000 less lines. Any ideas? > > lineIn = > csv.reader(file("rits_feed\\rits_feed_US.csv",'rb'),delimiter='|') > for emp in lineIn: > cin=cin+1 > print cin My psyc

Re: Sending Dictionary via Network

2006-10-24 Thread Steve Holden
mumebuhi wrote: > The simplejson module is really cool and simple to use. This is great! > > For others who are just starting to use Python (like myself), simply > download and decompress the source bundle then copy the simplejson > directory to your sys.path (e.g. /usr/lib/python2.4/). > Alterna

Want to reduce steps of an operation with dictionaries

2006-10-24 Thread pretoriano_2001
Hello: I have next dictionaries: a={'a':0, 'b':1, 'c':2, 'd':3} b={'a':0, 'c':1, 'd':2, 'e':3} I want to put in a new dictionary named c all the keys that are in b and re-sequence the values. The result I want is: c={'a':0, 'c':1, 'd':2} How can I do this with one line of instruction? I attempted

Re: python GUIs comparison (want)

2006-10-24 Thread Peter Decker
On 24 Oct 2006 16:38:28 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > You load dabo and then load your program through dabo... That > was all I needed to know to disregard it. Wow - inaccurate and proud of it! Your loss. -- # p.d. -- http://mail.python.org/mailman/listinfo/python-li

Re: python GUIs comparison (want)

2006-10-24 Thread David Boddie
On Tuesday 24 October 2006 17:38, Kevin Walzer wrote: > PyQt: > Pro: Powerful, cross-platform, sophisticated GUI's > Con: Based on C++ toolkit; That's not a bad thing in itself. > docs assume knowledge of C++; Only to a point. I knew Python before I knew C++, and it didn't stop me from learning

Re: Want to reduce steps of an operation with dictionaries

2006-10-24 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Hello: > I have next dictionaries: > a={'a':0, 'b':1, 'c':2, 'd':3} > b={'a':0, 'c':1, 'd':2, 'e':3} > I want to put in a new dictionary named c all the keys that are in b > and re-sequence the values. The result I want is: > c={'a':0, 'c':1, 'd':2} > How can I do this wi

Re: Want to reduce steps of an operation with dictionaries

2006-10-24 Thread Ben Finney
[EMAIL PROTECTED] writes: > I have next dictionaries: > a={'a':0, 'b':1, 'c':2, 'd':3} > b={'a':0, 'c':1, 'd':2, 'e':3} > I want to put in a new dictionary named c all the keys that are in b > and re-sequence the values. They never had a sequence, so you can't "re-sequence" them. You have not, p

<    1   2   3   >