[RELEASED] Python 3.3.0 alpha 1

2012-04-02 Thread Georg Brandl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team, I'm happy to announce the second alpha release of Python 3.3.0. This is a preview release, and its use is not recommended in production settings. Python 3.3 includes a range of improvements of the 3.x

[RELEASED] Python 3.3.0 alpha 2

2012-04-02 Thread Georg Brandl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team, I'm happy to announce the second alpha release of Python 3.3.0. This is a preview release, and its use is not recommended in production settings. Python 3.3

Re: Will MySQL ever be supported for Python 3.x?

2012-04-02 Thread John Nagle
On 3/31/2012 10:54 PM, Tim Roberts wrote: John Naglena...@animats.com wrote: On 3/30/2012 2:32 PM, Irmen de Jong wrote: Try Oursql instead http://packages.python.org/oursql/ oursql is a new set of MySQL bindings for python 2.4+, including python 3.x Not even close to being compatible

Re: [RELEASED] Python 3.3.0 alpha 2

2012-04-02 Thread Andrew Berg
To download Python 3.3.0 visit: http://www.python.org/download/releases/3.3.0/ The Windows links point to 3.3a1 installers, even though the links say 3.3a2. -- CPython 3.2.2 | Windows NT 6.1.7601.17640 -- http://mail.python.org/mailman/listinfo/python-list

Re: tabs/spaces

2012-04-02 Thread Ulrich Eckhardt
Am 30.03.2012 14:47, schrieb Dave Angel: But since it doesn't do it on all messages, have you also confirmed that it does it for a text message? My experience seems to be that only the html messages are messed up that way. I can't find any HTML in what I posted, so HTML is not the problem. A

Re: string interpolation for python

2012-04-02 Thread Yingjie Lan
Hi Adrian, see my comments below. From: Adrian Hunt cybor...@hotmail.com ... It could break old code... okay you may say you should’nt allow certain characters but if they're printable and used in a controlled environment those characters can dramatically

Re: tabs/spaces

2012-04-02 Thread Terry Reedy
On 4/2/2012 3:12 AM, Ulrich Eckhardt wrote: I can't find any HTML in what I posted, so HTML is not the problem. A difference could be the content type. I had in my posting: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Another one titled Pipelining in Python, where TB

Re: string interpolation for python

2012-04-02 Thread Yingjie Lan
You can already do essentially that without adding a special-case string  formatting method to the general methods we already have. balls = 5 people = 3 'The {people} people have {balls} balls.'.format(**locals()) 'The 3 people have 5 balls.' Clearly dynamic strings are much more

Re: string interpolation for python

2012-04-02 Thread Yingjie Lan
Python already has *3* different built-in string formatting/interpolation systems: ... I would surmise that your key implicitly grab variable values from the enclosing scope feature has previously been rejected for being too magical. It grabs because it is an expression in disguise (not a

Re: string interpolation for python

2012-04-02 Thread Chris Angelico
On Mon, Apr 2, 2012 at 5:24 PM, Yingjie Lan lany...@yahoo.com wrote: They are called Dynamic strings. Dynamic strings can achieve formatting, but the mechanism under the hood differ from common strings dramatically. Many here didn't realize that this is not another formatting proposal, it

Re: string interpolation for python

2012-04-02 Thread Jussi Piitulainen
Yingjie Lan writes: Clearly dynamic strings are much more powerful, allowing arbitrary expressions inside. It is also more terse and readable, since we need no dictionary. ... On the implementation, I would suppose new  syntax is needed (though very small). I don't think you need any new

Re: string interpolation for python

2012-04-02 Thread Steven D'Aprano
On Mon, 02 Apr 2012 17:52:33 +1000, Chris Angelico wrote: I'm -1 on the idea, mainly because there are already two perfectly good string interpolation syntaxes that don't require a new kind of string. Three. % formatting {} formatting $ formatting using string.Template -- Steven --

Re: string interpolation for python

2012-04-02 Thread Steven D'Aprano
On Mon, 02 Apr 2012 00:39:42 -0700, Yingjie Lan wrote: You can already do essentially that without adding a special-case string formatting method to the general methods we already have. balls = 5 people = 3 'The {people} people have {balls} balls.'.format(**locals()) 'The 3 people

Re: string interpolation for python

2012-04-02 Thread Chris Angelico
On Mon, Apr 2, 2012 at 6:26 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Mon, 02 Apr 2012 00:39:42 -0700, Yingjie Lan wrote: The compiler can choose to convert it into a string formatting expression, of course. To efficiently format strings at runtime, the best choice

Re: Threads on google groups not on gmane?

2012-04-02 Thread Robert Kern
On 3/31/12 1:47 AM, Mark Lawrence wrote: I went onto google groups to do a search and saw three threads (there may be more) that I've never seen on gmane, which I read via thunderbird on windows. The titles are Is programming art or science, breezypythongui: A New Toolkit for Easy GUIs in Python

Re: string interpolation for python

2012-04-02 Thread Yingjie Lan
- Original Message - From: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info To: python-list@python.org Cc: Sent: Monday, April 2, 2012 4:26 PM Subject: Re: string interpolation for python On Mon, 02 Apr 2012 00:39:42 -0700, Yingjie Lan wrote: You can already do

Re: string interpolation for python

2012-04-02 Thread Yingjie Lan
Actually, this sounds like a job for a precompiler/preprocessor. Do whatever translations you want on your code, then turn it into a .py file for execution. But hardly necessary, as there are already two - err, three, I stand corrected - perfectly good ways to do it. Agree and disagree. 

Re: string interpolation for python

2012-04-02 Thread Chris Angelico
On Mon, Apr 2, 2012 at 7:11 PM, Yingjie Lan lany...@yahoo.com wrote: I believe non of the other three alternatives are as terse and readable. We've got template based, formatting with dict, formatting with tuple. They all require the coder extra effort: Both template based and dict-based

Re: Threads on google groups not on gmane?

2012-04-02 Thread Paul Rubin
Robert Kern robert.k...@gmail.com writes: I also don't see these on GMane. It's possible that they are getting caught in one of GMane's several levels of spam filtering. I'm seeing some weird issues where google groups posts on another newsgroup aren't making it to the non-google nntp server

Re: string interpolation for python

2012-04-02 Thread Duncan Booth
Yingjie Lan lany...@yahoo.com wrote: Both template based and dict-based formatting require writing the identifier three times: name = 'Peter' Are you %(name)s%{'name':name} ÿ If dynamic string is used: Are you $name$? Template: Template(Are you $name?).substitute(name=name) It is three

Re: string interpolation for python

2012-04-02 Thread Chris Rebert
On Mon, Apr 2, 2012 at 2:11 AM, Yingjie Lan lany...@yahoo.com wrote: snip I believe non of the other three alternatives are as terse and readable. We've got template based, formatting with dict, formatting with tuple. They all require the coder extra effort: Both template based and dict-based

Re: Tkinter: IDLE can't get out of mainloop

2012-04-02 Thread Frederic Rentsch
On Sat, 2012-03-31 at 06:29 -0400, Terry Reedy wrote: On 3/31/2012 3:42 AM, Frederic Rentsch wrote: Hi all, Is is a bad idea to develop Tkinter applications in IDLE? I understand that IDLE is itself a Tkinter application, supposedly in a mainloop and mainloops apparently don't nest.

Re: Threads on google groups not on gmane?

2012-04-02 Thread Steven D'Aprano
On Mon, 02 Apr 2012 03:16:26 -0700, Paul Rubin wrote: Robert Kern robert.k...@gmail.com writes: I also don't see these on GMane. It's possible that they are getting caught in one of GMane's several levels of spam filtering. I'm seeing some weird issues where google groups posts on another

Re: string interpolation for python

2012-04-02 Thread Yingjie Lan
  Are you +name+? That allows arbitrary expressions and everything.   To make that work for any type, you need: Are you + str(name) + ? Another concern is performance. You are absolutely right, they are  equivalent in that both are expressions. As long as people start to realize that

Re: string interpolation for python

2012-04-02 Thread Steven D'Aprano
On Mon, 02 Apr 2012 02:11:46 -0700, Yingjie Lan wrote: Both template based and dict-based formatting require writing the identifier three times: name = 'Peter' Are you %(name)s%{'name':name} They don't *require* this at all. Are you %s % name For trivial examples, you have trivial

Re: string interpolation for python

2012-04-02 Thread Yingjie Lan
Are you %(name)s % locals() # or vars() This partly solves the problem, however, you  can't work with expressions inside, like: dsin($x$) = $sin(x)$ Also, what if locals() or vars() does not contain the variable x? (x could be nonlocal or global). It's more conservative than hostile.

Re: string interpolation for python

2012-04-02 Thread Yingjie Lan
... That, by the way, is perhaps the biggest problem with this idea of  dynamic strings: not that it is too powerful, but that it is TOO WEAK.  ... and similar for both format() and Template. Seems you miss understood my notion of dynamic string. Dynamic strings are expressions in disguise:

I look for a package to make some simple console form

2012-04-02 Thread Stéphane Klein
Hi, I look for a package to make some console form. It's a standard stuff, I think there are a package to do that. Example : What is your name ? Select your lang [EN, FR, DE…] ? Do you want … [Y, N] ? Type of field : * textline * select choice * boolean question Thank for your help,

Re: string interpolation for python

2012-04-02 Thread Laurent Claessens
Seems you miss understood my notion of dynamic string. Dynamic strings are expressions in disguise: the things in between $...$ are plain old expressions (with optional formatting specifications). They are evaluated as if they were outside the dynamic string. We put them in there to to kill two

Re: I look for a package to make some simple console form

2012-04-02 Thread Jean-Michel Pichavant
Stéphane Klein wrote: Hi, I look for a package to make some console form. It's a standard stuff, I think there are a package to do that. Example : What is your name ? Select your lang [EN, FR, DE…] ? Do you want … [Y, N] ? Type of field : * textline * select choice * boolean question

Re: Tools for refactoring/obfuscation

2012-04-02 Thread Javier
Well, a .pyc file would be a too blatant obfuscation, and people at my job would get angry. I need something more subtle. So I need a refactoring tool, preferably with which I can do scripting. These is what I found up to now in the CheeseShop: http://pypi.python.org/pypi/bicyclerepair/0.7.1

Re: Pythonect 0.1.0 Release

2012-04-02 Thread Jean-Michel Pichavant
Itzik Kotler wrote: Hi All, I'm pleased to announce the first beta release of Pythonect interpreter. Pythonect is a new, experimental, general-purpose dataflow programming language based on Python. It aims to combine the intuitive feel of shell scripting (and all of its perks like implicit

Re: string interpolation for python

2012-04-02 Thread Yingjie Lan
like this one ? b = dict(name=Sue, job=SAS sharp-shooter) print $b['name']$ works as b['job'] Is it really easier to read that the following ? {0} works as {1}.format(b['name'],b['job']) In the case in which b is an object having job and name attribute, the dynamic string will write

Re: I look for a package to make some simple console form

2012-04-02 Thread Stéphane Klein
Le 02/04/2012 15:54, Jean-Michel Pichavant a écrit : Stéphane Klein wrote: Hi, I look for a package to make some console form. It's a standard stuff, I think there are a package to do that. Example : What is your name ? Select your lang [EN, FR, DE…] ? Do you want … [Y, N] ? Type of field

Re: string interpolation for python

2012-04-02 Thread mwilson
Yingjie Lan wrote: Seems you miss understood my notion of dynamic string. Dynamic strings are expressions in disguise: the things in between $...$ are plain old expressions (with optional formatting specifications). They are evaluated as if they were outside the dynamic string. In that case

Re: I look for a package to make some simple console form

2012-04-02 Thread Grant Edwards
On 2012-04-02, St?phane Klein steph...@harobed.org wrote: Le 02/04/2012 15:54, Jean-Michel Pichavant a ?crit : St?phane Klein wrote: I look for a package to make some console form. It's a standard stuff, I think there are a package to do that. Example : What is your name ? Select your

Re: I look for a package to make some simple console form

2012-04-02 Thread Jean-Michel Pichavant
Stéphane Klein wrote: Le 02/04/2012 15:54, Jean-Michel Pichavant a écrit : Stéphane Klein wrote: Hi, I look for a package to make some console form. It's a standard stuff, I think there are a package to do that. Example : What is your name ? Select your lang [EN, FR, DE…] ? Do you want …

Re: string interpolation for python

2012-04-02 Thread Chris Angelico
On Mon, Apr 2, 2012 at 9:46 PM, Yingjie Lan lany...@yahoo.com wrote:  Are you +name+? That allows arbitrary expressions and everything. To make that work for any type, you need: Are you + str(name) + ? Another concern is performance. You are absolutely right, they are equivalent in

Re: string interpolation for python

2012-04-02 Thread mwilson
mwil...@the-wire.com wrote: Yingjie Lan wrote: Seems you miss understood my notion of dynamic string. Dynamic strings are expressions in disguise: the things in between $...$ are plain old expressions (with optional formatting specifications). They are evaluated as if they were outside the

Re: string interpolation for python

2012-04-02 Thread Yingjie Lan
Right, meaning that both have the same issues  of performance, need for str(), etc. There's absolutely no difference. OK, performance. Here is a new solution:   Suppose we have a new string method     str.format_join([...]) taking a list of strings and objects, with even-indexed ones being

Re: string interpolation for python

2012-04-02 Thread Yingjie Lan
  In that case you should re-think the delimiters, so that you have   something that can be nested.  An example (example only, I'm not in love with it as a final form): Haven't really thought about that. Nesting is a big  issue if in the embedded expression, there is another  dynamic

Re: [RELEASED] Python 3.3.0 alpha 2

2012-04-02 Thread Ned Deily
In article 4f794c1a.7020...@gmail.com, Andrew Berg bahamutzero8...@gmail.com wrote: To download Python 3.3.0 visit: http://www.python.org/download/releases/3.3.0/ The Windows links point to 3.3a1 installers, even though the links say 3.3a2. Thanks for the heads up. The links have now

Re: string interpolation for python

2012-04-02 Thread Steven D'Aprano
On Tue, 03 Apr 2012 00:58:38 +1000, Chris Angelico wrote: Maybe. But it (percent-notation) is expressive and insanely powerful. Moreover, it obeys the rule that you pay for the complexity you use, no more and no less. (Although I think there's one lack in Python's implementation - I can't

Re: I look for a package to make some simple console form

2012-04-02 Thread Stephane Klein
Le 02/04/2012 16:52, Jean-Michel Pichavant a écrit : Stéphane Klein wrote: Le 02/04/2012 15:54, Jean-Michel Pichavant a écrit : Stéphane Klein wrote: Hi, I look for a package to make some console form. It's a standard stuff, I think there are a package to do that. Example : What is your

Re: Number of languages known [was Re: Python is readable] - somewhat OT

2012-04-02 Thread Ethan Furman
Tim Rowe wrote: On 22 March 2012 19:14, Chris Angelico ros...@gmail.com wrote: In any case, though, I agree that there's a lot of people professionally writing code who would know about the 3-4 that you say. I'm just not sure that they're any good at coding, even in those few languages. All

Re: I look for a package to make some simple console form

2012-04-02 Thread J. Cliff Dyer
You might look into formencode. It basically takes the philosophy that a form is nothing more and nothing less than an interface between user input and python data. It doesn't make assumptions about how you present the form to the user. It just handles validation and conversion of that data

Python Script Works Locally But Not Remotely with SSH

2012-04-02 Thread goldtech
Hi, I have a WinXP PC running an SSH server and I have a Linux PC with an SSH client and logged into the XP seemingly OK. It's all on my personal LAN, the connection seems OK. I have a py file on the XP that I run via SSH from the Linux, it's: import webbrowser

Online SharePoint 2010 training sessions for end users with 12 Hours and $415 per person from 6th April 2012

2012-04-02 Thread Emiley Bradley
Greetings, Techies Platform’s training programs are essential to anyone in Information Management. With Techies Platform, you will experience rich content and an environment that is interesting, up-to-date, and engaging. Our instructors, materials, and in lab sessions are there to help build on

Re: Best way to structure data for efficient searching

2012-04-02 Thread larry.mart...@gmail.com
On Mar 28, 1:52 pm, Jon Clements jon...@googlemail.com wrote: On Wednesday, 28 March 2012 19:39:54 UTC+1, larry@gmail.com  wrote: I have the following use case: I have a set of data that is contains 3 fields, K1, K2 and a timestamp. There are duplicates in the data set, and they all

Best way to structure data for efficient searching

2012-04-02 Thread larry.mart...@gmail.com
I have the following use case: I have a set of data that is contains 3 fields, K1, K2 and a timestamp. There are duplicates in the data set, and they all have to processed. Then I have another set of data with 4 fields: K3, K4, K5, and a timestamp. There are also duplicates in that data set, and

Re: Best way to structure data for efficient searching

2012-04-02 Thread Jon Clements
On Wednesday, 28 March 2012 19:39:54 UTC+1, larry@gmail.com wrote: I have the following use case: I have a set of data that is contains 3 fields, K1, K2 and a timestamp. There are duplicates in the data set, and they all have to processed. Then I have another set of data with 4

No os.copy()? Why not?

2012-04-02 Thread John Ladasky
I'm looking for a Python (2.7) equivalent to the Unix cp command. Since the equivalents of rm and mkdir are in the os module, I figured I look there. I haven't found anything in the documentation. I am also looking through the Python source code in os.py and its child, posixfile.py. Any help?

Re: weird behaviour: pygame plays in shell but not in script

2012-04-02 Thread Mik
I can't believe I am so dumb! after sound.play() the script was terminating I didn't notice that 'play()' actually returns... What a nice way to introduce myself to the group!!! :-) sorry for bothering you guys :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: unittest: assertRaises() with an instance instead of a type

2012-04-02 Thread Steve Howell
On Mar 28, 6:55 pm, Ben Finney ben+pyt...@benfinney.id.au wrote: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: (By the way, I have to question the design of an exception with error codes. That seems pretty poor design to me. Normally the exception *type* acts as equivalent to

Re: Number of languages known [was Re: Python is readable] - somewhat OT

2012-04-02 Thread Steve Howell
On Mar 29, 7:03 am, Chris Angelico ros...@gmail.com wrote: On Fri, Mar 30, 2012 at 12:44 AM, Nathan Rice nathan.alexander.r...@gmail.com wrote: We would be better off if all the time that was spent on learning syntax, memorizing library organization and becoming proficient with new tools

Re: Best way to structure data for efficient searching

2012-04-02 Thread Asen Bozhilov
Larry.Mart wrote: Since there are duplicates, I can't use a dict. And if I have any extraneous data in the keys (i.e. something to make them unique) then I still have to walk through the entire dict to find the matches. You can use slightly different approach. With double mapping you could

ANN: Leo 4.10 final released

2012-04-02 Thread Edward K. Ream
Leo 4.10 final is now available at: http://sourceforge.net/projects/leo/files/Leo/4.10%20final/ Leo is a text editor, data organizer, project manager and much more. http://webpages.charter.net/edreamleo/intro.html Leo 4.10 contains 9 months of intense work on Leo. Several very important

help with subclassing problem

2012-04-02 Thread Peter
I am attempting to subclass the date class from the datetime package. Basically I want a subclass that can take the date as a string (in multiple formats), parse the string and derive the year,month and day information to create a date instance i.e. class MyDate(datetime.date): def

Is Programing Art or Science?

2012-04-02 Thread Xah Lee
the refreshen of the blood, from Xah's Entertainment Enterprise, i bring you: 〈Is Programing Art or Science〉 http://xahlee.org/UnixResource_dir/writ/art_or_science.html penned in the year of our lord two thousand and two, plain text version follows. Is

Re: Number of languages known [was Re: Python is readable] - somewhat OT

2012-04-02 Thread Steve Howell
On Mar 29, 11:53 am, Devin Jeanpierre jeanpierr...@gmail.com wrote: Well, what sort of language differences make for English vs Mandarin? Relational algebraic-style programming is useful, but definitely a large language barrier to people that don't know any SQL. I think this is reasonable.

Re: Python Script Works Locally But Not Remotely with SSH

2012-04-02 Thread Anoop Thomas Mathew
Hi, You can try using ssh -X xxx.xxx.xxx.xxx for GUI ssh connection. Thanks, Anoop Thomas Mathew atm ___ Life is short, Live it hard. On 28 March 2012 06:21, goldtech goldt...@worldpost.com wrote: Hi, I have a WinXP PC running an SSH server and I have a Linux PC with an SSH client and

Re: help with subclassing problem

2012-04-02 Thread Jon Clements
On Thursday, 29 March 2012 21:23:20 UTC+1, Peter wrote: I am attempting to subclass the date class from the datetime package. Basically I want a subclass that can take the date as a string (in multiple formats), parse the string and derive the year,month and day information to create a

weird behaviour: pygame plays in shell but not in script

2012-04-02 Thread Mik
Dear all, I am a bit frustrated by the following as I believe it is something silly that I am not able to see. I am using python 2.7.1+ under ubuntu. When I run the following script as in $python script.py I do not get any sound out of it BUT if I run every line in the python shell it works

How do I use PyGTK to put text besides clickable buttons?

2012-04-02 Thread Jason Hsu, Mr. Swift Linux
I've decided to use PyGTK instead of gtkdialog for providing configuration menus/dialog boxes in Swift Linux, the Linux distro I started. The problem with gtkdialog is that the i386 version is no longer available in the Debian repository. Since a picture is worth a thousand words, I'll give you

Re: weird behaviour: pygame plays in shell but not in script

2012-04-02 Thread alex23
On Mar 29, 10:41 pm, Mik mikp...@gmail.com wrote: What a nice way to introduce myself to the group!!! :-) Hey, don't beat yourself up, you: - summarised the problem in the subject heading - included actual code showing the problem - reported back on the problem you found That puts you ahead

Re: Python is readable

2012-04-02 Thread Steve Howell
On Mar 29, 9:38 pm, Nathan Rice nathan.alexander.r...@gmail.com wrote: The mathematics of the 20th century, (from the early 30s onward) tend to get VERY abstract, in just the way Joel decries.  Category theory, model theory, modern algebraic geometry, topos theory, algebraic graph theory,

Re: Python is readable

2012-04-02 Thread rusi
On Mar 30, 9:02 pm, Steve Howell showel...@yahoo.com wrote: Steven, how do you predict which abstractions are going to be useless? There was a time when imaginary numbers were just little toys that the mathematicians played around with in their ivory towers. A non-science/math analogous

Re: weird behaviour: pygame plays in shell but not in script

2012-04-02 Thread Mik
Oh thanks alex! that's kind! PS: It looks like a party indeed: plenty of interesting discussions :-) On Mar 30, 4:33 am, alex23 wuwe...@gmail.com wrote: On Mar 29, 10:41 pm, Mik mikp...@gmail.com wrote: What a nice way to introduce myself to the group!!! :-) Hey, don't beat yourself up,

Re: No os.copy()? Why not?

2012-04-02 Thread John Ladasky
On Mar 28, 9:50 pm, alex23 wuwe...@gmail.com wrote: On Mar 29, 6:12 am, John Ladasky john_lada...@sbcglobal.net wrote: I'm looking for a Python (2.7) equivalent to the Unix cp command. Any help?  Thanks. Try the shutil module:http://docs.python.org/library/shutil.html Many thanks! That's

Re: Number of languages known [was Re: Python is readable] - somewhat OT

2012-04-02 Thread Steve Howell
On Mar 29, 9:42 am, Devin Jeanpierre jeanpierr...@gmail.com wrote: On Thu, Mar 29, 2012 at 10:03 AM, Chris Angelico ros...@gmail.com wrote: You can't merge all of them without making a language that's suboptimal at most of those tasks - probably, one that's woeful at all of them. I mention

Re: Is Programing Art or Science?

2012-04-02 Thread ccc31807
Programming is neither an art nor a science, but a trade. It's not an art in the sense of painting, music, dance, poetry, etc., because the objective isn't to make a beautiful something, but to give instructions to a machine to accomplish some useful task. It's not a science in the sense of

breezypythongui: A New Toolkit for Easy GUIs in Python

2012-04-02 Thread lambertk
breezypythongui is an open source toolkit that enables the Python programmer to learn realistic GUI programming quickly and easily. For free source code, demo programs, and a tutorial, visit http://home.wlu.edu/~lambertk/breezypythongui/index.html. Brought to you by Ken Lambert, the author of

Re: weird behaviour: pygame plays in shell but not in script

2012-04-02 Thread rusi
On Mar 30, 8:33 am, alex23 wuwe...@gmail.com wrote: On Mar 29, 10:41 pm, Mik mikp...@gmail.com wrote: What a nice way to introduce myself to the group!!! :-) Hey, don't beat yourself up, you:  - summarised the problem in the subject heading  - included actual code showing the problem  -

Re: Python is readable

2012-04-02 Thread Steve Howell
On Mar 29, 8:36 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: The Romans had perfectly functioning concrete without any abstract understanding of chemistry. If I ever stumbled upon a technology that proved how useless abstract thinking was, do you know what I would call it?

Problem connecting to SMTP/IMAP server using SSL

2012-04-02 Thread Julien
Hi, I'm able to connect to an Exchange server via SMTP and IMAP from my iPhone using SSL and without using a VPN. So I would expect to be able to do the same from my computer using Python. However, the following hangs and times out on my computer when I'm not connected to the VPN: import

Re: Python is readable

2012-04-02 Thread Steve Howell
On Mar 30, 1:20 pm, Chris Angelico ros...@gmail.com wrote: Really?  Or could it be that algorithms for natural language processing that don't fail miserably is a very recent development, restricted natural languages more recent still, and pretty much all commonly used programming

Re: Number of languages known [was Re: Python is readable] - somewhat OT

2012-04-02 Thread rusi
On Mar 30, 4:37 am, Devin Jeanpierre jeanpierr...@gmail.com wrote: On Thu, Mar 29, 2012 at 3:50 PM, Nathan Rice nathan.alexander.r...@gmail.com wrote: Well, a lisp-like language.  I would also argue that if you are using macros to do anything, the thing you are trying to do should classify

Re: Number of languages known [was Re: Python is readable] - somewhat OT

2012-04-02 Thread Steve Howell
On Mar 31, 1:13 pm, Tim Rowe digi...@gmail.com wrote: I know 10 languages. But I'm not telling you what base that number is :) Well, that means you know at least two programming languages, which puts you ahead of a lot of people. :) obligatory joke Some folks, when confronted with a problem,

Python-URL! - weekly Python news and links (Mar 31)

2012-04-02 Thread Cameron Laird
I pine for the fjords. And it's time to bring Python-URL! to a close. Python-URL!, which Jean-Claude Wippler and I appear to have launched in 1998, has reached the end of its utility. We still have many loyal and enthusiastic readers--one subscription request arrived within the last day, in

Python-URL! - weekly Python news and links (Mar 31)

2012-04-02 Thread Cameron Laird
I pine for the fjords. And it's time to bring Python-URL! to a close. Python-URL!, which Jean-Claude Wippler and I appear to have launched in 1998, has reached the end of its utility. We still have many loyal and enthusiastic readers--one subscription request arrived within the last day, in

Re: Python is readable

2012-04-02 Thread alex23
On Mar 31, 2:02 am, Steve Howell showel...@yahoo.com wrote: Steven, how do you predict which abstractions are going to be useless? A useless abstraction is one that does nothing to simplify a problem *now*: being so fixated on over-arching abstract concepts that, far from those abstractions

Re: Python is readable

2012-04-02 Thread Steve Howell
On Mar 30, 11:25 pm, Lie Ryan lie.1...@gmail.com wrote: On 03/21/2012 01:44 PM, Steve Howell wrote: Also, don't they call those thingies object for a reason? ;) A subject is (almost?) always a noun, and so a subject is also an object. It's true that words that can act as a subject can also

Nature of Heavenly Bodies

2012-04-02 Thread BV BV
THE QUR'AN AND MODERN SCIENCE Extracted from the Book The Bible, The Qur'an and Science Maurice Bucaille Nature of Heavenly Bodies THE SUN AND THE MOON The Sun is a shine (diya') and the Moon a light (nur). This translation would appear to be more correct than those

M2Crypto.SSL.Checker.NoCertificate Exception

2012-04-02 Thread Tim H.
I have a weird quirk with the M2Crypto module and I hope someone would be able to point me in the right direction. I am working with a colleague to develop an internal tool to check SSL certificates on a list of IPv4 addresses obtained via stdin. We are using M2Crypto to help with

Re: Python is readable

2012-04-02 Thread Steve Howell
On Apr 1, 8:30 pm, alex23 wuwe...@gmail.com wrote: On Mar 31, 2:02 am, Steve Howell showel...@yahoo.com wrote: Steven, how do you predict which abstractions are going to be useless? A useless abstraction is one that does nothing to simplify a problem *now*: That's the very definition of

Re: string interpolation for python

2012-04-02 Thread Steve Howell
On Mar 31, 3:29 am, Terry Reedy tjre...@udel.edu wrote: On 3/31/2012 2:22 AM, Yingjie Lan wrote: Hi all, I'd really like to share this idea of string interpolation for formatting. Let's start with some code:   name = Shrek   print( Hi, $name$!) Hi, Shrek!   balls = 30   print(

why can't I pickle a class containing this dispatch dictionary?

2012-04-02 Thread jkn
Hi All I'm clearly not understanding the 'can't pickle instancemethod objects' error; can someone help me to understand, maybe suggest a workaround, (apart from the obvious if ... elif...). I'm running Python 2.6 on an embedded system. == testpickle.py == import pickle class Test(object):

588 Python programs

2012-04-02 Thread Steve Howell
Hi everyone, I have compiled over 500 Python programs from the Rosetta Code website in this page: http://shpaml.webfactional.com/misc/RosettaCoffee/python.htm For those of you unfamiliar with Rosetta Code, you can read more here: http://rosettacode.org/wiki/Rosetta_Code For the record,

Re: No os.copy()? Why not?

2012-04-02 Thread Ian Kelly
On Wed, Mar 28, 2012 at 2:12 PM, John Ladasky john_lada...@sbcglobal.net wrote: I'm looking for a Python (2.7) equivalent to the Unix cp command. Since the equivalents of rm and mkdir are in the os module, I figured I look there.  I haven't found anything in the documentation. I am also

Re: Python Script Works Locally But Not Remotely with SSH

2012-04-02 Thread goldtech
Bump(?) -- http://mail.python.org/mailman/listinfo/python-list

Re: No os.copy()? Why not?

2012-04-02 Thread HoneyMonster
On Wed, 28 Mar 2012 13:12:30 -0700, John Ladasky wrote: I'm looking for a Python (2.7) equivalent to the Unix cp command. Since the equivalents of rm and mkdir are in the os module, I figured I look there. I haven't found anything in the documentation. I am also looking through the Python

Re: Re: string interpolation for python

2012-04-02 Thread Evan Driscoll
On 01/-10/-28163 01:59 PM, Yingjie Lan wrote: Because of the d... format, it won't affect old ways of doing things one bit. Allowing dynamic string wouldn't hurt a bit to anything that is already there. Why don't you just write a function that does it? I think someone already suggested

Re: Best way to structure data for efficient searching

2012-04-02 Thread Peter Otten
larry.mart...@gmail.com wrote: I have the following use case: I have a set of data that is contains 3 fields, K1, K2 and a timestamp. There are duplicates in the data set, and they all have to processed. Then I have another set of data with 4 fields: K3, K4, K5, and a timestamp. There

Re: Python Script Works Locally But Not Remotely with SSH

2012-04-02 Thread Jedrzej Krzysztof Dec
On Wednesday, March 28, 2012 2:51:37 AM UTC+2, goldtech wrote: Hi, I have a WinXP PC running an SSH server and I have a Linux PC with an SSH client and logged into the XP seemingly OK. It's all on my personal LAN, the connection seems OK. I have a py file on the XP that I run via SSH

Re: Is Programing Art or Science?

2012-04-02 Thread Pascal J. Bourguignon
ccc31807 carte...@gmail.com writes: Programming is neither an art nor a science, but a trade. It's not an art in the sense of painting, music, dance, poetry, etc., because the objective isn't to make a beautiful something, but to give instructions to a machine to accomplish some useful task.

Re: Number of languages known [was Re: Python is readable] - somewhat OT

2012-04-02 Thread alex23
On Mar 30, 3:37 pm, Nathan Rice nathan.alexander.r...@gmail.com wrote: We live in a world where the tools that are used are based on tradition (read that as backwards compatibility if it makes you feel better) and as a mechanism for deriving personal identity.  The world is backwards and

Re: Python is readable

2012-04-02 Thread alex23
On Mar 31, 6:30 am, Neil Cerutti ne...@norwich.edu wrote: See, for example, Inform 7, which translates a subset of English into Inform 6 code. I never thought too deeply about why I disliked it, assuming it was because I already knew Inform 6. I've always respected Inform 7 while being also

Re: string interpolation for python

2012-04-02 Thread rusi
On Apr 2, 2:11 pm, Yingjie Lan lany...@yahoo.com wrote: Almost as terse, but not as readable, especially... Hi Yingjie, Just in case you are not a native speaker of English, 'terse' is a mildly pejorative word, ie it is not 'good'. You probably want to use something like 'concise', or just

Re: Threads on google groups not on gmane?

2012-04-02 Thread Mark Lawrence
On 02/04/2012 12:23, Steven D'Aprano wrote: On Mon, 02 Apr 2012 03:16:26 -0700, Paul Rubin wrote: Robert Kernrobert.k...@gmail.com writes: I also don't see these on GMane. It's possible that they are getting caught in one of GMane's several levels of spam filtering. I'm seeing some weird

AddNamedItem throws exception

2012-04-02 Thread David Manns
We have a scripting engine interface in our application. This works fine for loading/calling VBscript and Javascript scripting engines, but PythonScript fails. Specifically, it fails at : m_pAxsScript-AddNamedItem(application, SCRIPTITEM_NAMEDITEM) where m_pAxsScript is the IActiveScript

  1   2   >