Re: Python 2.7 released

2010-07-06 Thread David Bolen
Martineau ggrp2.20.martin...@dfgh.net writes: Some clarification. I meant installed 2.7 on top of 2.6.x. Doing so would have interfered with the currently installed version because I always install Python in the same directory, one named just Python, to minimize the number of changes I have

Re: SMTPHandler and Unicode

2010-07-06 Thread Vinay Sajip
On Jul 5, 2:35 pm, Antoine Pitrou solip...@pitrou.net wrote: a FileHandler works as expected, the log file being UTF-8 encoded. Ouch. Implicit encoding sounds like a bad behaviour. UTF-8 is only used as a fallback in an exception handler, you can use any supported encoding using the encoding=

Re: Why Python forbids multiple instances of one module?

2010-07-06 Thread kedra marbun
module obj is instance of types.ModuleType, which is instance of 'type', where class obj is instance of 'type'. even only at this point, they're diff in to many ways. there are so many things to do when you truly want module to replace class, as pointed by 2 posts above i'm also a beginner, so i

Re: Python 2.7 released

2010-07-06 Thread Tim Golden
On 06/07/2010 07:06, David Bolen wrote: I tend to need multiple versions around when developing, so I keep a bunch of versions all installed in separate directories as \Python\x.y (so I only have a single root directory). With 2.7, my current box has 6 Python interpreters (2.4-3.1) installed at

Re: delegation pattern via descriptor

2010-07-06 Thread Bruno Desthuilliers
kedra marbun a écrit : On Jul 5, 3:42 pm, Bruno Desthuilliers bruno. 42.desthuilli...@websiteburo.invalid wrote: kedra marbun a écrit : i'm confused which part that doesn't make sense? this is my 2nd attempt to py, the 1st was on april this year, it was just a month, i'm afraid i haven't

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

2010-07-06 Thread David Cournapeau
On Tue, Jul 6, 2010 at 4:30 AM, D'Arcy J.M. Cain da...@druid.net wrote: On Mon, 05 Jul 2010 14:42:13 -0400 Terry Reedy tjre...@udel.edu wrote: Good start. Now what is blocking those four? Lack of developer interest/time/ability? or something else that they need? How about a basic how-to

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

2010-07-06 Thread Stefan Behnel
Steven D'Aprano, 05.07.2010 08:31: On Sun, 04 Jul 2010 17:34:04 -0700, sturlamolden wrote: Using Python 2.x for new projects is not advisable (at least many will think so), and using 3.x is not possible. What to do? It's not a helpful situation for Python. That's pure FUD. Python 2.7 will

Re: Getting pyparsing to backtrack

2010-07-06 Thread Thomas Jollans
On 07/06/2010 04:21 AM, Dennis Lee Bieber wrote: On Mon, 05 Jul 2010 15:19:53 -0700, John Nagle na...@animats.com declaimed the following in gmane.comp.python.general: I'm working on street address parsing again, and I'm trying to deal with some of the harder cases. Hasn't it

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

Re: Changing Locale for datetime.strptime conversions

2010-07-06 Thread AlienBaby
On 6 July, 10:55, AlienBaby matt.j.war...@gmail.com 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.

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

2010-07-06 Thread sturlamolden
On 28 Jun, 19:39, Michael Torrie torr...@gmail.com 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]

[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.

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

Re: Changing Locale for datetime.strptime conversions

2010-07-06 Thread Antoine Pitrou
On Tue, 6 Jul 2010 03:21:21 -0700 (PDT) AlienBaby matt.j.war...@gmail.com 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,

Re: Another Regexp Question

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

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 python.l...@tim.thechases.com: On 07/05/2010 02:50 AM, Gregor Horvath wrote: Am Sun, 04 Jul 2010 18:51:54 -0500 schrieb Tim Chasepython.l...@tim.thechases.com: I think it's the same venting of frustration that caused veteran VB6

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, Issue 48

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

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 also

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 courn...@gmail.com 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

Re: Python GUI for C program [was: ]

2010-07-06 Thread bobicanprogram
On Jul 6, 7:45 am, Thomas Jollans tho...@jollans.com 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

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 na...@animats.com 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

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 torr...@gmail.com 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

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: Confusion over etree.ElementTree.Element.getiterator

2010-07-06 Thread Aahz
In article mailman.267.1278353389.1673.python-l...@python.org, Terry Reedy tjre...@udel.edu 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

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: 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 courn...@gmail.com: 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

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?

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 specific

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):

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, Babel

Re: Pdf download using mechanize

2010-07-06 Thread Aaron Watters
On Jul 6, 10:00 am, srinivasan srinivas sri_anna...@yahoo.co.in 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?

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

Re: Pdf download using mechanize

2010-07-06 Thread Aldo Ceccarelli
On 6 Lug, 16:00, srinivasan srinivas sri_anna...@yahoo.co.in 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?

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

2010-07-06 Thread Ritchy lelis
On 6 jul, 16:18, Alan G Isaac alan.is...@gmail.com 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

Re: markmin 0.1

2010-07-06 Thread Vlastimil Brom
2010/7/6 Chris Rebert c...@rebertia.com: On Mon, Jul 5, 2010 at 4:56 PM, Massimo Di Pierro mdipie...@cs.depaul.edu 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

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 should

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

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 alf.p.steinbach +use...@gmail.com 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

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 tho...@jollans.com 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

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 version

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')

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 sure the

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'

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 tho...@jollans.com 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

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 Cournapeaucourn...@gmail.com: 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

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: Plot problem.. ?? No sign at all

2010-07-06 Thread Ritchy lelis
On 6 jul, 17:29, Alan G Isaac alan.is...@gmail.com 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

Re: SMTPHandler and Unicode

2010-07-06 Thread Vinay Sajip
norbert ncauderan at 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:

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 we get

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 and a

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: 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 tho...@jollans.com 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

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 tho...@jollans.com 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 iostream), malloc and new, etc. With g++ you have a C++ standard library compiled against msvcrt.dll, whereas Python is

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 shouldn't

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.:(( cut Public download that is, people like me who have a MSDN subscription can still download old versions like Visual

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 sturlamol...@yahoo.no wrote: From: sturlamolden

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: 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 tjre...@udel.edu 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

Re: Python Embedding Importing relative modules

2010-07-06 Thread Aahz
In article 8f5014f6-9aa8-44e2-afe1-a1175bcdd...@w31g2000yqb.googlegroups.com, moerchendiser2k3 googler.1.webmas...@spamgourmet.com 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

Re: Python GUI for C program [was: ]

2010-07-06 Thread sturlamolden
On 6 Jul, 13:45, Thomas Jollans tho...@jollans.com 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

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

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 e_...@yahoo.com wrote: This seems odd to me, has anyone else had this problem? DVD? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python GUI for C program [was: ]

2010-07-06 Thread rantingrick
On Jul 6, 1:14 pm, sturlamolden sturlamol...@yahoo.no 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

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

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

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

Re: Python Embedding Importing relative modules

2010-07-06 Thread Aahz
In article 4a3f0ca7-fef0-4f9c-b265-5370e61ed...@d8g2000yqf.googlegroups.com, moerchendiser2k3 googler.1.webmas...@spamgourmet.com 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

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: 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 martin.hell...@dcuktec.org 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

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 martin.hell...@dcuktec.org 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

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 extension

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 tho...@jollans.com 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

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 sturlamolden
On 6 Jul, 21:49, Christian Heimes li...@cheimes.de 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

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 torr...@gmail.com wrote: On 07/06/2010 04:12 AM, sturlamolden wrote: On 28 Jun, 19:39, Michael Torrie torr...@gmail.com wrote: In python I could simply take the output of ps ax and use python's own, superior, cutting routines (using my module):

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 cas...@gmail.com wrote: On Jul 6, 9:21 am, Thomas Jollans tho...@jollans.com 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:

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

Re: Python Embedding Importing relative modules

2010-07-06 Thread Aahz
In article 33affa14-ded1-4742-a98f-c478df353...@w31g2000yqb.googlegroups.com, moerchendiser2k3 googler.1.webmas...@spamgourmet.com 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

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 googler.1.webmas...@spamgourmet.com wrote: Aahz: Set sys.path to include each script's base dir before running it, then restore after each script. That works,

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 vanished when I

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 technically possible,

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 expression. I'd like to

Re: Python Embedding Importing relative modules

2010-07-06 Thread Aahz
In article mailman.327.1278452148.1673.python-l...@python.org, Thomas Jollans tho...@jollans.com wrote: On 07/06/2010 09:11 PM, Aahz wrote: In article 4a3f0ca7-fef0-4f9c-b265-5370e61ed...@d8g2000yqf.googlegroups.com, moerchendiser2k3 googler.1.webmas...@spamgourmet.com wrote: Aahz: Set

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 alf.p.steinbach+use...@gmail.com 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++

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 alf.p.steinbach+use...@gmail.com 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

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 Windows??

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 cas...@gmail.com 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.

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 Heimesli...@cheimes.de 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

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 sturlamolden
On 7 Jul, 00:41, sturlamolden sturlamol...@yahoo.no 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

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 flippin int!)

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 tho...@jollans.com 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 01:14 AM, sturlamolden wrote: On 7 Jul, 01:07, Thomas Jollans tho...@jollans.com 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

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 ssq...@gmail.com 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

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 thud...@opensuse.us wrote: On Tue, Jul 6, 2010 at 6:40 AM, Michael Torrie torr...@gmail.com wrote: On 07/06/2010 04:12 AM, sturlamolden wrote: On 28 Jun, 19:39, Michael Torrie torr...@gmail.com wrote: In python I could simply take the output of ps

Re: Python install has difficulties with accented characters in path

2010-07-06 Thread Pierre Thibault
On 6 juil, 17:37, Thomas Jollans tho...@jollans.com 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

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 na...@animats.com wrote: David Cournapeau courn...@gmail.com 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

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

Re: Argh! Name collision!

2010-07-06 Thread Richard Thomas
On Jul 7, 3:11 am, Alf P. Steinbach /Usenet alf.p.steinbach +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 to do was figure out what it should be all about.

  1   2   3   >