Re: I strongly dislike Python 3

2010-06-27 Thread Lawrence D'Oliveiro
In message , Stefan Reich wrote: > My complaint is about changing the syntax of "print". I never use print, so I don’t appreciate the problem. It seems to be useful only for noddy I/O. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why Is Escaping Data Considered So Magical?

2010-06-27 Thread Ian Kelly
On Sat, Jun 26, 2010 at 8:31 PM, Lawrence D'Oliveiro wrote: > Except I only needed two calls to SQLString, while you need two dozen > instances of that repetitive items.c boilerplate. > > As a human, being repetitive is not my job. That’s what the computer is for. Then why do you have every param

Re: I strongly dislike Python 3

2010-06-27 Thread Martin v. Loewis
> I didn't notice this level of angst when Python made equally significant > changes going from 1.5 to 2.0... I think the *level* was about the same (IIRC). People would say that they ignore 2.x for years, and that it is important to continue supporting 1.5.2 for a long time (about until 2.4 was

Re: Why Is Escaping Data Considered So Magical?

2010-06-27 Thread Kushal Kumaran
On Sun, Jun 27, 2010 at 9:47 AM, Lawrence D'Oliveiro wrote: > In message , Roy Smith wrote: > >> I recently fixed a bug in some production code.  The programmer was >> careful to use snprintf() to avoid buffer overflows.  The only problem >> is, he wrote something along the lines of: >> >> snprint

2. Re: Python interface problem with Windows (Benjamin Kaplan)

2010-06-27 Thread Kermit Rose
On 6/26/2010 9:30 PM, python-list-requ...@python.org wrote: Today's Topics: 2. Re: Python interface problem with Windows (Benjamin Kaplan) > Message: 2 > Date: Sat, 26 Jun 2010 16:26:47 -0700 > From: Benjamin Kaplan > To: python-list@python.org > Subject: Re: Python interface prob

Re: 2. Re: Python interface problem with Windows (Benjamin Kaplan)

2010-06-27 Thread rantingrick
On Jun 27, 5:52 am, Kermit Rose wrote: > On 6/26/2010 9:30 PM, python-list-requ...@python.org wrote: > I do not know how to import code from any other directory than the > default, C:\Python26. Kermit, There are a couple of ways to import python modules from various places. But first create a f

Re: value of: None is None is None

2010-06-27 Thread Lawrence D'Oliveiro
In message , Alan G Isaac wrote: > Surprising for a moment, if you don't > immediatelyrecognize it as a chained comparison. Bugger. So much for a Python version of this , then ... -- http://mail.python.org/mailman/listinfo/pyth

Re: Why Is Escaping Data Considered So Magical?

2010-06-27 Thread Lawrence D'Oliveiro
In message , Kushal Kumaran wrote: > On Sun, Jun 27, 2010 at 9:47 AM, Lawrence D'Oliveiro > wrote: > >> In message , Roy Smith wrote: >> >>> I recently fixed a bug in some production code. The programmer was >>> careful to use snprintf() to avoid buffer overflows. The only problem >>> is, he w

Re: I strongly dislike Python 3

2010-06-27 Thread rantingrick
> > P.S. Am I the only one who has never, ever, even *seen* a 'print' > > statement in non-toy or non-bash-script-style code in any application > > or even third-party library I looked at? Except, on occasion, for > > quick and dirty debugging. Perhaps because I'm more used to > > cross-platform t

Re: Why Is Escaping Data Considered So Magical?

2010-06-27 Thread Lawrence D'Oliveiro
In message , Ian Kelly wrote: > On Sat, Jun 26, 2010 at 8:31 PM, Lawrence D'Oliveiro > wrote: > >> Except I only needed two calls to SQLString, while you need two dozen >> instances of that repetitive items.c boilerplate. >> >> As a human, being repetitive is not my job. That’s what the computer

live chat mic +cam freeeeeeeeeeee no dawenlod

2010-06-27 Thread lost2030
http://niceyapchat.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

live chat mic +cam freeeeeeeeeeee no dawenlod

2010-06-27 Thread lost2030
http://niceyapchat.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: value of: None is None is None

2010-06-27 Thread Thomas Jollans
On 06/27/2010 01:45 PM, Lawrence D'Oliveiro wrote: > In message , Alan G Isaac wrote: > >> Surprising for a moment, if you don't >> immediatelyrecognize it as a chained comparison. > > Bugger. So much for a Python version of this >

Re: I strongly dislike Python 3

2010-06-27 Thread Thomas Jollans
On 06/27/2010 01:46 PM, rantingrick wrote: > >>> P.S. Am I the only one who has never, ever, even *seen* a 'print' >>> statement in non-toy or non-bash-script-style code in any application >>> or even third-party library I looked at? Except, on occasion, for >>> quick and dirty debugging. Perhaps

Re: Python dynamic attribute creation

2010-06-27 Thread Bruno Desthuilliers
WANG Cong a écrit : > On 06/25/10 15:34, Bruno Desthuilliers > wrote: > >> WANG Cong a écrit : >>> Hi, list! >>> >>> I have a doubt about the design of dynamic attribute creation by >>> assignments in Python. >>> >>> As we know, in Python, we are able to create a new attribute of >>> a class dyn

Re: I strongly dislike Python 3

2010-06-27 Thread David Cournapeau
On Sun, Jun 27, 2010 at 4:54 PM, Martin v. Loewis wrote: >> I didn't notice this level of angst when Python made equally significant >> changes going from 1.5 to 2.0... > > I think the *level* was about the same (IIRC). People would say that > they ignore 2.x for years, and that it is important to

Re: Python dynamic attribute creation

2010-06-27 Thread Bruno Desthuilliers
WANG Cong a écrit : (snip) > > The point is why making metaprogramming easy is wonderful? Because it makes life easier ?-) > AND, even if > it were wonderful, why only this one, i.e. creating attributes by > assignments, not other things? Like : class Test(object): a = 1 del Test.a ?-)

Re: Python dynamic attribute creation

2010-06-27 Thread Bruno Desthuilliers
WANG Cong a écrit : > On 06/25/10 17:25, Steven D'Aprano > wrote: > >> On Fri, 25 Jun 2010 14:15:12 +0100, WANG Cong wrote: >> (snip) >>> 4) Also, this will _somewhat_ violate the OOP princples, in OOP, this is >>> and should be implemented by inherence. >> Perhaps, and perhaps not. But Python h

Re: Python dynamic attribute creation

2010-06-27 Thread Bruno Desthuilliers
WANG Cong a écrit : > On 06/26/10 00:11, Neil Hodgson wrote: > >> WANG Cong: >> >>> 4) Also, this will _somewhat_ violate the OOP princples, in OOP, >>> this is and should be implemented by inherence. >>Most object oriented programming languages starting with Smalltalk >> have allowed adding

Re: I strongly dislike Python 3

2010-06-27 Thread Malte Dik
quote: > > I didn't notice this level of angst when Python made equally significant > changes going from 1.5 to 2.0... admittedly Python 1.5 code would work > unchanged in 2.0, but the 2.x series introduced MUCH bigger additions to > Python than anything 3.0 and 3.1 have added, and anyone taking a

Re: CONTROLLED DEMOLITION INC explosive-charge placement technician Tom ?Sullivan 911 TESTIMONIAL Video

2010-06-27 Thread Juha Nieminen
In comp.lang.c++ nanothermite911fbibustards wrote: > http://www.ae911truth.org/newsletter/2010/06/index.php#cdi > > Explosive Evidence at WTC Cited by Former CDI Employee > News - News Releases By AE911Truth > Written by Darcy Wearing and Richard Gage, AIA > Thursday, 24 June 2010 18:55 Could

latex output

2010-06-27 Thread ilovesss2004
Hi, The latex print function in sympy only can make latex code for math expression which includes at least a variable. If we input an expression without any variable like latex('2**2/3'), we will get '$1$' instead of '$\\frac{1}{3} 2^{2}$'. Is there a python package I can use to output latex code

Re: Why Is Escaping Data Considered So Magical?

2010-06-27 Thread Nobody
On Sun, 27 Jun 2010 14:36:10 +1200, Lawrence D'Oliveiro wrote: >> In any case, you're still trying to make arguments about whether it's easy >> or hard to get it right, which completely misses the point. Eliminating >> the escaping entirely makes it impossible to get it wrong. > > Except nobody h

Re: I strongly dislike Python 3

2010-06-27 Thread Peter Kleiweg
David Cournapeau schreef op de 27e dag van de zomermaand van het jaar 2010: > I doubt "porting is easier than you think" will convince many people > if they don't know what the gain will be. For example, porting numpy > and scipy to py3k has been easier than I thought, but besides making > it easi

Re: I strongly dislike Python 3

2010-06-27 Thread David Cournapeau
On Sun, Jun 27, 2010 at 11:46 PM, Peter Kleiweg wrote: > David Cournapeau schreef op de 27e dag van de zomermaand van het jaar 2010: > >> I doubt "porting is easier than you think" will convince many people >> if they don't know what the gain will be. For example, porting numpy >> and scipy to py3

Re: CONTROLLED DEMOLITION INC explosive-charge placement technician Tom ?Sullivan 911 TESTIMONIAL Video

2010-06-27 Thread small Pox
On Jun 27, 6:45 am, Juha Nieminen wrote: > In comp.lang.c++ nanothermite911fbibustards > wrote: > > >http://www.ae911truth.org/newsletter/2010/06/index.php#cdi > > > Explosive Evidence at WTC Cited by Former CDI Employee > > News - News Releases By AE911Truth > > Written by Darcy Wearing and Ric

Re: Continuously running scripts question

2010-06-27 Thread Peter H. Coffin
On Sun, 27 Jun 2010 16:21:25 +1200, Lawrence D'Oliveiro wrote: > In message , Ian Kelly > wrote: > >> I use cron. >> >> Con: Most cron implementations have a maximum frequency of once per >> minute. > > Another con is: what happens if a run takes longer than the invocation > frequency? Not cro

Re: I strongly dislike Python 3

2010-06-27 Thread Stephen Hansen
On 6/27/10 5:16 AM, Thomas Jollans wrote: On 06/27/2010 01:46 PM, rantingrick wrote: P.S. Am I the only one who has never, ever, even *seen* a 'print' statement in non-toy or non-bash-script-style code in any application or even third-party library I looked at? Except, on occasion, for quick a

Re: I strongly dislike Python 3

2010-06-27 Thread rantingrick
On Jun 27, 7:16 am, Thomas Jollans wrote: > Granted, some use print to emit warnings (aifc for example). This isn't > perfectly clean, of course, but it's not used a whole lot either. Mostly > rather old code too, I think. > And some (abc for example) use print in what looks like internal > diagn

Re: 2. Re: Python interface problem with Windows (Benjamin Kaplan)

2010-06-27 Thread Terry Reedy
On 6/27/2010 6:52 AM, Kermit Rose wrote: I do not know how to import code from any other directory than the default, C:\Python26. I personally took the easy way. I put my package of modules in pthonxy/Lib/site-packages, which is already on the search path from package import mymod from packag

hiiiiiiiiiiiiiiiiiiiiiiiiiiiiii

2010-06-27 Thread eslam
: Islam is an Arabic word, it means that you totally surrender to God, and worship Him only. Here also I must explain what does worship means? It doesn't mean that you only pray, its meaning is much much wider, to worship God is that you look at Him as your ONLY master, no other master controlling

Re: I strongly dislike Python 3

2010-06-27 Thread Andreas Waldenburger
On Sun, 27 Jun 2010 02:45:37 +0100 Nobody wrote: > On Sat, 26 Jun 2010 21:08:48 +0200, Martin v. Loewis wrote: > > >> I think that's not true. If enough people want to support Python 2 > >> it might be possible to advance Python 2. > > > > That won't be sufficient: enough people wanting support

Re: I strongly dislike Python 3

2010-06-27 Thread Stephen Hansen
On 6/27/10 9:26 AM, rantingrick wrote: That being said, Stephen's statement was very broad, but I think it's true: print is primarily used in small scripts, or script-like testing functions/methods. No, Stephen's comments were NOT general in any way and they where in fact very specific... "If y

Where is StackPanel in IronPython / .Net 4?

2010-06-27 Thread Ian Hobson
Hi All, According to this page http://msdn.microsoft.com/en-us/library/system.windows.controls.stackpanel.aspx StackPanel is in the System.Windows.Controls Namespace When I try and set up a reference to that Namespace I get a "Could not add reference to assembly System.Windows.Controls" erro

Re: Where is StackPanel in IronPython / .Net 4?

2010-06-27 Thread Benjamin Kaplan
On Sun, Jun 27, 2010 at 10:36 AM, Ian Hobson wrote: > Hi All, > > According to this page > > http://msdn.microsoft.com/en-us/library/system.windows.controls.stackpanel.aspx > > StackPanel is in the System.Windows.Controls Namespace > > When I try and set up a reference to that Namespace I get a "C

Re: Why Is Escaping Data Considered So Magical?

2010-06-27 Thread Jorgen Grahn
On Sat, 2010-06-26, Lawrence D'Oliveiro wrote: > In message , Jorgen Grahn > wrote: > >> I thought it was well-known that the solution is *not* to try to >> sanitize the input -- it's to switch to an interface which doesn't >> involve generating an intermediate executable. In the Python example,

Re: I strongly dislike Python 3

2010-06-27 Thread Terry Reedy
On 6/27/2010 8:41 AM, David Cournapeau wrote: I think one point which needs to be emphasized more is what does python 3 bring to people. The" what's new in python 3 page" gives the impression that python 3 is about removing cruft. That's a very poor argument to push people to switch. Python3 i

Re: Roman Polansky RAPED Semantha Geimer Orally, Analy and Vaginally - TRAUMA for victim is so much that she wants it to be out of sight from her

2010-06-27 Thread nanothermite911fbibustards
On Jun 26, 10:02 pm, small Pox wrote: > Roman Polansky RAPED Semantha Geimer Orally, Analy and Vaginally - > TRAUMA for victim is so much that she wants it to be out of sight from > her > > Full Court Declaration of ROMAN POLANSKY > > http://www.netlexfrance.net/29/09/2009/roman-polanski-a-respect

Wrong reference

2010-06-27 Thread Jimmy
Add references to: "PresentationCore" and "PresentationFramework" for the System.Windows and System.Windows.Controls etc namespace. Ian Hobson wrote: Where is StackPanel in IronPython / .Net 4? 27-Jun-10 Hi All, According to this page http://msdn.microsoft.com/en-us/library/system.windows.c

Correction

2010-06-27 Thread Jimmy
It should be "PresentationCore" and "PresentationFramework." For some reason, that first part got deleted in my reply. Jimmy Cao wrote: Wrong reference 27-Jun-10 Add references to: "PresentationCore" and "PresentationFramework" for the System.Windows and System.Windows.Controls etc namespace.

PresentationCore got deleted again

2010-06-27 Thread Jimmy
For some reason, "PresentationCore" doesn't show up... PresentationCore PresentationCore PresentationCore PresentationCore PresentationCore Jimmy Cao wrote: Wrong reference 27-Jun-10 Add references to: "PresentationCore" and "PresentationFramework" for the System.Windows and System.Windows.Con

Re: os.system: string encoding

2010-06-27 Thread Martin v. Loewis
Am 25.06.2010 17:13, schrieb Peter Kleiweg: > How do I set the string encoding for os.system to anything other then UTF-8? You shouldn't have to set it, as it should use your locale's encoding. In 3.1.2, it will. For the moment, you can encode the string explicitly, and pass a byte string. Regar

Re: I strongly dislike Python 3

2010-06-27 Thread Martin v. Loewis
> I agree that there may be not much reason to port custom proprietary > apps that are working fine and which would hardly benefit from, let > alone need, and new Py3 features. In the long run, there will be a benefit: at some point in the future (surely years from now), /usr/bin/python will be Py

Re: Why Is Escaping Data Considered So Magical?

2010-06-27 Thread Jorgen Grahn
On Fri, 2010-06-25, Nobody wrote: > On Fri, 25 Jun 2010 12:15:08 +, Jorgen Grahn wrote: > >> I don't do SQL and I don't even understand the terminology properly >> ... but the discussion around it bothers me. >> >> Do those people really do this? > > Yes. And then some. > > Among web developer

Re: os.system: string encoding

2010-06-27 Thread Peter Kleiweg
Martin v. Loewis schreef op de 27e dag van de zomermaand van het jaar 2010: > Am 25.06.2010 17:13, schrieb Peter Kleiweg: > > How do I set the string encoding for os.system to anything other then UTF-8? > > You shouldn't have to set it, as it should use your locale's encoding. > In 3.1.2, it will

Re: Where is StackPanel in IronPython / .Net 4?

2010-06-27 Thread Ian
Hi Benjamin - and thanks for your reply. I'm now really confused. On 27/06/2010 20:05, Benjamin Kaplan wrote: You don't add references to namespaces. You add references to assemblies and you then you import the namespace. > From the documentation: ''' Namespace: System.Windows.Controls Assemb

Re: Why Is Escaping Data Considered So Magical?

2010-06-27 Thread Jorgen Grahn
On Sun, 2010-06-27, Lawrence D'Oliveiro wrote: > In message , Roy Smith wrote: > >> I recently fixed a bug in some production code. The programmer was >> careful to use snprintf() to avoid buffer overflows. The only problem >> is, he wrote something along the lines of: >> >> snprintf(buf, strlen

Scan until random delimiter.

2010-06-27 Thread Laurent Verweijen
In contrast to java or c python seems not be able to use a random delimiter. In java, you can do: Code: import java.util.Scanner Scanner sc = new Scanner(System.in).useSeperator(" ") int a = sc.nextInt() But in python there seems to be no other option then waiting until you see a newline. I

Re: os.system: string encoding

2010-06-27 Thread Martin v. Loewis
>> For the moment, you can encode the string explicitly, and pass a byte >> string. > > That doesn't work I only have 3.1.2 to test at the moment. I suggest trying to use the subprocess module instead. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Scan until random delimiter.

2010-06-27 Thread Albert Hopkins
On Sun, 2010-06-27 at 22:41 +0200, Laurent Verweijen wrote: > In contrast to java or c python seems not be able to use a random > delimiter. > > In java, you can do: > > > Code: > > import java.util.Scanner > > Scanner sc = new Scanner(System.in).useSeperator(" ") > int a = sc.nextInt() > >

Re: A link to a collection of tutorials on LISP.

2010-06-27 Thread Öö Tiib
On 28 juuni, 00:12, nanothermite911fbibustards wrote: > On Jun 27, 1:33 pm, Peter Keller  wrote: > > > nanothermite911fbibustards wrote: > > > A single bound pdf document of all the tutorial slides in one SINGLE > > > pdf with bookmarks and plain white background would be of some worth > > > but

refactoring a group of import statements

2010-06-27 Thread GrayShark
I have a large list of package files to import. I'm using a try/except test to verify the import. Looks like: try: import abc except ImportError: print( "Error importing abc" ) I've got many of those segments. I want to try and refactor this part of the code. Trying: f

Why are String Formatted Queries Considered So Magical?

2010-06-27 Thread Carl Banks
On Jun 24, 6:02 pm, Roy Smith wrote: > In article , >  Lawrence D'Oliveiro wrote: > > > I construct ad-hoc queries all the time. It really isn’t that hard to do > > safely. All you have to do is read the documentation > > I get worried when people talk about how easy it is to do something > safel

Re: refactoring a group of import statements

2010-06-27 Thread Thomas Jollans
On 06/28/2010 12:06 AM, GrayShark wrote: > I have a large list of package files to import. I'm using a try/except > test to verify the import. Looks like: > > try: > import abc > except ImportError: > print( "Error importing abc" ) > > I've got many of those segments. I want to try a

Re: Why are String Formatted Queries Considered So Magical?

2010-06-27 Thread Roy Smith
In article <14e44c9c-04d9-452d-b544-498adfaf7...@d8g2000yqf.googlegroups.com>, Carl Banks wrote: > Seriously, almost every other kind of library uses a binary API. What > makes databases so special that they need a string-command based API? > How about this instead (where this a direct binary i

Re: refactoring a group of import statements

2010-06-27 Thread rantingrick
On Jun 27, 5:18 pm, Thomas Jollans wrote: > On 06/28/2010 12:06 AM, GrayShark wrote: > > I have a large list of package files to import. I'm using a try/except > > test to verify the import. Looks like: > (1) Don't. If you need the module, there's no reason to check for > exceptions. Just let t

Re: I strongly dislike Python 3

2010-06-27 Thread eric_dex...@msn.com
On Jun 27, 2:09 pm, "Martin v. Loewis" wrote: > > I agree that there may be not much reason to port custom proprietary > > apps that are working fine and which would hardly benefit from, let > > alone need, and new Py3 features. > > In the long run, there will be a benefit: at some point in the fu

Re: refactoring a group of import statements

2010-06-27 Thread Thomas Jollans
On 06/28/2010 12:48 AM, rantingrick wrote: > On Jun 27, 5:18 pm, Thomas Jollans wrote: >> On 06/28/2010 12:06 AM, GrayShark wrote: >>> I have a large list of package files to import. I'm using a try/except >>> test to verify the import. Looks like: > > > >> (1) Don't. If you need the module, th

Re: I strongly dislike Python 3

2010-06-27 Thread Benjamin Kaplan
On Sun, Jun 27, 2010 at 4:03 PM, eric_dex...@msn.com wrote: > On Jun 27, 2:09 pm, "Martin v. Loewis" wrote: >> > I agree that there may be not much reason to port custom proprietary >> > apps that are working fine and which would hardly benefit from, let >> > alone need, and new Py3 features. >>

problems getting os.system and wxmenu to read options from a file and then execute

2010-06-27 Thread eric_dex...@msn.com
I managed to get the program running and the menu options are appearing on the list but the programs are not running. I suspect it is my onexecutemethod # Get the GUI stuff import wx # We're going to be handling files and directories import os menufile = open('menufile.txt','r') # Set up some b

Re: I strongly dislike Python 3

2010-06-27 Thread Stephen Hansen
On 6/27/10 4:03 PM, eric_dex...@msn.com wrote: On Jun 27, 2:09 pm, "Martin v. Loewis" wrote: The same happened with other kinds of deprecations and removals through the life of 2.x. Some applications where tied to a specific Python release, or to a specific feature that had been deprecated. The

Re: A link to a collection of tutorials on LISP.

2010-06-27 Thread nanothermite911fbibustards
On Jun 27, 2:33 pm, Peter Keller wrote: > nanothermite911fbibustards wrote: > > That guys intention is not to spread tutorial, but its a commercial. I > > clarified its true nature. > > Fair enough. > > > Your ilk has special skill in turning white into black and vice-versa. > > Assuming much the

Re: A link to a collection of tutorials on LISP.

2010-06-27 Thread nanothermite911fbibustards
On Jun 27, 4:20 pm, nanothermite911fbibustards wrote: > On Jun 27, 2:33 pm, Peter Keller wrote: > > > nanothermite911fbibustards wrote: > > > That guys intention is not to spread tutorial, but its a commercial. I > > > clarified its true nature. > > > Fair enough. > > > > Your ilk has special sk

dynamically modify help text

2010-06-27 Thread Brian Blais
Hello, I know that the help text for an object will give a description of every method based on the doc string. Is there a way to add something to this text, specific to an object, but generated at run- time? I have an object that reads a file, and I would like part of that file to be sh

Re: A link to a collection of tutorials on LISP.

2010-06-27 Thread Peter Keller
In comp.lang.lisp nanothermite911fbibustards wrote: > TROLL is that mythical creature who is looking for gold ? Nope, they are the ones that jump out from under bridges and scare little children cause they feel bad about themselves and need someone else to feel powerful over. I hope you get be

Re: Why are String Formatted Queries Considered So Magical?

2010-06-27 Thread Ben Finney
Carl Banks writes: > Seriously, almost every other kind of library uses a binary API. Except for the huge number that deal with text protocols or languages. > What makes databases so special that they need a string-command based > API? Because SQL is a text language. -- \ “In t

Re: I strongly dislike Python 3

2010-06-27 Thread Tim Roberts
Stefan Reich wrote: > >Consider Java as a better example: JDK 1.6 still runs and compiles >everything written for JDK 1.0. That is proper management. And Python has the same management. Python 2.6 still runs and compiles everything written for Python 2.0. If there is ever a JDK 2.0, I'll wager

Re: problems getting os.system and wxmenu to read options from a file and then execute

2010-06-27 Thread MRAB
eric_dex...@msn.com wrote: I managed to get the program running and the menu options are appearing on the list but the programs are not running. I suspect it is my onexecutemethod [snip] #add execute files from the text file list idtool = 400 for e in menuoptions:

Re: refactoring a group of import statements

2010-06-27 Thread rantingrick
On Jun 27, 6:09 pm, Thomas Jollans wrote: > > import Tkinter as tk > > try: > >     import Image #from PIL > >     print 'Using high quality images :)' > > except ImportError: > >     print 'Using low quality images :(' > > As such, that still appears rather useless - the following code doesn't >

Re: A link to a collection of tutorials on LISP.

2010-06-27 Thread nanothermite911fbibustards
On Jun 27, 4:26 pm, Peter Keller wrote: > In comp.lang.lisp nanothermite911fbibustards > wrote: > > > TROLL is that mythical creature who is looking for gold ? > > Nope, they are the ones that jump out from under bridges and scare little > children cause they feel bad about themselves and need s

Why Python3

2010-06-27 Thread Terry Reedy
Some people appear to not understand the purpose of Python3 or more specifically, of the changes that break Python2 code. I attempt here to give a relatively full explanation. SUMMARY: Python3 completes (or makes progress in) several transitions begun in Python2. In particular, Python3 bunch

Re: I strongly dislike Python 3

2010-06-27 Thread Grant Edwards
On 2010-06-27, Benjamin Kaplan wrote: >> It should be easier to have a large number of python versions on one >> machine... ?I am realy fond of 2.5 so I am probily going to start >> compiling them or just include the python2.5 exe if I port stuff and >> settle it that way.. > > You're on the only

Re: Why Python3

2010-06-27 Thread MRAB
Terry Reedy wrote: Some people appear to not understand the purpose of Python3 or more specifically, of the changes that break Python2 code. I attempt here to give a relatively full explanation. SUMMARY: Python3 completes (or makes progress in) several transitions begun in Python2. In parti

Re: I strongly dislike Python 3

2010-06-27 Thread geremy condra
On Sun, Jun 27, 2010 at 8:50 PM, Grant Edwards wrote: > On 2010-06-27, Benjamin Kaplan wrote: > >>> It should be easier to have a large number of python versions on one >>> machine... ?I am realy fond of 2.5 so I am probily going to start >>> compiling them or just include the python2.5 exe if I

Re: python source code -> win/dos executable (on linux)

2010-06-27 Thread Lawrence D'Oliveiro
In message <4c24c152$0$31381$4fafb...@reader1.news.tin.it>, superpollo wrote: > suppose i work in a linux environment, but i would like to ship a > win/dos executable file from time to time, just for test purposes (my > "testers" are windows users and don't want to go through the hassle of > inst

Re: Why Python3

2010-06-27 Thread Stephen Hansen
On 6/27/10 6:09 PM, MRAB wrote: Terry Reedy wrote: Another would have been to add but never remove anthing, with the consequence that Python would become increasingly difficult to learn and the interpreter increasingly difficult to maintain with volunteers. I think 2.7 is far enough in that dire

Re: I strongly dislike Python 3

2010-06-27 Thread Stephen Hansen
On 6/27/10 6:11 PM, geremy condra wrote: On Sun, Jun 27, 2010 at 8:50 PM, Grant Edwards wrote: If you install a real shell on Windows, then the hash-bang line works fine. :) Might as well spare yourself the trouble and install linux or *bsd. It's probably easier. Not at all, bash via msys i

Re: I strongly dislike Python 3

2010-06-27 Thread John Bokma
geremy condra writes: > On Sun, Jun 27, 2010 at 8:50 PM, Grant Edwards > wrote: >> On 2010-06-27, Benjamin Kaplan wrote: >> It should be easier to have a large number of python versions on one machine... ?I am realy fond of 2.5 so I am probily going to start compiling them or ju

Re: I strongly dislike Python 3

2010-06-27 Thread Grant Edwards
On 2010-06-28, geremy condra wrote: > On Sun, Jun 27, 2010 at 8:50 PM, Grant Edwards > wrote: >> On 2010-06-27, Benjamin Kaplan wrote: >> It should be easier to have a large number of python versions on one machine... ?I am realy fond of 2.5 so I am probily going to start compili

Re: python source code -> win/dos executable (on linux)

2010-06-27 Thread Grant Edwards
On 2010-06-28, Lawrence D'Oliveiro wrote: > In message <4c24c152$0$31381$4fafb...@reader1.news.tin.it>, superpollo > wrote: > >> suppose i work in a linux environment, but i would like to ship a >> win/dos executable file from time to time, just for test purposes (my >> "testers" are windows user

Re: problems getting os.system and wxmenu to read options from a file and then execute

2010-06-27 Thread eric dexter
On Jun 27, 5:56 pm, MRAB wrote: > eric_dex...@msn.com wrote: > > I managed to get the program running and the menu options are > > appearing on the list but the programs are not running.  I suspect it > > is my onexecutemethod > > [snip] > > >         #add execute files from the text file list > >

Re: Why Python3

2010-06-27 Thread MRAB
Stephen Hansen wrote: On 6/27/10 6:09 PM, MRAB wrote: Terry Reedy wrote: Another would have been to add but never remove anthing, with the consequence that Python would become increasingly difficult to learn and the interpreter increasingly difficult to maintain with volunteers. I think 2.7 is

Re: Why Is Escaping Data Considered So Magical?

2010-06-27 Thread Owen Jacobson
On 2010-06-26 22:33:57 -0400, Lawrence D'Oliveiro said: In message <2010062522560231540-angrybald...@gmailcom>, Owen Jacobson wrote: It's not hard. It's just begging for a visit from the fuckup fairy. That’s the same fallacious argument I pointed out earlier. In the sense that "using corre

Re: Why Python3

2010-06-27 Thread eric dexter
On Jun 27, 7:46 pm, MRAB wrote: > Stephen Hansen wrote: > > On 6/27/10 6:09 PM, MRAB wrote: > >> Terry Reedy wrote: > >>> Another would have been to add but never remove anthing, with the > >>> consequence that Python would become increasingly difficult to learn > >>> and the interpreter increasin

Re: python source code -> win/dos executable (on linux)

2010-06-27 Thread David Robinow
On Sun, Jun 27, 2010 at 9:16 PM, Lawrence D'Oliveiro wrote: > In message <4c24c152$0$31381$4fafb...@reader1.news.tin.it>, superpollo > wrote: > >> suppose i work in a linux environment, but i would like to ship a >> win/dos executable file from time to time, just for test purposes (my >> "testers"

Need instruction on how to use isinstance

2010-06-27 Thread Steven W. Orr
I need to test an argument for a few different types. I'm calling my function like this arf = MyFunc(list) What I want to do is to test for whether something is a string, tuple, list or function. It's that last one that's causing me a problem. if isinstance(arg, (str, tuple, list)): No problem

Re: I strongly dislike Python 3

2010-06-27 Thread Ben Finney
Terry Reedy writes: > On 6/27/2010 8:41 AM, David Cournapeau wrote: > > I think one point which needs to be emphasized more is what does > > python 3 bring to people. […] > Python3 is about finishing transitions. The last stage in a transition > that replaces something old with something new is

Re: Why Python3

2010-06-27 Thread Benjamin Kaplan
On Sun, Jun 27, 2010 at 6:51 PM, eric dexter wrote: > On Jun 27, 7:46 pm, MRAB wrote: >> Stephen Hansen wrote: >> > On 6/27/10 6:09 PM, MRAB wrote: >> >> Terry Reedy wrote: >> >>> Another would have been to add but never remove anthing, with the >> >>> consequence that Python would become increas

Re: I strongly dislike Python 3

2010-06-27 Thread geremy condra
On Sun, Jun 27, 2010 at 9:25 PM, John Bokma wrote: > geremy condra writes: > >> On Sun, Jun 27, 2010 at 8:50 PM, Grant Edwards >> wrote: >>> On 2010-06-27, Benjamin Kaplan wrote: >>> > It should be easier to have a large number of python versions on one > machine... ?I am realy fond of

Re: problems getting os.system and wxmenu to read options from a file and then execute

2010-06-27 Thread MRAB
eric dexter wrote: On Jun 27, 5:56 pm, MRAB wrote: eric_dex...@msn.com wrote: I managed to get the program running and the menu options are appearing on the list but the programs are not running. I suspect it is my onexecutemethod [snip] #add execute files from the text file list

Re: Why Python3

2010-06-27 Thread geremy condra
On Sun, Jun 27, 2010 at 9:46 PM, MRAB wrote: > Stephen Hansen wrote: >> >> On 6/27/10 6:09 PM, MRAB wrote: >>> >>> Terry Reedy wrote: Another would have been to add but never remove anthing, with the consequence that Python would become increasingly difficult to learn and the i

Re: Need instruction on how to use isinstance

2010-06-27 Thread Stephen Hansen
On 6/27/10 7:09 PM, Steven W. Orr wrote: So, my question is, what value can I use as the 2nd arg to isinstance to see if foo is a function? And while I'm on the subject, what types does isinstance not support? Does it have to be a function? -- There's quite a few things which are function-y en

Re: Need instruction on how to use isinstance

2010-06-27 Thread MRAB
Steven W. Orr wrote: I need to test an argument for a few different types. I'm calling my function like this arf = MyFunc(list) What I want to do is to test for whether something is a string, tuple, list or function. It's that last one that's causing me a problem. if isinstance(arg, (str, tup

Re: I strongly dislike Python 3

2010-06-27 Thread John Bokma
geremy condra writes: > On Sun, Jun 27, 2010 at 9:25 PM, John Bokma wrote: >> geremy condra writes: >> >>> On Sun, Jun 27, 2010 at 8:50 PM, Grant Edwards >>> wrote: On 2010-06-27, Benjamin Kaplan wrote: >> It should be easier to have a large number of python versions on one >>>

Re: dynamically modify help text

2010-06-27 Thread Red Forks
Read you doc file and set the __doc__ attr of the object you want to change. On Monday, June 28, 2010, Brian Blais wrote: > Hello, > > I know that the help text for an object will give a description of every > method based on the doc string.  Is there a way to add something to this > text, spec

Re: Why are String Formatted Queries Considered So Magical?

2010-06-27 Thread Carl Banks
On Jun 27, 4:35 pm, Ben Finney wrote: > Carl Banks writes: > > Seriously, almost every other kind of library uses a binary API. > > Except for the huge number that deal with text protocols or languages. No, not really. Almost all types of libraries have binary APIs, including those that deal wi

Re: I strongly dislike Python 3

2010-06-27 Thread Stephen Hansen
On 6/27/10 7:35 PM, John Bokma wrote: On top of that, I don't think it's that hard to make a small program that one associates with .py files which checks the first line and feeds the .py to the correct version of Python based on the information in the aformentioned first line. http://effbot.or

Re: Why are String Formatted Queries Considered So Magical?

2010-06-27 Thread Carl Banks
On Jun 27, 3:20 pm, Roy Smith wrote: > In article > <14e44c9c-04d9-452d-b544-498adfaf7...@d8g2000yqf.googlegroups.com>, >  Carl Banks wrote: > > > > > Seriously, almost every other kind of library uses a binary API. What > > makes databases so special that they need a string-command based API? >

Re: I strongly dislike Python 3

2010-06-27 Thread Paul Rubin
Terry Reedy writes: > Python3 is about finishing transitions. The last stage in a transition > that replaces something old with something new is to remove the old,.. Main problem is that by the time Python3 has stopped being disruptive, Python4 will be underway. Python3 is incompatible enough wi

Re: Need instruction on how to use isinstance

2010-06-27 Thread Steven W. Orr
On 6/27/2010 10:25 PM, Stephen Hansen wrote: > On 6/27/10 7:09 PM, Steven W. Orr wrote: >> So, my question is, what value can I use as the 2nd arg to isinstance >> to see if >> foo is a function? And while I'm on the subject, what types does >> isinstance not >> support? > > Does it have to be a f

  1   2   >