Re: is laziness a programer's virtue?

2007-04-15 Thread Claudio Grondi
Usenet after a longer time of inactivity. Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: clean up html document created by Word

2007-03-30 Thread Claudio Grondi
jd wrote: I am looking for python code (working or sample code) that can take an html document created by Microsoft Word and clean it up (if you've never had to look at a Word-generated html document, consider yourself lucky ;-) Alternatively, if you know of a non-python solution, I'd like

Re: image processing

2007-03-07 Thread Claudio Grondi
package? (i.e. I checked http://filters.sourceforge.net/ out, but haven't yet found the mentioned questions answered ) Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: C parsing fun

2007-02-05 Thread Claudio Grondi
Károly Kiripolszky wrote: You're right, thank you for the comment! I will look after how to avoid this. And after you have resolved this 'small' ;-) detail you will probably notice, that some full functional and in wide use being parser have still trouble with this ... Claudio Marc

Re: ANN: pyfuzzylib 0.1.3 Released

2006-09-17 Thread Claudio Grondi
sort of feedback is appreciated! Hope so ... :) Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: Searching for patterns on the screen

2006-09-15 Thread Claudio Grondi
in Python 2.5c2 using PIL 1.1.5 Use PIL for grabbing the screenshot and numarray for processing the image. See http://groups.google.com.vc/group/comp.lang.python/browse_thread/thread/6207e7526fb6fdc6/a05646969d59102e for some further helpful hints towards speeding things up. Claudio Grondi

Re: Unit balancing

2006-09-13 Thread Claudio Grondi
it, so Googling or waiting until someone else using such a tool posts here is all I can offer. Inbetween Frink is maybe an option? http://futureboy.homeip.net/frinkdocs/ Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: Scientific computing and data visualization.

2006-09-13 Thread Claudio Grondi
returned as undeliverable. Does anybody now about suitable visualisation tool? Have you looked at HippoDraw? http://www.slac.stanford.edu/grk/ek/hippodraw http://www.slac.stanford.edu/grp/ek/hippodraw/ Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for the Perfect Editor

2006-09-12 Thread Claudio Grondi
. If nothing suddenly changed, I can assure you, that you can't get anywhere else better support directly from the author as it is currently available for UliPad. And as it is all Python, so you are free to learn from it or try out your own ideas for extensions. Claudio Grondi -- http://mail.python.org

Re: Looking for the Perfect Editor

2006-09-09 Thread Claudio Grondi
Omar wrote: thanks for the suggestions, fellas Would be kind of you to tell us which one you have decided to use and why? Claudio Grondi P.S. If you don't like any of already mentioned you can give SciTe a try. -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Leo 4.4.1.1 final released

2006-09-08 Thread Claudio Grondi
187, in finishCreate c = self ; p = c.currentPosition() TypeError: currentPosition() takes exactly 2 arguments (1 given) --- ??? Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: IronPython 1.0 - Bugs or Features?

2006-09-07 Thread Claudio Grondi
time) /code Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: 3 Simple Questions About Python/IDLE

2006-09-07 Thread Claudio Grondi
- there are plenty options to choose from. 4) using 'import' (see recommendation in 1)) Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Beautiful Soup to entangle bookmarks.html

2006-09-07 Thread Claudio Grondi
() mySGMLParserClassObj_withListOfHREFs.feed(fileLikeObjFrom_urlopen.read()) mySGMLParserClassObj_withListOfHREFs.close() fileLikeObjFrom_urlopen.close() for href in mySGMLParserClassObj_withListOfHREFs.A_HREFs: print href #: for /code Claudio Grondi -- http://mail.python.org/mailman/listinfo/python

Re: Printing Documents

2006-09-07 Thread Claudio Grondi
load the document into the Internet Explorer and then use its menu [File] - [Print] to invoke printing (don't forget to keep your eye on the Python shell...) ;-) Claudio Grondi P.S. There are many options to automate usage of MSIE from Python, so maybe if you explain what you actually intend

Re: Extracting text from a string

2006-09-07 Thread Claudio Grondi
give you all you need. Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: Extracting text from a string

2006-09-07 Thread Claudio Grondi
IDLE to test your ideas: ['the string'][0] 'the string' Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: Extracting text from a string

2006-09-07 Thread Claudio Grondi
level in Python, the best solution for you to start with and learn some Python basics will be : prices.split()[2] '$14.99' prices.split()[6] '$27.99' prices.split()[10] '$66.99' prices.split()[14] '$129.99' prices.split()[18] '$254.99' Claudio Grondi -- http://mail.python.org/mailman

Re: Looking for the Perfect Editor

2006-09-07 Thread Claudio Grondi
learning flash) e) easy to learn suggestions? Welcome to the group of users of UliPad :) http://wiki.woodpecker.org.cn/moin/UliPad a) ok b) by double click (code snippets) c) ok e) maybe not that easy because of lack of full documentation, but sure worth to try, anyway. Claudio Grondi

IronPython 1.0 - Bugs or Features?

2006-09-06 Thread Claudio Grondi
please? Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: IronPython 1.0 - Bugs or Features?

2006-09-06 Thread Claudio Grondi
Larry Bates wrote: Claudio Grondi wrote: (just wanted to share my experience with IronPython 1.0) The context: C:\IronPython ipy.exe IronPython 1.0.60816 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. vs. C:\Python24 python.exe Python 2.4.2 (#67, Sep

Re: IronPython 1.0 - Bugs or Features?

2006-09-06 Thread Claudio Grondi
Marc 'BlackJack' Rintsch wrote: In [EMAIL PROTECTED], Claudio Grondi wrote: The context: C:\IronPython ipy.exe IronPython 1.0.60816 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. vs. C:\Python24 python.exe Python 2.4.2 (#67, Sep 28 2005, 12:41:11

Re: IronPython 1.0 - Bugs or Features?

2006-09-06 Thread Claudio Grondi
tjreedy wrote: Claudio Grondi [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I also erroneously assumed, that the first problem was detected during parsing ... so, by the way: how can I distinguish an error raised while parsing the code and an error raised when actually running

Re: OO on python real life tutorial?

2006-09-03 Thread Claudio Grondi
application which runs with any wxPython version? Are the subsequent wxPython versions by definition not compatible or do only the quirks change from release to release being shifted between the problem zones? Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: pictures as characters in a Tk text box?

2006-09-02 Thread Claudio Grondi
, so if you need only to display and not edit things it is a perfect one to use if you need to mix text with images and control elements. Claudio Grondi Simon Forman wrote: Jay wrote: This may be really obscure, but I had a dream about programming something like this, so don't blame me

Re: OO on python real life tutorial?

2006-09-01 Thread Claudio Grondi
self-confident and accept the enlightenment, that it probably or even for sure can't. Claudio Grondi Is there a OO tutorial out there to help me? Thanks, Filippo -- http://mail.python.org/mailman/listinfo/python-list

Re: OO on python real life tutorial?

2006-09-01 Thread Claudio Grondi
filippo wrote: thanks Fredrik and Claudio, probably structured coding paradigm is what I need. Claudio, could you explain better your sentence below? Claudio Grondi ha scritto: Python/Tk for it in order to avoid programming in wxPython if not really necessary (wxPython has its strengths

Re: simultaneous copy to multiple media

2006-08-31 Thread Claudio Grondi
not much gain on USB when on Windows, especially in case of a single file which fits into memory (and the file cache) to do it 'simultaneously'. This subject was discussed here already in the past: http://mail.python.org/pipermail/python-list/2005-March/271985.html Claudio Grondi I have searched

Re: random writing access to a file in Python

2006-08-28 Thread Claudio Grondi
18 hours and the machine is so busy that it is hard to use it for other tasks at the same time. If the sorting took less than one hour I would probably never make the effort to give it some serious thoughts. Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: time.clock() going backwards??

2006-08-28 Thread Claudio Grondi
expect, that even in case of multiple processors, if there were only one clock-pulse generator for all of them, they were not be able to run at different speeds. Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Misleading error message when opening a file (on Windows XP SP 2)

2006-08-28 Thread Claudio Grondi
+') IOError: [Errno 2] No such file or directory: 'veryBigFile.dat' Is it a BUG or a FEATURE? Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: Misleading error message when opening a file (on Windows XP SP 2)

2006-08-28 Thread Claudio Grondi
Marc 'BlackJack' Rintsch wrote: In [EMAIL PROTECTED], Claudio Grondi wrote: Here an example of what I mean (Python 2.4.2, IDLE 1.1.2, Windows XP SP2, NTFS file system, 80 GByte large file): f = file('veryBigFile.dat','r') f = file('veryBigFile.dat','r+') You mention the file size

Re: How to let a loop run for a while before checking for break condition?

2006-08-28 Thread Claudio Grondi
Hendrik van Rooyen wrote: Claudio Grondi [EMAIL PROTECTED] Wrote: | Fredrik Lundh wrote: | Diez B. Roggisch wrote: | | A while loop has a condition. period. The only thing to change that is | to introduce a uncoditioned loop, and use self-modifying code to make | it a while-loop

Re: Misleading error message when opening a file (on Windows XP SP 2)

2006-08-28 Thread Claudio Grondi
Tim Peters wrote: [Claudio Grondi] Here an example of what I mean (Python 2.4.2, IDLE 1.1.2, Windows XP SP2, NTFS file system, 80 GByte large file): f = file('veryBigFile.dat','r') f = file('veryBigFile.dat','r+') Traceback (most recent call last): File pyshell#1, line 1

Re: Misleading error message when opening a file (on Windows XP SP 2)

2006-08-28 Thread Claudio Grondi
). Concluding from this it becomes evident for me, that this misleading error message is Python fault (even if originated by misleading errno values set after fopen in the MSVC++ environment and Windows), right? Probably also in Python 2.5? Claudio Grondi -- http://mail.python.org/mailman/listinfo

Re: time.clock() going backwards??

2006-08-28 Thread Claudio Grondi
Rob Williscroft wrote: Claudio Grondi wrote in news:[EMAIL PROTECTED] in gmane.comp.python.general: Tim Roberts wrote: Tim Peters [EMAIL PROTECTED] wrote: It is much simpler than that. With a multiprocessor HAL, including on a dual-core or hyperthreaded system, QueryPerformanceCounter

Re: How to let a loop run for a while before checking for break condition?

2006-08-28 Thread Claudio Grondi
Sorin Schwimmer wrote: to Fredrik Lundh I'm afraid Claudio Grondi can't use your solution, as he needs it hosted on Windows, which lacks signal.alarm. to Claudio Grondi How about splitting your loop in two? The first loop would check for your boolean, which is changed by your timer

Re: How to let a loop run for a while before checking for break condition?

2006-08-28 Thread Claudio Grondi
Sorin Schwimmer wrote: I am thinking on something in the following form: code import time import thread delay=True def fn() global delay time.sleep(your_amount_of_time_in_seconds) delay=False thread.start_new_thread(fn,()) while delay: statement 1 statement 2 ...

Re: random writing access to a file in Python

2006-08-27 Thread Claudio Grondi
Paul Rubin wrote: Claudio Grondi [EMAIL PROTECTED] writes: Does it mean, that in case of very large files: the size of available memory for the sorting operation (making it possible to work on larger chunks of data in memory) has less impact on the actual sorting speed than the speed

How to let a loop run for a while before checking for break condition?

2006-08-27 Thread Claudio Grondi
on the Windows 2000/XP system I am mainly working with. What do you think about this idea? Does it make sense? Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: How to let a loop run for a while before checking for break condition?

2006-08-27 Thread Claudio Grondi
Diez B. Roggisch wrote: Claudio Grondi schrieb: Sometimes it is known in advance, that the time spent in a loop will be in order of minutes or even hours, so it makes sense to optimize each element in the loop to make it run faster. One of instructions which can sure be optimized away

Re: How to let a loop run for a while before checking for break condition?

2006-08-27 Thread Claudio Grondi
the same/similar idea and might share here an elegant Pythonic solution addressing this issue. Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: How to let a loop run for a while before checking for break condition?

2006-08-27 Thread Claudio Grondi
is not available. So now the only thing I would like to know is how to achieve the same functionality when running Python on a Microsoft Windows box. Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: random writing access to a file in Python

2006-08-27 Thread Claudio Grondi
Paul Rubin wrote: Claudio Grondi [EMAIL PROTECTED] writes: The Windows XP SP 2 '/ sort' (sorting of four Gigs of 20 byte records took 12 CPU and 18 usual hours) has, from what I could observe on the task manager, done the job in only two runs of 'copying' : That is terrible

Re: random writing access to a file in Python

2006-08-26 Thread Claudio Grondi
Paul Rubin wrote: Claudio Grondi [EMAIL PROTECTED] writes: Is there a ready to use (free, best Open Source) tool able to sort lines (each line appr. 20 bytes long) of a XXX GByte large text file (i.e. in place) taking full advantage of available memory to speed up the process as much

Re: random writing access to a file in Python

2006-08-26 Thread Claudio Grondi
Paul Rubin wrote: Claudio Grondi [EMAIL PROTECTED] writes: Try the standard Unix/Linux sort utility. Use the --buffer-size=SIZE to tell it how much memory to use. I am on Windows and it seems, that Windows XP SP2 'sort' can work with the file, but not without a temporary file and space

random writing access to a file in Python

2006-08-25 Thread Claudio Grondi
I have a 250 Gbyte file (occupies the whole hard drive space) and want to change only eight bytes in this file at a given offset of appr. 200 Gbyte (all other data in that file should remain unchanged). How can I do that in Python? Claudio Grondi -- http://mail.python.org/mailman/listinfo

Re: random writing access to a file in Python

2006-08-25 Thread Claudio Grondi
Tim Peters wrote: [Claudio Grondi] I have a 250 Gbyte file (occupies the whole hard drive space) Then where is Python stored ;-)? and want to change only eight bytes in this file at a given offset of appr. 200 Gbyte (all other data in that file should remain unchanged). How can I

Re: random writing access to a file in Python

2006-08-25 Thread Claudio Grondi
Dennis Lee Bieber wrote: On Fri, 25 Aug 2006 16:39:14 +0200, Claudio Grondi [EMAIL PROTECTED] declaimed the following in comp.lang.python: The core of my problem was ... trying to use 'wb' or 'w+b' ... (stupid me ...) Ouch... How many times did you have to restore that massive

Re: time.clock() going backwards??

2006-08-25 Thread Claudio Grondi
to such problems. Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: How to draw line on Image?

2006-08-18 Thread Claudio Grondi
anti-aliased drawing http://effbot.org/zone/draw-agg.htm Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: opposite of import

2006-08-03 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: Hi I am new to python. I wanted to know if there is an opposite of import If you mean 'import' adds something, so you ask how to get rid of something? Here you are: Look at the 'del' statement if it is what you are looking for. Claudio Grondi -- http

Re: Html character entity conversion

2006-08-01 Thread Claudio Grondi
Anthra Norell wrote: import SE# Available at the Cheese Shop I mean, that OP requested: 'How can I translate this using standard Python libraries??' so it's just only not on topic. Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: list comprehension syntax..?

2006-08-01 Thread Claudio Grondi
Gary Herron wrote: Gregory Guthrie wrote: Sorry for a simple question- but I don't understand how to parse this use of a list comprehension. The or clauses are odd to me. It also seems like it is being overly clever (?) in using a lc expression as a for loop to drive the recursion. Thanks

Re: Html character entity conversion

2006-07-31 Thread Claudio Grondi
John Machin wrote: Claudio Grondi wrote: [EMAIL PROTECTED] wrote: Claudio Grondi wrote: [EMAIL PROTECTED] wrote: Here is my script: from mechanize import * from BeautifulSoup import * import StringIO b = Browser() f = b.open(http://www.translate.ru/text.asp?lang=ru;) b.select_form(nr=0

Re: Html character entity conversion

2006-07-30 Thread Claudio Grondi
) ? I am sure, there is a more elegant and direct solution, but just wanted to provide here some quick response. Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: Html character entity conversion

2006-07-30 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: Claudio Grondi wrote: [EMAIL PROTECTED] wrote: Here is my script: from mechanize import * from BeautifulSoup import * import StringIO b = Browser() f = b.open(http://www.translate.ru/text.asp?lang=ru;) b.select_form(nr=0) b[source] = hello python html = b.submit

Re: Snapshot+Clipboard

2006-07-19 Thread Claudio Grondi
= ImageGrab.grab() # store screenshot as RGB Image GrabbedImage.save(TheScreenshot.jpg) # PIL evaluates extension /code For more details see: http://effbot.org/imagingbook/imagegrab.htm (works on Windows only) Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: WANTED: logging of all file operations on Windows

2006-07-10 Thread Claudio Grondi
Tim Golden wrote: Claudio Grondi wrote: I am aware, that it is maybe the wrong group to ask this question, but as I would like to know the history of past file operations from within a Python script I see a chance, that someone in this group was into it already and is so kind to share

Re: Tkinter binding and keyboard hardware settings (WinXP)

2006-07-10 Thread Claudio Grondi
raised earlier than after a specified delay period will just become ignored? Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

WANTED: logging of all file operations on Windows

2006-07-09 Thread Claudio Grondi
an existing file/directory - creating a new file/directory - _moving_ an existing file/directory (should _NOT_ be covered by the event duo of deleting an existing and creating a new file/directory) Any hints towards enlightenment? Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: WANTED: logging of all file operations on Windows

2006-07-09 Thread Claudio Grondi
is, that brute force applied to large amount of files/directories is not a convenient way to backup/synchronize the few new/changed/deleted/moved files/directories multiple times a day as the brute force approach just makes the hard drive(s) unnecessary wasting much energy and getting hot. Claudio Grondi

Re: WANTED: logging of all file operations on Windows

2006-07-09 Thread Claudio Grondi
Tim Golden wrote: Claudio Grondi wrote: I am aware, that it is maybe the wrong group to ask this question, but as I would like to know the history of past file operations from within a Python script I see a chance, that someone in this group was into it already and is so kind to share

Re: numarray

2006-07-06 Thread Claudio Grondi
the 'array' word.. .looks like it will work... from numpy import * makes numpy.array available as array in your code. I would be kind of you to post what you have exactly done as the phrase from import ... can't be it. Claudio Grondi what's the difference between 'import numpy', and from import numpy

wanted: framework for creating nice step by step graphical visualisations of running Python code

2006-07-02 Thread Claudio Grondi
it is done in the mentioned above example at pre-defined points in code called there /* visualisation step */ Any hints towards getting or constructing such a framework are welcome. Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: wanted: framework for creating nice step by step graphical visualisations of running Python code

2006-07-02 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: I remember Gato: http://gato.sourceforge.net/ It animates only algorithms on graphs, but it seems a starting point, and it works. I vaguely remember another system, but probably not very good. Bye, bearophile Yes, I have noticed Gato already before, but was

Re: style question

2006-06-26 Thread Claudio Grondi
Hari Sekhon wrote: Is it better to do: message = This is line1. This is line2 This is line3\n or message = This is line1.\n message = message + This is line2\n message = message + This is line3\n Since the first method does not follow python's clean and easy looking

Re: Beginner Programmer Question

2006-06-26 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: I am doing alot of reading and trying to teach myself how to program. I can not figure out how to make Write a program that continually reads in numbers from the user and adds them together until the sum reaches 100. this work. If someone could show me the correct code

Re: style question

2006-06-26 Thread Claudio Grondi
Scott David Daniels wrote: Claudio Grondi wrote: clever stuff to di indentation When necessary to skip first line _and_ indentation: message = This is line 1 This is line 2 This is line 3 .replace('\n ', '\n')[1:] # adjust here '\n ' to indentation Riffing on this idea

Re: Beginner Programmer Question

2006-06-26 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Claudio Grondi wrote: [EMAIL PROTECTED] wrote: I am doing alot of reading and trying to teach myself how to program. I can not figure out how to make Write a program that continually reads in numbers from the user and adds them together until

Re: What is Expressiveness in a Computer Language

2006-06-22 Thread Claudio Grondi
they deserve. Claudio Grondi (a past 'gullible idiot' who learned to enjoy the fun of being the audience) -- http://mail.python.org/mailman/listinfo/python-list

Re: Standard Yes / No Windows Dialog box creation

2006-06-17 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: I found a way to create Open File or Open Folder windows dialog boxes, but not to create an easier Yes / No dialog box... Maybe someone has a solution for this? Do it just the same way as you did it with the Open File or Open Folder windows dialog. What is your

Re: how to get the length of a number

2006-06-11 Thread Claudio Grondi
Stan Cook wrote: Can anyone tell me how to get the length of a number. I know len(string) will get the length of a string, but it doesn't like len(int). I seem to remember something like %s string. I tried to set a variable = to %s int, but that doesn't work. Is there a function I've

Re: integer to binary...

2006-06-02 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: does anyone know a module or something to convert numbers like integer to binary format ? for example I want to convert number 7 to 0111 so I can make some bitwise operations... Thanks Use the gmpy module. import gmpy a = 14 b = 7 c =

Re: John Bokma harassment

2006-05-24 Thread Claudio Grondi
Tim N. van der Leeuw wrote: [EMAIL PROTECTED] wrote: I agree there are limits to you right to free speech, but I believe Xah Lee is not crossing any boundaries. If he starts taking over newspapers and TV stations be sure to notify me, I might revise my position. Immanuel Perhaps he's not

Re: Pyrex installation on windows XP: step-by-step guide

2006-05-22 Thread Claudio Grondi
sturlamolden wrote: Julien Fiore wrote: Thanks for your remark, Sturlamolden. Is there a free version of the Visual C++ 2003 compiler available on the web? I have found Visual C++ 2005 Express edition (http://msdn.microsoft.com/vstudio/express/visualc/). According to Micrsoft, it replaces

Re: open file with whitespaces

2006-05-20 Thread Claudio Grondi
mardif wrote: OK OK GUYS I've found the solution: ( effectly, a friend of mine has found the solution ) import os os.spawnl(os.P_WAIT, c:\programmi\internet explorer\iexplore.exe,'C:\Documents and Settings\michele\Desktop\ciccio.html','C:\Documents and

Re: open file with whitespaces

2006-05-19 Thread Claudio Grondi
Christophe wrote: mardif a écrit : Hi guys. I've a very big big big problem: I've in my windows computer a file named cicciobello.html, located in c:\documents and settings\username\desktop\cicciobello.html. Now, I MUST open this file with os.spawn(os.P_WAIT , because I must wait

Re: Large Dictionaries

2006-05-18 Thread Claudio Grondi
Chris Foote wrote: Claudio Grondi wrote: Chris Foote wrote: Klaas wrote: 22.2s 20m25s[3] 20m to insert 1m keys? You are doing something wrong. I've put together some simplified test code, but the bsddb module gives 11m for 1M keys: I have run your code for the bsddb on my P4 2.8 GHz

Re: Large Dictionaries

2006-05-18 Thread Claudio Grondi
Chris Foote wrote: Richie Hindle wrote: [Chris] Has anyone written a fast hash module which is more optimal for large datasets ? PyJudy might be what you're looking for, though I've never used it: http://www.dalkescientific.com/Python/PyJudy.html Judy's key benefits are scalability,

Re: Large Dictionaries

2006-05-17 Thread Claudio Grondi
Chris Foote wrote: Klaas wrote: 22.2s 20m25s[3] 20m to insert 1m keys? You are doing something wrong. Hi Mike. I've put together some simplified test code, but the bsddb module gives 11m for 1M keys: I have run your code for the bsddb on my P4 2.8 GHz and have got: Number

Re: IDLE confusion

2006-05-16 Thread Claudio Grondi
MrBlueSky wrote: Hi, I'm trying to use IDLE to develop My First Python App and my head hurts... I've a file called spalvi.py with this in it: from Test import * firstTest(Mike) And a file called Test.py with this in it: def firstTest(name): print Yo,name I open

Re: Large Dictionaries

2006-05-16 Thread Claudio Grondi
Chris Foote wrote: Claudio Grondi wrote: Chris Foote wrote: p.s. Disk-based DBs are out of the question because most key lookups will result in a miss, and lookup time is critical for this application. Python Bindings (\Python24\Lib\bsddb vers. 4.3.0) and the DLL for BerkeleyDB

Re: Large Dictionaries

2006-05-16 Thread Claudio Grondi
Chris Foote wrote: Claudio Grondi wrote: Chris Foote wrote: However, please note that the Python bsddb module doesn't support in-memory based databases - note the library documentation's[1] wording: Files never intended to be preserved on disk may be created by passing None

Re: Large Dictionaries

2006-05-15 Thread Claudio Grondi
Chris Foote wrote: Hi all. I have the need to store a large (10M) number of keys in a hash table, based on a tuple of (long_integer, integer). The standard python dictionary works well for small numbers of keys, but starts to perform badly for me inserting roughly 5M keys: # keys

Re: How to install pyTrix?

2006-05-13 Thread Claudio Grondi
DeepBlue wrote: Hi all, can any1 please tell me how to install pyTrix? thx! The first step should be to get it, but how can it be got? Claudio -- http://mail.python.org/mailman/listinfo/python-list

Re: I have problems with creating the classic game Wumpus. the file: http://esnips.c

2006-04-26 Thread Claudio Grondi
Ben Sizer wrote: connyledin wrote: Im trying to create a version of the game Wumpus. Mine is called Belzebub. But im STUCK! And its due tuesday 2 maj. Im panicing! Can some one help me?? here is the file: http://esnips.com/webfolder/b71bfe95-d363-4dd3-bfad-3a9e36d0 What i have the biggest

Re: ANN: 3 new ShowMeDo.com videos on Python Objects

2006-04-15 Thread Claudio Grondi
Ian Ozsvald wrote: Summary: At http://ShowMeDo.com we have 3 new videos by Jerol Harrington introducing Python Objects: http://showmedo.com/videoListPage?listKey=IntroductionToPythonObjectsUsingIPython_JerolH and 5 videos for beginners to wxPython:

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 the

Re: Identifying filled circles in a scanned image

2006-03-30 Thread Claudio Grondi
Douglas Douglas wrote: Hi everybody. I have a paper form that I scan into an image. My user fills some circles in this paper form using black ink. Every form has ten rows with five circles each and the user fills only one circle for each row. I was wondering if I could use the Python

Re: Identifying filled circles in a scanned image

2006-03-30 Thread Claudio Grondi
Douglas Douglas wrote: First of all. Thanks Claudio and nikie for your fast answers. What I want to do is process the forms automatically. Each circle match a letter (like in a quiz). So if the user select option A in a row, he fills the first circle. If he select option C in the next row,

Re: a problem to solve

2006-03-22 Thread Claudio Grondi
John Salerno wrote: Ok, here's a problem I've sort of assigned to myself for fun, but it's turning out to be quite a pain to wrap my mind around. It's from a puzzle game. It will help if you look at this image: http://www.johnjsal.devisland.net/switches.jpg Here's the situation: Each of

Re: Searching for uniqness in a list of data

2006-03-01 Thread Claudio Grondi
rh0dium wrote: Hi all, I am having a bit of difficulty in figuring out an efficient way to split up my data and identify the unique pieces of it. list=['1p2m_3.3-1.8v_sal_ms','1p2m_3.3-1.8_sal_log'] Now I want to split each item up on the _ and compare it with all others on the list,

Re: why? [win32com/WMI]

2006-03-01 Thread Claudio Grondi
Sergey wrote: import win32com.client loc = win32com.client.Dispatch(WbemScripting.SWbemLocator) svc = loc.ConnectServer(srv, root/cimv2, [EMAIL PROTECTED], **) sys = svc.get(Win32_Process) sys.create(notepad.exe) = Traceback (most recent call last): File remote.py, line 6, in ?

Re: bsddb3 database file, are there any unexpected file size limits occuring in practice?

2006-02-28 Thread Claudio Grondi
Klaas wrote: Claudio writes: I am on a Windows using the NTFS file system, so I don't expect problems with too large file size. how large can files grow on NTFS? I know little about it. No practical limit on current harddrives. i.e.: Maximum file size Theory: 16 exabytes

Re: Firebird and Python

2006-02-28 Thread Claudio Grondi
Ray Cote wrote: At 5:07 PM +0100 2/27/06, Magnus Lycka wrote: SNIP I'm still interested in experiences from Pythonistas using Firebird-- especially embedded. Works great. Python and Firebird embedded (at least on Windows) is very simple to use. Not currently using it on other

Re: Firebird and Python

2006-02-28 Thread Claudio Grondi
haxier wrote: All the info you need is in the kinterbasdb module. I've worked with it under windows and Linux and... it just works. Really well indeed. I'd recommend it a lot. http://kinterbasdb.sourceforge.net/dist_docs/usage.html#faq_fep_embedded_using_with -- Asier. Thanks - you

Re: How to do an 'inner join' with dictionaries

2006-02-27 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: Let's say I have two dictionaries: dict1 is 1:23, 2:76, 4:56 dict2 is 23:A, 76:B, 56:C How do I get a dictionary that is 1:A, 2:B, 4:C Just copy/paste the following source code to a file and run it: code sourceCodeToExecute = dict1 = { 1:23,2:76, 4:56

Re: Is Python a Zen language?

2006-02-26 Thread Claudio Grondi
Crutcher wrote: You are a very silly person. Claudio -- http://mail.python.org/mailman/listinfo/python-list

Re: time.sleep(1) sometimes runs for 200 seconds under windows

2006-02-26 Thread Claudio Grondi
Tony Nelson wrote: In article [EMAIL PROTECTED], Claudio Grondi [EMAIL PROTECTED] wrote: Claudio Grondi wrote: Claudio Grondi wrote: Paul Probert wrote: Peter Hansen wrote: Are you saying that you believe the time.sleep(1) call is actually blocking for 200 seconds? With such rare

  1   2   3   4   >