Re: Best way to create a copy of a list

2006-04-04 Thread Frank Millman
Fredrik Lundh wrote: > Frank Millman wrote: > > > I have found two ways of doing it that seem to work. > > > > 1 - row = table[23][:] > > > > 2 - row = [] > > row[:] = table[23] > > > > Are these effectively identical, or is there a subtle distinction which > > I should be aware of. > > > > I

Re: wxpython in action book

2006-04-04 Thread momobear
Butternut squash wrote: > any recommendations? any opinions? > > I want to learn to program in python and need a gui reference. I'll be > updating various mysql tables. I have most of the code ready to roll by > using a command line. I need put some lipstick on my project. > > pyQT seems viable bu

Re: Find similar images using python

2006-04-04 Thread Christos Georgiou
On Fri, 31 Mar 2006 15:10:11 -0800, rumours say that Scott David Daniels <[EMAIL PROTECTED]> might have written: >Christos Georgiou wrote: >> I did make a module based on imgseek, and together with PIL, >> I manage my archive of email attachments (it's incredible how many >> different version

RE: Registration Code

2006-04-04 Thread Ryan Ginstrom
> On Behalf Of Dave Mandelin: > Second, I hear that in general it is very difficult to make a > time-limited demo, because the code has to be all there, so all a > cracker has to do is bypass the "if". It seems that even this method > won't work for that. Do you know of any way to make time limitin

Framework/module for generating HTML documentation

2006-04-04 Thread Ryan Ginstrom
I have been maintaining a body of documentation in plain HTML files. I would now like to automate the generation of the HTML files. Maintaining the HTML files now is tedious and error prone, because every time I move/remove/add a section, I have to renumber the following sections and update my int

Re: Loading a default browser under Windows

2006-04-04 Thread Philippe Martin
BartlebyScrivener wrote: > Philippe, > > import webbrowser > > webbrowser.open("http://groups.google.com/group/comp.lang.python";) > > rpd Many thanks, Philippe -- http://mail.python.org/mailman/listinfo/python-list

Standalone Python functions in UML?

2006-04-04 Thread Roman Susi
Hi! Out of curiosity, how do I draw functions outside classes with UML? How module could be drawn in this case? More theoretical question is if I create classes on the fly, how UML can reflect that? (I know that Python code itself is best at communication design ideas, but there are some peop

Re: what's going on here?

2006-04-04 Thread Ant
You are along the right lines. Try printing out the content of each URL - one of the pages will match your expression, but has additional instructions... I think you are reaching the end of their false trail when you get None returned from the url. The set of pages themselves are the linked list -

Re: Python and microsoft outlook-using com, can I interact with msoutlook?

2006-04-04 Thread Daniel Dittmar
[EMAIL PROTECTED] wrote: > Hi All, > I know that Microsoft Exchange has a com interface, CDO, but I can't seem to > find one for Microsoft outlook. > does anyone have code snippets for using msoutlook and python, or > suggestions? You can use CDO to manage your Inbox, send mail etc. The following

Does anyone know where is the Berkeley XML Database documentation for its Python API?

2006-04-04 Thread Sullivan WxPyQtKinter
I have been looking for python API documentation of BDBXML for quite a few days but I could not find it. Anyone has any idea where it is? Or if there is not such a thing at all, how could I get started? In addition, in the previous posts I have seen some grumble about python API's lack of XMLexcep

scraping nested tables with BeautifulSoup

2006-04-04 Thread [EMAIL PROTECTED]
I'm trying to get the data on the "Central London Property Price Guide" box at the left hand side of this page http://www.findaproperty.com/regi0018.html I have managed to get the data :) but when I start looking for tables I only get tables of depth 1 how do I go about accessing inner tables? sam

Dice probability problem

2006-04-04 Thread Tomi Lindberg
Hi, I'm trying to find a way to calculate a distribution of outcomes with any combination of dice. I have the basics done, but I'm a bit unsure how to continue. My main concern is how to make this accept any number of dice, without having to write a new list comprehension for each case? Here'

Re: Does anyone know where is the Berkeley XML Database documentation for its Python API?

2006-04-04 Thread Amit Khemka
There are no official/un-official documentation for bdbxml python api AFAIK !!! If you want some examples look in "dbxml/examples/python/", directory in your dbxml installation. Though for most part the python api closely follows the C++/Java api (look: http://www.dbxml.com/docs/programmer.html )

Re: markup.py - 1.2 - an HTML/XML generator

2006-04-04 Thread Daniel Nogradi
> > $ pwd > > /usr/lib/python2.4/site-packages > > $ grep -re klass . | wc -l > > 274 > > $ grep -re class_ . | wc -l > > 897 > > How many of those "class_" instances are really just substrings of > "__class__" and "class_name" and such? On my machine, I see a handful > in the standard library, an

Re: Standalone Python functions in UML?

2006-04-04 Thread Ravi Teja
>> Out of curiosity, how do I draw functions outside classes with UML? How module could be drawn in this case? As a utility class. >> More theoretical question is if I create classes on the fly, how UML can reflect that? "On the fly" usually means "at runtime". I guess you mean if you "change co

Re: Standalone Python functions in UML?

2006-04-04 Thread Rob Cowie
Roman Susi wrote: > Hi! > > Out of curiosity, how do I draw functions outside classes with UML? How > module could be drawn in this case? I would say that within a class diagram, you can't. In other UML diagrams (such as sequence interaction), the function is simply used as if it were a method be

Re: Dice probability problem

2006-04-04 Thread Alexander Schmolck
Tomi Lindberg <[EMAIL PROTECTED]> writes: > I'm trying to find a way to calculate a distribution of outcomes with any > combination of dice. I have the basics done, but I'm a bit unsure how to > continue. My main concern is how to make this accept any number of dice, > without having to write a ne

Re: Dice probability problem

2006-04-04 Thread Alexander Schmolck
Alexander Schmolck <[EMAIL PROTECTED]> writes: > addDice(resultFor1, pool[1]) > addDice(pool[0], pool[1]) sorry should have spelled out that successive lines are meant to be equivalent, i.e. addDice(resultFor1, pool[1]) == addDice(pool[0], pool[1]) 'as -- http://mail.python.org

Re: Dice probability problem

2006-04-04 Thread Antoon Pardon
Op 2006-04-04, Tomi Lindberg schreef <[EMAIL PROTECTED]>: > Hi, > > I'm trying to find a way to calculate a distribution of > outcomes with any combination of dice. I have the basics > done, but I'm a bit unsure how to continue. My main concern > is how to make this accept any number of dice, wi

Re: ANN: uuid-0.1 Released

2006-04-04 Thread jUrner
I would like to contact Ka-Ping Yee, but got no answer to my emails so far. Maybe s.o. knows how to contact Ka-Ping Yee. BTW persistant storage for clock sequence is not implemented in my module so far. I will consider it for the next release. Any ideas how to implement ? -- http://mail.python.

Re: Convertion of Unicode to ASCII NIGHTMARE

2006-04-04 Thread ChaosKCW
Hi Thanks for all the posts. I am still digesting it all but here are my initial comments. >Don't. You can't. Those characters don't exist in the ASCII character set. >SQLite 3.0 deals with UTF-8 encoded SQL statements, though. >http://www.sqlite.org/version3.html As mentioned by the next poster

Re: Best way to create a copy of a list

2006-04-04 Thread Jorge Godoy
"Frank Millman" <[EMAIL PROTECTED]> writes: > Interesting. My results are opposite. I got the same here (cPython 2.4.1): [EMAIL PROTECTED] ~ % python -mtimeit -s "data=[range(100)]*100; row = []" "row[:] = data[23]" 100 loops, best of 3: 1.15 usec per loop [EMAIL PROTECTED] ~ % python -mtim

Re: Convertion of Unicode to ASCII NIGHTMARE

2006-04-04 Thread John Machin
"Thus you lose data, but thats just dandy with me.": Please reconsider this attitude, before you perpetrate a nonsense or even a disaster. Wrt your last para: 1. Roger didn't say "ignore" -- he said "won't accept" (a major difference). 2. The ASCII code comprises 128 characters, *NOT* 256. 3. What

Re: question about nasty regex

2006-04-04 Thread Peter Hansen
Lawrence D'Oliveiro wrote: > In article <[EMAIL PROTECTED]>, > Paul Rubin wrote: >>"Some people, when confronted with a problem, think ``I know, I'll use >>regular expressions.'' Now they have two problems." --JWZ > > Regexes are good if you need a solution quickly, an

warning users of problems with logging

2006-04-04 Thread Chris Curvey
The following code exists in logging/config.py handlers[hand] = h except: #if an error occurs when instantiating a handler, too bad pass#this could happen e.g. because of lack of privileges The problem here is that if something did go wrong instantiating the handler, you have no

CD Burning

2006-04-04 Thread Albert Leibbrandt
Hi Can anybody tell me which windows API or python module they are using for writing cd's / dvd's with python? Thanks Albert -- http://mail.python.org/mailman/listinfo/python-list

Windows Services

2006-04-04 Thread rodmc
Hello, I am trying to figure out how to write a windows service, I am totally new to it. I have written a simple test case, however it doesn't appear to do anything. Although it installs and appears to start, when I run a query of its status (using another app) it says it is not running. As a not

tuple syntax ',' (ending in comma?)

2006-04-04 Thread Michael Yanowitz
Hello: I am still relatively new to Python. I am confused by the syntax for tuples. I had: thread.start_new_thread(read_data_thread, (strDataFilename)) and got back the following error: File "scene.py", line 256, in readData thread.start_new_thread(read_data_thread, (strDataFilename)

Re: tuple syntax ',' (ending in comma?)

2006-04-04 Thread Georg Brandl
Michael Yanowitz wrote: > Hello: > >I am still relatively new to Python. I am confused by the syntax for > tuples. > I had: > thread.start_new_thread(read_data_thread, (strDataFilename)) > and got back the following error: > > File "scene.py", line 256, in readData > thread.start_ne

Re: warning users of problems with logging

2006-04-04 Thread Peter Otten
Chris Curvey wrote: > The following code exists in logging/config.py > > handlers[hand] = h > except: #if an error occurs when instantiating a handler, too bad > pass#this could happen e.g. because of lack of privileges > > The problem here is that if something did go wrong inst

Re: Standalone Python functions in UML?

2006-04-04 Thread Philippe Martin
Roman Susi wrote: > Hi! > > Out of curiosity, how do I draw functions outside classes with UML? How > module could be drawn in this case? > I'm not up to par on the latest UML specs (or not too old) - but I don't believe UML handles that: it is called a class diagram after all. > More theoretic

Re: Problem with wrapping GNU Units

2006-04-04 Thread TheSeeker
Hi, Perhaps in another revision, as utilizing Unum, while cool, would be quite a change to my code. Could it be that the readline library used by GNU Units can detect the difference between a 'real' tty and a pipe? If so, how can I trick it? Thanks, Duane -- http://mail.python.org/mailman/list

Re: Windows Services

2006-04-04 Thread Larry Bates
rodmc wrote: > Hello, > > I am trying to figure out how to write a windows service, I am totally > new to it. I have written a simple test case, however it doesn't appear > to do anything. Although it installs and appears to start, when I run a > query of its status (using another app) it says it

Re: what's going on here?

2006-04-04 Thread John Salerno
Ant wrote: > You are along the right lines. Try printing out the content of each URL > - one of the pages will match your expression, but has additional > instructions... I think you are reaching the end of their false trail > when you get None returned from the url. But the weird thing is that wh

ANN: CherryPy-2.2.0-rc1 released

2006-04-04 Thread remi
Hello everyone, After six months of hard work and 300 changesets since the last stable release I'm happy to announce that CherryPy-2.2.0-final is out. The biggest changes are: - switch to a lowercase api (although the old camelCase API is still supported for backward compatibility) - support fo

Re: tuple syntax ',' (ending in comma?)

2006-04-04 Thread John Salerno
Michael Yanowitz wrote: > I am just confused by the syntax. I am used to a comma meaning that there > should be another parameter after the comma and if no additional parameter > the comma would not be necessary. But isn't it incorrect to think in terms of 'parameters' when referring to tuples

Re: scraping nested tables with BeautifulSoup

2006-04-04 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > I'm trying to get the data on the "Central London Property Price Guide" > box at the left hand side of this page > http://www.findaproperty.com/regi0018.html > > I have managed to get the data :) but when I start looking for tables I > only get tables of depth 1 how do I

Difference in Python and Ruby interactive shells

2006-04-04 Thread dmh2000
I am experimenting with the interactive interpreter environments of Python and Ruby and I ran into what seems to be a fundamental difference. However I may be doing something wrong in Python. Please comment and correct me if I am wrong In both languages, you can start up the interactive interprete

Re: symbolic links, aliases, cls clear

2006-04-04 Thread Pankaj
its true for the processes, gone to the system mode and from there the process is not considering the shell variable any more. In case of deamons also it is the same case. For Phython programs, I am not sure , may they are also nohops, so might be not accessing the shell variables. But i think you

Re: ANN: CherryPy-2.2.0 released

2006-04-04 Thread remi
Oops ... The title should have been "CherryPy-2.2.0 released", not "CherryPy-2.2.0-rc1" ... [EMAIL PROTECTED] wrote: > Hello everyone, > > After six months of hard work and 300 changesets since the last stable > release I'm happy to announce that CherryPy-2.2.0-final is out. > > The biggest chang

Re: Difference in Python and Ruby interactive shells

2006-04-04 Thread Claudio Grondi
dmh2000 wrote: > I am experimenting with the interactive interpreter environments of > Python and Ruby and I ran into what seems to be a fundamental > difference. However I may be doing something wrong in Python. Please > comment and correct me if I am wrong > > In both languages, you can start up

Re: how to comment lot of lines in python

2006-04-04 Thread Rick Zantow
Kent Johnson <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Rick Zantow wrote: >> Kent Johnson <[EMAIL PROTECTED]> wrote in news:44310867$1_1 >> @newspeer2.tds.net: >> >>> Sion Arrowsmith wrote: Out of curiousity, is there a modern editor which *doesn't* allow you to comment/un

Re: warning users of problems with logging

2006-04-04 Thread Chris Curvey
So it is. Great! -- http://mail.python.org/mailman/listinfo/python-list

Re: Framework/module for generating HTML documentation

2006-04-04 Thread Thomas Guettler
Hi, I have a little script which creates numbers by scanning the tags. But up to now it only works for single file. But it would be easy to split e.g. on every tag. http://www.thomas-guettler.de/scripts/number-html-headings.py.txt Am Tue, 04 Apr 2006 17:01:43 +0900 schrieb Ryan Ginstrom: > E.g

Re: CD Burning

2006-04-04 Thread Sybren Stuvel
Albert Leibbrandt enlightened us with: > Can anybody tell me which windows API or python module they are > using for writing cd's / dvd's with python? I'd install cygwin and use cdrecord. That seems the easiest way to go about burning disks to me. Sybren -- The problem with the world is stupidit

Re: Difference in Python and Ruby interactive shells

2006-04-04 Thread Sybren Stuvel
dmh2000 enlightened us with: > When you want to change something, you can edit those same source > files outside the environment and reload them from within the > interactive environment. But, here is the difference: with Python, > when you reload the source file (module in Python terms), it seems

Re: Difference in Python and Ruby interactive shells

2006-04-04 Thread Steve Juranich
dmh2000 wrote: > I am experimenting with the interactive interpreter environments of > Python and Ruby and I ran into what seems to be a fundamental > difference. However I may be doing something wrong in Python. Please > comment and correct me if I am wrong > > In both languages, you can start u

ANN: CherryPy-2.2.0 released

2006-04-04 Thread remi
(sorry for the double-post, the title of the previous one was wrong) Hello everyone, After six months of hard work and 300 changesets since the last stable release I'm happy to announce that CherryPy-2.2.0-final is out. The biggest changes are: - switch to a lowercase api (although the old came

Re: Difference in Python and Ruby interactive shells

2006-04-04 Thread Diez B. Roggisch
> In both languages, you can start up the interactive interpreter > ('python' and 'irb'), load source files and do stuff, like create > objects and call their methods. When you want to change something, you > can edit those same source files outside the environment and reload > them from within the

Re: what's going on here?

2006-04-04 Thread John Salerno
John Salerno wrote: > Ant wrote: >> You are along the right lines. Try printing out the content of each URL >> - one of the pages will match your expression, but has additional >> instructions... I think you are reaching the end of their false trail >> when you get None returned from the url. > >

Re: how to comment lot of lines in python

2006-04-04 Thread Kent Johnson
Rick Zantow wrote: >> Thank you! I don't suppose you have any tricks to make it work with >> UTF-8 data outside the cp1252 character set, do you? >> > > Sadly, I don't. TP claims Unicode support, but I'm not sure what they > mean; it does seem to be restricted to cp1252. TP will correctly read

How to get pyMinGW?

2006-04-04 Thread Ames Andreas
Hi all, the download link on http://jove.prohosting.com/iwave/ipython/pyMinGW.html seems to be broken. Can anybody provide another link? Is there a current version for python 2.4.3 available? TIA, aa -- Andreas Ames | Programmer | Comergo GmbH | Voice: +49 69 7505 3213 | ames AT avaya . c

Help with display placement

2006-04-04 Thread Samantha
I am new to Python and am attempting to write a routine that will display a five game selection for a power ball drawing. I think I have the random drawing set to work ok, but I want to have the dialog box move in the center of my screen. I can't seem to get the code correct to do this. Any help

ANN: CherryPy-2.2.0 released

2006-04-04 Thread remi
(sorry for the double-post, the title of the previous one was wrong) Hello everyone, After six months of hard work and 300 changesets since the last stable release I'm happy to announce that CherryPy-2.2.0-final is out. The biggest changes are: - switch to a lowercase api (although the old came

Re: Help with display placement

2006-04-04 Thread [EMAIL PROTECTED]
This code come up, fairly centered in my screen. What do you mean by move? -- http://mail.python.org/mailman/listinfo/python-list

how do you use pickle?

2006-04-04 Thread John Salerno
Here's what I have: import pickle data = open(r'C:\pickle_data.txt', 'w') image = open(r'C:\peakhell.jpg') pickle.Pickler(data) data.dump(image) data.close() image.close() First off, I'm not sure the second line is the way to do that. But my main problem is I don't know how to define the steps

Re: Difference in Python and Ruby interactive shells

2006-04-04 Thread Michele Simionato
You want this recipe from Michael Hudson: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/160164 "automatically upgrade class instances on reload()" -- http://mail.python.org/mailman/listinfo/python-list

Re: scraping nested tables with BeautifulSoup

2006-04-04 Thread [EMAIL PROTECTED]
Hey Kent, thanks for your reply. how did you exactly save the file in firefox? if I save the file locally I get the same error. print len(soup('table')) gives me 4 instead 25 -- http://mail.python.org/mailman/listinfo/python-list

Re: how do you use pickle?

2006-04-04 Thread Fredrik Lundh
John Salerno wrote: > Here's what I have: > > import pickle > > data = open(r'C:\pickle_data.txt', 'w') > image = open(r'C:\peakhell.jpg') > pickle.Pickler(data) > data.dump(image) > data.close() > image.close() > > First off, I'm not sure the second line is the way to do that. But my > main probl

Re: Best way to create a copy of a list

2006-04-04 Thread Alex Martelli
Frank Millman <[EMAIL PROTECTED]> wrote: ... > If they are all equivalent from a functional point of view, I lean > towards the second version. I agree with Rune that the third one is > nicer to read, but somehow the [:] syntax makes it a bit more obvious > what is going on. I vastly prefer to

Re: Difference in Python and Ruby interactive shells

2006-04-04 Thread malv
I think reload should be preceded by import. Example: Online code modification: upon modifying and saving mytest.py issue on the interactive shell: >>>import mytest >>>reload(mytest) The shell should respond with "" (NOT:mytest.pyc) Note that modules importing mytest should not

Re: Help with display placement

2006-04-04 Thread Samantha
I want to be able to control where the dialog is displayed . X,Y location from the upper left corner of the screen. S <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > This code come up, fairly centered in my screen. What do you mean by > move? > -- http://mail.python.org/mailma

Final Call for Papers: IAENG International Workshop on Software Engineering (in IMECS 2006)

2006-04-04 Thread imecs2006
Final CFP From: IAENG: International Association of Engineers (http://www.iaeng.org) Engineering Letters (http://www.engineeringletters.com) The 2006 IAENG International Workshop on Software Engineering (Part of The International MultiConference of Engineers and Computer Scientists IMECS 2006) I

Re: Difference in Python and Ruby interactive shells

2006-04-04 Thread Alex Martelli
Michele Simionato <[EMAIL PROTECTED]> wrote: > You want this recipe from Michael Hudson: > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/160164 > > "automatically upgrade class instances on reload()" Note that the version in the printed Cookbook (2nd edition) was substantially

Re: scraping nested tables with BeautifulSoup

2006-04-04 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > Hey Kent, > > thanks for your reply. how did you exactly save the file in firefox? if > I save the file locally I get the same error. I think I right-clicked on the page and chose "Save page as..." Here is a program that shows where BS is choking. It finds the last lea

Re: Difference in Python and Ruby interactive shells

2006-04-04 Thread Lou Pecora
In article <[EMAIL PROTECTED]>, "Michele Simionato" <[EMAIL PROTECTED]> wrote: > You want this recipe from Michael Hudson: > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/160164 > > "automatically upgrade class instances on reload()" Impressive, but YIKES, there ought to be

Re: how do you use pickle?

2006-04-04 Thread John Salerno
Fredrik Lundh wrote: > file handles does not belong to that group (what did you expect > pickle to do with a file handle ?) > > or did "object" refer to the Pickler instance? you don't really need to > bother with that; just use the dump *function* instead: > > pickle.dump(object, file) >

Re: how do you use pickle?

2006-04-04 Thread John Salerno
John Salerno wrote: > AttributeError: 'module' object has no attribute 'dump' (when I create > an instance) That should be: AttributeError: 'module' object has no attribute 'Pickler' (when I create an instance) -- http://mail.python.org/mailman/listinfo/python-list

Re: scraping nested tables with BeautifulSoup

2006-04-04 Thread [EMAIL PROTECTED]
so it must be the malformed HTML comment that is confusing BS. I might try different methods to see if I get the same problem... thanks -- http://mail.python.org/mailman/listinfo/python-list

Dr. Dobb's Python-URL! - weekly Python news and links (Apr 4)

2006-04-04 Thread Peter Otten
QOTW: "Don't be too sure that it's compatible for the indefinite future. XML is just as future-proof as any other format." - Sybren Stuvel "Submitting a proposed change or fix [of the Python docs] is easier and quicker than arguing about it on c.l.py and it seems to get pretty quickly to the actua

Re: scraping nested tables with BeautifulSoup

2006-04-04 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > Hey Kent, > > thanks for your reply. how did you exactly save the file in firefox? if > I save the file locally I get the same error. The Firefox version, among other things, turns all the funky and tags into comments. Here is a way to do the same thing with BS: imp

Re: Dice probability problem

2006-04-04 Thread Tomi Lindberg
First, thanks to Antoon and Alexander for replying. Antoon Pardon wrote: > It would be better to construct distributions for one > die and make a function that can 'add' two distributions > together. As both replies pointed to this direction, I tried to take that route. Here's the unpolished co

Re: how do you use pickle?

2006-04-04 Thread Fredrik Lundh
John Salerno wrote: > > but if you insist on using your own Pickler instance, you have to save > > the pickler instance in a variable, and call the dump method on that in- > > stance: > > > > myfile = open(somefilename, "wb") > > mypickler = pickle.Pickler(myfile) > > mypickler.dump(ob

Re: how do you use pickle?

2006-04-04 Thread Pythor
John Salerno wrote: > I'm sorry, but I'm terribly confused. Nothing seems to be working for > me. I *think* what I need to pickle is an image file, SNIP Hint: Read the source for that page more carefully. -- http://mail.python.org/mailman/listinfo/python-list

Re: how do you use pickle?

2006-04-04 Thread John Salerno
Fredrik Lundh wrote: > John Salerno wrote: > >>> but if you insist on using your own Pickler instance, you have to save >>> the pickler instance in a variable, and call the dump method on that in- >>> stance: >>> >>> myfile = open(somefilename, "wb") >>> mypickler = pickle.Pickler(myfile)

Re: Convertion of Unicode to ASCII NIGHTMARE

2006-04-04 Thread Robert Kern
Roger Binns wrote: > "Paul Boddie" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > >>It looks like you may have Unicode objects that you're presenting to >>sqlite. In any case, with earlier versions of pysqlite that I've used, >>you need to connect with a special unicode_results para

Re: how do you use pickle?

2006-04-04 Thread John Salerno
Fredrik Lundh wrote: > define "image file". the data in the file, the file name, or some other > representation? I was being dense again. I was just opening the file, but not reading it! After reading it, it's easy to pickle it. > did you, by any chance, name your test script "pickle.py" ? Th

Re: how do you use pickle?

2006-04-04 Thread John Salerno
Pythor wrote: > John Salerno wrote: > >> I'm sorry, but I'm terribly confused. Nothing seems to be working for >> me. I *think* what I need to pickle is an image file, > > SNIP > > Hint: Read the source for that page more carefully. > Hmmm...the source doesn't say much. Is there more to do wit

Re: Standalone Python functions in UML?

2006-04-04 Thread bruno at modulix
Ravi Teja wrote: (snip) >>>More theoretical question is if I create classes on the fly, how UML can > > reflect that? > > "On the fly" usually means "at runtime". I guess you mean if you > "change code" will my diagram stay in sync?. Nope, the OP really meant "on the fly", as in "at runtime". In

Re: Python and microsoft outlook-using com, can I interact with msoutlook?

2006-04-04 Thread J Correia
><[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] >Hi All, > know that Microsoft Exchange has a com interface, CDO, but I can't seem to >find one for Microsoft outlook. >does anyone have code snippets for using msoutlook and python, or >suggestions? Check out: http://aspn.activestat

Re: Standalone Python functions in UML?

2006-04-04 Thread bruno at modulix
Philippe Martin wrote: > Roman Susi wrote: > (snip) >>More theoretical question is if I create classes on the fly, how UML can >>reflect that? > > > You mean objects I think: Yes : class objects !-) Python's classes *are* objects. And you can create new classes at runtime. (snip) -- bruno d

Re: Dice probability problem

2006-04-04 Thread Gerard Flanagan
Tomi Lindberg wrote: > > # A die with n faces > D = lambda n: [x+1 for x in range(n)] > That can be written: D = lambda n : range(1,n+1) Gerard -- http://mail.python.org/mailman/listinfo/python-list

Re: how do you use pickle?

2006-04-04 Thread Pythor
John Salerno wrote: > Pythor wrote: > > John Salerno wrote: > > > >> I'm sorry, but I'm terribly confused. Nothing seems to be working for > >> me. I *think* what I need to pickle is an image file, > > > > SNIP > > > > Hint: Read the source for that page more carefully. > > > > Hmmm...the source d

kinterbas and Python

2006-04-04 Thread Balin
Hi all, I have some problem with packege kinterbas for Firebird db connection this is my code: import kinterbasdb class ConnessioneDB: def initialize(self): kinterbasdb.init(concurrency_level=1) con = kinterbasdb.connect(host='192.168.1.20', database='/home/db/TEST.FDB', user

Re: Convertion of Unicode to ASCII NIGHTMARE

2006-04-04 Thread Paul Boddie
Robert Kern wrote: > Roger Binns wrote: > > "Paul Boddie" <[EMAIL PROTECTED]> wrote > >>It looks like you may have Unicode objects that you're presenting to > >>sqlite. In any case, with earlier versions of pysqlite that I've used, > >>you need to connect with a special unicode_results parameter,

Re: Standalone Python functions in UML?

2006-04-04 Thread Roman Susi
Ravi Teja wrote: >>>Out of curiosity, how do I draw functions outside classes with UML? How > > module could be drawn in this case? > > As a utility class. So, function could be a utility class method. If there are no better ways. >>>More theoretical question is if I create classes on the fly,

Re: how do you use pickle?

2006-04-04 Thread John Salerno
Pythor wrote: > John Salerno wrote: >> Pythor wrote: >>> John Salerno wrote: >>> I'm sorry, but I'm terribly confused. Nothing seems to be working for me. I *think* what I need to pickle is an image file, >>> SNIP >>> >>> Hint: Read the source for that page more carefully. >>> >> Hmmm...t

Re: Help with display placement

2006-04-04 Thread [EMAIL PROTECTED]
Ok so I'm not to bright sometimes Well if you want this kinda control I suggest you go ahead and subclass toplevel, but the simple answer before running root.mainloop() make a call to root.geometry(geometryString) geoometrystring is in the format WxH+X+Y - you may hve to do some screen cal

Re: scraping nested tables with BeautifulSoup

2006-04-04 Thread [EMAIL PROTECTED]
Thanks Kent that works perfectly.. How can I strip all the HTML and create easily a dictionary of {location:price} ?? -- http://mail.python.org/mailman/listinfo/python-list

Re: Standalone Python functions in UML?

2006-04-04 Thread Philippe Martin
But not in UML: a class diagram will represent classes while a sequence diagram objects. Philippe bruno at modulix wrote: > Philippe Martin wrote: >> Roman Susi wrote: >> > (snip) > >>>More theoretical question is if I create classes on the fly, how UML can >>>reflect that? >> >> >> You me

Re: how do you use pickle?

2006-04-04 Thread Pythor
John Salerno wrote: > Pythor wrote: > > John Salerno wrote: > >> Pythor wrote: > >>> John Salerno wrote: > >>> > I'm sorry, but I'm terribly confused. Nothing seems to be working for > me. I *think* what I need to pickle is an image file, > >>> SNIP > >>> > >>> Hint: Read the source for

Re: scraping nested tables with BeautifulSoup

2006-04-04 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > Thanks Kent that works perfectly.. How can I strip all the HTML and > create easily a dictionary of {location:price} ?? This should help: prices = priceGuide.table for tr in prices: print tr.a.string, tr.a.findNext('font').string Kent -- http://mail.python.org/

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Apr 4)

2006-04-04 Thread gene tani
Peter Otten wrote: > The old Python "To-Do List" now lives principally in a > SourceForge reincarnation. > http://sourceforge.net/tracker/?atid=355470&group_id=5470&func=browse > http://python.sourceforge.net/peps/pep-0042.html > Thanks, very nice summary. One thing, the

ANNOUNCE: wxPython 2.6.3.2

2006-04-04 Thread Robin Dunn
Announcing -- The 2.6.3.2 release of wxPython is now available for download at http://wxpython.org/download.php. This is a mostly bug fix release and takes care of several "unfortunate features" discovered in the 2.6.3.0 release made last week. A summary of changes is listed below and a

Re: how do you use pickle?

2006-04-04 Thread John Salerno
Pythor wrote: > Whis is why I said carefully ;) I missed it several times myself when > I was working on the challenge. Ok, frustration has set in again. I see the file name in the source code, but am I meant to actually access a file, or just use the name itself? I also had to look up what 'b

Re: ANNOUNCE: wxPython 2.6.3.2

2006-04-04 Thread John Salerno
Robin Dunn wrote: > > Announcing > -- > > The 2.6.3.2 release of wxPython is now available for download at > http://wxpython.org/download.php. This is a mostly bug fix release > and takes care of several "unfortunate features" discovered in the > 2.6.3.0 release made last week. A summar

Re: how do you use pickle?

2006-04-04 Thread John Salerno
John Salerno wrote: > Pythor wrote: > >> Whis is why I said carefully ;) I missed it several times myself when >> I was working on the challenge. > > Ok, frustration has set in again. I see the file name in the source > code, but am I meant to actually access a file, or just use the name > its

Re: [ANN] markup.py - 1.2 - an HTML/XML generator

2006-04-04 Thread Walter Dörwald
Peter Hansen wrote: > Felipe Almeida Lessa wrote: >> $ pwd >> /usr/lib/python2.4/site-packages >> $ grep -re klass . | wc -l >> 274 >> $ grep -re class_ . | wc -l >> 897 > > How many of those "class_" instances are really just substrings of > "__class__" and "class_name" and such? On my machine,

[wxPython-users] Re: ANNOUNCE: wxPython 2.6.3.2

2006-04-04 Thread Kevin Walzer
Robin Dunn wrote: > > Announcing > -- > > The 2.6.3.2 release of wxPython is now available for download at > http://wxpython.org/download.php. This is a mostly bug fix release > and takes care of several "unfortunate features" discovered in the > 2.6.3.0 release made last week. A summar

Re: ANNOUNCE: wxPython 2.6.3.2

2006-04-04 Thread Robin Dunn
Kevin Walzer wrote: > Is the new build of wxPython-Mac a universal binary? > No, not yet. There is still some more work to do for that. -- Robin Dunn Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython! -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >