Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread Stephen Hansen
On 7/6/10 11:21 PM, Tim Roberts wrote: > sturlamolden wrote: >> >> Just a little reminder: >> >> Microsoft has withdrawn VS2008 in favor of VS2010. > > Nonsense. They have released VS2010, but they certainly have not > "withdrawn" VS2008, and I have heard of no plans to do so. Its not nonsense;

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread Tim Roberts
sturlamolden wrote: > >Just a little reminder: > >Microsoft has withdrawn VS2008 in favor of VS2010. Nonsense. They have released VS2010, but they certainly have not "withdrawn" VS2008, and I have heard of no plans to do so. >The express version is also unavailable for download. >:(( Also nons

Re: Argh! Name collision!

2010-07-06 Thread rantingrick
On Jul 6, 9:11 pm, "Alf P. Steinbach /Usenet" wrote: > "pyni"! Pronounced like "tiny"! Yay! hmm, how's about an alternate spelling... "pyknee", or "pynee", or "pynie" ... considering those are not taken either? -- http://mail.python.org/mailman/listinfo/python-list

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread Alf P. Steinbach /Usenet
* sturlamolden, on 06.07.2010 19:35: On 6 Jul, 19:09, Thomas Jollans wrote: Okay, you need to be careful with FILE*s. But malloc and free? You'd normally only alloc& free something within the same module, using the same functions (ie not mixing PyMem_Malloc and malloc), would you not? You h

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread David Cournapeau
On Wed, Jul 7, 2010 at 12:26 AM, Thomas Jollans wrote: > On 07/07/2010 12:08 AM, David Cournapeau wrote: >> On Tue, Jul 6, 2010 at 6:00 PM, Alf P. Steinbach /Usenet >> wrote: >>> There is no *technical* problem creating a compiler-independent C/C++ >>> language binding. >> >> It is quite hard, th

Re: Argh! Name collision!

2010-07-06 Thread Stephen Hansen
On 7/6/10 8:25 PM, Shashwat Anand wrote: > On Wed, Jul 7, 2010 at 8:21 AM, Richard Thomas > wrote: > On a possibly related note I was disappointed to discover that > Python's QT bindings are called PyQT not QTPy. :-) > Isn't this the standard. > Qt -> PyQt > cry

Re: Python as a scripting language. Alternative to bash script?

2010-07-06 Thread Chris Rebert
On Tue, Jul 6, 2010 at 6:40 AM, Michael Torrie wrote: > On 07/06/2010 04:12 AM, sturlamolden wrote: >> On 28 Jun, 19:39, Michael Torrie wrote: >>> In python I could simply take the output of "ps ax" and use python's >>> own, superior, cutting routines (using my module): >>> >>> (err, stdout, stde

Re: Argh! Name collision!

2010-07-06 Thread Shashwat Anand
On Wed, Jul 7, 2010 at 8:21 AM, Richard Thomas wrote: > On Jul 7, 3:11 am, "Alf P. Steinbach /Usenet" +use...@gmail.com> wrote: > > Donald Knuth once remarked (I think it was him) that what matters for a > program > > is the name, and that he'd come up with a really good name, now all he'd > had

Re: Argh! Name collision!

2010-07-06 Thread Richard Thomas
On Jul 7, 3:11 am, "Alf P. Steinbach /Usenet" wrote: > Donald Knuth once remarked (I think it was him) that what matters for a > program > is the name, and that he'd come up with a really good name, now all he'd had > to > do was figure out what it should be all about. > > And so considering Stu

Argh! Name collision!

2010-07-06 Thread Alf P. Steinbach /Usenet
Donald Knuth once remarked (I think it was him) that what matters for a program is the name, and that he'd come up with a really good name, now all he'd had to do was figure out what it should be all about. And so considering Sturla Molden's recent posting about unavailability of MSVC 9.0 (aka

Re: The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

2010-07-06 Thread Luis M . González
On Jul 2, 4:07 pm, John Nagle wrote: > David Cournapeau wrote: > > I think one point which needs to be emphasized more is what does > > python 3 bring to people. The" what's new in python 3 page" gives > > the impression that python 3 is about removing cruft. That's a very > > poor argument to pu

Re: Python install has difficulties with accented characters in path

2010-07-06 Thread Pierre Thibault
On 6 juil, 17:37, Thomas Jollans wrote: > Before filing a bug, best test it with Python 2.7 (just released), 3.1, > and, if possible, py3k trunk. > > I just tried to reproduce this with a current py3k checkout, where it > worked. Probably not an issue in Python 3.x due to the changed unicode > han

Re: Python as a scripting language. Alternative to bash script?

2010-07-06 Thread Chris Rebert
On Tue, Jul 6, 2010 at 1:35 PM, member thudfoo wrote: > On Tue, Jul 6, 2010 at 6:40 AM, Michael Torrie wrote: >> On 07/06/2010 04:12 AM, sturlamolden wrote: >>> On 28 Jun, 19:39, Michael Torrie wrote: In python I could simply take the output of "ps ax" and use python's own, superior, c

Re: Help with movie module

2010-07-06 Thread Rodrick Brown
Did you try emailing the author of this application? 2010/7/6 Jose Ángel Quintanar Morales > Hi, I'm sorry by my bad english. > > I have a little problem with pygame.movie module when I try work whit him > show this problem > > [josean...@qumax reproductor]$ python packbox.py > packbox.py:64: Ru

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread Thomas Jollans
On 07/07/2010 01:14 AM, sturlamolden wrote: > On 7 Jul, 01:07, Thomas Jollans wrote: > >> It's not managed code in the "runs on .net" sense, but in principle, it >> is managed, in that garbage collection is managed for you. > > I think you are confusing Python and C code. Or somebody's confusin

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread sturlamolden
On 7 Jul, 01:07, Thomas Jollans wrote: > It's not managed code in the "runs on .net" sense, but in principle, it > is managed, in that garbage collection is managed for you. I think you are confusing Python and C code. -- http://mail.python.org/mailman/listinfo/python-list

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread Thomas Jollans
On 07/07/2010 12:38 AM, Martin v. Loewis wrote: >>> - many things which are runtime independent on unix are not on >>> windows (file descriptor: AFAIK, a file descriptor as returned from >>> open can be dealt with in any C runtime on unix) >> >> Are you telling me that file descriptors (it's a fli

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread sturlamolden
On 7 Jul, 00:41, sturlamolden wrote: > It should also be mentioned that the Windows 7 SDK includes > vcbuild.exe, so it can be used to compile Visual Studio 2008 projects > (I'm going to try Python). Not sure why I forgot to mention, but we can (or even should?) use CMake to generate these proje

Help with movie module

2010-07-06 Thread Jose Ángel Quintanar Morales
Hi, I'm sorry by my bad english. I have a little problem with pygame.movie module when I try work whit him show this problem [josean...@qumax reproductor]$ python packbox.py packbox.py:64: RuntimeWarning: use mixer: No module named mixer (ImportError: No module named mixer) pygame.mixer.quit()

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread Martin P. Hellwig
On 07/06/10 21:19, sturlamolden wrote: On 6 Jul, 21:49, Christian Heimes wrote: I agree, the situation isn't ideal. I see if I can get in contact with Microsoft's open source team. Perhaps they can keep the download link to VS 2008 EE working. It seems the MSDN subscription required to get V

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread sturlamolden
On 6 Jul, 21:52, casevh wrote: > The original version of the Windows 7 SDK includes the command line > version of the VS 2008 amd64 compiler. I've used it compile MPIR and > GMPY successfully. The GMPY source includes a text file describing the > build process using the SDK tools. It should also

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread Martin v. Loewis
>> - many things which are runtime independent on unix are not on >> windows (file descriptor: AFAIK, a file descriptor as returned from >> open can be dealt with in any C runtime on unix) > > Are you telling me that file descriptors (it's a flippin int!) can't be > passed around universally on W

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread Thomas Jollans
On 07/07/2010 12:08 AM, David Cournapeau wrote: > On Tue, Jul 6, 2010 at 6:00 PM, Alf P. Steinbach /Usenet > wrote: >> There is no *technical* problem creating a compiler-independent C/C++ >> language binding. > > It is quite hard, though, or would require changes in the API to be > entirely safe

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread David Cournapeau
On Tue, Jul 6, 2010 at 6:00 PM, Alf P. Steinbach /Usenet wrote: > * sturlamolden, on 06.07.2010 17:50: >> >> Just a little reminder: >> >> Microsoft has withdrawn VS2008 in favor of VS2010. The express version >> is also unavailable for download.>:(( >> >> We can still get a VC++ 2008 compiler req

Re: Python Embedding Importing relative modules

2010-07-06 Thread Aahz
In article , Thomas Jollans wrote: >On 07/06/2010 09:11 PM, Aahz wrote: >> In article >> <4a3f0ca7-fef0-4f9c-b265-5370e61ed...@d8g2000yqf.googlegroups.com>, >> moerchendiser2k3 wrote: >>> Aahz: Set sys.path to include each script's base dir before running it, then restore after

Re: A question about the posibility of raise-yield in Python

2010-07-06 Thread Thomas Jollans
On 07/06/2010 08:56 PM, Дамјан Георгиевски wrote: I'm writing this as a complete newbie (on the issue), so don't be surprised if it's the stupidest idea ever. >>> I was wondering if there was ever a discusision in the python community on a 'raise-yield' kind-of combined expressi

Re: delegation pattern via descriptor

2010-07-06 Thread Bruno Desthuilliers
Gregory Ewing a écrit : > Bruno Desthuilliers wrote: >> kedra marbun a écrit : >> >>> if we limit our discussion to py: >>> why __{get|set|delete}__ don't receive the 'name' & 'class' from >>> __{getattribute|{set|del}attr}__ >>> 'name' is the name that is searched >> >> >> While it would have been

Re: Python install has difficulties with accented characters in path

2010-07-06 Thread Thomas Jollans
On 07/06/2010 11:17 PM, Pierre Thibault wrote: > I am building from the source and installing Python on my machine. > > I added these tests failed: > > test_doctest > test_httpservers > test_logging > > But I moved the Python installation folder on another directory and > the failed tests vanish

Re: Python Embedding Importing relative modules

2010-07-06 Thread Thomas Jollans
On 07/06/2010 09:11 PM, Aahz wrote: > In article <4a3f0ca7-fef0-4f9c-b265-5370e61ed...@d8g2000yqf.googlegroups.com>, > moerchendiser2k3 wrote: >> Aahz: >>> >>> Set sys.path to include each script's base dir before running it, then >>> restore after each script. >> >> That works, but doesnt solve

Re: Python Embedding Importing relative modules

2010-07-06 Thread Aahz
In article <33affa14-ded1-4742-a98f-c478df353...@w31g2000yqb.googlegroups.com>, moerchendiser2k3 wrote: > >Imagine I load them parallel so the GIL might interrupt the >save-process of sys.modules, > >[ENSURE GIL] >Load Script >Save sys.modules >[interrupt] >Load Script >Save sys.modules >... > >s

Python install has difficulties with accented characters in path

2010-07-06 Thread Pierre Thibault
I am building from the source and installing Python on my machine. I added these tests failed: test_doctest test_httpservers test_logging But I moved the Python installation folder on another directory and the failed tests vanished when I tried again. The difference? The new directory does not h

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread sturlamolden
On 6 Jul, 21:52, casevh wrote: > On Jul 6, 9:21 am, Thomas Jollans wrote: > > But that doesn't really > > change anything: the express edition of Microsoft's VC++ doesn't include > > an amd64 compiler anyway, AFAIK. See here: http://jenshuebel.wordpress.com/2009/02/12/visual-c-2008-express-edit

Re: Python as a scripting language. Alternative to bash script?

2010-07-06 Thread member thudfoo
On Tue, Jul 6, 2010 at 6:40 AM, Michael Torrie wrote: > On 07/06/2010 04:12 AM, sturlamolden wrote: >> On 28 Jun, 19:39, Michael Torrie wrote: >> >>> In python I could simply take the output of "ps ax" and use python's >>> own, superior, cutting routines (using my module): >>> >>> (err, stdout, s

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread sturlamolden
On 6 Jul, 21:49, Christian Heimes wrote: > I agree, the situation isn't ideal. I see if I can get in contact with > Microsoft's open source team. Perhaps they can keep the download link to > VS 2008 EE working. It seems the MSDN subscription required to get VS 2008 costs one dollar less than $12

Re: Python Embedding Importing relative modules

2010-07-06 Thread moerchendiser2k3
Good idea. Just one thing I thought about: Imagine I load them parallel so the GIL might interrupt the save-process of sys.modules, [ENSURE GIL] Load Script Save sys.modules [interrupt] Load Script Save sys.modules ... so this might run into several other problems. But maybe I change that so I

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread casevh
On Jul 6, 9:21 am, Thomas Jollans wrote: > On 07/06/2010 05:50 PM, sturlamolden wrote: > > > It is possible to build C and Fortran extensions for official Python > > 2.6/2.7 binaries on x86 using mingw. AFAIK, Microsoft's compiler is > > required for C++ or amd64 though. (Intel's compiler requires

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread Christian Heimes
> That's nice to know, but I personally don't have an MSDN subscription. > Many scientists don't have access to development tools like VS2008. > Many hobby developers don't have access expensive MSDN subscriptions. > Many don't develop C personally, but just "needs a compiler" to build > an extensi

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread David Robinow
On Tue, Jul 6, 2010 at 1:46 PM, Martin P. Hellwig wrote: > Public download that is, people like me who have a MSDN subscription can > still download old versions like Visual Studio 2005. > > So I would say that there is no particular hurry. > I would think that everyone really serious about MS dev

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread sturlamolden
On 6 Jul, 19:46, "Martin P. Hellwig" wrote: > Public download that is, people like me who have a MSDN subscription can > still download old versions like Visual Studio 2005. That's nice to know, but I personally don't have an MSDN subscription. Many scientists don't have access to development to

Recommend a MySQLdb Forum

2010-07-06 Thread Tim Johnson
Greetings: I would appreciate it if some could recommend a MySQLdb forum. thanks tim -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Embedding Importing relative modules

2010-07-06 Thread Aahz
In article <4a3f0ca7-fef0-4f9c-b265-5370e61ed...@d8g2000yqf.googlegroups.com>, moerchendiser2k3 wrote: >Aahz: >> >>Set sys.path to include each script's base dir before running it, then >>restore after each script. > >That works, but doesnt solve the problem. > >ScriptA.py has a module in its dir

Re: A question about the posibility of raise-yield in Python

2010-07-06 Thread Дамјан Георгиевски
>> > I'm writing this as a complete newbie (on the issue), so don't be >> > surprised if it's the stupidest idea ever. >> >> > I was wondering if there was ever a discusision in the python >> > community on a 'raise-yield' kind-of combined expression. I'd like >> > to know if it was proposed/reject

Re: Python Embedding Importing relative modules

2010-07-06 Thread moerchendiser2k3
>Set sys.path to include each script's base dir before running it, then >restore after each script. That works, but doesnt solve the problem. ScriptA.py has a module in its directory called 'bar.py' ScriptB.py has a module in its directory called 'bar.py' Imagine the 'bar.py' modules dont have t

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread Robert Kern
On 7/6/10 1:52 PM, Ed Keith wrote: I downloaded the ISO, but it seems to be just a bit too big to fit on a CD! This seems odd to me, has anyone else had this problem? These days, ISOs are destined for DVD-Rs. :-) There are also utilities for mounting ISOs directly without burning them to a p

Re: Python GUI for C program [was: ]

2010-07-06 Thread rantingrick
On Jul 6, 1:14 pm, sturlamolden wrote: > Also a good GUI builder is far more important than language when it > comes to making a GUI. Depending on toolkit my preferences are > wxFormBuilder, Qt Designer, GLADE or MS Visual Studio. Thats only true when using any language EXCEPT Python. With Pytho

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread sturlamolden
On 6 Jul, 19:52, Ed Keith wrote: > This seems odd to me, has anyone else had this problem? DVD? -- http://mail.python.org/mailman/listinfo/python-list

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread Stephen Hansen
On 7/6/10 10:52 AM, Ed Keith wrote: > I downloaded the ISO, but it seems to be just a bit too big to fit on a CD! The website says its a DVD iso. -- Stephen Hansen ... Also: Ixokai ... Mail: me+list/python (AT) ixokai (DOT) io ... Blog: http://meh.ixokai.io/ signature.asc Descrip

Re: Python GUI for C program [was: ]

2010-07-06 Thread sturlamolden
On 6 Jul, 13:45, Thomas Jollans wrote: > 1. Turn your C program into a library, and write a Python extension Note that using ctypes, Cython or Boost.Python is much less painful than using Python's C API directly. > It might, however, be best to simply write the GUI in C as well, which > would a

Re: Python Embedding Importing relative modules

2010-07-06 Thread Aahz
In article <8f5014f6-9aa8-44e2-afe1-a1175bcdd...@w31g2000yqb.googlegroups.com>, moerchendiser2k3 wrote: > >I have a serious problem I haven't solved yet, hope one of you can >help me. The first thing is, I embedded Python into my app and I >execute several scripts in this environment. > >The prob

Re: The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

2010-07-06 Thread rantingrick
On Jul 6, 12:37 am, Terry Reedy wrote: > In his post on this thread, Martin Loewis volunteered to list what he > knows from psycopg2 if someone else will edit. Now we are getting somewhere! This is the community spirit i want to see. You don't have to give much people, every little bit counts. B

Re: re.sub unexpected behaviour

2010-07-06 Thread Javier Collado
Thanks for your answers. They helped me to realize that I was mistakenly using match.string (the whole string) when I should be using math.group(0) (the whole match). Best regards, Javier -- http://mail.python.org/mailman/listinfo/python-list

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread Ed Keith
I downloaded the ISO, but it seems to be just a bit too big to fit on a CD! This seems odd to me, has anyone else had this problem? -EdK Ed Keith e_...@yahoo.com Blog: edkeith.blogspot.com --- On Tue, 7/6/10, sturlamolden wrote: > From: sturlamolden > Subject: Download Microsoft C/C+

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread Martin P. Hellwig
On 07/06/10 16:50, sturlamolden wrote: Just a little reminder: Microsoft has withdrawn VS2008 in favor of VS2010. The express version is also unavailable for download.>:(( Public download that is, people like me who have a MSDN subscription can still download old versions like Visual Studio

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread Christian Heimes
>> You need unofficial version of MinGW with gcc 4.x for several C++ >> extension like PyLucene's JCC. Some project like pywin32 don't work with >> MinGW, too. > > aha - why is that? > > But - if you write code that builds with [whatever gcc version you > have], the compiler Python is built with

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread sturlamolden
On 6 Jul, 19:11, Thomas Jollans wrote: > Python is written in C. How does the C++ runtime enter into it? The C and C++ runtimes interact (e.g. stdlib.h and ), malloc and new, etc. With g++ you have a C++ standard library compiled against msvcrt.dll, whereas Python is using msvcr90.dll. We can u

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread sturlamolden
On 6 Jul, 19:09, Thomas Jollans wrote: > Okay, you need to be careful with FILE*s. But malloc and free? You'd > normally only alloc & free something within the same module, using the > same functions (ie not mixing PyMem_Malloc and malloc), would you not? You have to be sure PyMem_Malloc is not

Re: The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

2010-07-06 Thread Thomas Jollans
On 07/06/2010 07:17 PM, Terry Reedy wrote: > docs.python.org / dev/3.0/howto/cporting.html http://docs.python.org/py3k/howto/cporting.html -- http://mail.python.org/mailman/listinfo/python-list

Re: re.sub unexpected behaviour

2010-07-06 Thread Steven D'Aprano
On Tue, 06 Jul 2010 19:10:17 +0200, Javier Collado wrote: > Hello, > > Let's imagine that we have a simple function that generates a > replacement for a regular expression: > > def process(match): > return match.string > > If we use that simple function with re.sub using a simple pattern an

Re: re.sub unexpected behaviour

2010-07-06 Thread Thomas Jollans
On 07/06/2010 07:10 PM, Javier Collado wrote: > Hello, > > Let's imagine that we have a simple function that generates a > replacement for a regular expression: > > def process(match): > return match.string > > If we use that simple function with re.sub using a simple pattern and > a string

Re: SMTPHandler and Unicode

2010-07-06 Thread Vinay Sajip
norbert gmail.com> writes: > > crash with a UnicodeError. I can't see any workaround, except by > subclassing SMTPHandler's emit method to be unicode-aware or at least > URF-8 aware. > Well, you could use an approach like the one suggested here: http://plumberjack.blogspot.com/2010/07/using-

Re: Plot problem.. ?? No sign at all

2010-07-06 Thread Ritchy lelis
On 6 jul, 17:29, Alan G Isaac wrote: > On 7/6/2010 12:11 PM, Ritchy lelis wrote: > > > My intention with de for loop was to iterate each point of the arrays > > Vi and Vref at the math calculations. The V0 it's the result of the > > math expressions between the Vi and Vref. I can't just create one

Re: What is the name of the name space I am in?

2010-07-06 Thread Anthra Norell
Gregory Ewing wrote: On 07/05/2010 11:07 AM, Anthra Norell wrote: I try to use "new.new.classobj (name, baseclass, dict)" and have no clue what the "dict" of the current name space is. Are you sure that's what you really want to know? The 'dict' argument to classobj() defines the attributes

Re: The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

2010-07-06 Thread Terry Reedy
On 7/6/2010 11:19 AM, Giampaolo Rodolà wrote: 2010/7/6 David Cournapeau: Or is there no change at the C level? That would make things easy. There are quite a few, but outside of the big pain point of strings/byte/unicode which is present at python level as well, a lot of the issues are not so

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread Thomas Jollans
On 07/06/2010 06:49 PM, sturlamolden wrote: > On 6 Jul, 18:21, Thomas Jollans wrote: > >> mingw gcc should work for building C++ extensions if it also works for C >> extensions. > > No, it uses an incompatible statically linked C++ runtime. We need to > use msvcp90.dll with Python 2.6/2.7. Pyth

re.sub unexpected behaviour

2010-07-06 Thread Javier Collado
Hello, Let's imagine that we have a simple function that generates a replacement for a regular expression: def process(match): return match.string If we use that simple function with re.sub using a simple pattern and a string we get the expected output: re.sub('123', process, '123') '123' H

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread Thomas Jollans
On 07/06/2010 06:58 PM, Christian Heimes wrote: > Am 06.07.2010 18:21, schrieb Thomas Jollans: >> mingw gcc should work for building C++ extensions if it also works for C >> extensions. There's no difference on the binding side - you simply have >> to include everything as extern "C", which I am su

Re: Lockless algorithms in python (Nothing to do with GIL)

2010-07-06 Thread Zac Burns
I'm not an expert on this, but wouldn't it be more dependent on the platform than python version? Perhaps it is Windows 7 that is very slow. Perhaps my processor architecture. Not sure... Here are some for 3.1.2x64 >>> import timeit >>> timeit.timeit('Lock()', 'from threading import Lock') 1.4162

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread Christian Heimes
Am 06.07.2010 18:21, schrieb Thomas Jollans: > mingw gcc should work for building C++ extensions if it also works for C > extensions. There's no difference on the binding side - you simply have > to include everything as extern "C", which I am sure the header does for > you. You need unofficial ve

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread sturlamolden
On 6 Jul, 18:21, Thomas Jollans wrote: > mingw gcc should work for building C++ extensions if it also works for C > extensions. No, it uses an incompatible statically linked C++ runtime. We need to use msvcp90.dll with Python 2.6/2.7. > As for amd64 - I do not know if there is a mingw64 releas

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread sturlamolden
On 6 Jul, 18:00, "Alf P. Steinbach /Usenet" wrote: > There is no *technical* problem creating a compiler-independent C/C++ language > binding. I believe that Java's JNI works fine no matter what compiler you use, > although it's many many years since I've done JNI things. Similarly, Python > shou

Re: Plot problem.. ?? No sign at all

2010-07-06 Thread Alan G Isaac
On 7/6/2010 12:11 PM, Ritchy lelis wrote: My intention with de for loop was to iterate each point of the arrays Vi and Vref at the math calculations. The V0 it's the result of the math expressions between the Vi and Vref. I can't just create one V0 by a function set by parametters (i don't see ho

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread Thomas Jollans
On 07/06/2010 05:50 PM, sturlamolden wrote: > It is possible to build C and Fortran extensions for official Python > 2.6/2.7 binaries on x86 using mingw. AFAIK, Microsoft's compiler is > required for C++ or amd64 though. (Intel's compiler requires VS2008, > which has now perished.) mingw gcc shoul

Re: markmin 0.1

2010-07-06 Thread Vlastimil Brom
2010/7/6 Chris Rebert : > On Mon, Jul 5, 2010 at 4:56 PM, Massimo Di Pierro > wrote: >> Markmin is a wiki markup language >> implemented in less than 100 lines of code (one file, no dependencies) >> easy to read >> secure >> ... > > Okay, but where can it be downloaded from? You didn't include a l

Re: Plot problem.. ?? No sign at all

2010-07-06 Thread Ritchy lelis
On 6 jul, 16:18, Alan G Isaac wrote: > On 7/6/2010 8:05 AM, Ritchy lelis wrote: > > >  1 - "import numpy as np > >       import matplotlib.pyplot as plt" > > >       In what help's me making the call's of the libraries that way? > > http://bytebaker.com/2008/07/30/python-namespaces/ > > >  2 - Wha

Re: Pdf download using mechanize

2010-07-06 Thread Aldo Ceccarelli
On 6 Lug, 16:00, srinivasan srinivas wrote: > HI, > I am using mechanize module for web scraping projects. One of y tasks is to > download pdf file from a page and store it. > Is there a way to download pdf file using mechanize how we do it in Perl's > WWW::Mechanize? > > Thanks, > Srini Hi, Sr

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread Alf P. Steinbach /Usenet
* sturlamolden, on 06.07.2010 17:50: Just a little reminder: Microsoft has withdrawn VS2008 in favor of VS2010. The express version is also unavailable for download.>:(( We can still get a VC++ 2008 compiler required to build extensions for the official Python 2.6 and 2.7 binary installers her

Re: Pdf download using mechanize

2010-07-06 Thread Aaron Watters
On Jul 6, 10:00 am, srinivasan srinivas wrote: > HI, > I am using mechanize module for web scraping projects. One of y tasks is to > download pdf file from a page and store it. > Is there a way to download pdf file using mechanize how we do it in Perl's > WWW::Mechanize? > > Thanks, > Srini Mec

Re: Changing Locale for datetime.strptime conversions

2010-07-06 Thread Antoine Pitrou
On Tue, 06 Jul 2010 11:54:46 -0400 pyt...@bdurham.com wrote: > Antoine, > > > If you want to do this seriously, I suggest you instead take a look at > > third-party libraries such as Babel: http://babel.edgewall.org/ > > Not the OP, but has Babel implemented parsing support? Last time I > looked

Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread sturlamolden
Just a little reminder: Microsoft has withdrawn VS2008 in favor of VS2010. The express version is also unavailable for download. >:(( We can still get a VC++ 2008 compiler required to build extensions for the official Python 2.6 and 2.7 binary installers here (Windows 7 SDK for .NET 3.5 SP1): h

Re: Changing Locale for datetime.strptime conversions

2010-07-06 Thread python
Antoine, > If you want to do this seriously, I suggest you instead take a look at > third-party libraries such as Babel: http://babel.edgewall.org/ Not the OP, but has Babel implemented parsing support? Last time I looked, Babel did a great job with locale specific formatting, but locale specifi

Re: Plot problem.. ?? No sign at all

2010-07-06 Thread Alan G Isaac
On 7/6/2010 8:05 AM, Ritchy lelis wrote: 1 - "import numpy as np import matplotlib.pyplot as plt" In what help's me making the call's of the libraries that way? http://bytebaker.com/2008/07/30/python-namespaces/ 2 - What's the instruction linspace means/does? >>> help(np.lins

Re: The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

2010-07-06 Thread Giampaolo Rodolà
2010/7/6 David Cournapeau : >> Or is there no change at the C level?  That would make things easy. > > There are quite a few, but outside of the big pain point of > strings/byte/unicode which is present at python level as well, a lot > of the issues are not so big (and even simpler to deal with). F

Re: python app development

2010-07-06 Thread Ed Leafe
On Jul 3, 2010, at 1:48 PM, mo reina wrote: > an anyone recommend a resource (book,tutorial,etc.) that focuses on > application development in python? something similar to Practical > Django Projects, but for stand alone applications instead of web apps > (for now). You should definitely

Re: Confusion over etree.ElementTree.Element.getiterator

2010-07-06 Thread Aahz
In article , Terry Reedy wrote: >On 7/5/2010 6:40 AM, Ben Sizer wrote: > >>> Admittedly, it's three clicks away from the library docs on docs.python.org. >>> >>> http://effbot.org/zone/element.htm#xml-namespaces >> >> Hopefully someone will see fit to roll this important documentation >> into doc

Pdf download using mechanize

2010-07-06 Thread srinivasan srinivas
HI, I am using mechanize module for web scraping projects. One of y tasks is to download pdf file from a page and store it. Is there a way to download pdf file using mechanize how we do it in Perl's WWW::Mechanize? Thanks, Srini -- http://mail.python.org/mailman/listinfo/python-list

Re: Python as a scripting language. Alternative to bash script?

2010-07-06 Thread Michael Torrie
On 07/06/2010 04:12 AM, sturlamolden wrote: > On 28 Jun, 19:39, Michael Torrie wrote: > >> In python I could simply take the output of "ps ax" and use python's >> own, superior, cutting routines (using my module): >> >> (err, stdout, stderr) = runcmd.run( [ 'ps', 'ax' ] ) >> for x in stdout.split

Re: The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

2010-07-06 Thread Steven
On Jul 5, 2:56 am, John Nagle wrote: >     The Twisted team has a list of what they need: > > "http://stackoverflow.com/questions/172306/how-are-you-planning-on-han..."; Here's what I got from a quick google review of the below four projects and python 3. >      * Zope Interface Here's a blog fro

Re: Python GUI for C program [was: ]

2010-07-06 Thread bobicanprogram
On Jul 6, 7:45 am, Thomas Jollans wrote: > On 07/06/2010 12:15 PM, francisco dorset wrote: > > > hey am a programmer i have good knowledge of the c language and i will > > like to now how i can use to python to provide graphical user-interface > > for my c programs and or the steps involved in doi

Re: The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

2010-07-06 Thread D'Arcy J.M. Cain
On Tue, 6 Jul 2010 16:30:34 +0800 David Cournapeau wrote: > One thing that would be very useful is how to maintain something that > works on 2.x and 3.x, but not limiting yourself to 2.6. Giving up > versions below 2.6 is out of the question for most projects with a Yes, PyGreSQL officially suppo

Re: Python GUI for C program [was: ]

2010-07-06 Thread Thomas Jollans
On 07/06/2010 12:15 PM, francisco dorset wrote: > hey am a programmer i have good knowledge of the c language and i will > like to now how i can use to python to provide graphical user-interface > for my c programs and or the steps involved in doing this and is it > possible > > if yes i will

Re: Python-list Digest, Vol 82, Issue 48

2010-07-06 Thread Thomas Jollans
On 07/06/2010 12:03 PM, francisco dorset wrote: > i need resources or books on how to embedding python into c/c++...and > also extending it > > [snip] What is the digest doing at the end of your message then? Anyway: http://docs.python.org/py3k/c-api/index.html http://docs.python.org/py3k/exten

RE: Python-list Digest, Vol 82, Issue 48

2010-07-06 Thread francisco dorset
i need resources or books on how to embedding python into c/c++...and also extending it am allergic to cheating, i hate failures, but am in love with achievements <º><.·´¯`·.F®an©ï§CØ`·.¸¸¸.·´¯`·.¸><º> From: python-list-requ...@python.org Subject: Python-list Digest, Vol 82, Issu

Re: Python 3 put-downs: What's the point?

2010-07-06 Thread Gregor Horvath
Am Mon, 05 Jul 2010 14:32:13 -0500 schrieb Tim Chase : > On 07/05/2010 02:50 AM, Gregor Horvath wrote: > > Am Sun, 04 Jul 2010 18:51:54 -0500 > > schrieb Tim Chase: > > > >> I think it's the same venting of frustration that caused veteran > >> VB6 developers to start calling VB.Net "Visual Fred" -

Re: Another Regexp Question

2010-07-06 Thread andrew cooke
http://bugs.python.org/issue9179 On Jul 5, 9:38 pm, MRAB wrote: > andrew cooke wrote: > > On Jul 5, 8:56 pm, MRAB wrote: > >> andrew cooke wrote: > >>> What am I missing this time? :o( > >> Nothing. It's a bug. :-( > > > Sweet :o) > > > Thanks - do you want me to raise an issue or will you? > >

Re: Changing Locale for datetime.strptime conversions

2010-07-06 Thread Antoine Pitrou
On Tue, 6 Jul 2010 03:21:21 -0700 (PDT) AlienBaby wrote: > I'm still having a bit of trouble, for example trying to set the > locale to Denmark > > > locale.setlocale(locale.LC_ALL, locale.normalize('da_DK')) > > returns with > > locale.setlocale(locale.LC_ALL, locale.normalize('da_DK'))

Re: Changing Locale for datetime.strptime conversions

2010-07-06 Thread AlienBaby
I'm still having a bit of trouble, for example trying to set the locale to Denmark locale.setlocale(locale.LC_ALL, locale.normalize('da_DK')) returns with locale.setlocale(locale.LC_ALL, locale.normalize('da_DK')) File "C:\Python26\lib\locale.py", line 494, in setlocale return _setl

[no subject]

2010-07-06 Thread francisco dorset
hey am a programmer i have good knowledge of the c language and i will like to now how i can use to python to provide graphical user-interface for my c programs and or the steps involved in doing this and is it possible if yes i will also like some resources or books to learn from. any

Re: Python as a scripting language. Alternative to bash script?

2010-07-06 Thread sturlamolden
On 28 Jun, 19:39, Michael Torrie wrote: > In python I could simply take the output of "ps ax" and use python's > own, superior, cutting routines (using my module): > > (err, stdout, stderr) = runcmd.run( [ 'ps', 'ax' ] ) > for x in stdout.split('\n'): >     print x.strip().split()[0] Or you just

Re: Changing Locale for datetime.strptime conversions

2010-07-06 Thread AlienBaby
On 6 July, 10:55, AlienBaby wrote: > Hi, > > I'm using datetime.strptime(string,format) to convert dates parsed > from a file into datetime objects. > > However, the files come from various places around the world, and > strptime fails when non-english month names are used. > > strptime says it co

Changing Locale for datetime.strptime conversions

2010-07-06 Thread AlienBaby
Hi, I'm using datetime.strptime(string,format) to convert dates parsed from a file into datetime objects. However, the files come from various places around the world, and strptime fails when non-english month names are used. strptime says it converts month names using the current locales versio

  1   2   >