Re: Identify and perform actions to data within stated limits

2005-03-01 Thread Steve Holden
wo' >>> Does this help at all? regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ exit -- http://mail.python.org/mailman/listinfo/python-list

Re: yield_all needed in Python

2005-03-01 Thread Steve Holden
the simpler expression of the idea with a yield in a loop. If you think there's a genuine chance this could be usefully added to Python the solution is obvious: write and submit a PEP. regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 200

Re: Running Python Scripts With 'sudo'

2005-03-02 Thread Steve Holden
http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: passing lists

2005-03-02 Thread Steve Holden
ass a list? Earl Eiland -- http://mail.python.org/mailman/listinfo/python-list -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Need help running external program

2005-03-02 Thread Steve Holden
;? I suspect if you use a raw string for the format then that will be enough - in other words, does output, input = popen2(r"""wget -q %s -O - | tr '\r' '\n' | tr \' \" | sed -n 's/.*url="\([^"]*\)".*/\1/p'""&

Re: mx.ODBC 2.0.7 bug?

2005-03-02 Thread Steve Holden
y to get Marc-Andre's attention. I'm not convinced that it demonstrates an mxODBC bug, since I don't believe that the ampersand is actioned by the drivers, but I'm not the best one to be authoritative about this. others-who-read-this-reply-will-ly y'

Re: What is the best way to handle a command line argument that includes an escape sequence like \n?

2005-03-02 Thread Steve Holden
nd of a line: C:\Steve>\python24\python -c "import sys; print repr(sys.argv[1])" " '' So someone else will have to tell you how to do that, but you should be clear about what's happening before you try and correct the problem. regards Steve -- Meet the Python

Re: function expression with 2 arguments

2005-03-03 Thread Steve Holden
http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: passing lists

2005-03-03 Thread Steve Holden
eated, Passed, Raw_packet_queue, Raw, False, Last_Passed, La st_Dropped, First_Created, ctr) File "/home/earl/ResearchProjects/IntrusionResistance/NewPhasee2/Parser.py", l ine 132, in Match Last_Passed = Raw_packet_queue[0][0][1] TypeError: unsubscriptable object On Wed,

Re: What is the best way to handle a command line argument that includes an escape sequence like \n?

2005-03-03 Thread Steve Holden
needed. As long as ytour problem is solved, that's fine, and it appears that you've solved it in a reasonably cross-platform way. Thanks again for your assistance. Always happy to help when I can! regards Steve -- Meet the Python developers and your c.l.py favorites March 23-2

Re: binutils "strings" like functionality?

2005-03-03 Thread Steve Holden
pers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Grid not getting updated

2005-03-03 Thread Steve Holden
eparately), and when Yield() returns the window display should be fully up to date. regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenw

Re: py2exe

2005-03-03 Thread Steve Holden
http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Call variable as a function

2005-03-03 Thread Steve Holden
be possible to set the variable to the function rather than the function's name: >>> var = test >>> var() hello >>> Hope this helps. regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http:

Re: There's GOT to be a better way!

2005-03-03 Thread Steve Holden
will print "A value" as long as a is imported before b. regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Call variable as a function

2005-03-03 Thread Steve Holden
Chmouel Boudjnah wrote: Steve Holden wrote: But it depends how you are creating the reference to the function. The above is required if all you have is a string, but it would also be possible to set the variable to the function rather than the function's name >>> var = test &

Re: Ruby on Rails or Perl's Maypole..is there a Python equivalent

2005-03-03 Thread Steve Holden
ome to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: problem with recursion

2005-03-03 Thread Steve Holden
and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: There's GOT to be a better way!

2005-03-03 Thread Steve Holden
Earl Eiland wrote: On Thu, 2005-03-03 at 15:11, Steve Holden wrote: Earl Eiland wrote: I'm writing my first program where I call custom modules. The 'global' command doesn't seem to apply, so how do I change a variable internally in a module without passing it down n layer

Final PyCon Keynote from Google Speaker

2005-03-03 Thread Steve Holden
ble via http://www.python.org//pycon/2005/register.html This is going to be a great opportunity for all those with an interest in Python to see just how far the language has come. regards Steve Holden Chairman, PyCON DC 2005 -- PyCon DC 2005: The third Python Community Conference http://www.py

Re: Wishful thinking : unix to windows script?

2005-03-04 Thread Steve Holden
, more recently, CoLinux (www.colinux.org). Why do it in Python when it's better done already? regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden

Re: Making things more functional in Python

2005-03-04 Thread Steve Holden
avorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Setting default option values for Tkinter widgets

2005-03-04 Thread Steve Holden
' Eric Brunel [EMAIL PROTECTED] regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Making things more functional in Python

2005-03-04 Thread Steve Holden
Michael Hoffman wrote: Steve Holden wrote: return dict([(d, sample.getval(d)) for d in dset for sample in samples]) That won't do what the original code does. This sets dict[d] to samples[-1].getval(d) instead of [sample.getval(d) for sample in samples]. My bad, I didn;t look closely enbou

Re: Unable to run IDLE Under Windows

2005-03-04 Thread Steve Holden
(and stop Cygwin services, if any are running). 2. In a new standard Cygwin command interpreter window run rebaseall -v That should be it. Any other ideas why IDLE won't run? Well, that's a few things to think about, anyway. regards Steve -- Meet the Python developers and your c

Re: __contains__ inconsistencies between Python 2.2 and 2.3

2005-03-04 Thread Steve Holden
u are interested). So you'll need to use the .find() string method and say if x.find("Hello") != -1: ... you found "Hello" because your ISP appears to be using an older version of Python than you. regards Steve -- Meet the Python developers and your c.l.py favorites

Re: Problem with variabels in Tkinter

2005-03-04 Thread Steve Holden
a look at some simple Tkinter examples. It should start to make sense after you've pored over the code for an house or so ... regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden

Re: Indexing strings

2005-03-04 Thread Steve Holden
x27;, 'python', 'swallows', 'the', 'lazy', 'mongoose'] >>> s.split(None, 3) ['The', 'quick', 'brown', 'python swallows the lazy mongoose'] >>> s.split(None, 1) ['The', 'q

Re: Python 2.4 removes None data type?

2005-03-04 Thread Steve Holden
vorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Accessing Python parse trees

2005-03-05 Thread Steve Holden
od that allows you to implement a specific response to the binary "+" operator). What you probably need is a specific magic hook for the "**" operator, but I'm not sure that's going to happen any time soon ... regards Steve -- Meet the Python developers and your c.l.py fav

Re: site-packages versus site-python

2005-03-05 Thread Steve Holden
regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: multiple inheritance with builtins

2005-03-06 Thread Steve Holden
The documentation explicitly states that only one of the built-in types can be used as a base class: they aren't desinged to be mixed with each other. regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005

Re: site-packages versus site-python

2005-03-06 Thread Steve Holden
d your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: python -i (interactive environment)

2005-03-07 Thread Steve Holden
Michael Hoffman wrote: Joe wrote: I want the script to decide whether to fall back to the interactive prompt. You solution makes it ALWAYS fall back to the interactive prompt. Actually, using sys.exit() means the program can exit even if python -i is used. You can use: import code code.interact()

Re: quick question

2005-03-07 Thread Steve Holden
Leeds, Mark wrote: I have a string variable say “8023 “ and I want to get rid of the beginning And ending quotes. I’ve tried different things But haven’t had any success. I’m definitely a python hacker and Not an expert. Thanks. >>> x = '"This is a quoted string"' >>> print x "This is a

Re: Speeding up CGIHTTPServer

2005-03-08 Thread Steve Holden
Tim Roberts wrote: "Johan Kohler" <[EMAIL PROTECTED]> wrote: I'm using CGIHTTPServer (via its test() method) to test some CGI on my Windoze 98 box. I find that the execution is very slow. Is there anything I can do to make sure I'm getting the best performance out of CGIHTTPServer? Compared to w

Re: Mysterious "Attribute Errors" when GUI Programming

2005-03-08 Thread Steve Holden
Coral Snake wrote: I am having problems with programming even simple "Hello World" programs from books and tutorials that use Python GUI libraries. Such Programs cause python to throw "Attribute Errors" even when the "attributes" being asked for by the errors exist in the source code. This has happ

Re: Accessing files installed with distutils

2005-03-08 Thread Steve Holden
[EMAIL PROTECTED] wrote: I was wondering how to do this too. I'm trying to write a distutils setup.py script that has some data I'd like to include. From the distutils docs I get data_files specifies a sequence of (directory, files) pairs in the following way: setup(... data_files=[('bitmaps

Re: looking for way to include many times some .py code from anotherpython code

2005-03-08 Thread Steve Holden
Martin MOKREJŠ wrote: Diez B. Roggisch wrote: See my post on Mar 2 about "automating assignment of class variables". I got no answers, maybe I wasn't clear enough ... :( Seems so - I for example didn't understand it. I need to define lots of variables. The variable names are often identical. The

Re: looking for way to include many times some .py code from anotherpython code

2005-03-08 Thread Steve Holden
Martin MOKREJŠ wrote: Peter Hansen wrote: Martin MOKREJŠ wrote: Am I so deperately fighting the language? No-one here on the list needs to set hundreds variables at once somewhere in their code? Nobody needs to do that. As others have pointed out, creating variables implies wanting to access th

Re: looking for way to include many times some .py code from anotherpython code

2005-03-08 Thread Steve Holden
Martin MOKREJŠ wrote: Steve Holden wrote: [...] I will be *very* surprised if you can't get a much better (i.e. easier and more efficient) solution by stepping back from the programming Hmm, I'm not convinced, but I'll put few more words here then. ;) details for a moment and exp

Re: None in string formatting

2005-03-08 Thread Steve Holden
Jorge Godoy wrote: [EMAIL PROTECTED] writes: Was doing some string formatting, noticed the following: x = None "%s" % x 'None' Is there a reason it maps to 'None'? I had expected ''. How would know, then, if there was no value at all or if it was an empty string? Well, for that matter, how can

Re: Working on a log in script to my webpage

2005-03-08 Thread Steve Holden
Pete. wrote: Hi all I am working on a log in script for my webpage. I have the username and the password stored in a PostgreSQL database. The first I do is I make a html form, where the user can type in his username and code, when this is done I want to run the script(testifcodeisokay) that v

Re: Python docs [was: function with a state]

2005-03-08 Thread Steve Holden
Xah Lee wrote: thanks for the help... --- the python doc is stilted. It tried to organized the thing and with a style around some highbrow inane "computer science" outlook. [usual semi-literate expletive-deleted rant omitted] And your writing is so lucid and comprehensible, it's a pity you can

Re: function namespaces

2005-03-08 Thread Steve Holden
Darren Dale wrote: Generally, I avoid execfile within a function. What's your use case? There may be a better way to approach this problem... I am writing a simulation that loads some predefined constants, depending on the options called by the user. I originally had it set up to parse the file,

Re: Working on a log in script to my webpage

2005-03-08 Thread Steve Holden
Pete. wrote: The 2 scripts I made is actually working the way they where meant to. So im kindda happy :) The problem is, that I didnt think about the problem: as Steve wrote: "There are other matters of concern, however, the most pressing of which is: How am I going to stop user from naviga

Re: popen2.Popen3 doesn't work well for me

2005-03-09 Thread Steve Holden
alexrait1 wrote: I launch my python. Then I write this: import popen2 popen2.Popen3("mplayer *.mpg") it starts playing for 2 seconds.. and then stops... if I quit python (ctrl - D) mplayer continues to run and plays music as it should... Any ideas? It looks like the process you start is blocking on

Re: Working on a log in script to my webpage

2005-03-09 Thread Steve Holden
Pete. wrote: I better mention, that I rather make it all in python and html (found out that python somehow works with asp) I know that what I have to do is the following: 1) When the user logs in, I have to store a session ID in a cookie In actual fact it's best not to wait until the user log

Re: Python COM Class Question

2005-03-09 Thread Steve Holden
pemo wrote: I'm trying to use difflib.py from a COM aware language - and, for ease of use, I'm initially trying to get this going from VB6. I've wrappered difflib.py correctly I think, and I can now call into it and call a global method (called 'test' of course). Here's the consuming code:

Re: BaseHTTPServer.BaseHTTPRequestHandler and HTTP chunking

2005-03-09 Thread Steve Holden
Andy Leszczynski wrote: Does BaseHTTPServer.BaseHTTPRequestHandler support HTTP protocol chunking? No. Hardly any HTTP 1.1 features are supported. regards Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: Second argument to super().

2005-03-10 Thread Steve Holden
John Roth wrote: "Tobiah" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] What is the purpose of the second argument to super()? I've always found the docs to be fairly confusing. They didn't give me enough context to tell what was going on. I also find the terminology confusing: "t

Re: mysqldb issue

2005-03-10 Thread Steve Holden
fedor wrote: Hi all, I have a problem with mysql connections. After about 28000-29000 connections, I get a "Can't connect to MySQL server on '127.0.0.1'" error. I have made a small program which generates the error """ import MySQLdb for i in range(3): if not i % 100:

Re: modifiable config files in compiled code?

2005-03-10 Thread Steve Holden
Larry Bates wrote: Note: my comments assume Windows distribution. Why do you think you can't you have a config file after you convert your program to an executable? I do it all the time and so do many I suspect the OP's config file is a Python module. regards Steve -- http://mail.python.org/mailm

Re: 'Browse' button for *.txt file?

2005-03-10 Thread Steve Holden
Fred wrote: Sorry if my choice of words is not very clear to you, but as english is not my first language, I put it this way because of a lack of better words. I will try it differently: What I meant is that I am searching for a module, that would allow me to select a file by not using a typed path

Re: looking up dictionaries by values

2005-03-10 Thread Steve Holden
Sandman wrote: Hi there, I'm still a bit new to Python, and had a question. I have a dictionary that looks like: PWD = \ { "root": 0, "joe": 200, "susan": 201, .. } In other words, the values are unique as well as the keys. I've run into a situation where I need to lookup t

Re: Is there a short-circuiting dictionary "get" method?

2005-03-11 Thread Steve Holden
Terry Reedy wrote: "Skip Montanaro" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] value = d.get('x') or bsf() Of course, this bsf() will get called if d['x'] evaluates to false, not just None, value = (d.get('x') is not None) or bsf() #?? Unfortunately this will set value to Tru

Re: HC Library and *attributes parameter

2005-03-11 Thread Steve Holden
Efrat Regev wrote: Hello, I'm a really new (and quite bad) Python programmer. While trying to use the HC HTML-Generating library, I couldn't figure out how to set a table's width to some given width. Moreover, the constructors interface is def __init__(self, object = None, align = None, border

Re: Working on a log in script to my webpage

2005-03-11 Thread Steve Holden
Pete: Don;t give up, load Webware or similar and use that! regards Steve Pete. wrote: Hi all. Unfortunaly it looks like I dont have to skill to make a secure log in, cant figure out how the code has to look like, so guess my webpage has to live with a security issue. Thanks for the effort y

Re: Will presentations at PyCon be recorded/streamed?

2005-03-11 Thread Steve Holden
[EMAIL PROTECTED] wrote: Howdy, I sure hope so. I don't get around much, so I love to be able to hear what I'm missing. I bet lots of folks would appreciate audio/video download/stream. Though video may be prefered, I've found that listening to a Powerpoint presentation is fine. Thanks, Kent A te

Re: Will presentations at PyCon be recorded/streamed?

2005-03-11 Thread Steve Holden
Steve Holden wrote: [EMAIL PROTECTED] wrote: Howdy, I sure hope so. I don't get around much, so I love to be able to hear what I'm missing. I bet lots of folks would appreciate audio/video download/stream. Though video may be prefered, I've found that listening to a Powerpoint prese

Re: executing non-Python conde

2005-03-11 Thread Steve Holden
be able to pass parameters. (Although there is a reference to global and local dictionaries that I don't understand.) Surely there is a way to do this! Earl Eiland Yes. os.popen, popen.popen{2,3,4}, os.system, ... take your pick! regards Steve -- Steve Holden+1 703 861 4237 +1 800 494

Re: SimpleHTTPRequestHandler handling long lasting requests problem

2005-03-11 Thread Steve Holden
that regard. Thx, A. Try switching keepalives off, or falling back to HTTP 1.0 - ironically it may be the attempt to use the same connection for both pieces of content that holds things up. regards Steve -- Steve Holden+1 703 861 4237 +1 800 494 3119 Holden Web LLC http

Re: Confused with classmethods

2005-03-11 Thread Steve Holden
indeed a questionable feature. It all happens because the parser detects that there are variables with that name in the enclosing functions and creates special cellvars... I believe you are coinfusing restrictions on exec syntax with restrictions on namespace nexting. - No nesting of scopes for cl

Re: executing non-Python conde

2005-03-11 Thread Steve Holden
w/mhammond/ google-is-your-friend-ly y'rs - steve -- Steve Holden+1 703 861 4237 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ Python Web Programming http://pydish.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: pre-PEP: Print Without Intervening Space

2005-03-11 Thread Steve Holden
them the linelist.append(fn(x)) way, which then gives you the choice of "".join(linelist) - no gaps "\n".join(lienlist) - one item per line " ".join(linelist) - spaces between items. regards Steve -- Steve Holden+1 703 861 4237 +1 800 494 3119 Holden Web

Re: Will presentations at PyCon be recorded/streamed?

2005-03-11 Thread Steve Holden
Grig Gheorghiu wrote: Is there an official procedure for signing up for presenting a Lightning Talk, except for editing the PyCon05 Wiki page? Grig No, just put your name down and that should get you a place. regards Steve -- Steve Holden+1 703 861 4237 +1 800 494 3119 Holden Web LLC

Re: smtplib / solaris (newbie problem?)

2005-03-11 Thread Steve Holden
also running an SMTP server (typically sendmail), whereas the Solaris box apparently isn't. If the two machines are on the same network, try replacing "localhost" with the name, or IP address, of the machine that *did* work. Otherwise, ask your sysadmin which host you

[Fwd: RE: [PyCON-Organizers] volunteers]

2005-03-14 Thread Steve Holden
__ Pycon-organizers mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/pycon-organizers -- Steve Holden+1 703 861 4237 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ Python Web Programming http://pydish.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3000 and "Python Regrets"

2004-12-01 Thread Steve Holden
Brad Tilley wrote: Matt Gerrans wrote: Anyway, what's to worry about?When the time comes just whip out a little script that converts Python 1.6 (or whatever you like) to Python3K; it will only take seven lines of P3K code. How about 'import classic' ... or from __past__ import __mistakes__ l

Re: Python Win32 Silent Install

2004-12-01 Thread Steve Holden
Matt Gerrans wrote: That sounds easy enough, but I imagine the Acive State package requires some kind of licensing.I'm pre-installing on millions of consumer PCs. Ah, so your group is responsible for all the "I've found Python on my computer, what does it do and can I remove it" messages w

Re: String operations

2004-12-01 Thread Steve Holden
Anoop Rajendra wrote: Hi. I'm trying to resolve an issue with strings. The command(inclusive of the back-slashes) condor_q -l -constraint "ProjectId==\"anoopr_samadams.fnal.gov_161903_30209\"" is the only way the command returns the right result. I'm trying to run this command from inside a python

Re: Python Win32 Silent Install

2004-12-01 Thread Steve Holden
Luke Skywalker wrote: On Wed, 01 Dec 2004 17:15:38 -0500, Steve Holden <[EMAIL PROTECTED]> wrote: You are right about ActiveState, the copy you download from their web site is licensed to prohibit redistribution. They might be prepared to cut you a special license, but you'd have

Re: non blocking read()

2004-12-01 Thread Steve Holden
Donn Cave wrote: In article <[EMAIL PROTECTED]>, Gustavo Córdova Avila <[EMAIL PROTECTED]> wrote: David Bolen wrote: Jp Calderone <[EMAIL PROTECTED]> writes: def nonBlockingReadAll(fileObj): bytes = [] while True: b = fileObj.read(1024) bytes.append(b)

Re: database questions ala newbie pythonist

2004-12-02 Thread Steve Holden
Dan Sommers wrote: On Wed, 1 Dec 2004 20:45:13 -0500, "chris" <[EMAIL PROTECTED]> wrote: But when I try to use a variable such as: ### ... varA = '0' varB = '1190' mycursor.execute('Update Categories Set DelStatus = ' varA 'Where Pro

Re: non blocking read()

2004-12-02 Thread Steve Holden
Gustavo Córdova Avila wrote: Donn Cave wrote: Depends. I don't believe the original post mentioned that the file is a pipe, socket or similar, but it's kind of implied by the use of select() also mentioned. It's also kind of implied by use of the term "block" - disk files don't block. If we are in

Re: non blocking read()

2004-12-02 Thread Steve Holden
Gustavo Córdova Avila wrote: Steve Holden wrote: Gustavo Córdova Avila wrote: Actually the op did mention that he wanted to monitor files. As was pointed out to me when I made the same assertion, he actually said "file object which is stdin" or something like that, which means the ob

Re: Why I can NOT use Python but PHP

2004-12-02 Thread Steve Holden
Lad wrote: I would like to set up my website and allow customers to choose products there, including shopping carts. I would like to use Python but it would be very complicated to start from nothing. Why is there not any(?) framework or complete e-commerce solution written in Python? There are lots

Re: Pythonic use of CSV module to skip headers?

2004-12-02 Thread Steve Holden
Ramon Felciano wrote: Hi -- I'm using the csv module to parse a tab-delimited file and wondered whether there was a more elegant way to skip an possible header line. I'm doing line = 0 reader = csv.reader(file(filename)) for row in reader: if (ignoreFirstLine

Re: pythonwin broke

2004-12-03 Thread Steve Holden
Jive wrote: I've un-installed Python 2.4, re-installed Python 2.3 and PythonWin for 2.3, but it's still broke. When I start PythonWin, sometimes it looks like it is going to be okay. But as soon as I open a .py file, the interactive window grabs the focus and will not let go. I am stumped. Is the

Re: pre-PEP generic objects

2004-12-03 Thread Steve Holden
Paul Rubin wrote: Steven Bethard <[EMAIL PROTECTED]> writes: IMHO this too easy to accomplish right now to warrant an "official" implementation: class Bunch: pass b = Bunch() b.one, b.two, b.three = 1,2,3 works just fine, depending on the problem I might add a few special operators. For anything

Re: How is Python designed?

2004-12-03 Thread Steve Holden
Limin Fu wrote: To clarify, I mean the internal structure and design of python interpreter. Any hint? Thanks. Regards, Limin In the open source world, of course, the usual answer from people like me (who don't delve deeply into the internals most of the time) is "use the source, Luke". But I'm s

Re: installing 2.4

2004-12-03 Thread Steve Holden
Peter Hansen wrote: Matt Gerrans wrote: "Peter Hansen" <[EMAIL PROTECTED]> wrote: Only pure Python code can run without change on a newer interpreter. Is the interpreter smart enough to rebuild a pyc (if the corresponding py file is there of course) file that was built by a previous version? Yes

Re: distinction between float & int

2004-12-03 Thread Steve Holden
Ishwor wrote: hi all, can anyone tell me why this distinction? i mean why it returns False on floats?? a = 1 b = 1 a is b True a = 1.1 b = 1.1 a is b False thanx . There is no guarantee that this will hold in all implementations of Python. The majority implementation, usually called CPython becaus

Re: Help with modules/packages.

2004-12-04 Thread Steve Holden
Christopher J. Bottaro wrote: Hello, I want to be able to say stuff like "import CJB.ClassA" and "import CJB.ClassB" then say "c = CJB.ClassA()" or "c = CJB.ClassB()". CJB will be a directory containing files "ClassA.py" and "ClassB.py". Now that I think about it, that can't work b

Re: help asap

2004-12-06 Thread Steve Holden
the_proud_family wrote: HELP ME PLEASE!! my email is [EMAIL PROTECTED] I can't get the ball to go up right side and then I need it to turn around and keep turning until velocity=0 I have been at it for the past 2 weeks now i give up and call for help. Please if anyone can gide me through i will be

Re: exec and global puzzle

2004-12-06 Thread Steve Holden
Andr? Roberge wrote: I have the following two files: #--testexec.py-- def exec_code(co): try: exec co except: print "error" #-- test.py-- import thread import testexec import time code = "def a():\n print 'a'\n\n" +\ "def c():\n a()\n\nc()" code2 = "def a():\n print '

Re: cut strings and parse for images

2004-12-06 Thread Steve Holden
Andreas Volz wrote: Hi, I used SGMLParser to parse all href's in a html file. Now I need to cut some strings. For example: http://www.example.com/dir/example.html Now I like to cut the string, so that only domain and directory is left over. Expected result: http://www.example.com/dir/ I know how

Re: better regular expression?

2004-12-06 Thread Steve Holden
Vivek wrote: [third request ...] Any suggestions? Thanx. Well, you could try asking just once and then waiting a bit :-) regards Steve -- http://www.holdenweb.com http://pydish.holdenweb.com Holden Web LLC +1 800 494 3119 -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL for Windows for Python 2.4

2004-12-10 Thread Steve Holden
Fuzzyman wrote: If you're determined enough there are instructions here : http://www.vrplumber.com/programming/mstoolkit/ These will get you the Visual Studio 7 tools (free releases of) and tell you how to configure distutils to use it. Hefty downloads though, do not attempt this without broadband

Re: Fun with Outlook and MAPI

2004-12-12 Thread Steve Holden
Chris wrote: Alas, I dont think that there is much you can do to prevent the confirmation dialogs with Outlook's MAPI dll. MS added them in a service pack as an anti-virus measure, so no work-around. Not all clients show these anoying dialogs though. Thunderbird definately doesn't. There is act

Re: newsgroups

2004-12-12 Thread Steve Holden
Francis Lavoie wrote: Do we need a special account or something to use the newsgroup instead of the mailling list? Yes, you have to find an NNTP server that carries comp.lang.python. It's possible your Internet service provider runs such a news server and will let you access it as a part of your

Re: thread/queue bug

2004-12-12 Thread Steve Holden
phil wrote: [...] > 5. Sorry I can't be more help. You don't give anyone much > to go on. All that stuff about "Queue(0)" and "listenq" > is pretty much meaningless to us, you know... You know, I get this all the time on language support groups. This might be a clue. All of my Linux support gr

Re: newbie questions

2004-12-12 Thread Steve Holden
houbahop wrote: Thank you everyone, but I still not understand why such a comon feature like passing parameters byref that is present in most serious programming languages is not possible in a clean way,here in python. I have the habit to never use globals as far as possible and this involve tha

Re: PIL for Windows for Python 2.4

2004-12-13 Thread Steve Holden
Fuzzyman wrote: Steve Holden wrote: Fuzzyman wrote: If you're determined enough there are instructions here : http://www.vrplumber.com/programming/mstoolkit/ These will get you the Visual Studio 7 tools (free releases of) and tell you how to configure distutils to use it. Hefty downloads t

Re: can't find python2.4 source code

2004-12-13 Thread Steve Holden
Donnie Leen wrote: I had tried already, the doesn't contain the sourcecode. In python2.3.3, the release pakage contained sourcecode is Python-2.3.3.tar. Rhubarb. All you had to do was follow Fredrik's instructions. Since they didn't appear to be explicit enough for you, search in the page he names

Re: Why are tuples immutable?

2004-12-13 Thread Steve Holden
jfj wrote: Yo. Why can't we __setitem__ for tuples? The way I see it is that if we enable __setitem__ for tuples there doesn't seem to be any performance penalty if the users don't use it (aka, python performance independent of tuple mutability). On the other hand, right now we have to use a list i

Re: PIL for Windows for Python 2.4

2004-12-13 Thread Steve Holden
Fuzzyman wrote: That's odd - it worked fully *both* times I've done it. I did the *full* doenload though and downloaded the 13 CAB files individually and did a local install. I made the mistake of trying to use the Microsoft installer, which is frankly a load of crap. As I write it's now canceling

Re: anybody know how to use python to communicate with UART?

2004-12-13 Thread Steve Holden
Arnold wrote: I want to use python to communicate with UART port in my PC, how can I achieve this? any modules need to be installed? Thanks pyserial is the usual solution. See http://pyserial.sourceforge.net/ regards Steve -- Steve Holden http://www.holdenweb.com/ Python Web

Re: PIL for Windows for Python 2.4

2004-12-13 Thread Steve Holden
Steve Holden wrote: Fuzzyman wrote: That's odd - it worked fully *both* times I've done it. I did the *full* doenload though and downloaded the 13 CAB files individually and did a local install. I made the mistake of trying to use the Microsoft installer, which is frankly a load of

Re: Fun with Outlook and MAPI

2004-12-13 Thread Steve Holden
messages directly from Outlook. """ regards Steve -- Steve Holden http://www.holdenweb.com/ Python Web Programming http://pydish.holdenweb.com/ Holden Web LLC +1 703 861 4237 +1 800 494 3119 -- http://mail.python.org/mailman/listinfo/python-list

<    4   5   6   7   8   9   10   11   12   13   >