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

2012-04-02 Thread Thomas Rachel
Am 02.04.2012 23:11 schrieb HoneyMonster: One way: import os os.system ("cp src sink") Yes. The worst way you could imagine. Why not the much much better from subprocess subprocess.call(['cp', 'src', 'sink']) ? Then you can call it with (really) arbitrary file names: def call_cp(from, t

Google Tech Talk: lisp at JPL

2012-04-02 Thread Xah Lee
Dearly beloved lisperati, I present you, Ron Garret (aka Erann Gat — aka Naggum hater and enemy of Kenny Tilton), at Google Tech Talk 〈The Remote Agent Experiment: Debugging Code from 60 Million Miles Away〉 Google Tech Talk, (2012-02-14) Presented by Ron Garret. @ http://www.youtube.com/watch?v=_

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

2012-04-02 Thread alex23
On Apr 3, 2:55 pm, Nathan Rice wrote: > I don't care what people do related to legacy systems. And that's what earns you the label 'architecture astronaut'. Legacy systems are _part_ of the problem; it's very easy to hold to a purist approach when you ignore the bulk of the domain that causes th

Re: simple rsa from javascript to python

2012-04-02 Thread Nobody
On Mon, 02 Apr 2012 16:19:05 -0700, Astan Chee wrote: > and I'm trying to convert this into python and I'm rather stuck with > pycrypto as there is no example on how to make the public key with a mod > and exponent (or I've probably missed it). from Crypto.PublicKey import RSA mod = long("B99808B

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

2012-04-02 Thread Nathan Rice
On Sun, Apr 1, 2012 at 11:18 PM, alex23 wrote: > On Mar 30, 3:37 pm, Nathan Rice > 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 wor

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

2012-04-02 Thread Dan Stromberg
You could use an hbox. Or rather, a vbox with a bunch of hbox's in it. On Thu, Mar 29, 2012 at 10:45 PM, Jason Hsu, Mr. Swift Linux < jhsu802...@gmail.com> wrote: > I've decided to use PyGTK instead of gtkdialog for providing > configuration menus/dialog boxes in Swift Linux, the Linux distro I

Re: Is Programing Art or Science?

2012-04-02 Thread Chiron
On Fri, 30 Mar 2012 01:27:16 -0700, Xah Lee wrote: > 〈Is Programing Art or Science〉 Why is this question important? -- You are confused; but this is your normal state. -- http://mail.python.org/mailman/listinfo/python-list

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

2012-04-02 Thread Ben Finney
Cameron Laird writes: > 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. Emile van Sebille writes: > On 3/31/2012 8:38 AM Cameron Laird said... >

Re: Problem connecting to SMTP/IMAP server using SSL

2012-04-02 Thread Michael Hrivnak
Your phone may be using TLS on the normal IMAP port (143). Or, are you sure your phone is using IMAP and not active sync? Michael On Mon, Apr 2, 2012 at 6:25 PM, Julien wrote: > Hi Michael, > > Thanks for your reply. I did try port 993. I know that port generally > works for me, as I can access

Re: string interpolation for python

2012-04-02 Thread Yingjie Lan
>>> I can't find a way to use an argument more than once, >>> without switching to "dictionary mode" and using keys for >>> everything. Even in "dictionary mode", the key is spelled more than once. The "tuple mode" below seems to save some typing.  However, when there are more and more item

Re: getaddrinfo NXDOMAIN exploit - please test on CentOS 6 64-bit

2012-04-02 Thread John Nagle
On 4/1/2012 1:41 PM, John Nagle wrote: On 4/1/2012 9:26 AM, Michael Torrie wrote: On 03/31/2012 04:58 PM, John Nagle wrote: Removed all "search" and "domain" entries from /etc/resolve.conf It's a design bug in glibc. I just submitted a bug report. http://sourceware.org/bugzilla/show_bug.cg

Cannot remove PIL, numpy lib from XP

2012-04-02 Thread W. eWatson
Well, it looks like I cannot remove PIL with control panel remove/add. The dialog just flashes when I push the button. I tried on an old program not in use, and it did respond as one would want. My guess is that I should not have started with removing Python 2.5.2 first. How do I get out of th

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

2012-04-02 Thread python
Thanks for all your hard work - I learned a lot by visiting the links you guys gathered over the years. Best regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: How I can draw the grid lines at intervals with step=1?

2012-04-02 Thread Chris Rebert
On Mon, Apr 2, 2012 at 5:14 PM, Andres Soto wrote: > Hi > I am trying to draw a step (or staircase) function. My points are all > integers. I would like that the grid lines help to identify the limits of > each line, but when I draw the grid, it is set each 5 units. > How can I draw the grid lines

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

2012-04-02 Thread Steve Howell
On Apr 2, 2:50 pm, Chris Angelico wrote: > On Fri, Mar 30, 2012 at 2:48 AM, Steve Howell wrote: > > I agree with you on the overall point, but I think that Python > > actually does a fine job of replacing REXX and PHP.  I've used both of > > the latter (and, of course, Python).  REXX and PHP are

How I can draw the grid lines at intervals with step=1?

2012-04-02 Thread Andres Soto
Hi I am trying to draw a step (or staircase) function. My points are all integers. I would like that the grid lines help to identify the limits of each line, but when I draw the grid, it is set each 5 units. How can I draw the grid lines at intervals with step=1? Thanks for your help in advance R

Re: Is Programing Art or Science?

2012-04-02 Thread Emile van Sebille
On 4/2/2012 4:52 PM Jürgen Exner said... "Pascal J. Bourguignon" wrote: ccc31807 writes: Programming is neither an art nor a science, but a trade. Oh, that's why it is tought in trade schools alongside butchery, plumbing, masonry, and chimney sweeping Yes -- back when we opened our firs

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

2012-04-02 Thread Tim Chase
PHP is a language that I wish would die off quickly and gracefully. I feel like the good things of PHP have already been subsumed into the ecosystems of stronger programming languages (including Python). The one killer feature PHP has to offer over other languages: ease of efficient deployment

Re: Is Programing Art or Science?

2012-04-02 Thread J�rgen Exner
"Pascal J. Bourguignon" wrote: >ccc31807 writes: > >> Programming is neither an art nor a science, but a trade. Oh, that's why it is tought in trade schools alongside butchery, plumbing, masonry, and chimney sweeping and why you don't find any programming classes at university. jue -- http://m

Re: Problem connecting to SMTP/IMAP server using SSL

2012-04-02 Thread Julien
Hi Michael, Thanks for your reply. I did try port 993. I know that port generally works for me, as I can access the Gmail IMAP/SMTP server using SSL. It also works for that other Exchange server but only when the VPN is turned on. Somehow my iPhone works fine without a VPN, as long as it uses SSL

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

2012-04-02 Thread Emile van Sebille
On 3/31/2012 8:38 AM Cameron Laird said... And it's time to bring "Python-URL!" to a close. Three cheers for your efforts over the years keeping this going. Many heartfelt thanks, Emile -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem connecting to SMTP/IMAP server using SSL

2012-04-02 Thread Michael Hrivnak
That method uses the default port 993. Can you connect to that port at all from your computer? For example, try using a telnet client. Michael On Sat, Mar 31, 2012 at 1:39 AM, Julien wrote: > Hi, > > I'm able to connect to an Exchange server via SMTP and IMAP from my > iPhone using SSL and w

simple rsa from javascript to python

2012-04-02 Thread Astan Chee
Hi, I've got a simple javascript that looks like this: var public_key_mod = "B99808B881F3D8A620F043D70B89674C0A120417FBD3690B3472589C641AD5D422502D0B26CADF97E2CB618DDDBD06CA0619EBBFB328A2FA31BD0F272FE3791810546E04BF42F05DB620FC7B4D0A2EAA17C18FF30C84D93341205C1D6EAD6ACBF2F08E334049DEBF31555CF164AD5

Re: Python is readable

2012-04-02 Thread Chris Angelico
On Sat, Mar 31, 2012 at 4:07 PM, Steve Howell wrote: > On Mar 30, 1:20 pm, Chris Angelico wrote: > >> Totally. That's why we're all still programming in assembly language >> and doing our own memory management, because we would lose a lot of >> personal value if programming stopped being so diffi

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

2012-04-02 Thread Chris Angelico
On Sun, Apr 1, 2012 at 6:23 AM, Steve Howell wrote: > On Mar 31, 1:13 pm, Tim Rowe 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. :) That's enoug

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

2012-04-02 Thread Chris Angelico
On Fri, Mar 30, 2012 at 2:48 AM, Steve Howell wrote: > I agree with you on the overall point, but I think that Python > actually does a fine job of replacing REXX and PHP.  I've used both of > the latter (and, of course, Python).  REXX and PHP are great at what > they do, but I don't think their s

Re: Python Script Works Locally But Not Remotely with SSH

2012-04-02 Thread Jerry Hill
On Tue, Mar 27, 2012 at 8:51 PM, goldtech wrote: > 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

Re: Python Script Works Locally But Not Remotely with SSH

2012-04-02 Thread Emile van Sebille
On 3/27/2012 5:51 PM goldtech said... 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 webb

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

2012-04-02 Thread Michael Hrivnak
Pickle cannot pickle a reference to an instance method. So the problem is that self.myDict has values which are references to instance methods. Without questioning what this is trying to do or why (I assume it's a proof of concept), here is a way to make it picklable: http://pastebin.com/1zqE52mD

Re: string interpolation for python

2012-04-02 Thread Chris Angelico
On Tue, Apr 3, 2012 at 4:56 AM, Steven D'Aprano wrote: > On Tue, 03 Apr 2012 00:58:38 +1000, Chris Angelico wrote: > >> I can't find a way to use an argument more than once, >> without switching to "dictionary mode" and using keys for everything. > > Ack. > > In this case, you can use format: > >>

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

2012-04-02 Thread nn
On Mar 31, 11:38 am, Cameron Laird wrote: > 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

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

2012-04-02 Thread Jason
On Sunday, April 1, 2012 1:54:14 AM UTC-4, Tim Roberts wrote: > John Nagle 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 eve

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 int

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 Kern 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 gro

Re: string interpolation for python

2012-04-02 Thread rusi
On Apr 2, 2:11 pm, Yingjie Lan 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 plain 'short.' As fo

Re: Python is readable

2012-04-02 Thread alex23
On Mar 31, 6:30 am, Neil Cerutti 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 unwilling to use

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 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 retarded in many, many ways, this

Re: Is Programing Art or Science?

2012-04-02 Thread Pascal J. Bourguignon
ccc31807 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. > > It's not

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 S

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.

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

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

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 Ian Kelly
On Wed, Mar 28, 2012 at 2:12 PM, 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 Pyt

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,

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

Re: string interpolation for python

2012-04-02 Thread Steve Howell
On Mar 31, 3:29 am, Terry Reedy 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 =

Re: Python is readable

2012-04-02 Thread Steve Howell
On Apr 1, 8:30 pm, alex23 wrote: > On Mar 31, 2:02 am, Steve Howell 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 short-sighted thinking. If it d

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 validating

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

Re: Python is readable

2012-04-02 Thread Steve Howell
On Mar 30, 11:25 pm, Lie Ryan 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 act like ob

Re: Python is readable

2012-04-02 Thread alex23
On Mar 31, 2:02 am, Steve Howell 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 making it easier t

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: 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 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. :) Some folks, when confronted with a problem, decide to solve it with binary

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 wrote: > On Thu, Mar 29, 2012 at 3:50 PM, Nathan Rice > > 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 > > as "not natural in lisp" :) > > You would r

Re: Python is readable

2012-04-02 Thread Steve Howell
On Mar 30, 1:20 pm, Chris Angelico 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 languages are all

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 ima

Re: Python is readable

2012-04-02 Thread Steve Howell
On Mar 29, 8:36 pm, Steven D'Aprano 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? "Concrete." Damn, those clever Rom

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

2012-04-02 Thread rusi
On Mar 30, 8:33 am, alex23 wrote: > On Mar 29, 10:41 pm, Mik 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 prob

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 Fun

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 eithe

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 wrote: > On Thu, Mar 29, 2012 at 10:03 AM, Chris Angelico 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 SQL because, even if you were to

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

2012-04-02 Thread John Ladasky
On Mar 28, 9:50 pm, alex23 wrote: > On Mar 29, 6:12 am, John Ladasky 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 what I was looking for. -- http:

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 wrote: > On Mar 29, 10:41 pm, Mik wrote: > > > What a nice way to introduce myself to the group!!! :-) > > Hey, don't beat yourself up, you: > >  - summarised the prob

Re: Python is readable

2012-04-02 Thread rusi
On Mar 30, 9:02 pm, Steve Howell 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 question: When Beet

Re: Python is readable

2012-04-02 Thread Steve Howell
On Mar 29, 9:38 pm, Nathan Rice 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, abstract algebras and topologic

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

2012-04-02 Thread alex23
On Mar 29, 10:41 pm, Mik 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 of most new post

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 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 grea

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

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

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 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. (It would not matter

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 Progra

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 __init__(

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 features

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

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 wrote: > On Fri, Mar 30, 2012 at 12:44 AM, Nathan Rice > > 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 was spent learning the mathematics, log

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

2012-04-02 Thread Steve Howell
On Mar 28, 6:55 pm, Ben Finney wrote: > Steven D'Aprano 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 an error code.) > > Have a look at Python's built-in OS

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

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 hel

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

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 larry.mart...@gmail.com
On Mar 28, 1:52 pm, Jon Clements 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 have to > > proc

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 yo

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 webbrowser.open('www.google.com')

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 into

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 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 the best people I'v

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: 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: [RELEASED] Python 3.3.0 alpha 2

2012-04-02 Thread Ned Deily
In article <4f794c1a.7020...@gmail.com>, Andrew Berg 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 been updated to p

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  dyn

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 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 ou

Re: string interpolation for python

2012-04-02 Thread Chris Angelico
On Mon, Apr 2, 2012 at 9:46 PM, Yingjie Lan 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 > equ

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

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

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 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 dyna

  1   2   >