WSDL and XML generation

2009-07-28 Thread guitarzero
Hi all Newbie in Python, i am looking for some pointers (or better existing modules) to do the followings: - generate (correct) XML messages from a WSDL file - make some modifications inside XML messages *before* sending them to the server hosting the Web services (described by previously mentionn

Re: Testoob: How do you use testoob.collector_from_globals / collector_from_modules?

2009-07-28 Thread orip
Hi Harry, I forwarded this to the Testoob list at http://groups.google.com/group/testoob Ori. On Jul 27, 4:12 pm, Harry Ebbers wrote: > Hi, > > For a project I'm creating unittests using testoob. When all tests are > in a single file there is no problem > > if __name__ == '__main__': >     test

Re: RSA cryptography between Python and Java

2009-07-28 Thread M.-A. Lemburg
Rob Knop wrote: > I've created an RSA key in Java. I have exported the public key by > making it into a X509EncodedKeySpec and spitting out the result of > getEncoded(). > > I want to use this public key to encode something in python that I will > send to Java, and then decode in Java with the co

Re: bad certificate error

2009-07-28 Thread Nick Craig-Wood
jakecjacobson wrote: > I am getting the following error when doing a post to REST API, > > Enter PEM pass phrase: > Traceback (most recent call last): >File "./ices_catalog_feeder.py", line 193, in ? > main(sys.argv[1]) >File "./ices_catalog_feeder.py", line 60, in main > pos

Re: Determining __name__ from the code that called a function

2009-07-28 Thread Gabriel Genellina
En Tue, 28 Jul 2009 03:21:10 -0300, Paul Johnston escribió: In ToscaWidgets 2 experimental, when defining resources you often do something like this: CSSLink(modname=__name__, filename='static/mycss.css') Now, what I'd like to do is make the "modname=__name__" optional, to make code more con

Re: ioctl on socket

2009-07-28 Thread jacopo mondi
Gabriel Genellina wrote: > En Mon, 27 Jul 2009 16:35:51 -0300, jacopo mondi > escribió: > >> Is there a reason why there is no ioctl interface for socket either then >> for windows platform? It's technical issues or what else?? > > I don't completely understand your question. On Windows, you can

Re: where do I put resources (images, audio files) when I wrote Python program?

2009-07-28 Thread Marco Mariani
Piotrek wrote: that? I think about puting these files in /usr/share/myprogram and then reading it the normal way (so the path "/usr/share/myprogram" would be just hardwired in my program). Is it the way one usually does it in Python program or is there any more sofisticated way? Just keep them

The longest word

2009-07-28 Thread NiklasRTZ
Newbie hello onwards to the .py manual asks meantime how the longest word gets determined? First word, ok 'a aa aaa aa'[:'a aa aaa aa'.find(' ',1,10)] 'a' rfind is another subset >>> 'a aa aaa aa'[:'a aa aaa aa'.rfind(' ',1,10)] 'a aa aaa' One row should be able. It's a direct word 'a aa aaa...' a

Re: If Scheme is so good why MIT drops it?

2009-07-28 Thread Hendrik van Rooyen
On Monday 27 July 2009 16:49:25 Aahz wrote: > In article , > > Hendrik van Rooyen wrote: > >On Sunday 26 July 2009 21:26:46 David Robinow wrote: > >> I'm a mediocre programmer. Does this mean I should switch to PHP? > > > >I have searched, but I can find nothing about this mediocre language. > >

Re: The longest word

2009-07-28 Thread Bearophile
On Jul 28, 10:26 am, NiklasRTZ wrote: > Newbie hello onwards to the .py manual asks meantime how the longest > word gets determined? > First word, ok >  'a aa aaa aa'[:'a aa aaa aa'.find(' ',1,10)] Your language is not easy to understand, but I think you want to find the longest word in a string.

Re: The longest word

2009-07-28 Thread NiklasRTZ
On Jul 28, 5:02 am, Bearophile wrote: > On Jul 28, 10:26 am, NiklasRTZ wrote: > > > Newbie hello onwards to the .py manual asks meantime how the longest > > word gets determined? > > First word, ok > >  'a aa aaa aa'[:'a aa aaa aa'.find(' ',1,10)] > > Your language is not easy to understand, but

Re: The longest word

2009-07-28 Thread Piet van Oostrum
> NiklasRTZ (N) wrote: >N> Newbie hello onwards to the .py manual asks meantime how the longest >N> word gets determined? >N> First word, ok >N> 'a aa aaa aa'[:'a aa aaa aa'.find(' ',1,10)] >N> 'a' >N> rfind is another subset > 'a aa aaa aa'[:'a aa aaa aa'.rfind(' ',1,10)] >N> 'a aa aaa'

Re: Override a method but inherit the docstring

2009-07-28 Thread Jean-Michel Pichavant
Shai wrote: On Jul 27, 5:05 pm, Jean-Michel Pichavant wrote: Ben Finney wrote: The docstring for ‘FooGonk.frobnicate’ is, intentionally, perfectly applicable to the ‘BarGonk.frobnicate’ method also. Yet in overriding the method, the original docstring is not associated with it.

Re: The longest word

2009-07-28 Thread Piet van Oostrum
> NiklasRTZ (N) wrote: >N> Thank you. This seems to work: >N> sorted("a AAA aa a sdfsdfsdfsdf vv".split(' '),lambda a,b: len(a)- >N> len(b))[-1] >N> 'sdfsdfsdfsdf' simpler: sorted("a AAA aa a sdfsdfsdfsdf vv".split(' '), key=len)[-1] -- Piet van Oostrum URL: http://pietvanoostru

Re: Extract images from PDF files

2009-07-28 Thread superpollo
David Lyon wrote: pdftohtml on sourceforge may help... also see: http://linuxcommand.org/man_pages/pdfimages1.html bye -- http://mail.python.org/mailman/listinfo/python-list

Re: The longest word

2009-07-28 Thread Peter Otten
NiklasRTZ wrote: > On Jul 28, 5:02 am, Bearophile wrote: >> On Jul 28, 10:26 am, NiklasRTZ wrote: >> >> > Newbie hello onwards to the .py manual asks meantime how the longest >> > word gets determined? >> > First word, ok >> > 'a aa aaa aa'[:'a aa aaa aa'.find(' ',1,10)] >> >> Your language is n

Re: bad certificate error

2009-07-28 Thread jakecjacobson
On Jul 28, 3:29 am, Nick Craig-Wood wrote: > jakecjacobson wrote: > >  I am getting the following error when doing a post to REST API, > > >  Enter PEM pass phrase: > >  Traceback (most recent call last): > >    File "./ices_catalog_feeder.py", line 193, in ? > >      main(sys.argv[1]) > >    Fil

Re: Re: where do I put resources (images, audio files) when I wrote Python program?

2009-07-28 Thread Dave Angel
Gabriel Genellina wrote: For those read-only resources I'd use pkgutil.get_data (instead of manually parsing __file__): http://docs.python.org/library/pkgutil.html#pkgutil.get_data It's easier to manage when someone later decide to install the package as an egg file, or distribute it using py2e

Re: ioctl on socket

2009-07-28 Thread Gabriel Genellina
En Tue, 28 Jul 2009 07:05:43 -0300, jacopo mondi escribió: Gabriel Genellina wrote: En Mon, 27 Jul 2009 16:35:51 -0300, jacopo mondi escribió: Is there a reason why there is no ioctl interface for socket either then for windows platform? It's technical issues or what else?? I don't comp

Re: The longest word

2009-07-28 Thread Hrvoje Niksic
Piet van Oostrum writes: >> NiklasRTZ (N) wrote: > >>N> Thank you. This seems to work: >>N> sorted("a AAA aa a sdfsdfsdfsdf vv".split(' '),lambda a,b: len(a)- >>N> len(b))[-1] >>N> 'sdfsdfsdfsdf' > > simpler: > > sorted("a AAA aa a sdfsdfsdfsdf vv".split(' '), key=len)[-1] There i

Re: I am trying to compile python 2.6.2 on my Mac

2009-07-28 Thread Tommy Nordgren
On Jul 26, 2009, at 10:37 AM, Chris Rebert wrote: On Sun, Jul 26, 2009 at 1:12 AM, Jessica R Smith wrote: Hello, I am trying to compile Python 2.6.2 on my Mac which has os/x 10.5.7 I downloaded python 2.6.2 from here: - http://www.python.org/ftp/python/2.6.2/Python-2.6.2.tar.bz2 I unpacked

Re: Looking for a dream language: sounds like Python to me.

2009-07-28 Thread ray
On Jul 27, 10:39 am, David Cournapeau wrote: > On Tue, Jul 28, 2009 at 12:28 AM, Dotan Cohen wrote: > >> It is neither efficient or inefficient: it is just a distribution > >> tool, to deploy python software in a form familiar to most windows > >> users. It does not make it any faster than running

Re: The longest word

2009-07-28 Thread NiklasRTZ
On Jul 28, 7:03 am, Hrvoje Niksic wrote: > Piet van Oostrum writes: > > >> NiklasRTZ (N) wrote: > > >>N> Thank you. This seems to work: > >>N> sorted("a AAA aa a  sdfsdfsdfsdf vv".split(' '),lambda a,b: len(a)- > >>N> len(b))[-1] > >>N> 'sdfsdfsdfsdf' > > > simpler: > > > sorted("a AAA a

Re: bad certificate error

2009-07-28 Thread Steven D'Aprano
On Mon, 27 Jul 2009 23:16:39 -0300, Gabriel Genellina wrote: > I don't see the point on "fixing" either the Python script or httplib to > accomodate for an invalid server certificate... If it's just for > internal testing, I'd use HTTP instead (at least until the certificate > is fixed). In real

Re: bad certificate error

2009-07-28 Thread Nick Craig-Wood
jakecjacobson wrote: > > >  If I go to this server in my browser, I get a "This server tried to > > >  identify itself with invalid information".  Is there a way to > > >  ignore this issue with Python?  Can I setup a trust store and add > > >  this server to the trust store? > > > > Invalid how?

index nested lists

2009-07-28 Thread Alex
hi at all, If I have this list: >>> lista ['ciao', 1, ['mela', 'pera', 'banana'], [1, 2, 3]] if I want enumerate elements...I can see: >>> for parola in lista: print lista[i] i = i + 1 ciao 1 ['mela', 'pera', 'banana'] [1, 2, 3] >>> but, if I want to enumerate elements about n

File and TagPy

2009-07-28 Thread redhot
Hello, I have question, is it possible to read tag in tagpy module from file stream? For example I have earlier read file: file = open('some.mp3', 'rb') and next get tags from it? Regards, Konrad -- http://mail.python.org/mailman/listinfo/python-list

FTP Offset larger than file.

2009-07-28 Thread Bakes
I am writing a python script that performs an identical function to the 'tail' unix utility, except that it connects to its files over FTP, rather than the local hard disk. I am currently using this python script to generate an increasing 'logfile' of garbage. > import time > for i in range(1, 20

Internal Math Library of Numpy

2009-07-28 Thread Nanime Puloski
Does Numpy use Python's standard math library when calculating elementary functions such as exp(x) and acos(x)? Also, what is the internal library of Numpy and Python's standard math library? Is it platform independent? -- http://mail.python.org/mailman/listinfo/python-list

RE: index nested lists

2009-07-28 Thread Andreas Tawn
> hi at all, > If I have this list: > > >>> lista > ['ciao', 1, ['mela', 'pera', 'banana'], [1, 2, 3]] > > if I want enumerate elements...I can see: > > >>> for parola in lista: > print lista[i] > i = i + 1 > > ciao > 1 > ['mela', 'pera', 'banana'] > [1, 2, 3] > >>> > > but, if I

Re: index nested lists

2009-07-28 Thread Alex
On 28 Lug, 15:12, "Andreas Tawn" wrote: > > hi at all, > >  If I have this list: > > > >>> lista > > ['ciao', 1, ['mela', 'pera', 'banana'], [1, 2, 3]] > > > if I want enumerate elements...I can see: > > > >>> for parola in lista: > >    print lista[i] > >    i = i + 1 > > > ciao > > 1 > > ['mela'

python 3 and stringio.seek

2009-07-28 Thread Michele Petrazzo
Hi list, I'm trying to port a my library to python 3, but I have a problem with a the stringio.seek: the method not accept anymore a value like pos=-6 mode=1, but the "old" (2.X) version yes... The error: File "/home/devel/Py3/lib/python3.0/io.py", line 2031, in seek return self._seek(pos,

Re: Gracefully exiting CLI application

2009-07-28 Thread Nobody
On Mon, 27 Jul 2009 22:35:01 +0200, David wrote: > I am writing a command line application, and I need to perform some > cleaning on exit even if the process is killed. How can I do that with > python? Killed by what means? Ctrl-C sends SIGINT which is converted to a KeyboardInterrupt exception.

Re: index nested lists

2009-07-28 Thread Jean-Michel Pichavant
Alex wrote: On 28 Lug, 15:12, "Andreas Tawn" wrote: hi at all, If I have this list: lista ['ciao', 1, ['mela', 'pera', 'banana'], [1, 2, 3]] if I want enumerate elements...I can see: for parola in lista: print lista[i] i = i + 1

Re: bad certificate error

2009-07-28 Thread Jean-Paul Calderone
On Tue, 28 Jul 2009 03:35:55 -0700 (PDT), jakecjacobson wrote: [snip] "Invalid how? Self signed certificate? Domain mismatch? Expired certificate?" It is a server name mismatch. Python 2.4 is not capable of allowing you to customize this verification behavior. It is hard coded to let Open

Re: bad certificate error

2009-07-28 Thread jakecjacobson
On Jul 28, 9:48 am, Jean-Paul Calderone wrote: > On Tue, 28 Jul 2009 03:35:55 -0700 (PDT), jakecjacobson > wrote: > > [snip] > > >"Invalid how?  Self signed certificate? Domain mismatch? Expired > >certificate?"  It is a server name mismatch. > > Python 2.4 is not capable of allowing you to cust

Questions about unicodedata in python 2.6.2

2009-07-28 Thread Weidong
I am trying to build python 2.6.2 from the source by following the instructions in README that comes with the source. The configure and make steps are fine, but there is an error in "make install" step. This "make install" attempts to build a lot of lib, and it complains about the lack of "unicode

Re: Questions about unicodedata in python 2.6.2

2009-07-28 Thread Weidong
On Jul 28, 9:54 am, Weidong wrote: > I am trying to build python 2.6.2 from the source by following the > instructions in README that comes with the source.  The configure and > make steps are fine, but there is an error in "make install" step. > This "make install" attempts to build a lot of lib,

Re: len() should always return something

2009-07-28 Thread Luis Zarrabeitia
On Friday 24 July 2009 11:58:36 am Phillip M. Feldman wrote: > I've been converting Matlab codes to Python.  In Matlab, a scalar is just a > one-by-one matrix and has a length of 1.  This convention seems no less > arbitrary to me than Python's convention that the concept of length is not > applica

Re: FTP Offset larger than file.

2009-07-28 Thread Hrvoje Niksic
Bakes writes: > The error I get is: > ftplib.error_temp: 451-Restart offset 24576 is too large for file size > 22852. > 451 Restart offset reset to 0 > which tells me that the local file is larger than the external file, > by about a kilobyte. Certainly, the local file is indeed that size, so > m

Python-URL! - weekly Python news and links (Jul 28)

2009-07-28 Thread Gabriel Genellina
QOTW: "But there's another principle at work here that's less well known, and that was first articulated to me by Robert Dewar: You can remove linear factors by profiling, but it's much harder to undo bad algorithmic decisions. In particular, whether a program runs in O(n) or O(n^2) sometimes dep

Re: Questions about unicodedata in python 2.6.2

2009-07-28 Thread Christian Heimes
Weidong schrieb: > I am trying to build python 2.6.2 from the source by following the > instructions in README that comes with the source. The configure and > make steps are fine, but there is an error in "make install" step. > This "make install" attempts to build a lot of lib, and it complains >

Re: FTP Offset larger than file.

2009-07-28 Thread Bakes
On 28 July, 15:01, Hrvoje Niksic wrote: > Bakes writes: > > The error I get is: > > ftplib.error_temp: 451-Restart offset 24576 is too large for file size > > 22852. > > 451 Restart offset reset to 0 > > which tells me that the local file is larger than the external file, > > by about a kilobyte.

Re: Help understanding the decisions *behind* python?

2009-07-28 Thread Luis Zarrabeitia
On Friday 24 July 2009 11:07:30 am Inky 788 wrote: > On Jul 23, 3:42 am, Hendrik van Rooyen > > if you think it is contrived, then please consider how you would > > keep track of say the colour of a pixel on a screen at position > > (x,y) - this is about the simplest "natural" tuple format and > >

Re: initializing with empty list as default causes freaky problems

2009-07-28 Thread Luis Alberto Zarrabeitia Gomez
Quoting Reckoner : > Hi, > > Observe the following: > > In [202]: class Foo(): >.: def __init__(self,h=[]): >.: self.h=h [...] > In [207]: f.h.append(10) > > In [208]: f.h > Out[208]: [10] > > In [209]: g.h > Out[209]: [10] > > The question is: why is g.h updated

Re: FTP Offset larger than file.

2009-07-28 Thread Bakes
On 28 July, 15:18, Bakes wrote: > On 28 July, 15:01, Hrvoje Niksic wrote: > > > > > Bakes writes: > > > The error I get is: > > > ftplib.error_temp: 451-Restart offset 24576 is too large for file size > > > 22852. > > > 451 Restart offset reset to 0 > > > which tells me that the local file is la

Re: Looking for a dream language: sounds like Python to me.

2009-07-28 Thread Stef Mientki
Matlab, from The Mathworks, has a companion product called Simulink. This allows the user to graphically build ‘algorithms’ in block form. There is a similar Python function. Where can I find a Python functionality like simulink ? thanks, Stef Mientki -- http://mail.python.org/mailman/l

Re: Internal Math Library of Numpy

2009-07-28 Thread David Cournapeau
On Tue, Jul 28, 2009 at 10:09 PM, Nanime Puloski wrote: > Does Numpy use Python's standard math library when calculating > elementary functions such as exp(x) and acos(x)? It depends on the dtype: for fundamental types (float, int, etc...), the underlying implementation is whatever the (C) math li

Re: New implementation of re module

2009-07-28 Thread MRAB
Aahz wrote: In article , MRAB wrote: I've been working on a new implementation of the re module. The details are at http://bugs.python.org/issue2636, specifically from http://bugs.python.org/issue2636#msg90954. I've included a .pyd file for Python 2.6 on Windows if you want to try it out. Ho

Re: If Scheme is so good why MIT drops it?

2009-07-28 Thread MRAB
Hendrik van Rooyen wrote: On Monday 27 July 2009 16:49:25 Aahz wrote: In article , Hendrik van Rooyen wrote: On Sunday 26 July 2009 21:26:46 David Robinow wrote: I'm a mediocre programmer. Does this mean I should switch to PHP? I have searched, but I can find nothing about this mediocre l

need help using Tkinter

2009-07-28 Thread Manzur Ahmed
i wanted to ask you if one of you could help me to use Tkinter. i'm trying to just create a simple GUI for which I have provided the code for below. # Simple GUI # Demonstrates creating a window from Tkinter import * # create the root window root = Tk () # modify the window root.title("Simple G

Re: WSDL and XML generation

2009-07-28 Thread Gustavo Andrés Angulo
Hi you can generate the WSDl with soaplib [1], and you can view web.py or django for this: for web.py -> http://webpy.org/cookbook/webservice for django -> http://www.djangosnippets.org/snippets/979/ [1]=> http://trac.optio.webfactional.com/ > Hi all > Newbie in Python, i am looking for some

Re: need help using Tkinter

2009-07-28 Thread MRAB
Manzur Ahmed wrote: i wanted to ask you if one of you could help me to use Tkinter. i'm trying to just create a simple GUI for which I have provided the code for below. # Simple GUI # Demonstrates creating a window from Tkinter import * # create the root window root = Tk () # modify the win

Re: M2Crypto hangs on this URL

2009-07-28 Thread John Nagle
Martin P. Hellwig wrote: John Nagle wrote: John Nagle wrote: John Nagle wrote: There's something strange about this URL: "https://sagar310.pontins.com/sraep/"; ... It looks to me like the SSL handshake is not done properly from the server side. Compare the output of: openssl s_client -hos

Re: FTP Offset larger than file.

2009-07-28 Thread Hrvoje Niksic
Bakes writes: >> > As a quick fix, you can add a file.flush() line after the >> > file.write(...) line, and the problem should go away. >> >> Thank you very much, that worked perfectly. > > Actually, no it didn't. That fix works seamlessly in Linux, but gave > the same error in a Windows environm

Re: Questions about unicodedata in python 2.6.2

2009-07-28 Thread Weidong
On Jul 28, 10:17 am, Christian Heimes wrote: > unicodedatais usually build as a shared library and not linked into the > Python core. How did you configure Python? The usual prodecure is: > >    ./configure >    make >    sudo make install > > On Unix the preferred option for ./configure is "--ena

Re: Wrapping prstat on Solaris

2009-07-28 Thread ryles
On Jul 27, 10:26 am, s...@pobox.com wrote: > At work we currently use top to monitor ongoing system utilization on our > Solaris systems.  As time has moved on though, use of top has become > problematic.  Our admins want us to switch to prstat, Sun's top-like > command.  It works fine however does

Python as active script

2009-07-28 Thread misterdi
I'm using Activestate python, For older version of python, I know that we can register python as active script by registering it through win32comext.axscript.client pyscript.py And to do that I need to change something in this pyscript.py before running pyscript_rexec.py(http://fastq.com/~sckitchin

Re: The longest word

2009-07-28 Thread ryles
On Jul 28, 7:55 am, NiklasRTZ wrote: > Sincere thanks for strengthening python's superior flexibility. Same > function also works around an exploding index problem returning > results for longest word where otherwise a word with whitespace > crashes the index: Babelfish? -- http://mail.python.

Re: FTP Offset larger than file.

2009-07-28 Thread Dave Angel
Bakes wrote: On 28 July, 15:18, Bakes wrote: On 28 July, 15:01, Hrvoje Niksic wrote: Bakes writes: The error I get is: ftplib.error_temp: 451-Restart offset 24576 is too large for file size 22852. 451 Restart offset reset to 0 which tells me that the local file is larger t

Re: Questions about unicodedata in python 2.6.2

2009-07-28 Thread Christian Heimes
Weidong wrote: > Thanks for your response! I configured it in the same way as you > said, but without "--enable-unicode=ucs4". The ocnfig.log shows that > checking for UCS-4 was failed. So I assume that by default UCS-2 was > used. There was no other problme in the "make" step. Correct > The

Re: New implementation of re module

2009-07-28 Thread Christopher Arndt
On 27 Jul., 21:27, Wolfgang Rohdewald wrote: > how do I compile _regex.c on Linux? This simple setup.py file should do the trick: from distutils.core import setup, Extension setup(name='regex', version='1.0', py_modules = ['regex'], ext_modules=[Extension('_regex', ['_regex.c'])], )

Re: New implementation of re module

2009-07-28 Thread MRAB
Christopher Arndt wrote: On 27 Jul., 21:27, Wolfgang Rohdewald wrote: how do I compile _regex.c on Linux? This simple setup.py file should do the trick: from distutils.core import setup, Extension setup(name='regex', version='1.0', py_modules = ['regex'], ext_modules=[Extension(

Language detector for Python using en-gram.

2009-07-28 Thread varun
One of my friend suggested me to do a language detector for python.At present the language detector in python is in uni-gram mode and i have planned to do it in en-gram mode.Kindly give me your suggestion as i am doing this as my final year project. With Anticipation, Varun V. Kumar -- http://m

Re: M2Crypto hangs on this URL

2009-07-28 Thread Martin P. Hellwig
John Nagle wrote: Martin P. Hellwig wrote: John Nagle wrote: John Nagle wrote: John Nagle wrote: There's something strange about this URL: "https://sagar310.pontins.com/sraep/"; ... It looks to me like the SSL handshake is not done properly from the server side. Compare the output of: op

Re: Gracefully exiting CLI application

2009-07-28 Thread David
Il Tue, 28 Jul 2009 14:31:56 +0100, Nobody ha scritto: > Killed by what means? > > Ctrl-C sends SIGINT which is converted to a KeyboardInterrupt exception. > This can be caught, or if it's allowed to terminate the process, any exit > handlers registered via atexit.register() will be used. > > Fo

C function taking double pointer to a structure variable as OUTPUT parameter

2009-07-28 Thread fengmang_python
Hi, Everyone, I am a newbie to both Swig and Python. I am trying to export a set of C APIs to Python. My C function is int getInfor( char* name, int height, int weight, Infor** infor) //where infor is an OUTPUT parameter { .. *infor = (Infor*)malloc(sizeof(Infor)); .. }   The declare of

Re: If Scheme is so good why MIT drops it?

2009-07-28 Thread Dimiter "malkia" Stanev
Xah Lee wrote: PHP is functional. PHP is functional, as in "it functions!". PHP is not functional, as in "it ain't functions!" -- http://mail.python.org/mailman/listinfo/python-list

Re: Discovery IP in connection

2009-07-28 Thread Djames Suhanko
Thanks, all! I didn't tried to print addr. :-( sorry all. I'm learning python yet. Thanks again ! On Mon, Jul 27, 2009 at 8:23 PM, Piet van Oostrum wrote: >> Djames Suhanko (DS) wrote: > >>DS> Hello,all! >>DS>  I wrote a little programa that listening UDP packets. A can receive >>DS> the me

Re: bad certificate error

2009-07-28 Thread Piet van Oostrum
> jakecjacobson (j) wrote: >j> On Jul 28, 9:48 am, Jean-Paul Calderone wrote: >>> On Tue, 28 Jul 2009 03:35:55 -0700 (PDT), jakecjacobson >>> wrote: >>> > [snip] >>> >>> >"Invalid how?  Self signed certificate? Domain mismatch? Expired >>> >certificate?"  It is a server name mismatch. >>>

[ANN] Pyjamas 0.6pre2 Python Web Widget Set and Javascript Compiler

2009-07-28 Thread Luke Kenneth Casson Leighton
http://pyjs.org this is a pre-release announcement, 0.6pre2, of the pyjamas widget set and python-to-javascript compiler. there are over 110 entries in the CHANGELOG since the last stable release, 0.5p1, and so it was deemed sensible to invite people to test this version before its next stable re

instead of depending on data = array('h') .. write samples 1 by 1 to w = wave.open("wav.wav", "w")

2009-07-28 Thread '2+
it says Wave_write.writeframes(data) will that mean "from array import array" is a must? this does the job: import oil import wave from array import array a = oil.Sa() w = wave.open("current.wav", "w") w.setnchannels(2) w.setsampwidth(2) w.setframerate(44100) data = array('h') for gas in rang

xlrd - insert column?

2009-07-28 Thread LeeRisq
Does xlrd have the capability to insert a column? -- http://mail.python.org/mailman/listinfo/python-list

Re: New implementation of re module

2009-07-28 Thread William Dode
On 28-07-2009, MRAB wrote: > With the official Python 2.6 distribution for Mac OS X it works. >> > The source code is intended to replace the current 're' module in Python > 2.7 (and I'll be porting it to Python 3.2), so I'm not that worried > about Python versions earlier than 2.6 for testing, a

Need help in passing a "-c command" argument to the interactive shell.

2009-07-28 Thread Bill
On my windows box I type => c:\x>python -c "import re" The result is => c:\x> In other words, the Python interactive shell doesn't even open. What am I doing wrong? I did RTFM at http://www.python.org/doc/1.5.2p2/tut/node4.html on argument passing, but to no avail. -- http://mail.python.org/mai

Re: Extract images from PDF files

2009-07-28 Thread writeson
David, Thanks for your reply, I'll take a look at pdftohtml and see if it suits my needs. Thanks! Doug -- http://mail.python.org/mailman/listinfo/python-list

Re: time.strftime('%m-%d-%Y %H:%m:%S') to log is out of order

2009-07-28 Thread Ben
On Jul 22, 1:04 pm, davidj411 wrote: > i think "Piet van Oostrum" has resolved my issue. > good eyes! Well, he *is* Dutch... -Ben -- http://mail.python.org/mailman/listinfo/python-list

"Deprecated sets module" with Python 2.6

2009-07-28 Thread Virgil Stokes
I would appreciate help on correcting a problem when trying to create an *.exe file using py2exe via GUI2exe with Python 2.6.2. When using GUI2exe to create an *.exe I always get the following warning during the compile process: C:\Python26\lib\site-packages\py2exe\build_exe.py:16: Deprecatio

Re: Need help in passing a "-c command" argument to the interactive shell.

2009-07-28 Thread Philip Semanchuk
On Jul 28, 2009, at 4:16 PM, Bill wrote: On my windows box I type => c:\x>python -c "import re" The result is => c:\x> In other words, the Python interactive shell doesn't even open. What am I doing wrong? Nothing! =) The -c option tells Python to execute the commands in the quotes as a P

Re: xlrd - insert column?

2009-07-28 Thread Tino Wildenhain
LeeRisq wrote: Does xlrd have the capability to insert a column? rd means ReaD, so there is nothing it could insert something to. Of course once you have read the data you can manipulate its structure how you like it. The counterpart is xlwt and it can write excel files however you like it. R

Re: "Deprecated sets module" with Python 2.6

2009-07-28 Thread MRAB
Virgil Stokes wrote: I would appreciate help on correcting a problem when trying to create an *.exe file using py2exe via GUI2exe with Python 2.6.2. When using GUI2exe to create an *.exe I always get the following warning during the compile process: C:\Python26\lib\site-packages\py2exe\build

Re: Need help in passing a "-c command" argument to the interactive shell.

2009-07-28 Thread Mark Lawrence
Bill wrote: On my windows box I type => c:\x>python -c "import re" The result is => c:\x> In other words, the Python interactive shell doesn't even open. What am I doing wrong? I did RTFM at http://www.python.org/doc/1.5.2p2/tut/node4.html on argument passing, but to no avail. You've told pyth

Re: need help using Tkinter

2009-07-28 Thread Mark Roseman
MRAB wrote: > Manzur Ahmed wrote: > > i wanted to ask you if one of you could help me to use Tkinter. i'm > > trying to just create a simple GUI for which I have provided the code > > for below. > There are some differences between Python 3.x and Python 2.x. In Python > 3.1 the module is called

Re: Override a method but inherit the docstring

2009-07-28 Thread Shai
On Jul 26, 6:55 pm, a...@pythoncraft.com (Aahz) wrote: > > Nice!  Maybe stick this on the Cookbook? http://code.activestate.com/recipes/576862/ Thanks for the suggestion, Shai. -- http://mail.python.org/mailman/listinfo/python-list

Re: New implementation of re module

2009-07-28 Thread Aahz
In article , MRAB wrote: >Aahz wrote: >> In article , >> MRAB wrote: >>> I've been working on a new implementation of the re module. The details >>> are at http://bugs.python.org/issue2636, specifically from >>> http://bugs.python.org/issue2636#msg90954. I've included a .pyd file for >>> Python

Re: If Scheme is so good why MIT drops it?

2009-07-28 Thread magicus
On Tue, 28 Jul 2009 16:11:02 +0100, MRAB wrote: > Hendrik van Rooyen wrote: >> On Monday 27 July 2009 16:49:25 Aahz wrote: >>> In article , >>> >>> Hendrik van Rooyen wrote: On Sunday 26 July 2009 21:26:46 David Robinow wrote: > I'm a mediocre programmer. Does this mean I should switc

Re: C function taking double pointer to a structure variable as OUTPUT parameter

2009-07-28 Thread Diez B. Roggisch
fengmang_pyt...@sina.com schrieb: Hi, Everyone, I am a newbie to both Swig and Python. I am trying to export a set of C APIs to Python. If you are really dealing with a plain C-api, don't bother using SWIG - use ctypes. It comes with python >=2.5, is availabe as extra module for earlier ver

Re: Questions about unicodedata in python 2.6.2

2009-07-28 Thread Weidong
On Jul 28, 12:37 pm, Christian Heimes wrote: > 'make install' shouldn't compile any libraries if you run 'make' prior > to 'make install'. I suggest you start again with a clean build tree of > Python 2.6.2. > > Christian You are perfectly right. I started everything again after a "make distclea

Re: "Deprecated sets module" with Python 2.6

2009-07-28 Thread Diez B. Roggisch
Virgil Stokes schrieb: I would appreciate help on correcting a problem when trying to create an *.exe file using py2exe via GUI2exe with Python 2.6.2. When using GUI2exe to create an *.exe I always get the following warning during the compile process: C:\Python26\lib\site-packages\py2exe\bui

Re: FTP Offset larger than file.

2009-07-28 Thread Bakes
On Jul 28, 5:36 pm, Dave Angel wrote: > Bakes wrote: > > On 28 July, 15:18, Bakes wrote: > > >> On 28 July, 15:01, Hrvoje Niksic wrote: > > >>> Bakes writes: > > The error I get is: > ftplib.error_temp: 451-Restart offset 24576 is too large for file size > 22852. > 451 Resta

Semaphore Techniques

2009-07-28 Thread John D Giotta
I'm looking to run a process with a limit of 3 instances, but each execution is over a crontab interval. I've been investigating the threading module and using daemons to limit active thread objects, but I'm not very successful at grasping the documentation. Is it possible to do what I'm trying to

Re: If Scheme is so good why MIT drops it?

2009-07-28 Thread MRAB
magicus wrote: On Tue, 28 Jul 2009 16:11:02 +0100, MRAB wrote: Hendrik van Rooyen wrote: On Monday 27 July 2009 16:49:25 Aahz wrote: In article , Hendrik van Rooyen wrote: On Sunday 26 July 2009 21:26:46 David Robinow wrote: I'm a mediocre programmer. Does this mean I should switch to

Re: If Scheme is so good why MIT drops it?

2009-07-28 Thread magicus
On Tue, 28 Jul 2009 23:22:29 +0100, MRAB wrote: > magicus wrote: >> On Tue, 28 Jul 2009 16:11:02 +0100, MRAB >> wrote: >> >>> Hendrik van Rooyen wrote: On Monday 27 July 2009 16:49:25 Aahz wrote: > In article , > > Hendrik van Rooyen wrote: >> On Sunday 26 July 2009 21:26

Questions on python 2.6.2 installed files

2009-07-28 Thread Weidong
I would like to build a python 2.6.2 for Linux that runs on arm-based embeded devices. After some experiment of building from the python 2.6.2 source, I notice that the installed files from "make install" are much too big for an embedded system. For example, the files it installs to /usr/local/li

Re: New implementation of re module

2009-07-28 Thread Mark Lawrence
MRAB wrote: Hi all, I've been working on a new implementation of the re module. The details are at http://bugs.python.org/issue2636, specifically from http://bugs.python.org/issue2636#msg90954. I've included a .pyd file for Python 2.6 on Windows if you want to try it out. I'm interested in how

Re: "Deprecated sets module" with Python 2.6

2009-07-28 Thread Steven D'Aprano
On Tue, 28 Jul 2009 22:28:09 +0200, Virgil Stokes wrote: > When using GUI2exe to create an *.exe I always get the following warning > during the compile process: > > C:\Python26\lib\site-packages\py2exe\build_exe.py:16: > DeprecationWarning: the sets module is deprecated > import sets The be

Re: Semaphore Techniques

2009-07-28 Thread Christian Heimes
John D Giotta schrieb: > I'm looking to run a process with a limit of 3 instances, but each > execution is over a crontab interval. I've been investigating the > threading module and using daemons to limit active thread objects, but > I'm not very successful at grasping the documentation. > > Is i

Re: Extract images from PDF files

2009-07-28 Thread Xavier Ho
I've got a non-Python solution if you have Acrobat 6 or up. >From the menu, Advanced -> Document Processing -> Extract All Images... If you need multiple PDFs done, Batch Processing would be a great start. Then you can run another script to make the thumbnails, or use Photoshop. Either way works

Re: Semaphore Techniques

2009-07-28 Thread Philip Semanchuk
On Jul 28, 2009, at 7:19 PM, Christian Heimes wrote: John D Giotta schrieb: I'm looking to run a process with a limit of 3 instances, but each execution is over a crontab interval. I've been investigating the threading module and using daemons to limit active thread objects, but I'm not ver

Re: Semaphore Techniques

2009-07-28 Thread David Bolen
John D Giotta writes: > I'm looking to run a process with a limit of 3 instances, but each > execution is over a crontab interval. I've been investigating the > threading module and using daemons to limit active thread objects, but > I'm not very successful at grasping the documentation. > > Is i

  1   2   >