Re: is laziness a programer's virtue?

2007-04-15 Thread Claudio Grondi
pollute 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 > li

Re: image processing

2007-03-07 Thread Claudio Grondi
processing packages missing, that is worth to be covered by a separate 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 'Bla

Re: ANN: pyfuzzylib 0.1.3 Released

2006-09-17 Thread Claudio Grondi
e usable any more ;-) ? > Every 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
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 -- http://mail.python.org/mailman/listinfo/python-list

Re: Scientific computing and data visualization.

2006-09-13 Thread Claudio Grondi
at needs discussion with >> author or an experienced user. Unfortunately a mail to author returned as >> undeliverable. >> >> Does anybody now about suitable visualisation tool? >> > > Have you looked at HippoDraw? > > http:

Re: Unit balancing

2006-09-13 Thread Claudio Grondi
#x27;t have any link at my fingertips or even an idea where to look after 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: Looking for the Perfect Editor

2006-09-12 Thread Claudio Grondi
your own notes from what you have learned as a kind of contribution to a better future documentation. 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

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
shCreate def finishCreate (self): # New in 4.4. File "D:\SftwLib\Leo\src\leoCommands.py", line 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: Looking for the Perfect Editor

2006-09-07 Thread Claudio Grondi
easy because of lack of full documentation, but sure worth to try, anyway. Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: Extracting text from a string

2006-09-07 Thread Claudio Grondi
el 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/listinfo/python-list

Re: Extracting text from a string

2006-09-07 Thread Claudio Grondi
, the actual string will be: ['the string'][0]. Just use 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
$129.99 > , > $254.99 > > What have you tried? Taking a look into regular expressions in the Python tutorial (4.2 re -- Regular expression operations) should give you all you need. C

Re: Printing Documents

2006-09-07 Thread Claudio Grondi
ll you 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 a

Re: Using Beautiful Soup to entangle bookmarks.html

2006-09-07 Thread Claudio Grondi
--- # --- # Execution block: fileLikeObjFrom_urlopen = urlopen('www.google.com') # set URL mySGMLParserClassObj_withListOfHREFs = mySGMLParserClassProvidingListOf_HREFs() mySGMLParserClassObj_withListOfHREFs.feed(fileLikeObjFrom_urlopen.read()) mySGMLParserClassObj

Re: 3 Simple Questions About Python/IDLE

2006-09-07 Thread Claudio Grondi
n a file in IDLE?) 3) Plain text editor or IDLE are good. For more see Python website - 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: IronPython 1.0 - Bugs or Features?

2006-09-07 Thread Claudio Grondi
2 min 41 s (of CPU time) CPython+Psyco : 2 min 45 s (of CPU time) IronPython 1.0 : 1 min 48 s (of CPU time) """ Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

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 >&g

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. >&

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 right

IronPython 1.0 - Bugs or Features?

2006-09-06 Thread Claudio Grondi
re if it is a bug or a feature. Can someone knowledgeable elaborate on it a bit please? Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

Re: OO on python real life tutorial?

2006-09-03 Thread Claudio Grondi
can't understand here is, with which of my opinions you disagree as one line below of my posting (you are responding to) I write: "I haven't said, that it is not suitable [for low-medium size projects]." ... By the way: why is it so hard to develop a wxPython appl

Re: pictures as characters in a Tk text box?

2006-09-02 Thread Claudio Grondi
HTML content, 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 p

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 &g

Re: OO on python real life tutorial?

2006-09-01 Thread Claudio Grondi
out how OO could be useful, just be more 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: simultaneous copy to multiple media

2006-08-31 Thread Claudio Grondi
sually 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 Gro

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: > > > import time > import thread > > delay=True > > def fn() > global delay > time.sleep() > delay=False > > thread.start_new_thread(fn,()) > > while delay: > > > ... > > while : > > > ... > > > Or,

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

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 multipr

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

2006-08-28 Thread Claudio Grondi
rent problems occurred while opening the file. The error message comes from Python (errnomodule.c), not from Windows(errno.h). 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/python-list

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 =

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

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 =

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

2006-08-28 Thread Claudio Grondi
uot;", line 1, in -toplevel- f = file('veryBigFile.dat','r+') 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: time.clock() going backwards??

2006-08-28 Thread Claudio Grondi
t. I think that is a huge > mistake, since it renders QueryPerformanceCounter non-monotonic. How does it come, that processors on same mainboard run at different speeds? Do they have separate clock-pulse generators? I can remember, that (at least on very old motherboards) the clock-pulse ge

Re: random writing access to a file in Python

2006-08-28 Thread Claudio Grondi
cessary to choose the right one to speed up sorting and actually _experiencing_ that you have to wait for your results 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

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 r

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

2006-08-27 Thread Claudio Grondi
> count += 1 > print count > > > This above is exactly what I am looking for, except it does not work in Microsoft Windows where the signal.alarm() function 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: How to let a loop run for a while before checking for break condition?

2006-08-27 Thread Claudio Grondi
ation counter so was not a very time consuming one). Just thought that for sure someone had already 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
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. >> O

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

2006-08-27 Thread Claudio Grondi
n 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: 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 >

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 wo

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 memor

Re: time.clock() going backwards??

2006-08-25 Thread Claudio Grondi
remember it right, the cause of such a problem is updating the clock by accessing a time server over a network. Just any such access results in adjusting the time a bit and leads eventually to such problems. Claudio Grondi -- http://mail.python.org/mailman/listinfo/python-list

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 ...) > >

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

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: How to draw line on Image?

2006-08-18 Thread Claudio Grondi
w. > > -- Paul > > And if the quality of the result is important maybe (maybe, because I haven't used it yet myself) aggdraw an add-on to the PIL library that supports 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 ar

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 re

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: Html character entity conversion

2006-07-30 Thread Claudio Grondi
John Machin wrote: > Claudio Grondi wrote: > >>[EMAIL PROTECTED] wrote: >> >>>Claudio Grondi wrote: >>> >>> >>>>[EMAIL PROTECTED] wrote: >>>> >>>> >>>>>Here is my script: >>>>> >>

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

Re: Html character entity conversion

2006-07-30 Thread Claudio Grondi
lace('&#','\u').replace(';','') strUnicode = eval("u'%s'"%strUnicodeHexCode) ? 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: Snapshot+Clipboard

2006-07-19 Thread Claudio Grondi
napshots of the screen. import ImageGrab GrabbedImage = ImageGrab.grab() # store screenshot as "RGB" Image GrabbedImage.save("TheScreenshot.jpg") # PIL evaluates extension 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: Tkinter binding and keyboard hardware settings (WinXP)

2006-07-10 Thread Claudio Grondi
> self.drawImage = self.canvas.create_image(112.5, 100, image= > self.cronoDefUp) > > > root = Tk() > root.title("GIF Animation Test") > app = GIF(root) > root.mainloop() > What about simple tracking of time (see above NOT tested rough draft) in the keyboardPrsUp and keyboardRlsUp functions, so, that events raised earlier than after a specified delay period will just become ignored? 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 >>

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 >>

Re: WANTED: logging of all file operations on Windows

2006-07-09 Thread Claudio Grondi
e hard drive(s) unnecessary wasting much energy and getting hot. Claudio Grondi > > > 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 Py

WANTED: logging of all file operations on Windows

2006-07-09 Thread Claudio Grondi
/directory - deleting 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: numarray

2006-07-06 Thread Claudio Grondi
;,'e']]) > > and it didn't work... > > i used > >>from import numpy * > > and it seems to accept 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

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, b

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

2006-07-02 Thread Claudio Grondi
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: How do you use this list ?

2006-06-27 Thread Claudio Grondi
Bo Yang wrote: > Hi everyone , > I have join this list for about 4 months , and everyday I receive > hundreds of > mails . There is no means to read all of them , so I just read something > interesting > for me . But if so , there are too much mails pile up in my inbox , I > want to ask > how do yo

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

Re: style question

2006-06-26 Thread Claudio Grondi
Scott David Daniels wrote: > Claudio Grondi wrote: > <<>> > >> When necessary to skip first line _and_ indentation: >> message = """ >> This is line 1 >> This is line 2 >> This is line 3 >> """.rep

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

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 e

Re: What is Expressiveness in a Computer Language

2006-06-22 Thread Claudio Grondi
med for causing it. Remember, if you do follow up you are talking to an idiot. Treat them with the ill-respect 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

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: what are you using python language for?

2006-06-07 Thread Claudio Grondi
hacker1017 wrote: > im just asking out of curiosity. It appears to me, that the natural language is not enough to record thoughts/observations/enlightenments for being reviewed and used with ease after a longer time, as for this purpose it is necessary to include in such records some sort of ac

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. > > impo

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 > > > Pe

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,

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 > Settings\michel

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

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 benefit

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 sim

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

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: >>> >>> &quo

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. >>> >> Pytho

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",nam

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 ha

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: > http://showmedo.com/videoListPa

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: 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 ro

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 Py

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: E

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

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 t

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

Re: Firebird and Python

2006-02-28 Thread Claudio Grondi
Ray Cote wrote: > At 5:07 PM +0100 2/27/06, Magnus Lycka wrote: > >> >> 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 ot

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 exabyt

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: sourceCodeToExecute = """ dict1 = { 1:23,2:76,

  1   2   3   4   >