Problem with access to shared memory(W2K) / ORIGINALLY (win32) speedfan api control

2005-04-06 Thread Claudio Grondi
Background information: - in order to monitor mainboard sensory data as fan speeds, temperatures, applications like SpeedFan http://www.almico.com/speedfan.php or MBM http://mbm.livewiredev.com/ can be used. Both of the mentioned apps expose data got from the hardwar

Re: (win32) speedfan api control

2005-04-06 Thread Claudio Grondi
, Delphi code examples). but ... I failed to get the data into a Python script :-( . For details see my other "Problem with access to shared memory(W2K) / ORIGINALLY (win32) speedfan api control" posting. Claudio "Almico" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[E

Re: Problem with access to shared memory(W2K) / ORIGINALLY (win32) speedfan api control

2005-04-06 Thread Claudio Grondi
> For the mistake you made see below, hope that helps. It doesn't. > > pBuf_buf = cast(pBuf, Buffer) > Here's the problem. pBuf is a pointer to a Buffer structure, not the > buffer structure itself. > Something like > pBuf_buf = Buffer.from_address(pBuf) > may work. If I currently underst

Re: Problem with access to shared memory(W2K) / ORIGINALLY (win32) speedfan api control

2005-04-06 Thread Claudio Grondi
of Python (Windows exception, can't read from memory at 0x0...07) due to existance of > ptr = cast(pBuf, POINTER(Buffer)) but the print > print ptr # should print does its output to the console... Strange... Claudio "Thomas Heller" <[EMAIL PROTECTED]> schrieb im Newsbe

Re: Problem with access to shared memory(W2K) SOLVED

2005-04-08 Thread Claudio Grondi
I have got a solution to my problem from Thomas Heller by email. The problem was solved by using .from_address() instead of causing trouble cast() - here the solution as a generalized example of code for reading access to shared memory area with given 'appropriateName': from ctypes import * FILE_

ANN: Python script (for Windows) accessing motherboard sensory data

2005-04-08 Thread Claudio Grondi
***' print '*** install and run MBM 5 before using this script ***' print '*** MBM 5 home: http://mbm.livewiredev.com ***' print '*** Port of the MBM API to Python by Claudio Grondi ***'

IPython - problem with using US international keyboard input scheme on W2K

2005-04-11 Thread Claudio Grondi
German Windows 2000, SP 4 Python 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)] IPython 0.6.10 -- An enhanced Interactive Python. Is it already known, that after switching the keyboard input scheme on German Windows 2000 to english USA International IPython generates \x00" instead

Re: IPython - problem with using US international keyboard input scheme on W2K

2005-04-12 Thread Claudio Grondi
? Claudio lazy at the moment, because instead of trying to fix it just switched back to Idle ... "Ville Vainio" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > >>>>> "Claudio" == Claudio Grondi <[EMAIL PROTECTED]> writes: > >

Re: changing colors in python

2005-04-16 Thread Claudio Grondi
The readline module (used e.g. in IPython) http://sourceforge.net/project/showfiles.php?group_id=82407 provides the Console.py script and in my own version of it, the (extended) Console() class supports any ANSI escape sequences of the form ESC[#m and ESC[#,#m , making it possible to set any by con

Re: Name/ID of removable Media: how?

2005-04-19 Thread Claudio Grondi
There are sure thousand ways of doing it "with windoze". Here one of them (NOT tested) in form of code snippets you can rearrange for your purpose: import win32com.client axFSO = win32com.client.Dispatch("Scripting.FileSystemObject") # SCRRUN.DLL axLstDrives = axFSO.Drives dctAXaxFSO_NumCodeAsKey

Re: Name/ID of removable Media: how?

2005-04-19 Thread Claudio Grondi
Maybe the function below can help? I suppose WMI returns same values as FSO (File System Object): def strDriveHexSerialNumberFromFSOintRetVal(intDriveSerialNumberByFSO): """Supplied with an integer representing a drive serial number returns the number in same format as \>dir command does (i.e

Re: Python documentation moronicities (continued)

2005-04-26 Thread Claudio Grondi
Conclusion: --- I agree with Bill Mill saying "I'd suggest that he [Xah Lee] actually make an effort at improving the docs before submitting them." so I am still waiting for the final version before deciding which docu is better, believing, that if Xah Lee puts more work and serious eff

from comp.ai.vision - beside C also Python code included

2005-04-26 Thread Claudio Grondi
From: Thomas Deselaers <[EMAIL PROTECTED]> Subject: Q&A : FIRE (Flexible Image Retrieval Engine) sources available FIRE is an extensible image retrieval engine that was developed to investigate the impact of different features for content-based image retrieval. The system was used in the 2004

I want a Python Puppy !

2005-12-12 Thread Claudio Grondi
I have just discovered the existance of Puppy Linux which is a complete operating system with a suite of GUI apps, only about 50 - 60M booting directly off the CDROM ( http://www.puppylinux.org ). This approach appears to me very Pythonic, so it were a nice thing to have a full featured Puppy

Re: I want a Python Puppy !

2005-12-12 Thread Claudio Grondi
Diez B. Roggisch wrote: > Claudio Grondi schrieb: > >> I have just discovered the existance of Puppy Linux which is a >> complete operating system with a suite of GUI apps, only about 50 - >> 60M booting directly off the CDROM ( http://www.puppylinux.org ). >>

Re: I want a Python Puppy !

2005-12-12 Thread Claudio Grondi
Paul Boddie wrote: > Claudio Grondi wrote: > >>I have just discovered the existance of Puppy Linux which is a complete >>operating system with a suite of GUI apps, only about 50 - 60M booting >>directly off the CDROM ( http://www.puppylinux.org ). > > > This i

Re: I want a Python Puppy !

2005-12-13 Thread Claudio Grondi
Magnus Lycka wrote: > Claudio Grondi wrote: > >> I have just discovered the existance of Puppy Linux which is a >> complete operating system with a suite of GUI apps, only about 50 - >> 60M booting directly off the CDROM ( http://www.puppylinux.org ). >> >&

Re: I want a Python Puppy !

2005-12-13 Thread Claudio Grondi
Paul Rubin wrote: > Claudio Grondi <[EMAIL PROTECTED]> writes: > >>Currently Ubuntu is my favorite, because it seems to be at the moment >>the only Linux distribution supporting already Python 2.4.2 out of the >>box, > > > Are you seriously saying that

Wanted: binary of OpenCV Python extension module for Windows

2005-12-16 Thread Claudio Grondi
OpenCV means Intel® Open Source Computer Vision Library. It is a collection of C functions and a few C++ classes that implement some popular Image Processing and Computer Vision algorithms. OpenCV library is mainly aimed at real time computer vision. Some example areas would be Human-Computer

Re: Wingide is a beautiful application

2005-12-17 Thread Claudio Grondi
vinjvinj wrote: > I haven't used an IDE in a long time but gave wing ide a try because > I wanted the same development platform on Linux and Windows. > > I'm currently using Ultraedit and it works fine but needed something > more portable as I'm moving my main platform over to Ubuntu. This is also

Re: Wingide is a beautiful application

2005-12-18 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: > Claudio Grondi wrote: > >>The only thing what makes a difference to me is, that Wing 'understands' >>Python code what results in features not available elsewhere (e.g. go to >>definition). > > > This is something that pr

Re: Wingide is a beautiful application

2005-12-18 Thread Claudio Grondi
Sybren Stuvel wrote: > Claudio Grondi enlightened us with: > >>With [Strg]-[End] I went to the end of the file where I wanted to >>continue editing, but the syntax highlighting told me there is no >>code but only a comment. I checked it and found out, that Vim is >

Re: Wingide is a beautiful application

2005-12-19 Thread Claudio Grondi
BartlebyScrivener wrote: > If you're on Windows XP why not try Xemacs? That's free and does syntax > highlighting etc. Doesn't have a problem with large files and so on. > > rpd > Installed: http://ftp.dk.xemacs.org/pub/emacs/xemacs/binaries/win32/InnoSetup/XEmacs%20Setup%2021.4.18-1.exe Request

Re: Wingide is a beautiful application

2005-12-19 Thread Claudio Grondi
BartlebyScrivener wrote: > Go to Options. Near the bottom, it will say "Edit Init.File" Click on > it. Done. A completely new file was created. > > Make an entry on a separate line near the top as follows > > (require 'python-mode) > > Then save the init file. Have copy/pasted to it including b

Re: How can I load python script into Html ??

2005-12-19 Thread Claudio Grondi
PatPoul wrote: > Yes I register Python script. > I see in your exemple that you use file extention pys. > That was why my exemple does'nt work. > > Thanks ! > > Patrick Poulin > In this context I have a question: How can the registering of the Python scripting engine be easily and completely

Re: ANNOUNCE; Try python beta

2005-12-19 Thread Claudio Grondi
Mike Meyer wrote: > Ok, I've given it the interface I want, and made it less of an > attractive nuisance. > > http://www.mired.org/home/mwm/try_python/ is now ready for people to > play with. There's no tutorial information on it yet, that's the next > thing to do. However, I won't be able to work

Re: Wanted: binary of OpenCV Python extension module for Windows

2005-12-21 Thread Claudio Grondi
Claudio Grondi wrote: > > OpenCV means Intel® Open Source Computer Vision Library. It is a > collection of C functions and a few C++ classes that implement some > popular Image Processing and Computer Vision algorithms. > OpenCV library is mainly aimed at real time compute

Re: Please enlighten me about PyPy

2005-12-22 Thread Claudio Grondi
Steve Holden wrote: > Kevin Yuan wrote: > >> >> >> 21 Dec 2005 19:33:20 -0800, Luis M. González <[EMAIL PROTECTED] >> >: >> >> ... ... >> This implementation requires a minimal core, writen in a restricted >> subset of python called "rpython". This subset avo

Re: Wingide is a beautiful application

2005-12-22 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: >>I don't like, that one of the latest UltraEdit releases >>was buggy causing 100%CPU load and 2MByte of harddisk >>data traffic beeing idle, so I am looking for an alternative >>for years, but instead of finding it I was forced lately >>to spend money again on renewing my

Re: python coding contest

2005-12-26 Thread Claudio Grondi
Peter Otten wrote: > Simon Hengel wrote: > > >>>Is it necessary to keep the input parameter as 'input'? Reducing that to >>>a single character drops the length of a program by at least 8 >>>characters. Technically it changes the interface of the function, so >>>it's a little bogus, but test.py do

Re: python coding contest

2005-12-27 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: > I now have a version which passes the test suite in 32 bytes grin> > > -T. > After I have posted the statement, that I have one with 39 bytes, I had the 32 version five minutes later, but thougt that instead of posting it I can maybe use it as entry on the contest ..

Re: python coding contest

2005-12-28 Thread Claudio Grondi
Simon Hengel wrote: > Hello, > we are hosting a python coding contest an we even managed to provide a > price for the winner... > > http://pycontest.net/ > > The contest is coincidentally held during the 22c3 and we will be > present there. > > https://events.ccc.de/congress/2005/wiki/Python_cod

Re: python coding contest

2005-12-29 Thread Claudio Grondi
Simon Hengel wrote: > Hello, > we are hosting a python coding contest an we even managed to provide a > price for the winner... > > http://pycontest.net/ > > The contest is coincidentally held during the 22c3 and we will be > present there. > > https://events.ccc.de/congress/2005/wiki/Python_cod

Re: python coding contest

2005-12-30 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: > Thomas Heller wrote: > >>X=' _ _ _ | _| _ |_|_' >>Y=0x23018F406A3530EC273F008 >>j="".join >>seven_seg=lambda n:j(j(c)+"\n"for c in zip(*[X[Y>>m+int(d)*9&7::8]for d in n >>for m in(6,3,0)])) > > > Interesting bit: > > Although there are more 3-char combinations

Re: python coding contest

2005-12-30 Thread Claudio Grondi
André wrote: > For the few that might be interested, I will be posting the details of > a 117 character long solution to the challenge on my blog > http://aroberge.blogspot.com/. > > Enjoy! > > André > It doesn't work for me as described on that page. The output is scrumbled. It seems, that the

Re: python coding contest

2005-12-31 Thread Claudio Grondi
> Please send me comments, suggestions and ideas. Now, after the contest is over I analysed the outcome of it and have come to the conclusion, that there were two major factors which contributed to squeezing of code: (1). usage of available variants for coding of the same thing (2). sqeez

Re: python coding contest

2006-01-01 Thread Claudio Grondi
Claudio Grondi wrote: >> Please send me comments, suggestions and ideas. > > > Now, after the contest is over I analysed the outcome of it and have > come to the conclusion, that there were two major factors which > contributed to squeezing of code: > > (1). usag

Re: python coding contest

2006-01-01 Thread Claudio Grondi
Steven D'Aprano wrote: > On Sun, 01 Jan 2006 03:34:33 +0100, Claudio Grondi wrote: > > >>>Please send me comments, suggestions and ideas. >> >>Now, after the contest is over I analysed the outcome of it and have >>come to the conclusion, that there were

Re: python coding contest

2006-01-01 Thread Claudio Grondi
Steven D'Aprano wrote: > On Sun, 01 Jan 2006 15:49:58 +0100, Claudio Grondi wrote: > > > >>What I have thought about as a simpler/better solution is a method >>allowing to avoid processing the content of the string or long integer >>object by looping ove

Re: python coding contest

2006-01-01 Thread Claudio Grondi
Claudio Grondi wrote: > Steven D'Aprano wrote: > >> On Sun, 01 Jan 2006 15:49:58 +0100, Claudio Grondi wrote: >> >> >> >>> What I have thought about as a simpler/better solution is a method >>> allowing to avoid processing the content of the s

Re: python coding contest

2006-01-01 Thread Claudio Grondi
Michael Spencer wrote: > Claudio Grondi wrote: > >> ...I analysed the outcome of it and have >> come to the conclusion, that there were two major factors which >> contributed to squeezing of code: >> >>(1). usage of available variants for coding of the sam

Re: Any wing2.0 users here?

2006-01-02 Thread Claudio Grondi
Alvin A. Delagon wrote: > emacs has been my long time companion for php, perl, and python. My boss > recommended to me Wing2.0, I find it hard to adjust though. What can you > say about this IDE? He say's if I think it could improve my productivity > he's willing to buy it for me. Suggestions f

Productivity and Quality of IDE

2006-01-02 Thread Claudio Grondi
In todays posting "Any wing2.0 users here?" I found in the sentence "What can you say about this IDE? He say's 'if I think it could improve my productivity he's willing to buy it for me." the indirect question: Can a better Python IDE increase programmers productivity? From my experienc

Re: Sort dictionary

2006-01-02 Thread Claudio Grondi
Markus Franz wrote: > Hi! > > I have: > > x = {'a':3, 'b':2, 'c':4} > > How can I sort x by value? (I tried using sorted() with x.items() - but I > didn't get a dictionary as response.) > > My second question: > How can I reduce the dictionary to 2 items (so delete everything after the > first

Re: Spiritual Programming (OT, but Python-inspired)

2006-01-02 Thread Claudio Grondi
There are many ways of going crazy, but the most valuable of them is this one which makes a genius out of an ordinary man. Claudio [EMAIL PROTECTED] wrote: > While preparing a Python411 podcast about classes and OOP, my mind > wondered far afield. I found myself constructing an extended metaphor

Re: Any wing2.0 users here?

2006-01-02 Thread Claudio Grondi
Jarek Zgoda wrote: > Alvin A. Delagon napisał(a): > > >>emacs has been my long time companion for php, perl, and python. My boss >>recommended to me Wing2.0, I find it hard to adjust though. What can you >>say about this IDE? He say's if I think it could improve my productivity >>he's willing to

Re: indentation preservation/restoration

2006-01-02 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: > I have (inadvertently) wiped out the functionality of my personal > python snippets by eliminating leading space. I have also just visited > http://www.python.org/tim_one/000419.html and saw a piece of code with > the indentation gone. Python code is fragile in this regar

Re: indentation preservation/restoration

2006-01-03 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: > Steven D'Aprano wrote: > > >>With a little bit of work, this could be expanded to add redundancy for >>not just indentation and numeric literals, but also string literals, >>keywords, operators, and anything else. > > > When I copy and assign to variable 'post' the re

Re: [OT] - Requesting Comments for Process Definition and Presentation

2006-01-03 Thread Claudio Grondi
Ilias Lazaridis wrote: > comp.lang.python / comp.lang.ruby > > - > > I would like to ask for feedback on the Process Definition and > Presentation. > > Essentially this is exactly what I've myself specialized to do. > > But I cannot apply the process to my own system. > > I ask here, as I hav

Re: How to generate (enumerate) 2**N tuples representing all vertices of unit hypercube in N-dimensional hyperspace ?

2006-01-03 Thread Claudio Grondi
Heiko Wundram wrote: > Paul Rubin wrote: > >>def perm(n): >> return [tuple([(1,-1)[(t>>i)%2] for i in xrange(n)]) >> for t in xrange(2L**n)] > > > or replace that with: > > def perm(n): >return (tuple(((1,-1)[(t>>i)%2] for i in xrange(n))) >for t in xrange(2L**n))

Re: How to generate (enumerate) 2**N tuples representing all vertices of unit hypercube in N-dimensional hyperspace ?

2006-01-04 Thread Claudio Grondi
Heiko Wundram wrote: > Claudio Grondi wrote: > >>Heiko Wundram wrote: >> >>>def perm(n): >>> return (tuple(((1,-1)[(t>>i)%2] for i in xrange(n))) >>> for t in xrange(2L**n)) >> >>Isn't this kind of coding beei

Re: Python article in Free Software Magazine

2006-01-04 Thread Claudio Grondi
Kirk Strauser wrote: > Michele Simionato wrote: > > >>when I think Zope is the less Pythonic application I have ever seen;) > > > You do? Why so? I'm not arguing, but that's different than my experience > with it and I'm curious about how you reached that conclusion. I can remeber, that I had

Re: Is 'everything' a refrence or isn't it?

2006-01-04 Thread Claudio Grondi
KraftDiner wrote: > I was under the assumption that everything in python was a refrence... > > so if I code this: > lst = [1,2,3] > for i in lst: >if i==2: > i = 4 > print lst > > I though the contents of lst would be modified.. (After reading that > 'everything' is a refrence.) > so it

Re: Win32 Binary-only for 2.3.x?

2006-01-04 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: > Hi, > > I must be going nutty, but I can't seem to find anywhere where I can > get just the binaries for, say, 2.3.5 for win32. I've googled high and > low and all I come up with is installer (MSI/EXE) binaries and the > source code. They have to be somewhere. I cant

Re: Win32 Binary-only for 2.3.x?

2006-01-04 Thread Claudio Grondi
Thomas Heller wrote: > [EMAIL PROTECTED] writes: > > >>Hi, >> >>I must be going nutty, but I can't seem to find anywhere where I can >>get just the binaries for, say, 2.3.5 for win32. I've googled high and >>low and all I come up with is installer (MSI/EXE) binaries and the >>source code. They

Re: Is 'everything' a refrence or isn't it?

2006-01-04 Thread Claudio Grondi
Steven D'Aprano wrote: > On Wed, 04 Jan 2006 10:54:17 -0800, KraftDiner wrote: > > >>I was under the assumption that everything in python was a refrence... >> >>so if I code this: >>lst = [1,2,3] >>for i in lst: >> if i==2: >> i = 4 >>print lst >> >>I though the contents of lst would be mo

Re: Is 'everything' a refrence or isn't it?

2006-01-05 Thread Claudio Grondi
Stuart D. Gathman wrote: > On Wed, 04 Jan 2006 10:54:17 -0800, KraftDiner wrote: > > >>I was under the assumption that everything in python was a refrence... >> >>so if I code this: >>lst = [1,2,3] >>for i in lst: >> if i==2: >> i = 4 >>print lst >> >>I though the contents of lst would be

Re: Is 'everything' a refrence or isn't it?

2006-01-05 Thread Claudio Grondi
Dan Sommers wrote: > On Wed, 04 Jan 2006 22:38:06 -0500, > "Stuart D. Gathman" <[EMAIL PROTECTED]> wrote: > > >>On Wed, 04 Jan 2006 10:54:17 -0800, KraftDiner wrote: >> >>>I was under the assumption that everything in python was a refrence... >>> >>>so if I code this: >>>lst = [1,2,3] >>>for i in

Does Python allow access to some of the implementation details?

2006-01-06 Thread Claudio Grondi
Let's consider a test source code given at the very end of this posting. The question is if Python allows somehow access to the bytes of the representation of a long integer or integer in computers memory? Or does Python hide such implementation details that deep, that there is no way to get dow

Re: Does Python allow access to some of the implementation details?

2006-01-06 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: > I don't know of a way to directly access the internal structure of a > long, but you can speed up your example. > > First, is the order of the commands > > >> i=i>>1 >> lstBitsBitwiseAnd.append(i&0x01) > > > what you intend? The first low order bit is discarded bec

Re: Does Python allow access to some of the implementation details?

2006-01-06 Thread Claudio Grondi
Martin v. Löwis wrote: > You can get somewhat faster in Python than your code if you avoid > producing new long objects all the time, and do the task in chunks of 30 > bits. It would be nice if you could explain why you consider chunks of 30 bits to be superior e.g. to chunks of 32 bits? > write

Re: Does Python allow access to some of the implementation details?

2006-01-07 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: > Claudio Grondi wrote: > >>Martin v. Löwis wrote: >> >>>You can get somewhat faster in Python than your code if you avoid >>>producing new long objects all the time, and do the task in chunks of 30 >>>bits. >> >&

Re: download full sites?

2006-01-07 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: > hi, does anyone know of any package that will download a full site for > offline viewing? It will change all url to match local urls and follow > a logical structure (the site's structure would be suffice).. Please > tell me if you have heard of such a package.. thanks al

Re: PIL implementation

2006-01-07 Thread Claudio Grondi
circusdei wrote: > I wrote this snippet with the intention of -- capturing a section of > the screen whenever it changes. It could be implemented to log any > sort of messaging system ( by saving consecutive images eg. > 1.png...etc). > > #code > > import Image > import Imag

Re: Does Python allow access to some of the implementation details?

2006-01-07 Thread Claudio Grondi
Paul Rubin wrote: > Claudio Grondi <[EMAIL PROTECTED]> writes: > >>The question is if Python allows somehow access to the bytes of the >>representation of a long integer or integer in computers memory? > > > No it doesn't, and that's a good thing, sinc

Re: Newbie with some doubts.

2006-01-07 Thread Claudio Grondi
Edgar A. Rodriguez wrote: > Hi everybody, > > Im newbie to Python (I found it three weeks ago) , in fact Im newbie to > programming. I'm being reading and training with the language, but I > still wondering about what Classes are used to. Could you please give > me some examples?? > > Thanks. >

Re: Does Python allow access to some of the implementation details?

2006-01-07 Thread Claudio Grondi
Bengt Richter wrote: > On Sat, 07 Jan 2006 14:05:18 +0100, Claudio Grondi <[EMAIL PROTECTED]> wrote: > [...] > >>What I am also looking for is a conversion to base 256 (i.e where the >>full byte is used and the string and the integer have the same actual >>

Re: Newbie with some doubts.

2006-01-07 Thread Claudio Grondi
Mike Meyer wrote: > Claudio Grondi <[EMAIL PROTECTED]> writes: > >>Edgar A. Rodriguez wrote: >> >>>Hi everybody, >>>Im newbie to Python (I found it three weeks ago) , in fact Im newbie >>>to >>>programming. I'm being reading an

Re: Viewing Binary Data

2006-01-08 Thread Claudio Grondi
Cuyler wrote: > Hello, > > I would like to display a file in its binary form (1s and 0s), but I'm > having no luck... Any thoughts would be most appreciated. > > Cheers! > > Cuyler > You may consider to check out the latest by me started thread in this newsgroup with the subject: "Does Python

Re: What is the slickest way to transpose a square list of lists (tuple of tuples)?

2006-01-08 Thread Claudio Grondi
Gerard Brunick wrote: > My way is ugly. These has to be a better way. > > Thanks, > Gerard Ugly is not necessary not the slickest. To do better, there must be something to compare to, right? Claudio -- http://mail.python.org/mailman/listinfo/python-list

Re: Running python apps from within python apps

2006-01-14 Thread Claudio Grondi
aph wrote: > Hello. I'm sure this has been asked before, but I can't find an answer > anywhere. > > I want to create a truly "dynamic" app which can get new functions > "on-the-fly" and run them without having to re-start the main app. > > I've found the code module that looks kind of hopefull. F

Re: Running python apps from within python apps

2006-01-14 Thread Claudio Grondi
aph wrote: > actually 'exec()' is the function I was looking for. Working code: > > class myApp: > > def kalle(self,str): > return str.upper() > > def run_script(self,script): > exec(script) > > app = myApp() > app.run_script("print self.kalle('hello')") > > Thanks... >

Re: Widget that displays a directory tree?

2006-01-16 Thread Claudio Grondi
Christos Georgiou wrote: > On Thu, 12 Jan 2006 11:55:46 -0500, rumours say that "Edward C. Jones" > <[EMAIL PROTECTED]> might have written: > > >>Do any of the Python GUIs have a super-high-level widget that displays a >>directory tree? Most file managers or editors have this type of window. >

Re: Widget that displays a directory tree?

2006-01-16 Thread Claudio Grondi
Fredrik Lundh wrote: > Claudio Grondi wrote: > > >>Christos Georgiou wrote: >> >>>On Thu, 12 Jan 2006 11:55:46 -0500, rumours say that "Edward C. Jones" >>><[EMAIL PROTECTED]> might have written: >>> >>> >>

Re: check to see if value can be an integer instead of string

2006-01-17 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: > Hello there, > i need a way to check to see if a certain value can be an integer. I > have looked at is int(), but what is comming out is a string that may > be an integer. i mean, it will be formatted as a string, but i need to > know if it is possible to be expressed as

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

2006-01-18 Thread Claudio Grondi
In the process of learning about some deeper details of Python I am curious if it is possible to write a 'prefix' code assigning to a and b something special, so, that Python gets trapped in an endless loop in a line with: if a==b: print 'OK' I mean, it would be of much help to me on my way t

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

2006-01-18 Thread Claudio Grondi
Steve Holden wrote: > Claudio Grondi wrote: > >> In the process of learning about some deeper details of Python I am >> curious if it is possible to write a 'prefix' code assigning to a and >> b something special, so, that Python gets trapped in an endless loop

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

2006-01-18 Thread Claudio Grondi
Fuzzyman wrote: > Claudio Grondi wrote: > [snip..] > >>Thanks for the quick reply. >> >>I see, that I have overseen, that as Fredrik also stated, one can >>directly manipulate __eq__() as the easiest way to achieve what I >>requested. >> >>To exp

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

2006-01-18 Thread Claudio Grondi
Steve Holden wrote: > Claudio Grondi wrote: > >> Steve Holden wrote: >> >>> Claudio Grondi wrote: >>> >>> >>>> In the process of learning about some deeper details of Python I am >>>> curious if it is possible to write a '

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

2006-01-18 Thread Claudio Grondi
Steve Holden wrote: > Claudio Grondi wrote: > [...] > >>> >> Yes, I know about 'is', >> >> but I mean, that it is not possible to use 'is' as replacement for >> '==' operator to achieve in Python same behaviour as it is

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

2006-01-18 Thread Claudio Grondi
Fuzzyman wrote: > Claudio Grondi wrote: > [snip..] > >>Yes, I know about 'is', >> >>but I mean, that it is not possible to use 'is' as replacement for '==' >>operator to achieve in Python same behaviour as it is the case in C and

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

2006-01-18 Thread Claudio Grondi
Fuzzyman wrote: > Oops... my misreading, sorry. > > The reason that, in Python, short ints have the same identity is not > fickle - it's just True. Python creates a new reference (pointer) to > the same object. > > You're saying you want one comparison operator that for : > > >>a=[1] >>... many

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

2006-01-18 Thread Claudio Grondi
Steve Holden wrote: > Claudio Grondi wrote: > >> Steve Holden wrote: > > [...] > >> The problem here is, that I mean, that in Python it makes no sense to >> talk about a value of an object, because it leads to weird things when >> trying to give a

Re: understanding stat module names

2006-01-18 Thread Claudio Grondi
David Bear wrote: > I'm trying to use os.chmod and am refered to the stat module. > > Is there are explanation of: > * S_ISUID > * S_ISGID > * S_ENFMT > * S_ISVTX > * S_IREAD > * S_IWRITE > * S_IEXEC > * S_IRWXU > * S_IRUSR > * S_IWUSR > * S_IXUSR >

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

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

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

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

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

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

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

2006-01-19 Thread Claudio Grondi
Steve Holden wrote: > Claudio Grondi wrote: > >> Steven D'Aprano wrote: >> >>> Claudio Grondi wrote: >>> >>> >>>> Exactly this is what Python does under the hood when writing >>>> a = "some string" >>>

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

2006-01-19 Thread Claudio Grondi
Fuzzyman wrote: > (If I understand correctly...) > > The reason he is looking for it, is in order to assert that Python > 'comparison' is broken. a bit this way, but why formulate it with such a negative touch? Lets understand it more as looking for a way to get a deep understanding of the concep

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

2006-01-19 Thread Claudio Grondi
Steve Holden wrote: > Claudio Grondi wrote: > >> Steve Holden wrote: >> >>> Claudio Grondi wrote: >>> >>> >>>> Steven D'Aprano wrote: >>>> >>>> >>>>> Claudio Grondi wrote: >>>>&g

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

2006-01-19 Thread Claudio Grondi
Steve Holden wrote: > Claudio Grondi wrote: > >> Steven D'Aprano wrote: > > [...] > >>>> The higher level of abstraction/indirection in Python results in making >>>> the concepts of 'value', 'having a value' or 'comparin

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

2006-01-19 Thread Claudio Grondi
Dennis Lee Bieber wrote: > On Thu, 19 Jan 2006 17:25:38 +0100, Claudio Grondi > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > >>Any hints towards enlightenment what this from the geometry known term >>'ellipsis' mean in Python? Goo

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

2006-01-19 Thread Claudio Grondi
Donn Cave wrote: > In article <[EMAIL PROTECTED]>, > Claudio Grondi <[EMAIL PROTECTED]> wrote: > > >>You seem here to try to give a definition of the term 'value' for >>Python. If I understand it right, the definition of the term can't be

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

2006-01-20 Thread Claudio Grondi
Magnus Lycka wrote: > Claudio Grondi wrote: > >> You seem here to try to give a definition of the term 'value' for >> Python. If I understand it right, the definition of the term can't be >> generally given for many reasons. It depends at least on t

Re: python & camera

2006-01-20 Thread Claudio Grondi
Alex Gittens wrote: > I'm working on a final project for my EE degree that requires the use > of digital camera with high resolution. I'd like to do the image > capture with Python, preferably in a cross-platform manner, but if > necessary, we can limit ourselves to Windows. Any ideas on > modules/

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

2006-01-20 Thread Claudio Grondi
Steven D'Aprano wrote: > On Thu, 19 Jan 2006 10:08:38 +0100, Claudio Grondi wrote: > > >>The point is to find a way to create in Python two indentifiers a and b >>without manipulating any of the __eq__ and to __eq__ related functions >>in a way, that the

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-20 Thread Claudio Grondi
J wrote: > Hi > > I hope the title of this message indicates my question. I am looking > for basic > array functionality in Python and it turns out that there are all these > packages which > are somehow related. Some are allegedly discontinued but still seem to > get updated. Could we start a dis

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

<    1   2   3   4   >