Decorator

2006-05-11 Thread Lad
I use Python 2.3. I have heard about decorators in Python 2.4. What is the decorator useful for? Thanks for reply L. -- http://mail.python.org/mailman/listinfo/python-list

Re: syntax for -c cmd

2006-05-11 Thread Fredrik Lundh
Edward Elliott wrote: > Now this is interesting. I broke the line up into separate arguments and it > seemed to work fine: > > $ python -c 'if 1==1: print "yes"' 'else: print "no"' > yes > > But then I tested the else branch and it produces no output: > $ python -c 'if 1==0: print "yes"' 'else: p

Re: Threads

2006-05-11 Thread Edward Elliott
Dennis Lee Bieber wrote: > On 11 May 2006 17:02:51 -0700, "placid" <[EMAIL PROTECTED]> declaimed the > following in comp.lang.python: >> do is, when the queue is empty, i want the thread to pause (or more >> technical, i want the thread to block) until the queue gets populated >> again. Is this po

Re: syntax for -c cmd

2006-05-11 Thread Edward Elliott
Dennis Lee Bieber wrote: > On Thu, 11 May 2006 20:12:55 GMT, Edward Elliott <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > >> If putting the else in a separate arg unbinds it from the if, I would >> expect a syntax error. If OTOH naked elses are allowed on the command >> li

Re: Multi-line lambda proposal.

2006-05-11 Thread Sybren Stuvel
Kaz Kylheku enlightened us with: > Which proposed lambda syntax is closest in this sense? I was talking about different ways (your multi-line lambda vs. the currently implemented one) of doing function decorators. > Is it unusual to have a tougher time explaining X than Y to people > who are lear

Re: Threads

2006-05-11 Thread Alex Martelli
Peter Otten <[EMAIL PROTECTED]> wrote: > placid wrote: > > > I have a thread that has a job Queue, it continuosly polls this queue > > to see if there are any jobs for it, what i really wont to be able to > > do is, when the queue is empty, i want the thread to pause (or more > > technical, i wan

matplotlib

2006-05-11 Thread Bryan
does anyone know if matplotlib is robust enough to use in a commercial application? are there any existing commercial or popular open source programs that use it? thanks, bryan -- http://mail.python.org/mailman/listinfo/python-list

Re: Reg Ex help

2006-05-11 Thread Paddy
P.S. This is how it works: >>> s ="/main/parallel_branch_1/release_branch_1.0/dbg_for_python/CHECKEDOUT >>> from /main/parallel_branch_1/release_branch_1.0/4" >>> s '/main/parallel_branch_1/release_branch_1.0/dbg_for_python/CHECKEDOUT from /main/parallel_branch_1/release_branch_1.0/4' >>> s.spli

Re: Reg Ex help

2006-05-11 Thread Paddy
If you have strings of all the CHECKEDOUT (is this from the lsco command?), then the following might work for you: >>> s ="/main/parallel_branch_1/release_branch_1.0/dbg_for_python/CHECKEDOUT >>> from /main/parallel_branch_1/release_branch_1.0/4" >>> s.split()[0].split('/')[-2] 'dbg_for_python' >

Re: Time to bundle PythonWin

2006-05-11 Thread Alex Martelli
Dave Benjamin <[EMAIL PROTECTED]> wrote: ... > It's time to bundle PythonWin. No: the Python Standard Distribution, in 2.5, includes instead ctypes, which is lower-level than PythonWin but more general (exists for other platforms, lets you call other DLLs on Windows and not just those wrapped f

Re: A Unicode problem -HELP

2006-05-11 Thread Martin v. Löwis
manstey wrote: > 1. I have # -*- coding: UTF-8 -*- as my first line. > 2. In Wing IDE I have set Default Encoding to UTF-8 > 3. I have imported codecs and opened and written my file, which doesn't > have a BOM, as encoding=UTF-8 > 4. I have written a dictionary for translation, with entries such as

Re: Threads

2006-05-11 Thread Peter Otten
placid wrote: > I have a thread that has a job Queue, it continuosly polls this queue > to see if there are any jobs for it, what i really wont to be able to > do is, when the queue is empty, i want the thread to pause (or more > technical, i want the thread to block) until the queue gets populate

Re: Simple DAV server?

2006-05-11 Thread Kyler Laird
Ivan Voras <[EMAIL PROTECTED]> writes: >Most of the problems are probably because I didn't mean it to be a >fully-compliant WebDAV server, but to serve my need at the time :) I am *so* close to having a WebDAV solution. Unfortunately when I finally moved to using HTTPS, it all broke in MS Windo

Re: calling perl modules from python

2006-05-11 Thread Ravi Teja
> This thing implements a perl interpreter inside python. That seems like > overkill to me. It does not *implement* Python, just embeds it. It is not an overkill if you can get it to work quickly and move on. If you are Windows, you can use COM. Support is available for both languages and is fai

Re: Time to bundle PythonWin

2006-05-11 Thread Ravi Teja
> I write applications that use COM and Tkinter to automate basic office > tasks. My users are thankfully benevolent enough to download and install > Python on their own. They don't know what PythonWin is, they aren't > remembering it, and frankly, I don't think it should be their concern. > It's

A Unicode problem -HELP

2006-05-11 Thread manstey
I am writing a program to translate a list of ascii letters into a different language that requires unicode encoding. This is what I have done so far: 1. I have # -*- coding: UTF-8 -*- as my first line. 2. In Wing IDE I have set Default Encoding to UTF-8 3. I have imported codecs and opened and w

Re: Calling C/C++ functions in a python script

2006-05-11 Thread Ravi Teja
You are working with the debug configuration, use release instead and python24.lib will suffice. http://news.hping.org/comp.lang.python.archive/6741.html -- http://mail.python.org/mailman/listinfo/python-list

python soap web services

2006-05-11 Thread Butternut squash
Is there any reason why there isn't any python library that makes using soap as easy as how microsoft .net makes it. I mean I write rudimentary asmx files call them from a webbrowser. The WSDL is generated and then there is documentation and a form to invoke a function. When do you think someone

Re: which windows python to use?

2006-05-11 Thread Robert Kern
James Stroud wrote: > Robert Kern wrote: > >>James Stroud wrote: >> >>>Enthought does not play well with cygwin, I've noticed. >> >>In what way? Does the mingw gcc that we distribute interfere with Cygwin's >>gcc? > > One can not run the enthought python interactive interpreter from a > cygwin

Re: Python and windows bandwidth statistics?

2006-05-11 Thread Roger Upole
win32pdh from Pywin32 lets you access the network performance counters. Roger "Dave Reid" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I've been searching for a something in Python for me to be able to get > the total outbound or inbound bandwidth (in Windows (or cross-OS > c

Re: which windows python to use?

2006-05-11 Thread James Stroud
Robert Kern wrote: > James Stroud wrote: > > >>Enthought does not play well with cygwin, I've noticed. > > > In what way? Does the mingw gcc that we distribute interfere with Cygwin's > gcc? > One can not run the enthought python interactive interpreter from a cygwin x-window session, it lo

Re: which windows python to use?

2006-05-11 Thread Robert Hicks
I tend to do ActivePython because the OSX version seems to come out a bit quicker. Although that might change in the future. Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: python equivalent of the following program

2006-05-11 Thread AndyL
Edward Elliott wrote: > AndyL wrote: > >>Edward Elliott wrote: >> >>>And if the script runs somewhere that stderr is likely to disappear: >>> >>>prog1 = subprocess.Popen(['prog1'], stdout=file1, >>>stderr=subprocess.STDOUT) >> >>Forgot to mention before that the main motivation is to have the same

Re: python equivalent of the following program

2006-05-11 Thread Edward Elliott
AndyL wrote: > Edward Elliott wrote: >> And if the script runs somewhere that stderr is likely to disappear: >> >> prog1 = subprocess.Popen(['prog1'], stdout=file1, >> stderr=subprocess.STDOUT) > > Forgot to mention before that the main motivation is to have the same > code on bot Linux and M$ pl

Re: MySQLdb trouble

2006-05-11 Thread Nicolay A. Vasiliev
Hi! > Number two suggestion: try committing the transaction (autocommit > might not be enabled in your environment). > commit() - is what I need :) Thank you very much! -- http://mail.python.org/mailman/listinfo/python-list

Re: Time to bundle PythonWin

2006-05-11 Thread Ten
On Thursday 11 May 2006 23:09, Dave Benjamin wrote: > Hey folks, > > Why is PythonWin (win32all) still a separate download from a third party? > Is it legal, technical, or what? I think it's about time it be part of the > standard distribution. > > There are many useful things that you ought to be

Re: Threads

2006-05-11 Thread placid
David Reed wrote: > On May 11, 2006, at 8:02 PM, placid wrote: > > > > > Carl J. Van Arsdall wrote: > >> placid wrote: > >>> Hi all, > >>> > >>> In Python, Threads cannot be paused, i remember reading this > >>> somewhere, > >>> so is there a way around this ? > >>> > >> > >> When you say paused d

Re: glob() that traverses a folder tree

2006-05-11 Thread seannakasone
awesome. thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Threads

2006-05-11 Thread David Reed
On May 11, 2006, at 8:02 PM, placid wrote: > > Carl J. Van Arsdall wrote: >> placid wrote: >>> Hi all, >>> >>> In Python, Threads cannot be paused, i remember reading this >>> somewhere, >>> so is there a way around this ? >>> >> >> When you say paused do you mean paused by an external source o

Re: Chicago Python Users Group Thurs May 11 at 7pm

2006-05-11 Thread AndyL
Brian Ray wrote: > This will be our best meeting yet! ChiPy's Monthly meeting this Thurs. > May 11, 2006. 7pm. > I will miss it. When the next is planed? -- http://mail.python.org/mailman/listinfo/python-list

Re: Threads

2006-05-11 Thread placid
Carl J. Van Arsdall wrote: > placid wrote: > > Hi all, > > > > In Python, Threads cannot be paused, i remember reading this somewhere, > > so is there a way around this ? > > > > When you say paused do you mean paused by an external source or paused > by a call internal to the thread? There are p

Re: python equivalent of the following program

2006-05-11 Thread AndyL
Edward Elliott wrote: > Steven Bethard wrote: > >>import subprocess >> >>file1 = open('file1', 'w') >>prog1 = subprocess.Popen(['prog1'], stdout=file1) > > > And if the script runs somewhere that stderr is likely to disappear: > > prog1 = subprocess.Popen(['prog1'], stdout=file1, stderr=subproc

Re: Time to bundle PythonWin

2006-05-11 Thread Carl Banks
Robert Hicks wrote: > No it isn't. It is a Windows only package. It needs to stay a separate > download. The latest Python Library Reference has a section called "MS Windows Specific Services", where it has several packages that work only on Windows. There's also a section for SGI IRIX modules, a

Re: Threads

2006-05-11 Thread Carl J. Van Arsdall
placid wrote: > Hi all, > > In Python, Threads cannot be paused, i remember reading this somewhere, > so is there a way around this ? > When you say paused do you mean paused by an external source or paused by a call internal to the thread? There are plenty of synchronization constructs for

Threads

2006-05-11 Thread placid
Hi all, In Python, Threads cannot be paused, i remember reading this somewhere, so is there a way around this ? TIA -- http://mail.python.org/mailman/listinfo/python-list

Re: Time to bundle PythonWin

2006-05-11 Thread John Bokma
"Robert Hicks" <[EMAIL PROTECTED]> wrote: > No it isn't. Learn to quote when you use Google's Usenet garbage. -- John MexIT: http://johnbokma.com/mexit/ personal page: http://johnbokma.com/ Experienced programmer available:

Re: which windows python to use?

2006-05-11 Thread N/A
hi, if mathematical and numerical algorithm are all you need, then just go for Enthought distribution + Matplotlib. The Enthought distribution provides all packages you need and handy for insatllation! My combo: 1. Enthought Distribution 2. Matplotlib 3. EmEditor Brian Blais wrote: > Hello,

Re: Time to bundle PythonWin

2006-05-11 Thread Dave Benjamin
On Thu, 11 May 2006, Robert Hicks wrote: > No it isn't. It is a Windows only package. It needs to stay a separate > download. The Windows installer for Python is an MSI file. It's already Windows only. Dave -- http://mail.python.org/mailman/listinfo/python-list

Re: find all index positions

2006-05-11 Thread John Machin
On 12/05/2006 5:13 AM, vbgunz wrote: > I thought this to be a great exercise so I went the extra length to > turn it into a function for my little but growing library. I hope you > enjoy :) > Oh, indeed ;-) > > def indexer(string, target): Consider not shadowing the name of the string module.

Re: Time to bundle PythonWin

2006-05-11 Thread Robert Hicks
No it isn't. It is a Windows only package. It needs to stay a separate download. Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN] tdir 1.69 Released And Available

2006-05-11 Thread Tim Daneliuk
Edward Elliott wrote: > Tim Daneliuk wrote: > >> 'tdir' is a reimplementation and enhancement of the old 'xdir' CP/M >> utility from Ancient Times. >> >> 'tdir' is an advanced directory display utility written in Pure Python, >> and runs on both *nix and Win32 systems.\ >> >> With 'tdir' you can d

Re: FTP filename escaping

2006-05-11 Thread Edward Elliott
Serge Orlov wrote: > Almad wrote: >> OK, after some investigation...problem is in non-latin characters in >> filenames on ftp. >> >> Yes, users should be killed for this, > > It's futile, users will always find a way to crash you program :) And > you can't kill them all, there are too many of them

Re: Reg Ex help

2006-05-11 Thread Edward Elliott
Bruno Desthuilliers wrote: > don a écrit : >> Also if there is a better way than using regex, please let me know. > > s ="/main/parallel_branch_1/release_branch_1.0/dbg_for_python/CHECKEDOUT > from /main/parallel_branch_1/release_branch_1.0/4" > parts = s.replace(' ', '/').strip('/').split('/')

Time to bundle PythonWin

2006-05-11 Thread Dave Benjamin
Hey folks, Why is PythonWin (win32all) still a separate download from a third party? Is it legal, technical, or what? I think it's about time it be part of the standard distribution. There are many useful things that you ought to be able to do without downloading third-party libraries. Termina

Re: can distutils windows installer invoke another distutils windows installer

2006-05-11 Thread Serge Orlov
timw.google wrote: > Hi all. > > I have a package that uses other packages. I created a setup.py to use > 'try:' and import to check if some required packages are installed. I > have the tarballs and corresponding windows installers in my sdist > distribution, so if I untar my source distribution a

Re: Matplotlib in Python vs. Matlab, which one has much better graphical pressentation?

2006-05-11 Thread Alexander Schmolck
N/A <[EMAIL PROTECTED]> writes: > Hi all, > > Can I have your opinions on Matlab vs. Matplotlib in Python in terms of 2D and > 3D graphical presentation please. > > > Matplotlib in Python vs. Matlab, which one has much better graphical > pressentation? As far as 2D plots are concerned I think

Re: calling perl modules from python

2006-05-11 Thread Mirco Wahab
Hi David > I have a hash function written by another organization that I need to use. > It is implemented in perl. I've been attempting to decode what they are > doing in their hash function and it is taking way too long. I've > identified two functions in a perl module that I would like to 'call

Re: FTP filename escaping

2006-05-11 Thread Serge Orlov
Almad wrote: > OK, after some investigation...problem is in non-latin characters in > filenames on ftp. > > Yes, users should be killed for this, It's futile, users will always find a way to crash you program :) And you can't kill them all, there are too many of them. > but I would like to handle

Re: python equivalent of the following program

2006-05-11 Thread Edward Elliott
Steven Bethard wrote: > import subprocess > > file1 = open('file1', 'w') > prog1 = subprocess.Popen(['prog1'], stdout=file1) And if the script runs somewhere that stderr is likely to disappear: prog1 = subprocess.Popen(['prog1'], stdout=file1, stderr=subprocess.STDOUT) -- http://mail.python.or

Re: calling perl modules from python

2006-05-11 Thread Bruno Desthuilliers
David Bear a écrit : > I have a hash function written by another organization that I need to use. > It is implemented in perl. I've been attempting to decode what they are > doing in their hash function and it is taking way too long. No comment... > I've > identified two functions in a perl modu

Re: reusing parts of a string in RE matches?

2006-05-11 Thread Mirco Wahab
Hi John > Ah, I see the difference. In Python you get a list of > tuples, so there seems to be a little extra work to do > to get the number out. Dohh, after two cups of coffee ans several bars of chocolate I eventually mad(e) it ;-) In Python, you have to deconstruct the 2D-lists (here: long

Re: Reg Ex help

2006-05-11 Thread Bruno Desthuilliers
don a écrit : > I have a string from a clearcase cleartool ls command. > > /main/parallel_branch_1/release_branch_1.0/dbg_for_python/CHECKEDOUT > from /main/parallel_branch_1/release_branch_1.0/4 > > I want to write a regex that gives me the branch the file was > checkedout on ,in this case - 'd

Re: 2 books for me

2006-05-11 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Ed Leafe <[EMAIL PROTECTED]> wrote: >On May 11, 2006, at 3:32 PM, Robert Hicks wrote: > >> Wouldn't portability go with Tkinter since that is installed with >> every >> Python? > > Dunno about other platforms, but it's not on my Mac.

Re: Nested loops confusion

2006-05-11 Thread Edward Elliott
[EMAIL PROTECTED] wrote: > Call me crazy, but be careful when programming python in different text > editors and in general, ie cutting and pasting, tabing and spacing. > Loops can look fine and not work (try moving around test print > statements for iterators), in this case try re-tabing your inde

Re: pythoncode in matlab

2006-05-11 Thread patrick . d . hull
> PyMat will not help you! PyMat works the other way around, ie it > allows for Matlab calls from Python. excuse my ignorance: but why would that not be helpful? I may be missing something blindingly stupid (very possible) but it seems to me using PyMat would be just as powerful (if not more) as

Re: reusing parts of a string in RE matches?

2006-05-11 Thread Mirco Wahab
Hi John > Ah, I see the difference. In Python you get a list of tuples, so there > seems to be a little extra work to do to get the number out. Dohh, after two cups of coffee ans several bars of chocolate I eventually mad(e) it ;-) In Python, you have to deconstruct the 2D-lists (here: long lis

Re: String concatenation performance

2006-05-11 Thread Bruno Desthuilliers
Cristian.Codorean a écrit : > I was just reading a "Python Speed/Performance Tips" article on the > Python wiki > http://wiki.python.org/moin/PythonSpeed/PerformanceTips > and I got to the part that talks about string concatenation and that it > is faster when using join instead of += because of st

calling perl modules from python

2006-05-11 Thread David Bear
I have a hash function written by another organization that I need to use. It is implemented in perl. I've been attempting to decode what they are doing in their hash function and it is taking way too long. I've identified two functions in a perl module that I would like to 'call' from a python pr

Re: segmentation fault in scipy?

2006-05-11 Thread py_genetic
>Now I'm even more confused. What kind of array is "error" here? First you tell >me it's a (25000, 80) array and now you are telling me it is a (25000,) array. >Once you've defined what "error" is, then please tell me what the quantity is >that you want to calculate. I think I told you several diff

Re: Python memory deallocate

2006-05-11 Thread Bruno Desthuilliers
mardif a écrit : > OK! i will test my app with python 2.5a2 Please let us know the result. -- http://mail.python.org/mailman/listinfo/python-list

Re: 2 books for me

2006-05-11 Thread Bruno Desthuilliers
Robert Hicks a écrit : > Wouldn't portability go with Tkinter since that is installed with every > Python? Tkinter ? What's that ?-) -- http://mail.python.org/mailman/listinfo/python-list

Re: which windows python to use?

2006-05-11 Thread Robert Kern
James Stroud wrote: > Enthought does not play well with cygwin, I've noticed. In what way? Does the mingw gcc that we distribute interfere with Cygwin's gcc? -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attemp

Re: which windows python to use?

2006-05-11 Thread James Stroud
Brian Blais wrote: > Hello, > > Are there any recommendations for which Windows python version to use? > I'd like to see a pros-and-cons description of each, given that > different uses might dictate different versions. The versions I know > (and there are surely more) are: > > 1) download f

Re: segmentation fault in scipy?

2006-05-11 Thread py_genetic
True! it is rediculous/insane as I mentioned and noted and agreed with you (in all your responses) and was my problem, however, not wrong (same result), as I was just simply noting (not to be right), although, yes, insane. Thanks again. -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN] tdir 1.69 Released And Available

2006-05-11 Thread Edward Elliott
Tim Daneliuk wrote: > 'tdir' is a reimplementation and enhancement of the old 'xdir' CP/M > utility from Ancient Times. > > 'tdir' is an advanced directory display utility written in Pure Python, > and runs on both *nix and Win32 systems.\ > > With 'tdir' you can display directories sorted by fi

Re: Reg Ex help

2006-05-11 Thread Mirco Wahab
Hi don > I have a string from a clearcase cleartool ls command. > /main/parallel_branch_1/release_branch_1.0/dbg_for_python/CHECKEDOUT > from /main/parallel_branch_1/release_branch_1.0/4 > I want to write a regex that gives me the branch the file was > checkedout on ,in this case - 'dbg_for_python

Re: NEWBIE: Tokenize command output

2006-05-11 Thread Steven Bethard
Lorenzo Thurman wrote: > This is what I have so far: > > // > #!/usr/bin/python > > import os > > cmd = 'ntpq -p' > > output = os.popen(cmd).read() > // > > The output is saved in the variable 'output'. What I need to do next is > select the line from that output that starts with the '*' [sni

Re: syntax for -c cmd

2006-05-11 Thread Edward Elliott
James wrote: > Wrong syntax is shown below. What should be the delimiter before else? > > python -c 'if 1==1: print "yes"; else print "no"' Now this is interesting. I broke the line up into separate arguments and it seemed to work fine: $ python -c 'if 1==1: print "yes"' 'else: print "no"' yes

Re: python equivalent of the following program

2006-05-11 Thread Steven Bethard
AndyL wrote: > What would by a python equivalent of following shell program: > > #!/bin/sh > > prog1 > file1 & > prog2 > file2 & If you're just going for quick-and-dirty, Rob's suggestion of os.system is probably a reasonable way to go. If you want better error reporting, I sugges

Re: glob() that traverses a folder tree

2006-05-11 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > # i'm guessing os.walk() is the best way to traverse folder trees. > > import os, glob > > for dir, subdir, files in os.walk('.\InteropSolution'): >for file in files: > if glob.fnmatch.fnmatch(file,"*.dll") or > glob.fnmatch.fnmatch(file,"*.exe"): > p

Re: segmentation fault in scipy?

2006-05-11 Thread Robert Kern
py_genetic wrote: >>No! matrix objects use matrix multiplication for *. You seem to need >>elementwise >>multiplication. > > No! when you mult a vector with itself transposed, the diagonal of the > resulting matrix is the squares of each error (albeit you do a lot of > extra calc), then sum the s

Re: 2 books for me

2006-05-11 Thread Ed Leafe
On May 11, 2006, at 3:32 PM, Robert Hicks wrote: > Wouldn't portability go with Tkinter since that is installed with > every > Python? Dunno about other platforms, but it's not on my Mac. -- Ed Leafe -- http://leafe.com -- http://dabodev.com -- http://mail.python.org/mailman/listin

Re: FTP filename escaping

2006-05-11 Thread Almad
OK, after some investigation...problem is in non-latin characters in filenames on ftp. Yes, users should be killed for this, but I would like to handle it somehow... I can't figure out how it's handled by protocol, ftplib seems to just strip those characters... Thank You, Almad -- http://mai

Re: segmentation fault in scipy?

2006-05-11 Thread Robert Kern
py_genetic wrote: >>No! matrix objects use matrix multiplication for *. You seem to need >>elementwise >>multiplication. > > No! when you mult a vector with itself transposed, the diagonal of the > resulting matrix is the squares of each error (albeit you do a lot of > extra calc), then sum the s

Re: segmentation fault in scipy?

2006-05-11 Thread py_genetic
>No! matrix objects use matrix multiplication for *. You seem to need >elementwise >multiplication. No! when you mult a vector with itself transposed, the diagonal of the resulting matrix is the squares of each error (albeit you do a lot of extra calc), then sum the squares, ie trace(). Its a ni

SSL support in SOAPpy to build a SOAP server

2006-05-11 Thread [EMAIL PROTECTED]
Can some one get me started with a working SOAP server that works over https. (SSL)? I have M2Crypto installed and found the following sample, but something is wrong in ssl_context = SSL.Context() Any help or tutorial appreciated? from SOAPpy import SOAPServer from M2Crypto import SSL

Re: 2 books for me

2006-05-11 Thread Robert Hicks
Wouldn't portability go with Tkinter since that is installed with every Python? Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: 2 books for me

2006-05-11 Thread vbgunz
The cookbook assumes you know some Python. if you know it, you're good :) If you're new to Python and programming I would recommend 'Learning Python' by Mark Lutz and David Ascher. if you're very familiar with programming but need to catch up on Python syntax, I would recommend the Python in a nuts

Re: Nested loops confusion

2006-05-11 Thread conor . robinson
>I'm still not sure what was stopping the inner >loop from working earlier - but removing the redundancy in "j=0" and so >on seems to have solved it. Call me crazy, but be careful when programming python in different text editors and in general, ie cutting and pasting, tabing and spacing. Loops ca

FTP filename escaping

2006-05-11 Thread Almad
Hello, I feel ashamed, but my google-fu betrayed me again. How do I escape filenames when using ftplib? I'd like to download it and upload on ftp again... toDown = self.ftpMaster.nlst() for fileDown in toDown: f = tmpfile() # download self.ftpMa

Re: segmentation fault in scipy?

2006-05-11 Thread Robert Kern
[EMAIL PROTECTED] wrote: > This is great advise and much appreciated. It was the answer to my > problem, thank you. However, isn't this faster... > scipy.sum(scipy.array(scipy.matrix(error)*scipy.matrix(error)), axis = > None) > as we you explained in my other posting? No! matrix objects use ma

Re: Slow network reading?

2006-05-11 Thread Andrew MacIntyre
Ivan Voras wrote: > def query(self, sql): > self.sf.write("SQL %s\r\n" % sql) > self.sf.flush() > resp = self.sf.readline().rstrip() > m = SQLCacheD.re_rec.match(resp) > if m != None: # only if some rows are returned (SELECT) > n_rows

Re: find all index positions

2006-05-11 Thread alisonken1
Scott David Daniels wrote: > [EMAIL PROTECTED] wrote: > print list(positions('1234', 'abcd efgd 1234 fsdf gfds abcde 1234')) > > prints: > [10, 31] > Nicer than mine ;) Shows I need to get a job where I use python more! -- http://mail.python.org/mailman/listinfo/python-list

Re: find all index positions

2006-05-11 Thread vbgunz
I thought this to be a great exercise so I went the extra length to turn it into a function for my little but growing library. I hope you enjoy :) def indexer(string, target): '''indexer(string, target) -> [list of target indexes] enter in a string and a target and indexer will either re

Re: which windows python to use?

2006-05-11 Thread Ten
On Thursday 11 May 2006 13:38, Brian Blais wrote: > Hello, > > Are there any recommendations for which Windows python version to use? I'd > like to see a pros-and-cons description of each, given that different uses > might dictate different versions. The versions I know (and there are > surely mo

Re: Calling C/C++ functions in a python script

2006-05-11 Thread Carl
[EMAIL PROTECTED] wrote: > > Ravi Teja a écrit : > >> >> For more advanced needs, take a look at some of the extending options >> available. >> http://www.suttoncourtenay.org.uk/duncan/accu/integratingpython.html > > Thanks for your answer. It is just what I'm trying to do. > Unfortunately, app

websphere6 ND soap access

2006-05-11 Thread Marc Schoechlin
Hi ! Websphere ND Application server offers access to it`s internal management api via jython using the wsadmin frontend. Does anybody know if there is a possibility to use real python (including it`s standard api) to automate websphere administration tasks ? The "wsasmin" console connects to th

Re: segmentation fault in scipy?

2006-05-11 Thread conor . robinson
>I'm afraid you're using terminology (and abbreviations!) that I can't follow. >Let me try to restate what's going on and you can correct me as I screw up. You >have a neural net that has 80 output units. You have 25000 observations that >you >are using to train the neural net. Each observation ve

Re: pythoncode in matlab

2006-05-11 Thread Carl
[EMAIL PROTECTED] wrote: > check out PyMat: > http://claymore.engineer.gvsu.edu/~steriana/Python/pymat.html > > I've never used it but I believe it should work for your needs. > However, I highly recommend taking a look at SAGE: > http://modular.math.washington.edu/sage/ > which has an interface

Re: which windows python to use?

2006-05-11 Thread Robert Kern
Brian Blais wrote: > Are there advantages/disadvantages? I have used enthought before, but it > seems as if > they are not at 2.4, and may lag behind in versions (which may not be a bad > thing). We will be releasing a 2.4 version "shortly" although I'm sure if you search the archives of this

Re: Multi-line lambda proposal.

2006-05-11 Thread Kaz Kylheku
Duncan Booth wrote: > Kaz Kylheku wrote: > > > Duncan Booth wrote: > >> One big problem with this is that with the decorator the function has > >> a name but with a lambda you have anonymous functions so your > >> tracebacks are really going to suck. > > > > Is this an issue with this particular de

Re: scientific libraries for python

2006-05-11 Thread Robert Kern
Harold Fellermann wrote: > Hi all, > > I want to use the current need for a Levenberg-Marquardt least squares > fitting procedure > for my long term desire to dive into scientific libraries for python. Does it have to be Levenberg-Marquardt, or will another non-linear least squares procedure do?

multi-threaded c++ callback problem

2006-05-11 Thread pydev
hi all, i'm building a wrapper for a multi-threaded c++ library to use it in python. everything works fine except the callback. the c++ code to call the python function: //---// void pyCallEventCallback( CALL hCall,

Re: Reg Ex help

2006-05-11 Thread Aaron Barclay
Hi don, there may well be a better way then regex, although I find them usefull and use them a lot. The way they work would be dependant on knowing some things. For example, if the dir you are after is always 4 deep in the structure you could try something like... path = '/main/parallel_bran

Re: A critic of Guido's blog on Python's lambda

2006-05-11 Thread Boris Borcic
jayessay wrote: > "Michele Simionato" <[EMAIL PROTECTED]> writes: > >> jayessay wrote: >>> I was saying that you are mistaken in that pep-0343 could be used to >>> implement dynamically scoped variables. That stands. >> Proof by counter example: >> >> from __future__ import with_statement >> impo

multi-threaded c++ callback problem

2006-05-11 Thread t.buehler
hi all,   i'm building a wrapper for a multi-threaded c++ library to use it in python. everything works fine except the callback.   the c++ code to call the python function: //---// void pyCallEventCallback(  CALL hCall,

Factory pressed dvd movies, ps2, psp & xbox backups for sale !!!

2006-05-11 Thread Movie World
We're offering all the latest factory pressed high quality dvd movies, ps2, psp and xbox silvers with factory printed colour inserts at fantastic prices, whether for personal use or reselling. We're shipping worldwide with various shipping methods. For resellers, please contact us for bulk discount

Re: segmentation fault in scipy?

2006-05-11 Thread conor . robinson
> If I run it from the shell (unix) I get: Segmentation fault and see a > core dump in my processes. If I run it in the python shell I get as > above: > File "D:\Python24\Lib\site-packages\numpy\core\defmatrix.py", line > 149, in That's a Window's path... Does Windows even make full use o

Re: Reg Ex help

2006-05-11 Thread Tim Chase
> /main/parallel_branch_1/release_branch_1.0/dbg_for_python/CHECKEDOUT > from /main/parallel_branch_1/release_branch_1.0/4 > > I want to write a regex that gives me the branch the file was > checkedout on ,in this case - 'dbg_for_python' > > Also if there is a better way than using regex, please

Re: Reg Ex help

2006-05-11 Thread James Thiele
don wrote: > I have a string from a clearcase cleartool ls command. > > /main/parallel_branch_1/release_branch_1.0/dbg_for_python/CHECKEDOUT > from /main/parallel_branch_1/release_branch_1.0/4 > > I want to write a regex that gives me the branch the file was > checkedout on ,in this case - 'dbg_fo

  1   2   >