Re: A solution to the MSVCRT vs MSVCR71 problem?

2007-01-20 Thread Martin v. Löwis
sturlamolden schrieb: > Problem 2: You want to distribute a program created Py2Exe, but has no > license for Visual Studio 2003. You are therefore not allowed to > redistribute msvcrt71.dll. But without this DLL your program will not > work. As a side note: Visual Studio 2003 is out of sale, so if

Re: Code reformater?

2007-01-20 Thread Gabriel Genellina
At Sunday 21/1/2007 00:15, Steven D'Aprano wrote: On Sat, 20 Jan 2007 23:51:24 -0300, Gabriel Genellina wrote: > As the indentation *is* significant in python, none of the above can > help if you lose the indentation. Try to reconstruct this: > > def foo(): > if a>0: > if b>0: > print 1 > print

Re: selective logger disable/enable

2007-01-20 Thread Gary Jefferson
Vinay Sajip wrote: > > The documentation for Logger - see > > http://docs.python.org/lib/node406.html > > - shows that there are addFilter() and removeFilter() methods on the > Logger class which you can use to add or remove filters from individual > Logger instances. From the above page (entitled

Re: Code reformater?

2007-01-20 Thread Steven D'Aprano
On Sat, 20 Jan 2007 23:51:24 -0300, Gabriel Genellina wrote: > As the indentation *is* significant in python, none of the above can > help if you lose the indentation. Try to reconstruct this: > > def foo(): > if a>0: > if b>0: > print 1 > print 2 > else: > return 3 > return 4 > > The tools may

A solution to the MSVCRT vs MSVCR71 problem?

2007-01-20 Thread sturlamolden
This question has been asked many times, and last time I was accused of spreading FUD. So now I will rather propose a solution. The reason for the problem is as follows: The binary installer for Python built by te python.org team is compiled with Microsoft Visual Studio 2003. It is linked with t

Re: Code reformater?

2007-01-20 Thread Gabriel Genellina
At Saturday 20/1/2007 14:37, Siggi wrote: > When I copy/paste Python code from the web, every so often, > the TABs are wrong, which means that the code won't work and I have to > manually reformat the code. > > Is there a code reformater that can parse the code to make it right? > > Thanks. May

Re: Py 2.5 on Language Shootout

2007-01-20 Thread Fuzzyman
Carl Friedrich Bolz wrote: > [EMAIL PROTECTED] wrote: > >>> Looking over the benchmarks, one gains the impression that Python is a > >>> slow language. > >> What does that even mean - a slow language? > >> > > > > The alioth benchmarks provide a set of numbers by which > > languages may be

Re: The proper use of QSignalMapper

2007-01-20 Thread borntonetwork
How simple. I will remember that sender() function for future reference. Thanks, David. David Boddie wrote: > On Saturday 20 January 2007 16:03, borntonetwork wrote: > > > David, thanks for your help. Unfortunately, all attempts of making this > > solution work have failed. I would be interested t

Re: scipy.optimize.lbfgsb help please!!!

2007-01-20 Thread Robert Kern
mclaugb wrote: > " x, f, d = lbfgsb.fmin_l_bfgs_b(Permmin, x0, Jacobi, params, > bounds=[(.001,100),(-50,-.001)] , maxfun=500) > File "C:\Python24\lib\site-packages\scipy\optimize\lbfgsb.py", line 197, > in fmin_l_bfgs_b > isave, dsave) > ValueError: failed to initialize intent(inout) array

Re: scipy.optimize.lbfgsb help please!!!

2007-01-20 Thread Robert Kern
mclaugb wrote: > Just to clarify--this is a multivariate algorithm. Yes. That means that the domain of the objective function is multivariate. The image is still a scalar. RR^n -f-> RR > I changed the function > Permmin to simply take the absolute value of (xmin, ymin) so that it returns >

Re: scipy.optimize.lbfgsb help please!!!

2007-01-20 Thread mclaugb
Just to clarify--this is a multivariate algorithm. I changed the function Permmin to simply take the absolute value of (xmin, ymin) so that it returns one value. Unfortunately, the error remains--it still returns this error: " x, f, d = lbfgsb.fmin_l_bfgs_b(Permmin, x0, Jacobi, params, bounds

Re: regexp qns

2007-01-20 Thread James Stroud
[EMAIL PROTECTED] wrote: > James Stroud wrote: > >>[EMAIL PROTECTED] wrote: >> >>>hi >>>suppose i have a string like >>> >>>test1?test2t-test3*test4*test5$test6#test7*test8 >>> >>>how can i construct the regexp to get test3*test4*test5 and >>>test7*test8, ie, i want to match * and the words before

Re: scipy.optimize.lbfgsb help please!!!

2007-01-20 Thread Robert Kern
mclaugb wrote: > Does anyone out there have a piece of code that demonstrates the use of the > lbfgsb multivariate, bounded solver in the scipy.optimize toolkit? An > example would get me started because my code below does not seem to work. You will probably get better/faster/more answers on th

Re: Py 2.5 on Language Shootout

2007-01-20 Thread Isaac Gouy
Ramon Diaz-Uriarte wrote: > On 20 Jan 2007 11:34:46 -0800, Isaac Gouy <[EMAIL PROTECTED]> wrote: > > > > Ramon Diaz-Uriarte wrote: > > > On 1/20/07, Carl Friedrich Bolz <[EMAIL PROTECTED]> wrote: > > > > [EMAIL PROTECTED] wrote: > > > > >>> Looking over the benchmarks, one gains the impression th

Re: Does eval has the same features as Perl's?

2007-01-20 Thread Paddy
Jm lists wrote: > Hello members, > > I want to know does the "eval" in python have the same features as in > Perl (capture errors)? > > For example,in perl I can wrote: > > $re = eval { 1 / 0 }; > > Though 1/0 is a fatal error but since it's in "eval" block so the perl > interpreter doesn't get e

Re: python packages and __name__ query.

2007-01-20 Thread Gabriel Genellina
"krishnakant Mane" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > I use cx freze for creating a python executable. cx_freeze is almost irrelevant here; all the following considerations are about your application structure, it doesnt matter if you use cx_freeze later (or any

Re: Py 2.5 on Language Shootout

2007-01-20 Thread Ramon Diaz-Uriarte
On 20 Jan 2007 11:34:46 -0800, Isaac Gouy <[EMAIL PROTECTED]> wrote: > > Ramon Diaz-Uriarte wrote: > > On 1/20/07, Carl Friedrich Bolz <[EMAIL PROTECTED]> wrote: > > > [EMAIL PROTECTED] wrote: > > > >>> Looking over the benchmarks, one gains the impression that Python is > > > a > > > >>> slow l

Re: confused on python rpc with apache, is it possible?

2007-01-20 Thread fumanchu
krishnakant Mane wrote: > can I do xml-rpc using the default libraries that come with every > python installer? You can, but others have packaged them up to make it easier. CherryPy includes an xmlrpc tool (and has no dependencies other than standard Python). You can see an example of what your c

pyparsing Combine without merging sub-expressions

2007-01-20 Thread Steven Bethard
Within a larger pyparsing grammar, I have something that looks like:: wsj/00/wsj_0003.mrg When parsing this, I'd like to keep around both the full string, and the AAA_ substring of it, so I'd like something like:: >>> foo.parseString('wsj/00/wsj_0003.mrg') (['wsj/00/wsj_0003.

Re: spidering script

2007-01-20 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, "David Waizer" <[EMAIL PROTECTED]> wrote: > Hello.. > > I'm looking for a script (perl, python, sh...)or program (such as wget) > that will help me get a list of ALL the links on a website. > > For example ./magicscript.pl www.yahoo.com and outputs it to a file

Re: urllib2 and transfer-encoding = chunked

2007-01-20 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > Haha! My mistake. > > The error is that when a web server is chunking a web page only the > first chunk appears to be acquired by the urllib2.urlopen call. If you > check the headers, there is no 'Content-length' (as expected) and > in

Re: Win GUI application: avoiding DOS console

2007-01-20 Thread Jarek Zgoda
Siggi napisał(a): > how do I avoid the DOS console show-up when starting a WinXP GUI application > with mouseclick on the respective Python file? > > I had this with my previous Python installation; it is very simple, > something with a "-i" somewhere in the open command of the MS Windows data

Re: Win GUI application: avoiding DOS console

2007-01-20 Thread Siggi
Thanks, but I don't mean that, I am looking for the method keeping *.py. "Bruno Desthuilliers" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Siggi a écrit : >> Hi all, >> >> how do I avoid the DOS console show-up when starting a WinXP GUI >> application with mouseclick on t

Re: Py 2.5 on Language Shootout

2007-01-20 Thread Isaac Gouy
Ramon Diaz-Uriarte wrote: > On 1/20/07, Carl Friedrich Bolz <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] wrote: > > >>> Looking over the benchmarks, one gains the impression that Python is a > > >>> slow language. > > >> What does that even mean - a slow language? > > >> > > > > > > The

Re: how to mimik a main() function to start a program with entry point?

2007-01-20 Thread Joshua J. Kugler
krishnakant Mane wrote: > hello all. > I have one simple query and may be that's to stupid to answer but I am > not finding the answer any ways. > I have a set of modules in my package and out if which one is my > actual starting point to my entire program. say for example I have an > entire data

Re: confused on python rpc with apache, is it possible?

2007-01-20 Thread Diez B. Roggisch
> > well in that case I don't need apache. > can I do xml-rpc using the default libraries that come with every > python installer? Yes, and a simple look in the API docs would have convinced you of that. I suggest you start googling and reading. > is there some added advantage of using twisted?

python packages and __name__ query.

2007-01-20 Thread krishnakant Mane
hello all, I had previously mentioned my doubt and confusion about having a main() to be an entry point in my python based software. I am still having a particular doubt. I use cx freze for creating a python executable. my software is essentially a package containing a few modules and one file whe

Re: confused on python rpc with apache, is it possible?

2007-01-20 Thread krishnakant Mane
On 20/01/07, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > > There is nothing an apache will do for you - except from possibly > proxing python. > > Go read up upon xmlrpc and python, possibly doing it with twisted, but > there are other options. > > Don't bother with the apache. well in that case

Re: Py 2.5 on Language Shootout

2007-01-20 Thread Isaac Gouy
[EMAIL PROTECTED] wrote: > Isaac Gouy wrote: > > [EMAIL PROTECTED] wrote: > > > Alioth is a great site for selecting the language in which to implement > > > primitives. Usually it's C. > > > > And for selecting a language for which you might need to implement > > primitives in C :-) > > Well if y

Re: OT Annoying Habits

2007-01-20 Thread Jorge Godoy
"John Machin" <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: > [snip] > >> The information contained in this message and any attachment may be >> proprietary, confidential, and privileged or subject to the work >> product doctrine and thus protected from disclosure. If the reader >> of th

Re: OT Annoying Habits (Was: when format strings attack)

2007-01-20 Thread John Machin
[EMAIL PROTECTED] wrote: [snip] > The information contained in this message and any attachment may be > proprietary, confidential, and privileged or subject to the work > product doctrine and thus protected from disclosure. If the reader > of this message is not the intended recipient, or an emp

Re: Win GUI application: avoiding DOS console

2007-01-20 Thread Bruno Desthuilliers
Siggi a écrit : > Hi all, > > how do I avoid the DOS console show-up when starting a WinXP GUI application > with mouseclick on the respective Python file? rename yourfile.py to yourfile.pyw -- http://mail.python.org/mailman/listinfo/python-list

Win GUI application: avoiding DOS console

2007-01-20 Thread Siggi
Hi all, how do I avoid the DOS console show-up when starting a WinXP GUI application with mouseclick on the respective Python file? I had this with my previous Python installation; it is very simple, something with a "-i" somewhere in the open command of the MS Windows data types "PY" and "PY

Re: Code reformater?

2007-01-20 Thread Siggi
"Vincent Delporte" wrote: > Hello > > When I copy/paste Python code from the web, every so often, > the TABs are wrong, which means that the code won't work and I have to > manually reformat the code. > > Is there a code reformater that can parse the code to make it right? > > Thanks. Maybe my th

Re: The proper use of QSignalMapper

2007-01-20 Thread David Boddie
On Saturday 20 January 2007 16:03, borntonetwork wrote: > David, thanks for your help. Unfortunately, all attempts of making this > solution work have failed. I would be interested to know if anyone has > used QSignalMapper successfully in a similar situation. Looking again at what you originally

Re: **argv can't work

2007-01-20 Thread Roel Schroeven
Steven D'Aprano schreef: > Its because of an evil terrorist plot. I suggest you invade Belgium, that > should fix it. Please notify me in time so I can emigrate before it's too late. -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton

Re: confused on python rpc with apache, is it possible?

2007-01-20 Thread Diez B. Roggisch
krishnakant Mane schrieb: >> Use mod_python with some xmlrpc handler. There is more than one around. >> Google for them. That way you can keep Apache for both Python and PHP. >> > I am confused. > I have some documents on xml-rpc but none of them mentioned apache. There is nothing an apache will d

Re: confused on python rpc with apache, is it possible?

2007-01-20 Thread krishnakant Mane
> Use mod_python with some xmlrpc handler. There is more than one around. > Google for them. That way you can keep Apache for both Python and PHP. > I am confused. I have some documents on xml-rpc but none of them mentioned apache. Krishnakant. -- http://mail.python.org/mailman/listinfo/python-lis

scipy.optimize.lbfgsb help please!!!

2007-01-20 Thread mclaugb
Does anyone out there have a piece of code that demonstrates the use of the lbfgsb multivariate, bounded solver in the scipy.optimize toolkit? An example would get me started because my code below does not seem to work. Thanks alot, Bryan I have tried to use the LBFGSB optimisation algorithm w

Re: OT Annoying Habits (Was: when format strings attack)

2007-01-20 Thread Roel Schroeven
Carroll, Barry schreef: > Secondly, can someone point me to the Standard Usenet Convention that > mandates against top-posting. This is not sarcasm; I would really like > to see it. You see, I recently returned to Usenet after a LONG absence. > When I was last a regular Usenet citizen the Interne

Re: Py 2.5 on Language Shootout

2007-01-20 Thread Ramon Diaz-Uriarte
On 1/20/07, Carl Friedrich Bolz <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > >>> Looking over the benchmarks, one gains the impression that Python is a > >>> slow language. > >> What does that even mean - a slow language? > >> > > > > The alioth benchmarks provide a set of numbers

Re: OT Annoying Habits (Was: when format strings attack)

2007-01-20 Thread Roel Schroeven
Paul Rubin schreef: > No. Top posting has always been an aberrance. It first appeared in > Usenet when Usenet (a word whose etymology comes from "Unix" and > "network") started attracting Microsoft Windows users, who were in the > habit of using Windows products that top-posted. That happened fa

Re: Py 2.5 on Language Shootout

2007-01-20 Thread Carl Friedrich Bolz
[EMAIL PROTECTED] wrote: >>> Looking over the benchmarks, one gains the impression that Python is a >>> slow language. >> What does that even mean - a slow language? >> > > The alioth benchmarks provide a set of numbers by which > languages may be compared. Wrong. The benchmarks provide a s

Re: when format strings attack

2007-01-20 Thread [EMAIL PROTECTED]
I will give the formatting a try. I noticed another formatting thing I wasn't looking for. It is possible to have a \n at the end of a word or at least that is how it is shown and fixed through python 2.5. I had an error where 36\n isn't a number. easy to fix though. Jeremy Sanders wrote: > S

Re: The proper use of QSignalMapper

2007-01-20 Thread borntonetwork
David, thanks for your help. Unfortunately, all attempts of making this solution work have failed. I would be interested to know if anyone has used QSignalMapper successfully in a similar situation. For any interested, I worked around the problem using a closure, which seems a bit cleaner from a co

Re: OT Annoying Habits (Was: when format strings attack)

2007-01-20 Thread rzed
Dane Jensen <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > On Friday 19 January 2007 22:51, Hendrik van Rooyen wrote: >> "Steven D'Aprano" <[EMAIL PROTECTED]> wrote: >> > Or perhaps I should say: >> > >> > .snoitnevnoc >> > hsilgnE tpada )ylbissop revenehw( dluohs ew os dna ,naitraM >> >

Re: OT Annoying Habits (Was: when format strings attack)

2007-01-20 Thread Neil Cerutti
On 2007-01-20, Nick Maclaren <[EMAIL PROTECTED]> wrote: > > In article <[EMAIL PROTECTED]>, > "Carroll, Barry" <[EMAIL PROTECTED]> writes: >|> >|> My thanks to Aahz and the others who responded. I also did some >|> Googling on my own. I found out that top-posting is the norm in the >|> e-mail wo

RE: OT Annoying Habits (Was: when format strings attack)

2007-01-20 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, "Carroll, Barry" <[EMAIL PROTECTED]> writes: |> |> My thanks to Aahz and the others who responded. I also did some |> Googling on my own. I found out that top-posting is the norm in the |> e-mail world. Bottom- and inline-posting are the norm in the newsgroup |>

Re: Match 2 words in a line of file

2007-01-20 Thread Alex
egc> how do i write a regexp for this.. or better yet shd i even be using egc> regexp or is there a better way to do this "A team of engineers were faced with a problem; they decided to handle it with regular expressions. Now they had two problems" Regular expressions are not always the bes

Re: PQueue and Python 2.5

2007-01-20 Thread Giovanni Bajo
On 20/01/2007 11.29, Martin v. Löwis wrote: >> I haven't got a clue how to investigate this, but I would be willing to >> help if someone has any ideas. > > There are a number of problems in this code; the most significant one is > the incorrect usage of memory management API. In pqueue_dealloc,

Re: OT Annoying Habits (Was: when format strings attack)

2007-01-20 Thread Dane Jensen
On Friday 19 January 2007 22:51, Hendrik van Rooyen wrote: > "Steven D'Aprano" <[EMAIL PROTECTED]> wrote: > > Or perhaps I should say: > > > > .snoitnevnoc > > hsilgnE tpada )ylbissop revenehw( dluohs ew os dna ,naitraM ton > > ,puorgswen egaugnal hsilgnE na no er'ew ,segaugnal hcus era ereht fi ne

RE: OT Annoying Habits (Was: when format strings attack)

2007-01-20 Thread Michael . Coll-Barth
::CLAP CLAP:: thank you! I have been in the newsgroups for over 12 years and I never cared about the top/bottom post silliness. All I care about is that the message is clearly written. Everything else is doggerel. > -Original Message- > From: Carroll, Barry > > Personally, I don't

pywin32 for Windows x64

2007-01-20 Thread Bernard Lebel
Hello, Softimage has gracefully released an x64 build of the pywin32 extension, free for download. http://webrel2.softimage.com/open/products/xsi/v6/pywin32-207.win64-py2.4.exe (if that link doesn't work, go to http://www.softimage.com/downloads/XSI6_EssAdv/default.aspx, and look for Python 64)

Re: Match 2 words in a line of file

2007-01-20 Thread Steven D'Aprano
On Fri, 19 Jan 2007 22:57:37 -0800, Rickard Lindberg wrote: > Daniel Klein wrote: > >> 2) This can be resolved with >> >> templine = ' ' + line + ' ' >> if ' ' + word1 + ' ' in templine and ' ' + word2 + ' ' in templine: > > But then you will still have a problem to match the word "foo" in a > s

Re: Does eval has the same features as Perl's?

2007-01-20 Thread Jm lists
Thank you.I'm just learning Python and want to make something clear to me.:) 2007/1/20, Steven D'Aprano <[EMAIL PROTECTED]>: > On Sat, 20 Jan 2007 17:30:24 +0800, Jm lists wrote: > > > Hello members, > > > > I want to know does the "eval" in python have the same features as in > > Perl (capture er

Re: Py 2.5 on Language Shootout

2007-01-20 Thread bearophileHUGS
[EMAIL PROTECTED]: > In reality the choice would be C++ because of OO and STL. I have seen that when Python+Psyco are too much slow, D language is a good sweet half point between Python and C++ :-) Fast as C++ and with a simpler syntax and semantics (Pyrex isn't bad, but D gives high-level things

Re: Does eval has the same features as Perl's?

2007-01-20 Thread Steven D'Aprano
On Sat, 20 Jan 2007 17:30:24 +0800, Jm lists wrote: > Hello members, > > I want to know does the "eval" in python have the same features as in > Perl (capture errors)? > > For example,in perl I can wrote: > > $re = eval { 1 / 0 }; > > Though 1/0 is a fatal error but since it's in "eval" block

Re: PQueue and Python 2.5

2007-01-20 Thread Martin v. Löwis
Berteun Damman schrieb: > I haven't got a clue how to investigate this, but I would be willing to > help if someone has any ideas. There are a number of problems in this code; the most significant one is the incorrect usage of memory management API. In pqueue_dealloc, the call PyMem_DEL(pqp) shoul

Re: Code reformater?

2007-01-20 Thread Mario Wehbrink
Vincent Delporte schrieb in comp.lang.python: Hi > When I copy/paste Python code from the web, every so often, > the TABs are wrong, which means that the code won't work and I have to > manually reformat the code. > > Is there a code reformater that can parse the code to make it right? It

Does eval has the same features as Perl's?

2007-01-20 Thread Jm lists
Hello members, I want to know does the "eval" in python have the same features as in Perl (capture errors)? For example,in perl I can wrote: $re = eval { 1 / 0 }; Though 1/0 is a fatal error but since it's in "eval" block so the perl interpreter doesn't get exit. Thanks again. -- http://mail.

Re: multiple file deletes using ftp.delete

2007-01-20 Thread Drew
On Jan 19, 11:16 pm, "Drew" <[EMAIL PROTECTED]> wrote: > Hi all > I'm fairly new to python so please forgive my lack of comprehension of > the obvious. > > I'm writing a script to ftp files to a server. This script will run > weekly. Part of the script first deletes the previous weeks files. The >