ANN: PyEnchant 1.1.5

2006-01-19 Thread Ryan Kelly
Hi Everyone, I'm pleased to announce the release of PyEnchant version 1.1.5. This is a bugfix release to address some hangs when running on MS Windows. Specifically: * Fix hang in included MySpell (Windows distribution) * Workaround for some MySpell/unicode problems * Update to latest

Re: web crawling.

2006-01-19 Thread gene tani
S Borg wrote: Hello, I have been writing very simple Python programs that parse HTML and such, mainly just to get a better feel for the language. Here is my question: If I parsed an HTML page into all of the image files listed on that page, how could I request all of those images and

Re: Arithmetic sequences in Python

2006-01-19 Thread Antoon Pardon
Op 2006-01-19, Alex Martelli schreef [EMAIL PROTECTED]: What should list(list(1,2,3)) be? Should list really work completely differently depending on whether it has a single arg or multiple args? It works just fine for max and min, why should list be different? Well IMO it works fine for

Re: New Python.org website ?

2006-01-19 Thread Fredrik Lundh
Shalabh Chaturvedi wrote: Tim the Taller (I presume he's taller; he's Dutch) and the other critics fail to realize is that no one reads content. I disagree completely. I wouldn't touch a new language or technology without first reading content. Neither would my boss, or any other manager

Re: OT: excellent book on information theory

2006-01-19 Thread Steve Holden
Roger Upole wrote: Alex Martelli [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Steven D'Aprano [EMAIL PROTECTED] wrote: ... I mean, when you read He sat on the chair do you need to look up the dictionary to discover that chairs can have arm rests or not, they can be made of wood

Re: New Python.org website ?

2006-01-19 Thread Fredrik Lundh
JW wrote: I don't agree. I read websites in search for information (content), not to find advertisements. Yes, and I read Playboy for the interviews ;) if you want the glossy stuff, go to python.com. In another post, you mention http://www.joelonsoftware.com/ which appears to be some

Re: 10060, 'Operation timed out'

2006-01-19 Thread Sumit Acharya
Hi Steve, this is the trace I have got:- Traceback (most recent call last): File sumit1.py, line 39, in ? ftp.connect(host,port) File C:\programs\packages\python24\lib\ftplib.py, line 129, in connect raise socket.error, msg socket.error: (10060, 'Operation timed out') --

Re: Arithmetic sequences in Python

2006-01-19 Thread Paul Rubin
Antoon Pardon [EMAIL PROTECTED] writes: And [[3]] would have to become: list((list((3,)),)) In my opinion the bracket notation wins the clarity contest handsdown in this case and IMO these cases occure frequently enough. I'm convinced now. Until that, I could have gone either way. --

Re: New Python.org website ?

2006-01-19 Thread Steve Holden
Shalabh Chaturvedi wrote: Tim Parkin wrote: Well apart from the front page and a couple of pages providing content specific to different types of usersm the whole site is the same as it was before. Do you have a problem with marketing python or with the content of the python site? Could you

Re: New Python.org website ?

2006-01-19 Thread Fredrik Lundh
Tim Parkin wrote: the design is alright (if a bit too bland business), but the little I've seen of the information architecture and the backend infrastructure feels like 1998 (which, I suppose, was when the project started...) Could you expand on why the backend infrastructure and

Re: tools to manipulate PDF document?

2006-01-19 Thread tooper
Try reportlab PDF library (www.reportlab.org). Many things for graphs but also basic handling. Works fast reliably for my requirements. -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python.org website ?

2006-01-19 Thread Brian van den Broek
Steve Holden said unto the world upon 11/01/06 04:44 AM: http://beta.python.org A few minor points about the design: The Using Python for . . . for section on the right is expectation violating in several ways: 1) Each two lines have 3 separate links, but all go to the same place. Much

Re: New Python.org website?

2006-01-19 Thread Steve Holden
Obaid R. wrote: Steve Holden: The history of this choice is lost in the mists of time. Many other proposals were made and discussed at around the same time, to the extent that it became clear no one choice could win universal approval. You are the first person to my knowledge to point out

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Claudio Grondi
Fredrik Lundh wrote: Dave Hansen wrote: Fuzzyman wrote: I'm not familiar with the C basic datatypes - I assume it has an array or list like object. Would it contain a sequence of poitners to the members ? In which case they would only be equal if the pointers are the same. In this case :

Re: getopt.gnu_getopt: incorrect documentation

2006-01-19 Thread Steve Holden
Giovanni Bajo wrote: Hello, The official documentation for getopt.gnu_getopt does not mention the version number in which it was introduced (so I assumed it was introduced back when getopt was added). This is wrong, though: I was informed that Python 2.2 does not have this function, and a

Re: why is my hash being weird??

2006-01-19 Thread Steven D'Aprano
pycraze wrote: I do the following Steps to the .c file to create the .py file 1 cc -o s s.c 2 ./s (input) test.py 3 python test.py You are appending to the test file. How many times have you appended to it? Once? Twice? A dozen times? Just what is in the file test.py

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Steven D'Aprano
Claudio Grondi wrote: Exactly this is what Python does under the hood when writing a = some string b = some string where a and b are actually, in terms of C, pointer to Python object data structures which provide strings as arrays where it is possible to say a[0], but ... if here

Re: Arithmetic sequences in Python

2006-01-19 Thread Steven D'Aprano
Alex Martelli wrote: I much prefer the current arrangement where dict(a=b,c=d) means {'a':b, 'c':d} -- it's much more congruent to how named arguments work for every other case. Would you force us to quote argument names in EVERY functioncall...?! Hmmm... should these two forms give

Re: MSSQL LIKE and IN statements in ADO problem

2006-01-19 Thread Raja Raman Sundararajan
Hello Steve, Roger and Pete, Nice to read your reply. Well, I can do an assert check for integers and then filter out hazardous SQL injection characters for varchars and do a direct substitution of the filtered values with the SQL statement. But by using ADO, input strings can be treated as

Re: New Python.org website ?

2006-01-19 Thread Fredrik Lundh
Steve Holden wrote: This critique is all very well, but it tends to rely rather heavily on the words I think. You are, of course, entitled to your opinion, but please don't think that this new design was created on a whim. you keep saying that, but whenever the analysis that led up to the

Re: tools to manipulate PDF document?

2006-01-19 Thread wcc
Thanks a lot tooper. I will check it out. - wcc -- http://mail.python.org/mailman/listinfo/python-list

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Claudio Grondi
Steven D'Aprano wrote: Claudio Grondi wrote: Exactly this is what Python does under the hood when writing a = some string b = some string where a and b are actually, in terms of C, pointer to Python object data structures which provide strings as arrays where it is possible to say a[0],

Re: MSSQL LIKE and IN statements in ADO problem

2006-01-19 Thread Raja Raman Sundararajan
This does not seem to work well Roger value = '%raj%' cmd.CommandText = select * from table_name where firstname LIKE ? result is 0 where I expected 4 /Raja Raman -- http://mail.python.org/mailman/listinfo/python-list

Re: 10060, 'Operation timed out'

2006-01-19 Thread Steve Holden
Sumit Acharya wrote: Hi Steve, this is the trace I have got:- Traceback (most recent call last): File sumit1.py, line 39, in ? ftp.connect(host,port) File C:\programs\packages\python24\lib\ftplib.py, line 129, in connect raise socket.error, msg socket.error: (10060, 'Operation

Announcement Study Group Essentials of Programming Languages

2006-01-19 Thread bobueland
Since there have been some interest, a reading group has been started at http://groups.yahoo.com/group/csg111 I must warn you that the programming language used in Essentials of Programming Languages is Scheme, which is variant of Lisp. Now this course is not a course in Scheme but about powerful

Python on an embedded platform

2006-01-19 Thread Derek
Hi, I am looking to port Python to an embedded platform (an ARM7 device with fairly limited memory, capable of running an RTOS, but not an OS, such as Linux). I came across DePython from a few years ago, but it seems to have died a death. Does anybody have advice? I am looking for any tricks,

Re: 10060, 'Operation timed out'

2006-01-19 Thread Sumit Acharya
Ok, so need to see on the server side. -- http://mail.python.org/mailman/listinfo/python-list

Efficient implementation of deeply nested lists

2006-01-19 Thread Kay Schluehr
I want to manipulate a deeply nested list in a generic way at a determined place. Given a sequence of constant objects a1, a2, ..., aN and a variable x. Now construct a list from them recursively: L = [a1, [a2, [[aN, [x]]...]] The value of x is the only one to be changed. With each value of

Re: tools to manipulate PDF document?

2006-01-19 Thread Raja Raman Sundararajan
Yes, reportlad is a good tool for creating pdf and images -- http://mail.python.org/mailman/listinfo/python-list

Re: Arithmetic sequences in Python

2006-01-19 Thread Fredrik Lundh
Steven D'Aprano wrote: I much prefer the current arrangement where dict(a=b,c=d) means {'a':b, 'c':d} -- it's much more congruent to how named arguments work for every other case. Would you force us to quote argument names in EVERY functioncall...?! Hmmm... should these two forms give

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Claudio Grondi
Steven D'Aprano wrote: On Wed, 18 Jan 2006 15:29:24 +0100, Claudio Grondi wrote: The problem here is, that I mean, that in Python it makes no sense to talk about a value of an object, because it leads to weird things when trying to give a definition what a value of an object is. Python

Re: Problem getting MoinMoin going

2006-01-19 Thread funny_leech
Howdy, I got it going--apparently, it's an incompatability between MoinMoin 1.5.0 and Python 2.3.4. Python 2.3.5 and greater works. There's a patch for MoinMoin 1.5.0 at : http://moinmoin.wikiwikiweb.de/MoinMoinBugs/DeepCopyError This will be included in all future MoinMoin releases, so it's

Re: New Python.org website ?

2006-01-19 Thread Tim Parkin
Fredrik Lundh wrote: What puzzles me (and scares me) is that some people seem to think that anyone would go to python.org and expect a corporate fluff site. It's like when I asked a suit friend with long industry experience to check the python marketing list; his spontaneous reaction after

Re: Being unjust

2006-01-19 Thread Kay Schluehr
Paul Boddie wrote: Adrian Holovaty wrote: Fuzzyman wrote: web.py has the great advantage that (allegedly) you can migrate apps from CGI to FastCGI, mod_python, WSGI. This isn't an advantage of web.py over other frameworks. You can do the same thing with Django, because it has a

Re: web crawling.

2006-01-19 Thread Fuzzyman
Use BeautifulSoup to get all the image tags out of the html. You'll need to join the urls of the images to the url of the page (urlparse.urljoin off the top of my head). If you look at BeautifulSoup you will see how to get the 'src' reference of each image tag. All the best, Fuzzyman

Re: Determine the IP address of an eth interface

2006-01-19 Thread Tim Golden
[billie] | Hi all. I'm searching for a module that permits me to | low-level interact | with ethernet interfaces of my system. | I would like to determine at least the first of the followings values: | | 1 - IP address assigned to the interface | 2 - subnet mask | 3 - default gateway | 4 -

Re: New Python.org website ?

2006-01-19 Thread Tim Parkin
Fredrik Lundh wrote: Steve Holden wrote: This critique is all very well, but it tends to rely rather heavily on the words I think. You are, of course, entitled to your opinion, but please don't think that this new design was created on a whim. you keep saying that, but whenever the

Re: getopt.gnu_getopt: incorrect documentation

2006-01-19 Thread Giovanni Bajo
Steve Holden wrote: The official documentation for getopt.gnu_getopt does not mention the version number in which it was introduced (so I assumed it was introduced back when getopt was added). This is wrong, though: I was informed that Python 2.2 does not have this function, and a quick

Re: Determine the IP address of an eth interface

2006-01-19 Thread Michael Amrhein
billie wrote: Hi all. I'm searching for a module that permits me to low-level interact with ethernet interfaces of my system. I would like to determine at least the first of the followings values: 1 - IP address assigned to the interface 2 - subnet mask 3 - default gateway 4 - primary and

Re: tools to manipulate PDF document?

2006-01-19 Thread Justin Ezequiel
have you seen http://www.pdfhacks.com/pdftk/ -- http://mail.python.org/mailman/listinfo/python-list

Multiple modules with database access + general app design?

2006-01-19 Thread Robin Haswell
Hey people I'm an experience PHP programmer who's been writing python for a couple of weeks now. I'm writing quite a large application which I've decided to break down in to lots of modules (replacement for PHP's include() statement). My problem is, in PHP if you open a database connection it's

Re: Returning a tuple-struct

2006-01-19 Thread Giovanni Bajo
[EMAIL PROTECTED] wrote: time.localtime() (2006, 1, 18, 21, 15, 11, 2, 18, 0) time.localtime()[3] 21 time.localtime().tm_hour 21 Anyway, I guess there's a few of ways to do this. In the case above, it would seem reasonable to override __getitem__() and other things to get that result.

Re: Retrieve a GIF's palette entries using Python Imaging Library (PIL)

2006-01-19 Thread and-google
Stuart wrote: I see that the 'Image' class has a 'palette' attribute which returns an object of type 'ImagePalette'. However, the documentation is a bit lacking regarding how to maniuplate the ImagePalette class to retrieve the palette entries' RGB values. ImagePalette.getdata() should do

Decimal vs float

2006-01-19 Thread Kay Schluehr
I wonder why this expression works: decimal.Decimal(5.5)**1024 Decimal(1.353299876254915295189966576E+758) but this one causes an error 5.5**1024 Traceback (most recent call last): File interactive input, line 1, in ? OverflowError: (34, 'Result too large') Another quirk is the follwoing:

Re: New Python.org website ?

2006-01-19 Thread Fredrik Lundh
Tim Parkin wrote: How about designing a website and showing us what you think would be a good idea? Or suggesting some way of managing all of the content and building the system. I think I just did that: the easiest way to get there would be to use a MoinMoin instance to main- tain

Re: Decimal vs float

2006-01-19 Thread Gerhard Häring
Kay Schluehr wrote: I wonder why this expression works: decimal.Decimal(5.5)**1024 Decimal(1.353299876254915295189966576E+758) The result is a Decimal type, which can have *very high* values. but this one causes an error 5.5**1024 Traceback (most recent call last): File

Re: Efficient implementation of deeply nested lists

2006-01-19 Thread Fuzzyman
Kay Schluehr wrote: I want to manipulate a deeply nested list in a generic way at a determined place. Given a sequence of constant objects a1, a2, ..., aN and a variable x. Now construct a list from them recursively: L = [a1, [a2, [[aN, [x]]...]] The value of x is the only one to be

Re: OT: excellent book on information theory

2006-01-19 Thread Anton Vredegoor
Paul Rubin wrote: For an absolutely amazing translation feat, try Michael Kandel's Polish-to-English translation of Stanislaw Lem's The Cyberiad. Returning to the original book, why did they write a lot of it (at least the first few pages until I gave up, after having trouble understanding

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Steve Holden
Claudio Grondi wrote: Steven D'Aprano wrote: Claudio Grondi wrote: Exactly this is what Python does under the hood when writing a = some string b = some string where a and b are actually, in terms of C, pointer to Python object data structures which provide strings as arrays where it is

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Steve Holden
Claudio Grondi wrote: Steven D'Aprano wrote: [...] The higher level of abstraction/indirection in Python results in making the concepts of 'value', 'having a value' or 'comparing values' useless, where it helps in C to express the difference between address and content at that address and to

Re: how to find not the next sibling but the 2nd sibling or find sibling a OR sinbling b

2006-01-19 Thread Kent Johnson
[EMAIL PROTECTED] wrote: i have some html which looks like this where i want to scrape out the href stuff (the www.cnn.com part) div class=noFoodCheese/div div class=foodBlue/div a class=btn href = http://www.cnn.com; so i wrote this code which scrapes it perfectly: for incident in

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Fuzzyman
(If I understand correctly...) The reason he is looking for it, is in order to assert that Python 'comparison' is broken. Part of this is because of his assertation that the term 'value' has no meaning in Python. He bases this on the fact that Java and C define 'value' to mean the pointer when

Re: New Python.org website ?

2006-01-19 Thread Steve Holden
Tim Parkin wrote: Fredrik Lundh wrote: [various stuff] It would be apparent to you if you'd read around (even within this list) that the website is ultimately intended to have 'through the web' editing tools. You'd also know that one of the biggest acheivements so far is the separation of

Re: Sudoku solver: reduction + brute force

2006-01-19 Thread ago
Anton, Do you think it is possible to reduce the set of all possible solutions to a small enough set? I personally doubt it, but IF that was the case an efficient solver could be easily created. In reducing the set of all solutions for instance you could always swap the numbers (3rd axis) so

Re: Decimal vs float

2006-01-19 Thread Steve Holden
Kay Schluehr wrote: I wonder why this expression works: decimal.Decimal(5.5)**1024 Decimal(1.353299876254915295189966576E+758) but this one causes an error 5.5**1024 Traceback (most recent call last): File interactive input, line 1, in ? OverflowError: (34, 'Result too large')

Re: New Python.org website?

2006-01-19 Thread Magnus Lycka
Steve Holden wrote: The trepidation was accounted for solely by a concern that Python would become involved in any kind of religious controversy, or that someone of extreme views might claim that Python was associated with, or against, a particular religious belief. I'm sure there are a

Re: OT: excellent book on information theory

2006-01-19 Thread Juho Schultz
Anton Vredegoor wrote: Returning to the original book, why did they write a lot of it (at least the first few pages until I gave up, after having trouble understanding formulas about concepts I have no such trouble with when framed in less jargonized from) in unintelligible mathemathical

Re: Multiple modules with database access + general app design?

2006-01-19 Thread Paul McGuire
Robin Haswell [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hey people I'm an experience PHP programmer who's been writing python for a couple of weeks now. I'm writing quite a large application which I've decided to break down in to lots of modules (replacement for PHP's

Re: Arithmetic sequences in Python

2006-01-19 Thread Kent Johnson
Paul Rubin wrote: [EMAIL PROTECTED] (Alex Martelli) writes: I see no credibly simple and readable alternative to {a:b, c:d} dictionary display syntax, for example; dict(((a,b),(c,d))) just wouldn't cut it, because of the parentheses overload (double entendre intended). dict(a=b,c=d) I

Re: Need Help with Python/C API

2006-01-19 Thread Doru-Catalin Togea
On Thu, 18 Jan 2006, pycraze wrote: Hi! I don't really understand what you need/want. Can you explain in more details? I Need to know how do i create a dictionary... eg: n = pali_hash n={} n={1:{ } } - i need to know how to make a key of a dictionary, to a dictionary using Python/C

Re: Sudoku solver: reduction + brute force

2006-01-19 Thread ago
Your reduction-first approach makes short work of them, though. On the other hand, my version probably didn't take as long to write! Well, I started from the reduction-only algorithm so by the time I implemented the brute force solver I already had the code. Anyway the full code is just above

Re: simple pythonpath query

2006-01-19 Thread Tim Golden
[EMAIL PROTECTED] | I've downloaded the hypertext module and put it in the c:\python24\lib | folder. I would have thought that since the lib directory is in the | Pythonpath,I would be able to import python scripts from | C:\Python24\Lib\HyperText. I also tried including |

Re: OT: excellent book on information theory

2006-01-19 Thread Nicola Musatti
Tim Peters wrote: [Paul Rubin] I wouldn't have figured out that a car park was a parking lot. I might have thought it was a park where you go to look at scenery from inside your car. Sort of a cross between a normal park and a drive-in movie. [Grant Edwards[ ;) That's a joke,

Re: simple pythonpath query

2006-01-19 Thread marc . wyburn
Cheers Tim, that sorted it. I need to re-read the modules section and namespaces. Everydays a schoolday. MW. -- http://mail.python.org/mailman/listinfo/python-list

Re: Ordering numbers

2006-01-19 Thread Kent Johnson
yawgmoth7 wrote: I have a dictonary here: seq = {8:0x13AC9741, 10:0x27592E8, 4:0x4EB25D, 5:0x9D64B, 7:0x13AC9, 1:0x2759, 11:0x4EB, 3:0x9D, 9:0x13, 2:0x2, 0:0x0, 6:0x0} Python always prints them in order, from least to greatest. But I wanna have it show them in hte order that I put in.

Re: MSSQL LIKE and IN statements in ADO problem

2006-01-19 Thread Raja Raman Sundararajan
Ok guys! The problem seems to be much easier to be solved than first thought. --Shoot-- Using the correct CreateParameter statement seems to do the trick. For example creating the parameter as cmd.CreateParameter(name,const.adVarChar, const.adParamInput, Size=16, Value=value[i])

Re: OT: excellent book on information theory

2006-01-19 Thread Anton Vredegoor
Juho Schultz wrote: Last month I spent about an hour trying to explain why a*2.5e-8 = x raises a SyntaxError and why it should be written x = a*2.5e-8 The guy who wrote the 1st line has MSc in Physics from Cambridge (UK). In mathematics, there is no difference between the two lines. Some

Re: Registering COM python based components when not admin

2006-01-19 Thread tooper
Thanks for the hint ! -- http://mail.python.org/mailman/listinfo/python-list

Re: MSSQL LIKE and IN statements in ADO problem

2006-01-19 Thread gregarican
Thanks. Please keep us posted. For some of my potentially exposed areas I was just doing regex lookups against the input parameter to filter out possible SQL injection keywords. Obviously not as elegant and efficient as using ADO parameters to strictly define the data that should be coming into

Re: Multiple modules with database access + general app design?

2006-01-19 Thread Robin Haswell
On Thu, 19 Jan 2006 12:23:12 +, Paul McGuire wrote: Robin Haswell [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hey people I'm an experience PHP programmer who's been writing python for a couple of weeks now. I'm writing quite a large application which I've decided to break

Re: Decimal vs float

2006-01-19 Thread Kay Schluehr
Steve Holden wrote: If Mr. interpreter is as slick as he is why doesn't he convert the float by himself? This is at most a warning caused by possible rounding errors of float. Indeed, as the documentation says: This serves as an explicit reminder of the details of the conversion

Re: MSSQL LIKE and IN statements in ADO problem

2006-01-19 Thread gregarican
The IN statement logic is a good mind exercise if there are multiple parameters that needed to be brought in. Below is the code that fixed the LIKE statement logic where you needed an ADO parameterized query used. Apparently the percent signs don't have to be referenced anywhere in the code, as my

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Claudio Grondi
Steve Holden wrote: Claudio Grondi wrote: Steven D'Aprano wrote: Claudio Grondi wrote: Exactly this is what Python does under the hood when writing a = some string b = some string where a and b are actually, in terms of C, pointer to Python object data structures which provide

Re: PyHtmlGUI Project is looking for developers

2006-01-19 Thread Veri
Good Morning everybody. Maybe it didn't get clear in the previous discussion: We didn't choose Qt as GUI API, we build an own GUI which is able to produce XML and html output, but whose structure is close to Qt. We even built a basic factory which produces PyHtmlGUI widgets from a Qt Designer .ui

Re: Multiple modules with database access + general app design?

2006-01-19 Thread Daniel Dittmar
Robin Haswell wrote: cursor for every class instance. This application runs in a very simple threaded socket server - every time a new thread is created, we create a new db.cursor (m = getattr(modules, module)\n m.c = db.cursor() is the first part of the thread), and when the thread finishes

Dom or MiniDom example

2006-01-19 Thread Sbaush
Hi, i'm searching for a dom or a minidom examples. I'm building a GUI. This gui should create a XML string. What's the best way to implement this? Dom, minidom or another way?Thanks.-- Sbaush -- Sbaush -- http://mail.python.org/mailman/listinfo/python-list

Re: Decimal vs float

2006-01-19 Thread Steve Holden
Kay Schluehr wrote: Steve Holden wrote: If Mr. interpreter is as slick as he is why doesn't he convert the float by himself? This is at most a warning caused by possible rounding errors of float. Indeed, as the documentation says: This serves as an explicit reminder of the details of the

Re: Efficient implementation of deeply nested lists

2006-01-19 Thread Peter Otten
Kay Schluehr wrote: I want to manipulate a deeply nested list in a generic way at a determined place. Given a sequence of constant objects a1, a2, ..., aN and a variable x. Now construct a list from them recursively: L = [a1, [a2, [[aN, [x]]...]] The value of x is the only one to be

Re: Decimal vs float

2006-01-19 Thread Fredrik Lundh
Kay Schluehr wrote: This is interesting. If we define def f(): print str(1.1) and disassemble the function, we get: dis.dis(f) 2 0 LOAD_GLOBAL 0 (str) 3 LOAD_CONST 1 (1.1001) # huh? huh huh? str(1.1) '1.1'

Re: Multiple modules with database access + general app design?

2006-01-19 Thread Robin Haswell
On Thu, 19 Jan 2006 14:37:34 +0100, Daniel Dittmar wrote: Robin Haswell wrote: cursor for every class instance. This application runs in a very simple threaded socket server - every time a new thread is created, we create a new db.cursor (m = getattr(modules, module)\n m.c = db.cursor() is

Re: Clicking at a certain x,y position in python? (Mac OSX)

2006-01-19 Thread has
Nainto wrote: I have been searching and searching and cannot find a way to click at a certain position in python. What for? There's a few ways it might be done, but what's best depends on what you're trying to achieve. -- http://mail.python.org/mailman/listinfo/python-list

Re: MSSQL LIKE and IN statements in ADO problem

2006-01-19 Thread Raja Raman Sundararajan
Hi Gregarican, Thanks for sharing your code. One needs to add the % signs if one wants to do wildcard searches using LIKE in the SQL server. Do as Roger and Steve suggested '%raj%', now you can find the names containing the word raj anywhere in the column. just value = 'raj' is only going to

Re: New Python.org website ?

2006-01-19 Thread Steve Holden
Fredrik Lundh wrote: Steve Holden wrote As you indicated, there are other priorities just at the moment. you're complaining about the lack of manpower, and still think that lowering the threshold for contributions is not a priority ? at this point, this should be your *only*

Re: OT: excellent book on information theory

2006-01-19 Thread Mikael Olofsson
Terry Hancock wrote: Tim Peters [EMAIL PROTECTED] wrote: UK:Harry smiled vaguely back US:Harry smiled back vaguely Terry Hancock wrote: I know you are pointing out the triviality of this, since both US and UK English allow either placement -- but is it really preferred style in

Re: MSSQL LIKE and IN statements in ADO problem

2006-01-19 Thread Steve Holden
Raja Raman Sundararajan wrote: [...] Any inputs to improve the IN statement logic? My dream is to use just one create parameter for the SQL list so that the query looks like query = SELECT * FROM tb_name WHERE firstname IN ? Nice and easy... Some DBAPI modules will indeed allow you to

Re: PyHtmlGUI Project is looking for developers

2006-01-19 Thread Fuzzyman
Veri wrote: Good Morning everybody. Maybe it didn't get clear in the previous discussion: We didn't choose Qt as GUI API, we build an own GUI which is able to produce XML and html output, but whose structure is close to Qt. We even built a basic factory which produces PyHtmlGUI widgets from

Re: socket.ssl with key files?

2006-01-19 Thread Chris Curvey
thanks for the info. 1) Am I correct that I should just be splitting the files? 2) The passphrase question was in the back of my mind, but I guess I need to move it to the front. Hopefully someone here will have an idea. (I wonder if M2Crypto handles that?) I guess it's better to know that the

Re: Sudoku solver: reduction + brute force

2006-01-19 Thread Anton Vredegoor
ago wrote: Do you think it is possible to reduce the set of all possible solutions to a small enough set? I personally doubt it, but IF that was the case an efficient solver could be easily created. No I don't think so, but it's a great idea :-) . Iff we would have some ultimate symmetry

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Steve Holden
Claudio Grondi wrote: Steve Holden wrote: Claudio Grondi wrote: Steven D'Aprano wrote: Claudio Grondi wrote: Exactly this is what Python does under the hood when writing a = some string b = some string where a and b are actually, in terms of C, pointer to Python object data structures

Re: New Python.org website ?

2006-01-19 Thread Markus Wankus
Fredrik Lundh wrote: Tim Parkin wrote: How about designing a website and showing us what you think would be a good idea? Or suggesting some way of managing all of the content and building the system. I think I just did that: the easiest way to get there would be to use a MoinMoin

Re: New Python.org website ?

2006-01-19 Thread Markus Wankus
whisper If you build it, they will come. /whisper -- http://mail.python.org/mailman/listinfo/python-list

Re: Efficient implementation of deeply nested lists

2006-01-19 Thread Kay Schluehr
Peter Otten wrote: Kay Schluehr wrote: I want to manipulate a deeply nested list in a generic way at a determined place. Given a sequence of constant objects a1, a2, ..., aN and a variable x. Now construct a list from them recursively: L = [a1, [a2, [[aN, [x]]...]] The value

Re: OT: excellent book on information theory

2006-01-19 Thread Fredrik Lundh
Mikael Olofsson wrote: A related important question is: Does the US version communicate the same thing (meaning aswell as feeling) to the American reader as the UK version communicates to the British reader? That should always be the objective for any translator. fwiw, the Swedish Dan Brown

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Fuzzyman
Claudio Grondi wrote: [snip..] Wow! I haven't got this evil idea myself yet (even if as I understand there is no problem to achieve similar thing also in C), so I have learned a bit more about Python again. Am I right supposing, that this becomes possible because the .append() goes not that

Re: New Python.org website ?

2006-01-19 Thread Fredrik Lundh
Markus Wankus wrote: Well I happen to agree whole-heartedly with Tim on that one. I can't stand trying to navigate some of these Wiki-trying-to-be-website pages. It is impossible to find anything on most of them (notice I didn't say all..there are exceptions). It seems like they cater to

Re: Need Help with Python/C API

2006-01-19 Thread Carsten Haese
On Thu, 2006-01-19 at 00:44, pycraze wrote: Hi guys, I Need to know how do i create a dictionary... eg: n = pali_hash n={} n={1:{ } } - i need to know how to make a key of a dictionary, to a dictionary using Python/C API's You can either use Py_BuildValue (See

Re: Multiple modules with database access + general app design?

2006-01-19 Thread Frank Millman
Robin Haswell wrote: Hey people I'm an experience PHP programmer who's been writing python for a couple of weeks now. I'm writing quite a large application which I've decided to break down in to lots of modules (replacement for PHP's include() statement). My problem is, in PHP if you open

Re: Multiple modules with database access + general app design?

2006-01-19 Thread Daniel Dittmar
Robin Haswell wrote: On Thu, 19 Jan 2006 14:37:34 +0100, Daniel Dittmar wrote: If you use a threading server, you can't put the connection object into the module. Modules and hence module variables are shared across threads. You could use thread local storage, but I think it's better to pass

Re: New Python.org website ?

2006-01-19 Thread Tim Parkin
Fredrik Lundh wrote: Steve Holden wrote As you indicated, there are other priorities just at the moment. you're complaining about the lack of manpower, and still think that lowering the threshold for contributions is not a priority ? at this point, this should be your *only*

Re: OT: excellent book on information theory

2006-01-19 Thread Ben
Hi Paul, Dr MacKay was my information studies lecturer and 4th year degree project mentor at university, about 5 years ago, and I think that this book is basically the course notes we used then! He is an excellent lecturer, and if the book is as good as the course, it should be very interesting,

  1   2   3   >