Re: The .NET Framework SDK needs to be installed before building

2005-09-22 Thread Claudio Grondi
I mean I have seen this error already in the past installing another package requiring compilation of C sources. As I can remember, the actual problem was, that C++ .NET 2003 compiler environment was not installed - so this message seems to point in the wrong direction (is created somewhere inside

Re: Getting a number out of a string

2005-09-27 Thread Claudio Grondi
what about: >>> lst = [digit for digit in '06897'] >>> lst ['0', '6', '8', '9', '7'] Claudio <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > I'm trying to extract single digit number from a string. > > t[1] = '06897' > > I want to get the 7, 9,8 & 6 seperated out to use but ca

Re: pyMinGW support for Python 2.4.2 (final) is available

2005-09-28 Thread Claudio Grondi
I am not able to download any file from the site below, getting always only a page with link to the download which is the link to the HTML page with same link. Any ideas why? Claudio "A.B., Khalid" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > This is to inform those interes

Wanted: Python module allowing direct access to raw sectors of harddrives (MFT, boot sector, etc.) in MS Windows

2005-10-10 Thread Claudio Grondi
Googling for keywords like "direct access sector harddrive Python module Windows" seems to give no useful results. Any hints(best if cross-platform)? Claudio -- http://mail.python.org/mailman/listinfo/python-list

Re: Wanted: Python module allowing direct access to raw sectors ofharddrives (MFT, boot sector, etc.) in MS Windows

2005-10-10 Thread Claudio Grondi
Thank you Jeff very much for your quick reply. It saved me really much time of digging in the wrong direction. <[EMAIL PROTECTED]> wrote in news:<[EMAIL PROTECTED]>... >> I took the advice from this web page: >> http://support.microsoft.com/kb/q100027/ Ok, I had found this page myself during Googl

Re: Wanted: Python module allowing direct access to raw sectors ofharddrives (MFT, boot sector, etc.) in MS Windows

2005-10-11 Thread Claudio Grondi
at I provide will work with Python 2.3 > > http://starship.python.net/crew/samschul/ > > Sam Schulenburg > > Claudio Grondi wrote: > > Thank you Jeff very much for your quick reply. > > It saved me really much time of digging in the wrong direction. > > > > <[

Python source code for direct access to raw sectors of harddrives (MFT, boot sector, etc.) in Linux/Windows

2005-10-12 Thread Claudio Grondi
Python code for direct access to raw sectors of harddrives (MFT, boot sector, etc.) in Linux/Windows: http://people.freenet.de/AiTI-IT/Python/HowTo_AccessRawSectorsOfPhysicalDrives_onLinux.py and http://people.freenet.de/AiTI-IT/Python/HowTo_AccessRawSectorsOfPhysicalDrives_onWindows.py Claudio h

Re: Yes, this is a python question, and a serious one at that (moving to Win XP)

2005-10-13 Thread Claudio Grondi
What I can point you to is not Python, but embedding it in Python is a question of executing one line of Python code triggering its execution. I think you will be fascinated by its features and ease of use and how well it is suited to fit into your needs: http://www.autoitscript.com/autoit3/index

Re: matching elements of numeric arrays

2005-10-13 Thread Claudio Grondi
<[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED] > I have two one-dimensional Numeric arrays, and I need to know the > indices in the second array of elements from the first. > > so if i had: > > a=array([2,4,6]) > b=array([2,3,4,5,6]) > > i want a function match that does this: > > >>> match(a,

Re: UI toolkits for Python

2005-10-14 Thread Claudio Grondi
"Kenneth McDonald" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED] > Thanks for reminding me of Gtk. OK, add that to the list. > > The Web Browser interface is good for simple things, and will get better > with CSS2's adoption, but they still don't have a good way for important > things like i

Re: UI toolkits for Python

2005-10-16 Thread Claudio Grondi
"Steve Holden" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Claudio Grondi wrote: > > "Kenneth McDonald" <[EMAIL PROTECTED]> wrote in > > news:[EMAIL PROTECTED] > > > >>Thanks for reminding me of Gtk. OK, add th

Re: UI toolkits for Python

2005-10-18 Thread Claudio Grondi
"Steve Holden" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Claudio Grondi wrote: > > "Steve Holden" <[EMAIL PROTECTED]> schrieb im Newsbeitrag > [...] > [Claudio] > >>>I don't fully understand your attitud

Re: How to organize Python files in a (relatively) big project

2005-10-19 Thread Claudio Grondi
If I understand you right you need a concept in which you can put the files of your project where you want, i.e. restructure the nesting of directories storing your scripts without the problem of breaking the import statements. This will give you not a solution to any problem you maybe have with ma

Re: UI toolkits for Python

2005-10-19 Thread Claudio Grondi
;t seen any really platform-independent software yet and I don't expect to see any in the future. It is simply not possible to have one, even if much progress was done lately in many areas in order to try to approach it as close as possible. Claudio "Steve Holden" <[EMAIL PROT

Re: How to organize Python files in a (relatively) big project

2005-10-19 Thread Claudio Grondi
Maybe looking at the todays thread ["dynamical" importing] can be helpful also here. Claudio P.S. Below a copy of one of the responses: : Joerg Schuster wrote: > I need to import modules from user defined paths. I.e. I want to do > something like: > > module_dir = sys.argv[1] > > my_path = os.pa

Re: PyFLTK - an underrated gem for GUI projects

2005-11-09 Thread Claudio Grondi
> So I hope this humble message might inspire some folks to have a serious > look at pyfltk. For many situations, PyFLTK can take you to break-even > point quickly, and deliver net savings in time and effort after that. Animated by your posting I have downloaded: fltk-1.1.6-source.zip (3.073.43

Re: Want to perform unattended installation of SW using python

2005-11-13 Thread Claudio Grondi
Use AutoIt3 for it and be happy: http://www.autoitscript.com/autoit3/. And if you need Python to be involved in this process, just write out the AutoIt script from Python and then run the AutoIt script from Python, what makes you twice that happy. If you want, you can reinvent the wheel using Pyt

Re: PySizer 0.1

2005-11-13 Thread Claudio Grondi
A small hint about the Web-site: At least to me, the links to the documentation as e.g. http://pysizer.8325.org/doc/auto/home/nick/sizer-trunk/doc/auto/scanner.html are broken (no big thing, because the distro has it anyway). Claudio "Nick Smallbone" <[EMAIL PROTECTED]> schrieb im Newsbeitrag ne

Re: SciPy python 2.4 wintel binaries

2005-11-14 Thread Claudio Grondi
Is http://heanet.dl.sourceforge.net/sourceforge/scipy/scipy-0.4.3.win32-py2.4.exe not what are you looking for? Claudio "jelle" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Hi Peter, > > I'm aware of the Enthought distribution, which really is my preferred > 2.3 Python dis

Re: newbie - How do I import automatically?

2005-11-16 Thread Claudio Grondi
Just edit the first lines of %SystemDrive%\Python24\Lib\idlelib\PyShell.py yourself (not tested, but I have customized Idle intitial message using it and it worked ok - after new Python installation I overwrite this file with my own version to keep this customization.) Hope this helps. Claudio <

Re: newbie - How do I import automatically?

2005-11-16 Thread Claudio Grondi
<[EMAIL PROTECTED]> schrieb im Newsbeitrag news:<[EMAIL PROTECTED]>... > I tried to put the line > from btools import * > in several places in PyShell.py > but to now avail. It does not work, IDLE does not execute it??? > Bob I have to give up here :-( . The best solution I am able to come up wit

Re: newbie - How do I import automatically?

2005-11-16 Thread Claudio Grondi
Probably you have inbetween already found the 'def runsource(' line in the PyShell.py , but maybe you still wait for a reply, so here it is: yes, you put the two lines at the beginning of in PyShell.py existing runsource() method of the class ModifiedInterpreter(InteractiveInterpreter) If in my

Re: newbie - How do I import automatically?

2005-11-17 Thread Claudio Grondi
Thanks to "Serge Orlov" for the hint: "run C:\Python24\Lib\idlelib>idle.py -h" Following works for me now if I start IDLE by following console command: C:\Python24\pythonw.exe C:\Python24\Lib\idlelib\idle.py -c "import os;from path import path" The IDLE console prompt appears in the second li

Re: IDLE question

2005-11-17 Thread Claudio Grondi
<[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > IDLE doesn't seem to honor PYTHONSTARTUP environment variable nor > sitecustomize.py > > How do you then customize in IDLE? > > (basically I want to execute the statement >from btools import * > each time I restart IDLEs Pytho

Re: newbie - How do I import automatically?

2005-11-17 Thread Claudio Grondi
"Mikael Olofsson" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > [EMAIL PROTECTED] wrote: > > I tried to put the line > > from btools import * > > in several places in PyShell.py > > but to now avail. It does not work, IDLE does not execute it??? > > IDLE definitely executes Py

Re: newbie - How do I import automatically?

2005-11-17 Thread Claudio Grondi
7;__builtins__', '__doc__', '__file__', '__name__', 'main'] > > With the line in PyShell.py: > > IDLE 1.0.3 No Subprocess > >>> dir() > ['__builtins__', '__doc__', '__file__&#x

Re: IDLE question

2005-11-17 Thread Claudio Grondi
now a patch fixing it I have no good feeling about, but it works: in PyShell.py in def restart_subprocess(self): insert in section: " console.showprompt() # restart subprocess debugger # (-Patch) # making additional modules available in IDLE directly after re-

Re: IDLE question

2005-11-17 Thread Claudio Grondi
<[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > I did as you suggested, however > > after I make a new File (File/New Window) and save and then run (F5) I > get the following alert > > The Python Shell is already executing a command; please waith until it > is finished > > I al

Re: IDLE question

2005-11-17 Thread Claudio Grondi
me.sleep(0.1) # (Patch-) console.showprompt() # restart subprocess debugger I have no slightest idea why does it make a difference. What would make much more sense for me is to wait until self.tkconsole.executing is False but this resulted in an endless loop ... Cla

Re: IDLE question

2005-11-17 Thread Claudio Grondi
<[EMAIL PROTECTED]> wrote > This works! > > Thanks Claudio I am glad, that the time I put into it was not wasted. > For complete happiness I would also like to know what's hapening. > Is there anywhere I can read about PyShell.py. Not that I would know about (except reading the source code). May

Re: How to - import code not in current directory

2005-11-17 Thread Claudio Grondi
"py" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Claudio Grondi wrote: > > so this should work in your case: > > > > import sys > > sys.path.append("C:\some\other\directory") > > import bar > > ...that will

Re: How to - import code not in current directory

2005-11-17 Thread Claudio Grondi
This question seems to come up in this newsgroup quite often, so looking through past threads will sure provide more details. Here from "Re: how to import a module from a arbitraty path?" posted to comp.lang.python by Simon Brunning on May 26, 2005 09:20 : " > I have a program which is going to

Re: Announce: PythonD 2.4.2 r 1.0 for DJGPP/DOS/Windows

2005-11-18 Thread Claudio Grondi
I have read the announcement and checked out the homepage, but I am still missing the point. May someone explain to me, what PythonD is good for? In my eyes there is sufficient support for networking and OpenGL in Python, so why another not compatible version? Claudio "bdeck" <[EMAIL PROTECTED]>

Re: Any royal road to Bezier curves...?

2005-11-21 Thread Claudio Grondi
http://en.wikipedia.org/wiki/De_Casteljau%27s_algorithm has a Python example implementation of qubic Bezier curves available. Claudio "Warren Francis" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > I'm fairly new to Python (2-3 months) and I'm trying to figure out a simple >

Re: Any royal road to Bezier curves...?

2005-11-21 Thread Claudio Grondi
> http://en.wikipedia.org/wiki/De_Casteljau%27s_algorithm > has a Python example implementation of qubic Bezier curves available. Here my port to Tkinter (doesn't need PIL) from Tkinter import * master = Tk() objTkCanvas = Canvas(master, width=110, height=180) objTkCanvas.pack() def midpoint((x1

Re: Call OCX from python?

2005-11-26 Thread Claudio Grondi
"JustSomeGuy" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Hi I have a commercial OCX that I want to use in > my python application. How do I call OCXs from > python? > TIA import win32com.client axOCX = win32com.client.Dispatch("RegistryEntryForThisOCXin[VersionIndependent

Re: How to get started in GUI Programming?

2005-11-27 Thread Claudio Grondi
<[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > I am trying to learn GUI programming in Python, but have to confess I > am finding it difficult. > > I am not an experienced programmer - just someone who from time to > time writes small programs for my use. Over the years I hav

Re: Call OCX from python?

2005-11-29 Thread Claudio Grondi
"JustSomeGuy" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > > "Claudio Grondi" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > "JustSomeGuy" <[EMAIL PROTECTED]> schrieb im Newsbeitrag > >

Re: Compiling Guppy-PE extension modules

2005-11-29 Thread Claudio Grondi
"Sverker Nilsson" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > I have been informed that Guppy-PE (http://guppy-pe.sourceforge.net) > has failed to compile its extension modules with a Microsoft .NET 2003 > compiler under Windows 2000. > > [To the person who informed me abou

Is there no compression support for large sized strings in Python?

2005-12-01 Thread Claudio Grondi
What started as a simple test if it is better to load uncompressed data directly from the harddisk or load compressed data and uncompress it (Windows XP SP 2, Pentium4 3.0 GHz system with 3 GByte RAM) seems to show that none of the in Python available compression libraries really works for large s

Re: Is there no compression support for large sized strings in Python?

2005-12-01 Thread Claudio Grondi
"Fredrik Lundh" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Claudio Grondi wrote: > > > What started as a simple test if it is better to load uncompressed data > > directly from the harddisk or > > load compressed data and uncompres

Re: Is there no compression support for large sized strings in Python?

2005-12-01 Thread Claudio Grondi
I was also able to create a 1GB string on a different system (Linux 2.4.x, 32-bit Dual Intel Xeon, 8GB RAM, python 2.2). $ python -c 'print len("m" * 1024*1024*1024)' 1073741824 I agree with another poster that you may be hitting Windows limitations rather than Python ones, but I am certainly not f

Re: Is there no compression support for large sized strings in Python?

2005-12-01 Thread Claudio Grondi
"Harald Karner" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Claudio Grondi wrote: > > Anyone on a big Linux machine able to do e.g. : > > \>python -c "print len('m' * 2500*1024*1024)" > > or even more withou

Re: Compiling Guppy-PE extension modules

2005-12-01 Thread Claudio Grondi
> I have made a new version now, 0.1.1 . > It compiles cleanly with gcc -pedantic . but the problem with sets.c remains: C:\VisualC++NET2003\Vc7\bin\cl.exe /c /nologo /Ox /MD /W3 /G7 /GX /DNDEBUG -IE:\Python24\include -IE:\Python24\PC /Tcsrc/sets/sets.c /Fobuild\temp.win32-2.4\Re lease\src/sets/s

Can Python by design handle adress space larger than 2 GByte?

2005-12-01 Thread Claudio Grondi
> the string type uses the ob_size field to hold the string length, and > ob_size is an integer: > > $ more Include/object.h > ... > int ob_size; /* Number of items in variable part */ If this is what you mean, #define PyObject_VAR_HEAD \ PyObject_HEAD \ int ob_size; /* Number of ite

Re: Is there no compression support for large sized strings in Python?

2005-12-02 Thread Claudio Grondi
"Gerald Klix" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Did you consider the mmap library? > Perhaps it is possible to avoid to hold these big stings in memory. > BTW: AFAIK it is not possible in 32bit windows for an ordinary programm > to allocate more than 2 GB. That re

Re: Compiling Guppy-PE extension modules

2005-12-02 Thread Claudio Grondi
"Sverker Nilsson" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > "Claudio Grondi" <[EMAIL PROTECTED]> wrote: > > > but the problem with sets.c remains: > > > > C:\VisualC++NET2003\Vc7\bin\cl.exe /c /nologo /Ox /MD /W3

Re: PythonMagick on Windows

2005-12-05 Thread Claudio Grondi
Adam Endicott wrote: > Does anyone know anything about PythonMagick? I've got a project that > could use ImageMagick, so I went looking around for PythonMagick, and > I'm a bit lost. > > I was able to download the PythonMagick source from the ImageMagick > site, but I'm on Windows and don't have t

Re: PythonMagick on Windows

2005-12-05 Thread Claudio Grondi
Adam Endicott wrote: > Claudio Grondi wrote: > >>Why is PIL *(Python Image Library) not suitable to do the graphics? >> >>http://www.pythonware.com/products/pil/ >> >>Claudio > > > I am using PIL for some other things, but what I need ImageMagick for

DevX: "Processing EDI Documents into XML with Python"

2005-01-21 Thread Claudio Grondi
"You don't have to rely on expensive and proprietary EDI conversion software to parse, validate, and translate EDI X12 data to and from XML; you can build your own translator with any modern programming language, such as Python." by Jeremy Jones http://www.devx.com/enterprise/Article/2

Re: [ANN] PyScript 0.5 released

2005-01-21 Thread Claudio Grondi
http://sourceforge.net/project/showfiles.php?group_id=50346 shows the date of release of pyscript-0.5 as: 2004-05-11 07:00 What is then the reason for this [ANN] ? Claudio "Paul Cochrane" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > PyScript is a python module for pr

Re: is there better 32 clock() timing?

2005-01-24 Thread Claudio Grondi
On my 2.8GHz P4, Windows 2000 SP4 with Python 2.3.4 I am getting totally different results compared to Ray. Does Python 2.3.4 already use the Pentium RTDSC instruction for clock()? Claudio # \> Claudio Grondi, 2.8GHz P4 Python 2.3.4 (2005-01-24 14:32) # time of taking t

Re: python without OO

2005-01-26 Thread Claudio Grondi
I can't resist to point here to the Re: How to input one char at a time from stdin? posting in this newsgroup to demonstrate, what this thread is about. Claudio > >On Tue, 25 Jan 2005 12:38:13 -0700, Brent W. Hughes > ><[EMAIL PROTECTED]> wrote: > >> I'd like to get a character from stdin, perf

Re: Tao Scripting Language 0.8.5 beta released!

2005-01-27 Thread Claudio Grondi
Dear Limin, Tao Script with its 300 KByte of code is so small, that one just must love it forgiving all its baby troubles. After changes (see below) to the code in taoModule.cpp necessary because my compiler claimed repeated definition of 'ref' e.g. in the section: if(TaoReference *ref2a=inNameSp

Re: CONTEST - What is the (best) solution?

2005-02-03 Thread Claudio Grondi
> {Key11: Value11 > > {Keyn1: Valuen1 > Keyn2: Valuen2 > ... > Keynn:Valuenn} > > Each pair in a dictionary is separated by CRLF and in each dictionary > numbers of pairs can be different. > I need to read only the last dictionary.What is a > best solution? > Thanks > Lad What about (not test

Re: IPython colors in windows

2005-02-04 Thread Claudio Grondi
Hi, I have watched this thread hoping to get an hint on my problem, but it seems I didn't. My problem is, that the background of part of the error messages is always black (e.g. after typing In [1]: sdfsdf) and my monitor failes to show the red, green texts on black background clearly enough to s

Re: IPython colors in windows

2005-02-04 Thread Claudio Grondi
I use this one, http://heanet.dl.sourceforge.net/sourceforge/uncpythontools/readline-1.7.win 32.exe which I assume is the right one. Any other ideas? Claudio "Fuzzyman" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Are you really using the readline module from newcenturycom

Re: IPython colors in windows

2005-02-04 Thread Claudio Grondi
with black background: "In [1]:" sdlfjf "--- " "exceptions.NameError" Traceback (most recent call last) "Fernando Perez" <[EMAIL PROTECTED]> schrie

Re: IPython colors in windows

2005-02-05 Thread Claudio Grondi
"Ashot" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > whoa, that was quick, looks like it works for me. Thanks a lot! > It would be nice to be able to set the colors in the prefs file, although > its possible to edit the pyColorize file as Claudio mentioned. To get the colour

Re: key - key pairs

2005-06-23 Thread Claudio Grondi
> is there in python a kind of dictionary that supports key - key pairs? > I need a dictionary in which I can access a certain element using two > different keys, both unique. > A Python dictionary needs a unique key, so a pair of keys is still one unique key, but probably it is some kind of misund

Re: Favorite non-python language trick?

2005-06-24 Thread Claudio Grondi
> And you can do block comments with --[[ and ---]]. I am very happy not to have such "tricks" in Python. Any other (useful) suggestions? Claudio "Joseph Garvin" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > As someone who learned C first, when I came to Python everytime I

Re: Favorite non-python language trick?

2005-06-24 Thread Claudio Grondi
im Newsbeitrag news:[EMAIL PROTECTED] > Claudio Grondi wrote: > > >>And you can do block comments with --[[ and ---]]. > >> > >> > > > >I am very happy not to have such "tricks" in Python. > > > >Any other (useful) suggestions? > >

Re: Documentation bug: Python console behaviour changed

2005-07-19 Thread Claudio Grondi
"Lucas Raab" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Peter Hansen wrote: > > Kay Schluehr wrote: > > > >> The documentation of the Python console behaviour is not correct > >> anymore for Python 2.4.1. At least for the Win2K system I'm working on > >> 'Ctrl-Z' does not s

Re: Documentation bug: Python console behaviour changed

2005-07-20 Thread Claudio Grondi
>> 'Ctrl-Z' does not shut down the console but 'Ctrl-D' etc. >> Usually means you have a readline package installed. Right. Readline uninstalled, Ctrl-Z works again. By the way: After trying to take over readline support from Gary Bishop, I have inbetween given up trying to fix readline behaviour

Version of TAR in tarfile module? TAR 1.14 or 1.15 port to Windows?

2005-08-19 Thread Claudio Grondi
I need to unpack on a Windows 2000 machine some Wikipedia media .tar archives which are compressed with TAR 1.14 (support for long file names and maybe some other features) . It seems, that Pythons tarfile module is able to list far more files inside the archives than WinRAR or 7zip or TotalCommand

Re: Version of TAR in tarfile module? TAR 1.14 or 1.15 port to Windows?

2005-08-20 Thread Claudio Grondi
ages/dump.tar results in: /usr/bin/tar: j\:/o/archives/images/dump.tar: Cannot open: Input/Output error telling tar.exe --extract --directory=tmp -f /cygdrive/j/o/archives/images/dump.tar doesn't work either. Claudio "Martin v. Löwis" <[EMAIL PROTECTED]> schrieb im Newsbe

unpacking TAR 1.14/ 1.15 archives on Windows (first step towards own static HTML version of Wikipedia)

2005-08-20 Thread Claudio Grondi
yself http://www.pythonforum.org/ftopic19424_Wikipedia___conversion_of_in_SQL_database_stored_data_to_HTM.html ) Claudio "Diez B. Roggisch" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Claudio Grondi wrote: > > remember. I work in a Windows command shell

Re: Speed quirk: redundant line gives six-fold speedup

2005-08-25 Thread Claudio Grondi
> I've learnt my lesson :) Thank you for your help, and apologies > for wasting other people's time with this as well as my own! I've learnt my lesson reading through this thread, too. I am glad to be given the chance of wasting my time with it and very happy and thankful, that you posted your

Why does min(A,B) behave different for lists and for classes?

2005-08-26 Thread Claudio Grondi
Trying to understand the outcome of the recent thread (called later reference thread): "Speed quirk: redundant line gives six-fold speedup" I have put following piece of Python code together: class PythonObject_class: pass PythonObject_class_instanceA = PythonObject_class() PythonObject_class_

Re: Why does min(A, B) not raise an error if A, B actually can't be compared?

2005-08-26 Thread Claudio Grondi
A) outputs: min(A,B) is A: in case of classes with defined __cmp__() as parameter: True min(B,A) is A: in case of classes with defined __cmp__() as parameter: False "Raymond Hettinger" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Claudio Grondi wrote: &

Re: new line

2005-08-29 Thread Claudio Grondi
"Kuljo" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Dear friends > I'm so sorry to bore you with this trivial problem. Allthou: I have string > having 0x0a as new line, but I should have \n instead. > How should I solve it? > I've tried > >>>text_new=tex_old.replace(str(0x0a

Python OpenCV wrapper

2005-09-06 Thread Claudio Grondi
What is the current status of Python OpenCV interface i.e. the opencv module? \OpenCV\samples\python\contours.py gives following ERROR: OpenCV Python version of contours Traceback (most recent call last): File "\OpenCV\samples\python\contours.py", line 6, in ? from opencv import cv ImportE

Re: left/right mouse button events not trapped

2005-09-06 Thread Claudio Grondi
I don't know much about wxPython, but the left/right mouse button events _ARE_ trapped, but not when clicking on the image, probably because they are registered to the panel not to the image. Just resize the window and click next to the image. Hope this helps for now, before you get a respon

Re: left/right mouse button events not trapped

2005-09-06 Thread Claudio Grondi
ranit.bmp', "rb").read() stream = cStringIO.StringIO(data) bmp = wx.BitmapFromImage( wx.ImageFromStream( stream )) bmpW = bmp.GetWidth() bmpH = bmp.GetHeight() DisplayPicturePanel=DisplayPicture(None, -1, "Test MB", bmp, bmpW, bmpH) #MainFrame = DisplayPicture(N

Is it possible to detect if files on a drive were changed without scanning the drive?

2005-09-12 Thread Claudio Grondi
It is maybe not a pure Python question, but I think it is the right newsgroup to ask for help, anyway. After connecting a drive to the system (via USB or IDE) I would like to be able to see within seconds if there were changes in the file system of that drive since last check (250 GB drive with ab

Re: Why do Pythoneers reinvent the wheel?

2005-09-12 Thread Claudio Grondi
Here some of my thougts on this subject: I think that this question adresses only a tiny aspect of a much more general problem the entire human race has in any area. Reinventing the wheel begins when the grandpa starts to teach his grandchild remembering well that he has done it already many times

Re: Is it possible to detect if files on a drive were changed without scanning the drive?

2005-09-12 Thread Claudio Grondi
"Alessandro Bottoni" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Claudio Grondi wrote: > > After connecting a drive to the system (via USB > > or IDE) I would like to be able to see within seconds > > if there were changes in the fil

Re: IPython colors in windows

2005-02-06 Thread Claudio Grondi
Hi, I have done some more work on Console.py from the readline package version 1.12, adding support for background colors and testing of proper function of them (run the Console.py script to see coloured output). Added was also the possibility to set the default text/background colors for colored

Re: IPython colors in windows

2005-02-06 Thread Claudio Grondi
write(). e.g. '\x1B[31m' '\x1B[1m' will cause later submitted text to be light red. Running Console.py creates coloured test output which can be checked for integrity. Any feedback is welcome. Claudio "Claudio Grondi" <[EMAIL PROTECTED]> schrieb im Newsb

Re: Possible to import a module whose name is contained in a variable?

2005-03-06 Thread Claudio Grondi
"Steven Reddie" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Hi, > > I want to do something like the following, which doesn't work: > > modulename = 'module' > import modulename > > The error is that there is no module named 'modulename'. Is there a > way to get that

Re: Possible to import a module whose name is contained in a variable?

2005-03-07 Thread Claudio Grondi
trag news:[EMAIL PROTECTED] > Claudio Grondi wrote: > > "Steven Reddie" <[EMAIL PROTECTED]> schrieb im Newsbeitrag > > news:[EMAIL PROTECTED] > >> > >>I want to do something like the following, which doesn't work: > >> > >>modul

simultaneous copy to multiple media

2005-03-20 Thread Claudio Grondi
I would like to save time copying the same file (>6 GByte) to various different target storage media connected to the system via USB. Is there a (Python or other) tool able to help me to do this, so that I don't need to copy the source file first to the first media, then to the second, etc.? Clau

Re: simultaneous copy to multiple media

2005-03-20 Thread Claudio Grondi
there maybe a way to use a direct DMA transfer to multiple target destinations (I copy to drives connected via USB ports) ? Can someone point me in the right direction? Claudio "Claudio Grondi" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > I would like t

AsmL/Python relationship? Anyone using AsmL? What for?

2004-12-15 Thread Claudio Grondi
Hi, I have just by chance discovered, that Microsoft research works on a kind of programming language called AsmL, and I'm just curious if AsmL, which is using same concept of significant indentation as Python language, was developed fully independently or is there a kind of relationship (same per

Re: [perl-python] a program to delete duplicate files

2005-03-20 Thread Claudio Grondi
>> I'll post my version in a few days. Have I missed something? Where can I see your version? Claudio "Xah Lee" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > here's a large exercise that uses what we built before. > > suppose you have tens of thousands of files in various d

Re: simultaneous copy to multiple media

2005-03-20 Thread Claudio Grondi
means your message, that you think, that the consecutive copy is the fastest possible method if using Windows 2000? Claudio "Grant Edwards" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > On 2005-03-20, Claudio Grondi <[EMAIL PROTECTED]> wrote: >

Re: simultaneous copy to multiple media

2005-03-20 Thread Claudio Grondi
I don't know any deep details about USB, except that I _know_ that it is a serial bus, but considering following: 1) I can read/write 45 MByte/s from harddrive to harddrive on the E-IDE bus (theoretically 100 MByte/s), so the speed of the harddrive I read/write from/to is probably the bottleneck.

Re: simultaneous copy to multiple media

2005-03-21 Thread Claudio Grondi
, that I don't need to "reinvent the wheel". Claudio "Jacek Trzmiel" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > > Claudio Grondi wrote: > > I am on a Widows 2000 box using the NTFS file system. > > Both up to now suggeste

Wikipedia - conversion of in SQL database stored data to HTML

2005-03-21 Thread Claudio Grondi
Is there an already available script/tool able to extract records and generate proper HTML code out of the data stored in the Wikipedia SQL data base? e.g. converting all occurences of [[xxx|yyy]] to yyy etc. Or even better a script/tool able to generate and write to the disk all the HTML files

Re: Wikipedia - conversion of in SQL database stored data to HTML

2005-03-21 Thread Claudio Grondi
while back" smaller than 2 GByte (skipping the history dump) causes no problems with MySQL. "Leif K-Brooks" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Claudio Grondi wrote: > > Is there an already available script/tool able to extract records a

Re: Anonymus functions revisited

2005-03-22 Thread Claudio Grondi
For me, one of the reasons for using Python is the ease and the intuivity of reading its code. I have a problem with intuitively getting what is going on when using a pattern like (x,y,z=0) -> (x,y,z) where I expect at the first glance some C code with access to class members. At least I must st

Re: Anonymus functions revisited

2005-03-22 Thread Claudio Grondi
> > Why not: > > try: > > (x,y,z) > > except NameError: > > z=0 > > (x,y,z) > > ? instead of > > lambda x,y,z=0:(x,y,z) > Because it does not do the same thing ?-) Haven't got the idea why? () > Because, if it did, it would still require 5 times more lines of code to > do the same thing (he

Re: Anonymus functions revisited

2005-03-22 Thread Claudio Grondi
> > Already > > lambda x,y,z=0:(x,y,z) > > is a problem for me. > > > > Why not: > > try: > > (x,y,z) > > except NameError: > > z=0 > > (x,y,z) > > ? > > Because they are not equivallent. > > > Watching the last piece of code > > can even directly be seen, that there > > is eventually a Nam

Re: Anonymus functions revisited

2005-03-22 Thread Claudio Grondi
> for x,y,z in some_iterator: > > If some_iterator produces at some time > a tuple with only two elements this > will raise an exception no matter > whether you assigned z already or not. So if I now understand it right, the core of the whole proposal is to find a way to make unpacking of tuples

Re: Anonymus functions revisited

2005-03-22 Thread Claudio Grondi
> What do you find most readable: your version, with an ad-hoc function > defined somewhere else, far away in the code, or a simpler: > for (x,y,z=0) in tupleList: > do_whatever_with_it() I came up with the "ad-hoc function" to give a kind of replacement for the used syntax, in order not to as

Re: Wikipedia - conversion of in SQL database stored data to HTML

2005-03-22 Thread Claudio Grondi
> $main_prefix = "u:/WikiMedia-Static-HTML/"; > $wiki_language = "pl"; > The script is running now for over half an hour > and has created yet 1.555 folders and > generated 527 files with a total size of 6 MBytes > consuming only 16 seconds of CPU time. > I estimate the time until the script i

Re: problems with  character

2005-03-22 Thread Claudio Grondi
>>s = 'a  aaa' >>What am I doing wrong? First get rid of characters not allowed in Python code. Replace  with appropriate escape sequence: /x## where ## is the hexadecimal code of the ASCII character. Claudio -- http://mail.python.org/mailman/listinfo/python-list

Re: problems with  character

2005-03-22 Thread Claudio Grondi
"Claudio Grondi" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > >>s = 'a  aaa' > >>What am I doing wrong? > > First get rid of characters not allowed > in Python code. > Replace  with appropriate escape > seq

Re: (win32) speedfan api control

2005-04-02 Thread Claudio Grondi
your script works ok on my W2K box :-). It makes me curious if I can get also the temperatures into Python script for further processing as easy as the setting of the checkbox is done? (I have not much experience with this kind of programming yet) May I ask how did you get the "TJvXPCheckbox" and

Re: (win32) speedfan api control

2005-04-04 Thread Claudio Grondi
is another story. By the way: is there a free tool (primary for Windows, but best for both Linux and Windows) able to get the text of the word under the current mouse pointer position like it is done e.g. by Babylon translator? Claudio "Simon Brunning" <[EMAIL PROTECTED]> sc

  1   2   3   4   >