Re: Python is slow

2008-12-14 Thread Benjamin Kaplan
On Sun, Dec 14, 2008 at 11:38 PM, cm_gui wrote: > > hahaha, do you know how much money they are spending on hardware to > make > youtube.com fast??? Obviously not enough to get to the point where it's cheaper to have the programmers write C code. And the hardware is more for handling the intens

Re: Having Issues with CMD and the 'python' command

2008-12-15 Thread Benjamin Kaplan
On Mon, Dec 15, 2008 at 8:13 AM, wrote: > On Mon, 15 Dec 2008 at 23:01, James Mills wrote: > >> On Mon, Dec 15, 2008 at 10:51 PM, Lamonte Harris >> wrote: >> >>> Every time I start cmd on windows it requires me to "set >>> path=%path%;C:\python26" why? I'm getting annoyed... >>> >> >> "cmd" has

Re: Factoring Polynomials

2008-12-18 Thread Benjamin Kaplan
On Thu, Dec 18, 2008 at 7:59 PM, Collin D wrote: > On Dec 18, 4:41 pm, "James Mills" > wrote: > > On Fri, Dec 19, 2008 at 10:11 AM, Gabriel Genellina > > > > wrote: > > > En Thu, 18 Dec 2008 17:37:35 -0200, escribió: > > > > >> I am trying to write a simple application to factor polynomials. I

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Benjamin Kaplan
On Fri, Dec 19, 2008 at 12:53 PM, Thomas Heller wrote: > Steve Holden schrieb: > > Thomas Heller wrote: > >> Question from a non-native english speaker: is this now valid english? > >> > >> "One of Python's great strengths" > >> ^ > >> "and also teaches Python's functional pro

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Benjamin Kaplan
On Sun, Dec 21, 2008 at 2:26 PM, r wrote: > I noticed when i mentioned "self" nobody wants to touch that subject. > There could be many reasons why... > > 0.) nobody but the 10 regulars i see here exists if you only see 10 people, you must not be following this list very well. > > 1.) nobody

Re: wxpython for python 3.0 ?

2008-12-21 Thread Benjamin Kaplan
On Sun, Dec 21, 2008 at 4:42 PM, wrote: > The wxpython web describes compatability with python 2.4 & 2.5 . > Does it work with 3.0 ? If not, anyone have a clue as to when ? This question was asked a couple of times on the wxpython-users mailing list. It's probably going to take a while. For n

Re: SuSE11.1 eclipse 64 pydev can't add python path

2008-12-23 Thread Benjamin Kaplan
On Tue, Dec 23, 2008 at 7:49 AM, Reimar Bauer wrote: > Hi > > I can install pydev using the update manager in eclipse for 64 bit from the > SuSE 11.1 repo. But I can't configure pydev without crashing it. > I can select the interpreter /usr/bin/python > and I do see the System PYTHONPATH > Forced

Re: Python's popularity

2008-12-23 Thread Benjamin Kaplan
On Tue, Dec 23, 2008 at 12:05 AM, r wrote: > On Dec 22, 10:09 pm, Ben Kaplan wrote: > > That's just because most of us don't say anything unless we have > > something useful to say. We prefer to let the experts answer the > > questions, but we read the threads so we can benefit from them. > > OK

Re: SuSE11.1 eclipse 64 pydev can't add python path

2008-12-23 Thread Benjamin Kaplan
On Tue, Dec 23, 2008 at 5:08 PM, Nikolas Tautenhahn wrote: > Hi, > > Reimar Bauer wrote: > > I can install pydev using the update manager in eclipse for 64 bit from > the > > SuSE 11.1 repo. But I can't configure pydev without crashing it. > > I can select the interpreter /usr/bin/python > > and

Re: multiply each element of a list by a number

2008-12-26 Thread Benjamin Kaplan
On Fri, Dec 26, 2008 at 7:05 PM, wrote: > > What does *not* work is > 3 * [0,1,2] > As you know, this gives > [0,1,2,0,1,2,0,1,2] > What I am hoping for is > [0,3,6] > I see that I can use > numpy.multiply(3,range(3)) > but this seems overkill to me. Can you tell

Re: Creating an application for Linux

2008-12-31 Thread Benjamin Kaplan
On Wed, Dec 31, 2008 at 4:06 PM, Mike Driscoll wrote: > Hi, > > My boss wants me to port one of my applications to Ubuntu. I > successfully ported it without too many headaches but now I need a way > to distribute it to people that may or may not already have the > dependencies my application req

Re: type conversion

2008-12-31 Thread Benjamin Kaplan
On Wed, Dec 31, 2008 at 5:26 PM, Steven D'Aprano < st...@remove-this-cybersource.com.au> wrote: > On Wed, 31 Dec 2008 12:35:20 -0800, Hamish McKenzie wrote: > > > sometimes I want to be able to initialize an instance with a variety of > > different data types. > > Type conversion is a bit of a mis

Re: Why not Ruby?

2009-01-01 Thread Benjamin Kaplan
On Thu, Jan 1, 2009 at 5:28 PM, Richard Riley wrote: > Jason Rumney writes: > > > On Jan 1, 3:12 pm, r wrote: > > > >> The man lives in a world driven by common sense > > > > "Common" sense suggests that his views are shared among the general > > populace. I don't see much evidence of that in t

Re: If your were going to program a game...

2009-01-01 Thread Benjamin Kaplan
On Thu, Jan 1, 2009 at 3:24 PM, excord80 wrote: > On Jan 1, 2:37 pm, Kay Schluehr wrote: > > > There is no solution to this problem from a Python perspective. Do > > what everyone does right now: [snip] > > It still surprises me that no one has implemented the solution for > this yet. > > Maybe

Re: Noob question: Is all this typecasting normal?

2009-01-02 Thread Benjamin Kaplan
On Fri, Jan 2, 2009 at 4:15 PM, sprad wrote: > I've done a good bit of Perl, but I'm new to Python. > > I find myself doing a lot of typecasting (or whatever this thing I'm > about to show you is called), and I'm wondering if it's normal, or if > I'm missing an important idiom. > > For example: >

Re: some question about python2.6 and python3k

2009-01-04 Thread Benjamin Kaplan
On Sun, Jan 4, 2009 at 12:14 PM, Michael Yang wrote: > Hi,guys > > i am a new guy for python world,i have some question want to ask > > 1.should i learn about python2.6 or python3k?i heard of it has some > difference from them > If you don't have to worry about external libraries, you should prob

Re: python is great

2009-01-06 Thread Benjamin Kaplan
On Tue, Jan 6, 2009 at 3:24 PM, Joe Strout wrote: > M.-A. Lemburg wrote: > > On the Mac in particular, if you want >>> your app to run on any PowerPC or Intel machine runing 10.4 or later, >>> and you're using anything not in the standard framework (such as >>> MySQLdb), it's a bit of a nightmar

Re: del behavior

2009-01-07 Thread Benjamin Kaplan
On Wed, Jan 7, 2009 at 2:39 PM, Eric Snow wrote: > I was reading in the documentation about __del__ and have a couple of > questions. Here is what I was looking at: > > http://docs.python.org/reference/datamodel.html#object.__del__ > > What is globals referring to in the following text from that

Re: State of the art: Tkinter, Tk 8.5, Tix?

2009-01-07 Thread Benjamin Kaplan
On Wed, Jan 7, 2009 at 2:31 PM, excord80 wrote: > Does Python work with Tk 8.5? I'm manually installing my own Python > 2.6.1 (separate from my system's Python 2.5.2), and am about to > install my own Tcl/Tk 8.5 but am unsure how to make them talk to > eachother. Should I install Tk first? If I p

Re: why cannot assign to function call

2009-01-07 Thread Benjamin Kaplan
On Wed, Jan 7, 2009 at 7:22 PM, Terry Reedy wrote: > Joe Strout wrote: > > That's not necessarily true. If you have >> >> a = "par" + "rot" >> b = "parrot" >> >> then, most likely (though it depends on how clever the compiler >> optimizations are), there are two different string objects conta

Re: Work with Open Office

2009-01-08 Thread Benjamin Kaplan
On Thu, Jan 8, 2009 at 10:07 AM, Dan Esch wrote: > Okay, I'm currently stuck with VBA / Excel in work and the following > paradigm: > > VB (6? .NET? not sure) ==> VBA ==> Excel 2003 and Access > > Where I'd like to be is this > > Python ==> X ==> Open Office / (MySQL or other) for some sufficie

Re: string split

2009-01-09 Thread Benjamin Kaplan
On Fri, Jan 9, 2009 at 3:26 PM, Leland wrote: > Hi, > > I have some formatted strings that I'd like to split and get the > meaningful data, here is the example of the string format. The big > difference of these two line are the second double quote set at the > second line > 100-01001-001,"Diode,

Re: In Python 2.6, bytes is str

2008-10-06 Thread Benjamin Kaplan
On Mon, Oct 6, 2008 at 1:30 AM, Bryan Olson <[EMAIL PROTECTED]> wrote: > > > In Python 2.6, the name 'bytes' is defined, and bound to str. The 2.6 > assignment presents some pitfalls. Be aware. > > Consider constructing a bytes object as: > >b = bytes([68, 255, 0]) > > In Python 3.x, len(b) wi

Re: How to setup pythonpath in Ubuntu8.04

2008-10-06 Thread Benjamin Kaplan
On Mon, Oct 6, 2008 at 10:37 PM, Steve <[EMAIL PROTECTED]> wrote: > Ubuntu8.04 wrapped python25 and set python25 as default python path in > the shell.Now I want upgrade to python26,how I set up python26 as > default python path?Thanks a lot! > -- What do you mean by that? "Python path" usually

Re: equivalent of py2exe in other os

2008-10-07 Thread Benjamin Kaplan
On Tue, Oct 7, 2008 at 6:43 AM, Almar Klein <[EMAIL PROTECTED]> wrote: > Hi, > I was going to say "try google", but it seems quite hard to find indeed. > Use "freeze" for linux and "py2app" for osx. > > I know of a program called gui2exe which is a gui which uses the three > to compile executables

Re: equivalent of py2exe in other os

2008-10-07 Thread Benjamin Kaplan
I believe that all (or nearly all) Unix variants come with Python preinstalled. Ubuntu, at least, has a lot of system programs written in Python. Even Mac OS X requires Python. On Tue, Oct 7, 2008 at 7:43 AM, Astan Chee <[EMAIL PROTECTED]> wrote: > Hi, > Thanks for the replies. I forgot to add t

Re: equivalent of py2exe in other os

2008-10-07 Thread Benjamin Kaplan
On Tue, Oct 7, 2008 at 10:58 AM, Joe Strout <[EMAIL PROTECTED]> wrote: > On Oct 7, 2008, at 8:43 AM, Benjamin Kaplan wrote: > > I believe that all (or nearly all) Unix variants come with Python >> preinstalled. Ubuntu, at least, has a lot of system programs written in >

Re: Pylab Fails with Runtime Error on Win XP Under Python 2.4

2008-10-12 Thread Benjamin Kaplan
On Sun, Oct 12, 2008 at 3:56 PM, W. eWatson <[EMAIL PROTECTED]> wrote: > > Thanks. > > Oddly when I use cmd, it gets me to settings and docs. If I try c:\whatever > I get a msg, and it remains in the same folder. > Are you just typing "C:\whatever" or did you type in "chdir C:\whatever"? -- http

Re: Upgrading from 2.5 to 2.6

2008-10-12 Thread Benjamin Kaplan
On Sun, Oct 12, 2008 at 6:16 PM, Daniel Klein <[EMAIL PROTECTED]>wrote: > Are there any guidelines for upgrading from 2.5 to 2.6? > > Do you have to uninstall 2.5, or does the installer do that for you? > > I have wxPython, mod_python and Django installed. Will these have to > reinstalled/reconfig

Re: docpicture

2008-10-13 Thread Benjamin Kaplan
On Mon, Oct 13, 2008 at 1:43 PM, <[EMAIL PROTECTED]> wrote: > >Steven> I can't imagine Python having direct syntactic support for it, >Steven> but I don't see any reason why the standard library couldn't >Steven> some day grow a "docpicture" module, complete with a tiny (?) >Steven

Re: docpicture

2008-10-13 Thread Benjamin Kaplan
On Mon, Oct 13, 2008 at 2:48 PM, Joe Strout <[EMAIL PROTECTED]> wrote: > On Oct 13, 2008, at 12:09 PM, Benjamin Kaplan wrote: > > Heck, if you go to the point of including a docpicture module, might as >> well >> just support the feature in IDLE... Other IDEs

Re: Selecting random elements from a list.

2008-10-13 Thread Benjamin Kaplan
On Mon, Oct 13, 2008 at 5:29 PM, aditya shukla <[EMAIL PROTECTED]>wrote: > Hello folks, > > i have a list say list1=[a,b,c,...z] ie 26 elements i have to take 5 > elements from it randomly and save in another list.Please explain how to do > this? > > > Aditya > http://docs.python.org/library/ran

Re: Trying to install module, No module named scipy_distutils.core (but i have scipy)

2008-10-16 Thread Benjamin Kaplan
On Thu, Oct 16, 2008 at 8:28 PM, process <[EMAIL PROTECTED]> wrote: > trying to install PyKF-0.1 (Kalman Filters) > http://pykf.sourceforge.net/ > > > > I have Numpy, Scipy, Matplotlib installed an have successfully > installed other packages using them. > > > $ setup.py > Traceback (most recent c

Re: Finding the instance reference of an object

2008-10-17 Thread Benjamin Kaplan
On Fri, Oct 17, 2008 at 3:03 PM, Aaron Castironpi Brady < [EMAIL PROTECTED]> wrote: > On Oct 17, 10:56 am, Joe Strout <[EMAIL PROTECTED]> wrote: > > On Oct 16, 2008, at 11:23 PM, Dennis Lee Bieber wrote: > snip > > >But, it seems, you are the only one arguing that "the semantics are > > > all

Re: a question about Chinese characters in a Python Program

2008-10-20 Thread Benjamin Kaplan
On Mon, Oct 20, 2008 at 12:44 PM, est <[EMAIL PROTECTED]> wrote: > On Oct 20, 11:46 pm, Steven D'Aprano <[EMAIL PROTECTED] > cybersource.com.au> wrote: > > On Mon, 20 Oct 2008 06:30:09 -0700, est wrote: > > > Like I said, str() should NOT throw an exception BY DESIGN, it's a > basic > > > language

Re: csv.reader problem tab-delimiter - newbie

2008-10-21 Thread Benjamin Kaplan
On Tue, Oct 21, 2008 at 12:26 PM, <[EMAIL PROTECTED]> wrote: > Hi all, > > I use python 2.5 and want to read in a simple 5-columned, tab- > delimited ascii file "dummy.txt" such as as > > 1 23.04 5.6 > 4 677 8.2 19 > > I do > > import csv > asciireader = csv.reader(open('dum

Re: Developing for Python (2.x or 3)?

2008-10-21 Thread Benjamin Kaplan
On Tue, Oct 21, 2008 at 1:20 PM, Paulo J. Matos <[EMAIL PROTECTED]> wrote: > Hi all, > > I am in the process of choosing which Python version for a brand new > application. Van Rossum in an interview recently advised all new > applications to use Python3 but I am afraid, most libraries (PyGtk, > P

Re: p2exe for python 2.6

2008-10-22 Thread Benjamin Kaplan
On Wed, Oct 22, 2008 at 2:43 PM, Stefaan Himpe <[EMAIL PROTECTED]>wrote: > How can convert my python script in exe for the python version 2.6? >> > > You must use a standalone executable builder like >* py2exe (Windows) >* py2app (Mac OS) >* PyInstaller (all platforms) >* cx_Freeze

Re: Python Script Bug

2008-10-23 Thread Benjamin Kaplan
On Thu, Oct 23, 2008 at 2:54 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>wrote: > Hello everyone, > I would like to know what isn't good in my script. > #!/usr/bin/python > # -*- coding: iso-8859-15 -*- > from time import strftime > import datetime > t = input(datetime.date) > global t > print t.strf

Re: Limit between 0 and 100

2008-10-25 Thread Benjamin Kaplan
On Sat, Oct 25, 2008 at 4:42 PM, <[EMAIL PROTECTED]> wrote: > Hi. I'm very new to Python, and so this is probably a pretty basic > question, but I'm lost. I am looking to limit a float value to a > number between 0 and 100 (the input is a percentage). > > I currently have: > > integer = int() > ru

Re: SendKeys-0.3.win32-py2.1.exe

2008-10-25 Thread Benjamin Kaplan
On Sat, Oct 25, 2008 at 5:33 PM, Jesse <[EMAIL PROTECTED]> wrote: > cant seem to install this, using python 2.6, any known errors that > wont let me select the python installation to use, just opens a blank > dialog and wont let me continue..do i need to downgrade python?? > > thanks in advance >

Re: Improving interpreter startup speed

2008-10-26 Thread Benjamin Kaplan
On Sun, Oct 26, 2008 at 1:45 PM, BJörn Lindqvist <[EMAIL PROTECTED]> wrote: > 2008/10/26 James Mills <[EMAIL PROTECTED]>: > > On Sun, Oct 26, 2008 at 11:23 AM, BJörn Lindqvist <[EMAIL PROTECTED]> > wrote: > >> How are you getting those numbers? 330 μs is still pretty fast, isn't > >> it? :) Most d

Re: Converting a time string to a more readable date, time

2008-10-27 Thread Benjamin Kaplan
On Mon, Oct 27, 2008 at 4:45 PM, Thierry Lam <[EMAIL PROTECTED]> wrote: > I have a python time string which has the following value: > > 1225137896 > > The above corresponds to 2008/10/27 16:04:56 > > What can I use to convert 1225137896 to a more readable date, time > format? > -- >>> from date

Re: Default Argument Question

2008-10-29 Thread Benjamin Kaplan
On Wed, Oct 29, 2008 at 12:44 PM, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Chris Rebert a écrit : > (snip) > >> Note that the "accumulation" behavior of lists is considered an >> aberration >> > > By who ? > All the python newbies who don't read the tutorial and get tripped up by this.

Re: Parse each line by character location

2008-11-04 Thread Benjamin Kaplan
On Tue, Nov 4, 2008 at 11:45 AM, Tyler <[EMAIL PROTECTED]> wrote: > Hello All: > > I hope this is the right place to ask, but I am trying to come up with > a way to parse each line of a file. Unfortunately, the file is neither > comma, nor tab, nor space delimited. Rather, the character locations

Re: Building loop with some exceptions?

2008-11-04 Thread Benjamin Kaplan
On Tue, Nov 4, 2008 at 2:26 PM, Gilles Ganault <[EMAIL PROTECTED]> wrote: > On Tue, 4 Nov 2008 11:22:27 -0800 (PST), Aaron Brady > <[EMAIL PROTECTED]> wrote: > >> for i=01 to 99 except 04, 34, 40, 44, 48, 54, 57, 67, 76, 83, 89: > > > >sorted( list( set( domain ) - set( exceptions ) ) ) > > > >Set

Re: damn street venders

2008-11-05 Thread Benjamin Kaplan
I'm pretty sure all of the spam is automated, so your message won't get through to anyone. On Mon, Nov 3, 2008 at 9:05 AM, r <[EMAIL PROTECTED]> wrote: > Hey, go sell your stupid watch somewhere else. > i am tired of the message boards clogged with these stupid ads. > Nobody here cares about your

Re: overloading for ladder logic

2008-11-07 Thread Benjamin Kaplan
On Fri, Nov 7, 2008 at 8:48 AM, <[EMAIL PROTECTED]> wrote: > I am trying to simulate the execution of some PLC ladder logic in > python. > > I manually modified the rungs and executed this within python as a > proof of concept, but I'd like to be able to skip the modification > step. My thought

Re: pysqlite install error on hp ux (ld: Can't find library for -lpython2.5)

2008-11-10 Thread Benjamin Kaplan
On Mon, Nov 10, 2008 at 9:00 PM, Geon. <[EMAIL PROTECTED]> wrote: > > Hi, as far as I know. > > > > 1. you can use module sqlite3 instead. > > 2. you can use these commands on ubuntu: > > > > sudo apt-get install libsqlite3-dev > > sudo easy_install -Z pysqlite > > is possible apt-get on hp unix?

Re: How to make arrays from Lists

2008-11-11 Thread Benjamin Kaplan
On Tue, Nov 11, 2008 at 7:32 PM, <[EMAIL PROTECTED]> wrote: > I want to construct a 2-dimensional array from a List but I cannot > find a simple way of changing any element. For example, construct a > 3x3 array like this:- > >>> x=[0,0,0] > x=[x]*3 > this produces [[0,0,0],[0,0,0],[0,0,0]. S

Re: What is the best Python GUI API?

2008-11-13 Thread Benjamin Kaplan
On Thu, Nov 13, 2008 at 3:36 PM, rm <[EMAIL PROTECTED]> wrote: > On Nov 13, 2:23 pm, James Harris <[EMAIL PROTECTED]> > wrote: > > On 13 Nov, 18:59, Stef Mientki <[EMAIL PROTECTED]> wrote: > > > > > Abah Joseph wrote: > > > > What is the best Python GUI API? I am planning to start my first GUI >

Re: email notifier question ??

2008-11-13 Thread Benjamin Kaplan
On Thu, Nov 13, 2008 at 11:23 PM, yoma <[EMAIL PROTECTED]> wrote: > Is it really impossible to get the message receipt ?? > i hope more people to help me! > -- > When you send the email, there isn't even any way to ensure that it got through, let alone that the recipient read it. When you send

Re: don't get JPE (Java Python Extension) compiled.

2008-11-15 Thread Benjamin Kaplan
On Sat, Nov 15, 2008 at 4:33 AM, Tamer Higazi <[EMAIL PROTECTED]> wrote: > Hi people! > I want to compile the Java Python Extension which I downloaded through > CVS "http://jpe.cvs.sourceforge.net/jpe/"; > > Building JPE by bootstrapping the makefile system with the cmd: > > "python makefile.py" >

Re:

2008-11-16 Thread Benjamin Kaplan
On Wed, Nov 12, 2008 at 4:02 AM, anish mathew <[EMAIL PROTECTED]>wrote: > pls help me > > html page conecting to database sql or .mdb files > > pls sent qury > I know that English may not be your first language, but please make an effort to use proper English. Your question isn't really

Re: Win 98 --Is 2.4.x The last version of Python for It?

2008-11-16 Thread Benjamin Kaplan
For x86 processors: python-2.5.2.msi For Win64-Itanium users: python-2.5.2.ia64.msi For Win64-AMD64 users: python-2.5.2.amd64.msi

Re: python script to act as list server

2008-11-16 Thread Benjamin Kaplan
On Sun, Nov 16, 2008 at 12:05 PM, William Gill <[EMAIL PROTECTED]> wrote: > Before I spend the next couple weeks researching and testing, can anyone > tell me if what I want to do is possible, and possibly point me in the right > direction to get started. > > I want to forward any email addressed

Re: Need help in understanding a python code

2008-11-16 Thread Benjamin Kaplan
On Sun, Nov 16, 2008 at 7:34 AM, John Machin <[EMAIL PROTECTED]> wrote: > On Nov 16, 11:04 pm, Steven D'Aprano <[EMAIL PROTECTED] > cybersource.com.au> wrote: > > On Sun, 16 Nov 2008 02:41:03 -0800, John Machin wrote: > > > On Nov 16, 9:31 pm, Steven D'Aprano <[EMAIL PROTECTED] > > > cybersource.c

Re: py2exe 0.6.9 released

2008-11-16 Thread Benjamin Kaplan
On Sun, Nov 16, 2008 at 2:21 AM, Jimmy Retzlaff <[EMAIL PROTECTED]> wrote: > py2exe 0.6.9 released > = > > py2exe is a Python distutils extension which converts Python scripts > into executable Windows programs, able to run without requiring a > Python installation. Console and

Re: wxPython Crashes with basic example

2008-11-19 Thread Benjamin Kaplan
On Wed, Nov 19, 2008 at 12:51 PM, Samuel Morhaim <[EMAIL PROTECTED]>wrote: > Hi, I am trying to run the basic wxpython example as seen here > http://www.zetcode.com/wxpython/firststeps/ and everytime i run it, it > crashes python/wxpython .. meaning it doesnt close gracefully. > The error I get is

Re: wxPython Crashes with basic example

2008-11-19 Thread Benjamin Kaplan
Samuel Morhaim <[EMAIL PROTECTED]>wrote: > thanks for the reply. > I just tried from the shell and it does the same..I had this running > before.. a few days ago I had to reformat my machine, I reinstalled > everything.. and now its happening.. > > Thanks anyway.. > >

Re: 404 not found on for Python 2.6 Itanium

2008-11-19 Thread Benjamin Kaplan
On Wed, Nov 19, 2008 at 4:12 PM, "Martin v. Löwis" <[EMAIL PROTECTED]>wrote: > > Then why is there a link on the download site? > > Where specifically did you spot that link? I can't see any. > Copied from the download page: - Python 2.6 compressed source tarball

Re: Python 3 __cmp__ semantic change?

2008-11-21 Thread Benjamin Kaplan
On Fri, Nov 21, 2008 at 10:44 AM, Hyuga <[EMAIL PROTECTED]> wrote: > On Nov 21, 4:09 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > > Johannes Bauer <[EMAIL PROTECTED]> wrote: > > > Seems it was removed on purpose - I'm sure there was a good reason for > > > that, but may I ask why? Instead of the

Re: can error messages be improved or can they be overridden ?

2009-02-23 Thread Benjamin Kaplan
On Mon, Feb 23, 2009 at 1:37 PM, Stef Mientki wrote: > rdmur...@bitdance.com wrote: > >> >> FYI, top posts are much harder to read and to reply to than if you edit >> the message to which you are replying and add your new content interleaved >> or at the bottom (as I have done). >> >> > ??? I read

Re: read csv error question

2009-02-23 Thread Benjamin Kaplan
On Mon, Feb 23, 2009 at 6:43 PM, MRAB wrote: > Vincent Davis wrote: > >> I am trying to read a csv file from excel on a mac. I get the following >> error. >> SystemExit: file some.csv, line 1: new-line character seen in unquoted >> field - do you need to open the file in universal-newline mode? >

Re: TypeErrors

2009-02-28 Thread Benjamin Kaplan
On Sat, Feb 28, 2009 at 12:24 PM, Sean Novick wrote: > I'm having issues with a phone-number database. > Here is a code snippet: > def menu(): > > print '''Please make a selection from the following options: > To add an Employee - enter: 1 > > For a complete listing of Em

Re: TypeErrors

2009-03-01 Thread Benjamin Kaplan
On Sun, Mar 1, 2009 at 1:50 PM, Sean Novick wrote: > Here is the bit of code my error was refering to: > class phonedb: > > some definitons... > > def lookup(self, string): > list = [] > for key in self.shelve.keys(): > e = self.shelve[key] > if cmp(e, stri

Re: Python won't run

2009-03-01 Thread Benjamin Kaplan
On Sun, Mar 1, 2009 at 10:52 PM, wrote: > On Feb 23, 5:01 pm, Ned Deily wrote: > > [Again, please reply-all to the list, don't send private email!] > > > > On Feb 23, 2009, at 14:03 , kevin hayes wrote: > > > > > > > > > Ned, system log didn't do anything when I tried to open IDLE. However, > th

Re: Quadratic equation

2009-03-13 Thread Benjamin Kaplan
On Fri, Mar 13, 2009 at 4:06 PM, Daniel Sidorowicz wrote: > Hello I need some hello I need some help with a programingproject, I'm > fairly new to programming so I do find it slightly confusing. > > Here is my code for my main function which > passes my variable from a text file, > however when i

Re: Quadratic equation

2009-03-13 Thread Benjamin Kaplan
ul. > You're going to want to loop through L. Every element in L is a string, and you can call split on each individual element. Since this is a homework assignment, I don't want to give too much away. Try looking at the docs if you don't understand how to use lists. > >

Re: [ActivePython 2.5.1.1] Why does Python not return first line?

2009-03-15 Thread Benjamin Kaplan
On Sun, Mar 15, 2009 at 8:14 PM, Gilles Ganault wrote: > Hello > > I'm stuck at why Python doesn't return the first line in this simple > regex: > > === > response = "Address :\r\t\t\r\t\t\t3 Abbey Road, > St Johns Wood \r\t\t\tLondon, NW8 9AY\t\t" > > re_address = re.compile('Address > :

Re: Where's the documentation to support the following behavior...

2009-03-17 Thread Benjamin Kaplan
On Tue, Mar 17, 2009 at 6:14 PM, grocery_stocker wrote: > Given the following > > [example of cached numbers] > > > It seems like id(list[]) == id(). However, I > can't find anything in the python documentation that talks about it. > Did I perhaps overlook something? You didn't find anythin

Re: Concrete Factory Pattern syntax?

2009-03-19 Thread Benjamin Kaplan
On Thu, Mar 19, 2009 at 6:52 PM, Austin Schutz wrote: > > I have a fairly simple bit of code, something like: > > # This should be importing the subclasses somehow, so that the factory > # can make them. > # import Parser.One > # import Parser.Two > # or.. from Parser import *? > class Parser():

Re: nested classes

2009-03-20 Thread Benjamin Kaplan
On Fri, Mar 20, 2009 at 10:06 AM, Esmail wrote: > Hello all, > > I am curious why nested classes don't seem to be used much in Python. > I see them as a great way to encapsulate related information, which is > a > good thing. > > In my other post "improve this newbie code/nested functions in > Py

Re: what features would you like to see in 2to3?

2009-03-22 Thread Benjamin Kaplan
On Sun, Mar 22, 2009 at 4:49 PM, Daniel Fetchinson < fetchin...@googlemail.com> wrote: > > It's GSoC time again, and I've had lots of interested students asking > about > > doing on project on improving 2to3. What kinds of improvements and > features > > would you like to see in it which student p

Re: Find duplicates in a list and count them ...

2009-03-26 Thread Benjamin Kaplan
On Thu, Mar 26, 2009 at 5:14 PM, wrote: > Hi D'Arcy J.M. Cain, > > Thank you. I tried this and my list of 76,979 integers got reduced to a > dictionary of 76,963 items, each item listing the integer value from the > list, a comma, and a 1. I think what this is doing is finding all integers > fr

Re: complaints about no replies last week

2009-03-28 Thread Benjamin Kaplan
On Sat, Mar 28, 2009 at 11:07 AM, Aaron Brady wrote: > Hi, > > A week ago, I posted a question and an idea about Python's garbage > collector. I got a few replies. Some days later, I posted a mock-up > implementation of it, and got *NO* replies. Does this mean: > > a) It works > b) It doesn't

Re: Syntax disagreement between IDLE and pydev?

2009-03-30 Thread Benjamin Kaplan
On Mon, Mar 30, 2009 at 2:23 PM, Jim Garrison wrote: > Jim Garrison wrote: > >> IDLE (3.1a1) accepts >> >>a,*b = re.split(str,pattern) >> >> and does the right thing ('a' gets the first result and 'b' gets >> the rest). >> >> pydev configured to use the exact same Python 3.1a1 runtime doesn't

Re: Detecting Binary content in files

2009-03-31 Thread Benjamin Kaplan
On Tue, Mar 31, 2009 at 12:23 PM, ritu wrote: > Hi, > > I'm wondering if Python has a utility to detect binary content in > files? Or if anyone has any ideas on how that can be accomplished? I > haven't been able to find any useful information to accomplish this > (my other option is to fire off

Re: Python 3.0 online docs broken

2009-04-08 Thread Benjamin Kaplan
On Wed, Apr 8, 2009 at 11:28 AM, Jim Garrison wrote: > Jim Garrison wrote: > >> Ye Liu wrote: >> >>> On Apr 6, 6:33 pm, Jim Garrison wrote: >>> I notice the online docs (at docs.python.org/3.0/index.html) were updated today. It seems some of the top-level pages, like Tutorial, "U

Re: Python 2.6/3.0 packages for Ubuntu?

2009-04-10 Thread Benjamin Kaplan
On Fri, Apr 10, 2009 at 4:27 PM, wrote: > Does Ubuntu really not have Python 2.6 or 3.0 packages or do I just have my > package list misconfigured? I'm setting up a fresh machine and am not too > Ubuntu-aware. Is there a list of package repositories around somewhere? > > Thx, > Which version o

Re: Python 2.6/3.0 packages for Ubuntu?

2009-04-10 Thread Benjamin Kaplan
On Fri, Apr 10, 2009 at 5:15 PM, wrote: > >>> Does Ubuntu really not have Python 2.6 or 3.0 packages > >Benjamin> Which version of Ubuntu are you using? > >Benjamin> Hardy: 2.5.2 >Benjamin> Intrepid: 2.5.2 and 3.0rc1 >Benjamin> Jaunty (beta) : 2.6.2rc1 and 3.0.1 > > I'm us

Re: Python 2.6/3.0 packages for Ubuntu?

2009-04-10 Thread Benjamin Kaplan
On Fri, Apr 10, 2009 at 8:29 PM, Terry Reedy wrote: > Benjamin Kaplan wrote: > >> >> >> On Fri, Apr 10, 2009 at 5:15 PM, mailto:s...@pobox.com>> >> wrote: >> >> >> >> Does Ubuntu really not have Python 2.6 or 3.0 packages

Re: IronPython newbie: not clear on imports and assemblies

2009-04-15 Thread Benjamin Kaplan
On Wed, Apr 15, 2009 at 4:31 PM, Thomas Gagne wrote: > OK--I also haven't programmed on .NET before. > > My goal is to play with the "EssentialPDF" libraries inside IronPython. > But I'm not clear on how to import (load?) Essential's .dll files. Of > course, all the samples files are in C# and V

Re:

2009-04-15 Thread Benjamin Kaplan
On Wed, Apr 15, 2009 at 4:35 PM, fridash13 wrote: > i am quite new to python ... > > i made a small script ,, for active directory using python > > all the script does is basicly explor the AD for a number of tasks .. > > * 1 .Find a user (quick method) > * 2 .Find a computer (quick method) > * 3

Re:

2009-04-18 Thread Benjamin Kaplan
On Sat, Apr 18, 2009 at 4:23 PM, karlos barlos wrote: > hello to all !! > > given the code : > > elif choice == "3": > print "all users list :" > print"\n" > import active_directory > for user in active_directory.search ("objectCategory='Person'", > "objectClass='Us

Re: What is the best framework or module in Python for a small GUI based application development?

2009-04-22 Thread Benjamin Kaplan
On Wed, Apr 22, 2009 at 12:13 PM, Mike Driscoll wrote: > On Apr 22, 10:51 am, Tim Chase wrote: > > > My requirement is to write an application which is GUI based > > > has to run on browsers. Could you tell me which one would be > > > suitable for this? > > > > These are generally 2 different th

Re: getting linux distro used...

2009-04-26 Thread Benjamin Kaplan
On Mon, Apr 27, 2009 at 1:35 AM, deostroll wrote: > Hi, > > I just found that you could use platform.system() to get the > underlying os used. But is there a way to get the distro used...? > > --deostroll > -- > http://mail.python.org/mailman/listinfo/python-list > platform.linux_distribution()

Re: Python 2.6 Install on OSX Server 10.5: lWhich flag to use in "configure" to Change the Install location?

2009-04-29 Thread Benjamin Kaplan
On Wed, Apr 29, 2009 at 5:43 PM, Omita wrote: > Long story short... I am installing Python 2.6 on OSX Server. By > default the Python.framework is installing in /Library: > > /Library/Frameworks/Python.framework > > However, as I am using OSX Server I would ideally like the install > location to

Re: MacPython 3.0.1 installation problem, no /usr/local/bin/python*

2009-05-09 Thread Benjamin Kaplan
On Sat, May 9, 2009 at 4:30 AM, Raoul Gough wrote: > I just installed MacPython 3.0.1 (woot!) but the installer didn't seem > to do an absolutely complete job. According to the ReadMe.txt, "The > installer puts [...] command-line tools in /usr/local/bin [...]". This > didn't happen - even after th

Re: Help with Tkinter on OS X --- driving me insane!

2009-05-17 Thread Benjamin Kaplan
On Sun, May 17, 2009 at 8:42 AM, Piet van Oostrum wrote: > > Edward Grefenstette (EG) wrote: > > >EG> Any attempt to do anything with Tkinter (save import) raises the > >EG> following show-stopping error: > > >EG> "Traceback (most recent call last): > >EG> File "", line 1, in > >EG> Fil

Re: Package problem

2009-05-19 Thread Benjamin Kaplan
On Tue, May 19, 2009 at 2:45 AM, David Cournapeau wrote: > On Tue, May 19, 2009 at 2:35 PM, David Lyon > wrote: > > On Tue, 19 May 2009 13:53:18 +0900, David Cournapeau > > > wrote: > >> Given that nobody has managed to solve this problem, I doubt you will > >> find a solution. > > > > It is sol

Re: error in tutorial for 3.0, section 9.3.3

2009-05-23 Thread Benjamin Kaplan
On Sat, May 23, 2009 at 9:13 AM, Vincent Davis wrote: > let me add that I see that this could be right if x.counter = 1 and > counter need not have anything to do with MyClass but this could be more > clear. > Thanks > Vincent Davis > 720-301-3003 > > > On Sat, May 23, 2009 at 7:08 AM, Vincent Dav

Re: error in tutorial for 3.0, section 9.3.3

2009-05-23 Thread Benjamin Kaplan
e instance. That's what the "self" parameter in the method argument list is. x.f() is just syntax sugar for MyClass.f(x). Dynamically adding variables can get very confusing, so people usually declare everything (or almost everything) they're going to use in the __init__ method

Re: wxPython gurus, please help

2009-05-23 Thread Benjamin Kaplan
On Sat, May 23, 2009 at 6:55 PM, Jive Dadson wrote: > I have an application that opens an image file of the user's choice. I > have an exception handler for the case that the user selected a bad or > unsupported image file. My code is catching the exception, but > unfortunately for me, after

Re: writing on file not until the end

2009-05-24 Thread Benjamin Kaplan
On Sun, May 24, 2009 at 2:46 PM, Alexzive wrote: > Hello, > I am a newby with python. I wrote the following code to extract a text > from a file and write it to another file: > > linestring = open(path, 'r').read() #read all the inp file in > linestring > > i=linestring.index("*NODE") > i=linestr

Re: What text editor is everyone using for Python

2009-05-26 Thread Benjamin Kaplan
On Tue, May 26, 2009 at 8:07 AM, Lacrima wrote: > I am new to python. > And now I am using trial version of Wing IDE. > But nobody mentioned it as a favourite editor. > So should I buy it when trial is expired or there are better choices? We're mostly talking about text editors, not full-fledge

Re: Network programming ?

2009-05-26 Thread Benjamin Kaplan
On Tue, May 26, 2009 at 4:00 AM, Dave Angel wrote: > thushiantha...@gmail.com wrote: > >> Hi everyone, >> >> I am planning to develop a chatting software in Python, for my college >> project. I am using Windows Vista. Is it possible to do sockets >> programming in Python ? Any books or websites ?

Re: What text editor is everyone using for Python

2009-05-26 Thread Benjamin Kaplan
On Tue, May 26, 2009 at 11:17 AM, Ken Seehart wrote: > > Lacrima wrote: > >> I am new to python. >> And now I am using trial version of Wing IDE. >> But nobody mentioned it as a favourite editor. >> So should I buy it when trial is expired or there are better choices? >> >> > > Jean-Michel Pichav

Re: Seeking old post on developers who like IDEs vs developers who like simple languages

2009-05-28 Thread Benjamin Kaplan
On Thu, May 28, 2009 at 2:09 PM, Mohan Parthasarathy wrote: > > > On Mon, May 18, 2009 at 12:31 AM, Ulrich Eckhardt > wrote: > >> Steve Ferg wrote: >> > On the one hand, there are developers who love big IDEs with lots of >> > features (code generation, error checking, etc.), and rely on them to

Re: How does Python's OOP feel?

2009-05-29 Thread Benjamin Kaplan
On Fri, May 29, 2009 at 9:41 PM, Lie Ryan wrote: > Ikon wrote: > > I'm rather new to Python. I have PHP for my main language and I do > > some Java. They all have a very strict OO schema. As I red through > > Python's tutorial it seams it has nothing of those rules. No statical, > > abstract clas

<    1   2   3   4   5   6   7   8   >