Re: numpy or _numpy or Numeric?

2007-01-23 Thread Travis E. Oliphant
auditory wrote: > I am a newbie here > > I am trying to read "space separated floating point data" from file > > I read about csv module by searching this group, > but I couldn't read space separated values with csv. > (which may be matter of course..) > > I also read about numpy.fromfile(file,

Re: What's the reverse of Py_BuildValue("u#" ?

2007-01-23 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: > How could I get the pointer to and the length of ucs2 array out of a > PyObject representing a string? Something that works whether PyObject > string is in unicode or not. You can use PyObject_Unicode(o) to convert the object to Unicode first, then use PyUnicode_AsUni

numpy or _numpy or Numeric?

2007-01-23 Thread auditory
I am a newbie here I am trying to read "space separated floating point data" from file I read about csv module by searching this group, but I couldn't read space separated values with csv. (which may be matter of course..) I also read about numpy.fromfile(file, sep=' ') which i can use. but on m

Re: Simple Matrix class

2007-01-23 Thread Paul McGuire
> The points should be aligned on a log-log plot to be a power function. > As Robert Kern stated before, this problem should be not worse than > O(n**3) - how have you implemented it? > Sure enough, the complete equation is t = 5e-05exp(1.1n), or t = 5e-05 X 3**n. As for the implementation, it's p

Re: Overloading assignment operator

2007-01-23 Thread Steven D'Aprano
On Tue, 23 Jan 2007 18:07:55 -0800, Russ wrote: > Achim Domma wrote: >> Hi, >> >> I want to use Python to script some formulas in my application. The user >> should be able to write something like >> >> A = B * C >> >> where A,B,C are instances of some wrapper classes. Overloading * is no >> probl

sqlite user-defined functions & unicode issue

2007-01-23 Thread Ben Wolfson
I've got a db some of whose elements have been created automatically from filesystem data (whose encoding is iso-8859-1). If I try to select one of those elements using a standard SQL construct, things work fine: >>> sqlite.register_converter("text", unicode) >>> db = sqlite.connect(".mdb/databas

Re: Overloading assignment operator

2007-01-23 Thread Gabriel Genellina
"Carroll, Barry" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > * ... the assignment operator is used to assign an > * object to a name in the current namespace... IOW, you cannot "overload > * the assignment operator." > (wesley chun) This is the key concept, if you want to

sqlite user-defined functions & unicode issue

2007-01-23 Thread Ben Wolfson
I've got a db some of whose elements have been created automatically from filesystem data (whose encoding is iso-8859-1). If I try to select one of those elements using a standard SQL construct, things work fine: >>> sqlite.register_converter("text", unicode) >>> db = sqlite.connect(".mdb/databas

Re: newbie question: ftp.storbinary()

2007-01-23 Thread Gabriel Genellina
"Scott Ballard" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > Sorry for the lame question, I'm still trying to pick up Python and new to > the list here. It's not a lame question... > Question: > I'm trying to write a python script that will access an FTP site and > upload

Re: free variables /cell objects question

2007-01-23 Thread Carl Banks
On Jan 23, 9:46 am, "gangesmaster" <[EMAIL PROTECTED]> wrote: > ugliness :) > > so this is why [lambda: i for i in range(10)] will always return 9. > imho that's a bug, not a feature. It's a feature. If you were to write a nested function like this, where a, b, c, and d, are cell variables: prin

Re: easy_install pylons failure - www.myghty.org unavailable

2007-01-23 Thread Robert Kern
Robert Kern wrote: > [EMAIL PROTECTED] wrote: > >> Is it not able to get past this point because there is only one source for >> Myghty or does it always need to go to a package's home page? I was able to >> work around this by manually downloading the Myghty-1.1.tar.gz file and >> installing it.

Re: easy_install pylons failure - www.myghty.org unavailable

2007-01-23 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Is it not able to get past this point because there is only one source for > Myghty or does it always need to go to a package's home page? I was able to > work around this by manually downloading the Myghty-1.1.tar.gz file and > installing it. Asking on Distutils-SIG l

easy_install pylons failure - www.myghty.org unavailable

2007-01-23 Thread skip
I'm trying to easy_install pylons. Alas: $ easy_install pylons Searching for pylons Best match: Pylons 0.9.4.1 Processing Pylons-0.9.4.1-py2.5.egg Pylons 0.9.4.1 is already the active version in easy-install.pth Using /usr/local/mojam/lib/python2.5/site-packages/Pylons-0.

Re: Python does not play well with others

2007-01-23 Thread Gabriel Genellina
At Tuesday 23/1/2007 22:50, John Nagle wrote: The major complaint I have about Python is that the packages which connect it to other software components all seem to have serious problems. As long as you don't need to talk to anything outside the Python world, you're fine. But once you do, t

What's the reverse of Py_BuildValue("u#" ?

2007-01-23 Thread sndive
How could I get the pointer to and the length of ucs2 array out of a PyObject representing a string? Something that works whether PyObject string is in unicode or not. Also could I replace a sequence if(PyBool_Check(obj)) { ... } if(PyString_Check(obj)) { // would this be true for any

Re: Python does not play well with others

2007-01-23 Thread skip
John> MySQLdb has version and platform compatibility problems. Got specific examples? I've successfully used MySQLdb on Linux, Mac and Solaris with no compatibility problems at all. John> Even basic sockets don't quite work right; the socket module John> encapsulates the timeout m

Re: Simple Matrix class

2007-01-23 Thread Gabriel Genellina
At Tuesday 23/1/2007 22:33, Paul McGuire wrote: On Jan 23, 6:59 pm, Robert Kern <[EMAIL PROTECTED]> wrote: > Paul McGuire wrote: > > I've posted a simple Matrix class on my website as a small-footprint > > package for doing basic calculations on matrices up to about 10x10 in > > size (no theoret

Re: Overloading assignment operator

2007-01-23 Thread Russ
Achim Domma wrote: > Hi, > > I want to use Python to script some formulas in my application. The user > should be able to write something like > > A = B * C > > where A,B,C are instances of some wrapper classes. Overloading * is no > problem but I cannot overload the assignment of A. I understand t

Python does not play well with others

2007-01-23 Thread John Nagle
The major complaint I have about Python is that the packages which connect it to other software components all seem to have serious problems. As long as you don't need to talk to anything outside the Python world, you're fine. But once you do, things go downhill. MySQLdb has version and platf

Re: Simple Matrix class

2007-01-23 Thread Paul McGuire
On Jan 23, 6:59 pm, Robert Kern <[EMAIL PROTECTED]> wrote: > Paul McGuire wrote: > > I've posted a simple Matrix class on my website as a small-footprint > > package for doing basic calculations on matrices up to about 10x10 in > > size (no theoretical limit, but performance on inverse is exponenti

Re: smtplib starttls gmail example

2007-01-23 Thread Jean-Paul Calderone
On Tue, 23 Jan 2007 23:48:59 GMT, py <[EMAIL PROTECTED]> wrote: >Hi, Jean Paul. > >I read your code with interest. I wonder, does twisted also raise the socket >error or does it know >about this apparently well-known and often ignored incompatibility between the >standard and >the implementations

RE: smtplib starttls gmail example - comments?

2007-01-23 Thread py
I would love for anybody to comment on this code with regard to redundancy/efficiency/wordiness or whatever else. for instance, do i understand correctly that i cant have a try: else: without an intervening except:? -dave stdout.write("calling smtp server...") try: se

Re: Simple Matrix class

2007-01-23 Thread Robert Kern
Paul McGuire wrote: > I've posted a simple Matrix class on my website as a small-footprint > package for doing basic calculations on matrices up to about 10x10 in > size (no theoretical limit, but performance on inverse is exponential). Why is that? A simple and robust LU decomposition should be n

Re: free variables /cell objects question

2007-01-23 Thread Terry Reedy
"Paul Rubin" <"http://phr.cx"@NOSPAM.invalid> wrote in message news:[EMAIL PROTECTED] | or the Python idiom [(lambda i=i: i) for i in range(10)] While the idiom is commonly written this way, I think it would be clearer if the two related but different variables had two different names: [(lam

Re: My python programs need a GUI, wxPython or PyQt4?

2007-01-23 Thread Joshua J. Kugler
Daniel wrote: > I've downloaded both the wxPython and the PyQt4 package, and by the > first impression I must say that the PyQt4 system had a very > compelling presentation. From what I can understand from the feedback > I've gotten so far is that the wxPython is a better choice when it > comes to

Re: free variables /cell objects question

2007-01-23 Thread Terry Reedy
"gangesmaster" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | so this is why [lambda: i for i in range(10)] will always return 9. No, it returns a list of 10 identical functions which each return the current (when executed) global (module) variable i. Except for names, 'lambda:i

Re: smtplib starttls gmail example

2007-01-23 Thread py
Hmm, my last post seems to have been redirected to /dev/null. Anyhoo. Jean Paul, I read your code with interest. Does twisted also raise the apparently well-known and often ignored socket error, and do you supposed this error has something to do with the fact that the trailing \n.\n is encrypted?

Re: Simple Matrix class

2007-01-23 Thread Paul McGuire
On Jan 23, 4:05 pm, Casey Hawthorne <[EMAIL PROTECTED]> wrote: > Do you calcalate the matrix inversion, when you don't need to? > No, the inversion is only calculated on the first call to inverse(), and memoized so that subsequent calls return the cached value immediately. Since the Matrix class

Re: How to instantiate a different class in a constructor?

2007-01-23 Thread Gabriel Genellina
At Tuesday 23/1/2007 20:07, GiBo wrote: BTW When is the subclass.__init__() method invoked if I don't explicitly call it from __new__()? Apparently not from baseclass.__new__() nor from object.__new__(). At instance creation, when type(name, bases, ns) is invoked, after the __new__ call, but

Re: smtplib starttls gmail example

2007-01-23 Thread py
Hi, Jean Paul. I read your code with interest. I wonder, does twisted also raise the socket error or does it know about this apparently well-known and often ignored incompatibility between the standard and the implementations? Something else has occurred to me. After starting tls, all the xmitt

RE: Overloading assignment operator

2007-01-23 Thread Carroll, Barry
> -Original Message- > From: Achim Domma [mailto:[EMAIL PROTECTED] > Sent: Tuesday, January 23, 2007 10:25 AM > To: python-list@python.org > Subject: Overloading assignment operator > > Hi, > > I want to use Python to script some formulas in my application. The user > should be able to wr

Re: How to instantiate a different class in a constructor?

2007-01-23 Thread GiBo
Paul McGuire wrote: > On Jan 23, 5:09 am, GiBo <[EMAIL PROTECTED]> wrote: >> Hi all, >> >> I have a class URI and a bunch of derived sub-classes for example >> HttpURI, FtpURI, HttpsURI, etc. (this is an example, I know there is >> module urllib & friends, however my actual problem however maps ver

Re: Overloading assignment operator

2007-01-23 Thread Peter Otten
Steven D'Aprano wrote: > On Tue, 23 Jan 2007 19:42:01 +0100, Peter Otten wrote: > >> Achim Domma wrote: >> >>> I want to use Python to script some formulas in my application. The user >>> should be able to write something like >>> >>> A = B * C >>> >>> where A,B,C are instances of some wrapper

Re: My python programs need a GUI, wxPython or PyQt4?

2007-01-23 Thread Daniel
I've downloaded both the wxPython and the PyQt4 package, and by the first impression I must say that the PyQt4 system had a very compelling presentation. From what I can understand from the feedback I've gotten so far is that the wxPython is a better choice when it comes to compability (with li

Re: spidering script

2007-01-23 Thread William Park
In David Waizer <[EMAIL PROTECTED]> wrote: > Hello.. > > I'm looking for a script (perl, python, sh...)or program (such as wget) > that will help me get a list of ALL the links on a website. lynx -dump (look at the bottom) -- William Park <[EMAIL PROTECTED]>, Toronto, Canada ThinFlash:

Re: My python programs need a GUI, wxPython or PyQt4?

2007-01-23 Thread Peter Decker
On 1/23/07, Daniel Jonsson <[EMAIL PROTECTED]> wrote: > So, I've reached the point where my building pipeline tools actually > needs to be used by other people in my company. By this reason I > actually need to think about the usability, and I've come to the > conclusion that I need a GUI. So, whic

Re: Overloading assignment operator

2007-01-23 Thread Achim Domma
Paul McGuire wrote: > Simple option: how do you feel about using '<<=' instead of '=' (by > defining __ilshift__)? This gives you: > > A <<= B * C > > (looks sort of like "injecting" the result of B times C into A) Thanks! That is exactly the kind of solution I was looking for! :-) Achim --

Re: My python programs need a GUI, wxPython or PyQt4?

2007-01-23 Thread Paul Rubin
"Daniel Jonsson" <[EMAIL PROTECTED]> writes: > So, I've reached the point where my building pipeline tools actually > needs to be used by other people in my company. By this reason I > actually need to think about the usability, and I've come to the > conclusion that I need a GUI. So, which of t

Re: My python programs need a GUI, wxPython or PyQt4?

2007-01-23 Thread hg
Daniel Jonsson wrote: > So, I've reached the point where my building pipeline tools actually > needs to be used by other people in my company. By this reason I > actually need to think about the usability, and I've come to the > conclusion that I need a GUI. So, which of the two packages should I

Re: My python programs need a GUI, wxPython or PyQt4?

2007-01-23 Thread Michael Bentley
On Jan 23, 2007, at 4:01 PM, Daniel Jonsson wrote: > So, I've reached the point where my building pipeline tools actually > needs to be used by other people in my company. By this reason I > actually need to think about the usability, and I've come to the > conclusion that I need a GUI. So, which

Re: My python programs need a GUI, wxPython or PyQt4?

2007-01-23 Thread Joshua J. Kugler
Daniel Jonsson wrote: > So, I've reached the point where my building pipeline tools actually > needs to be used by other people in my company. By this reason I > actually need to think about the usability, and I've come to the > conclusion that I need a GUI. So, which of the two packages should I >

Re: Overloading assignment operator

2007-01-23 Thread Steven D'Aprano
On Tue, 23 Jan 2007 19:42:01 +0100, Peter Otten wrote: > Achim Domma wrote: > >> I want to use Python to script some formulas in my application. The user >> should be able to write something like >> >> A = B * C >> >> where A,B,C are instances of some wrapper classes. Overloading * is no >> pro

Re: My python programs need a GUI, wxPython or PyQt4?

2007-01-23 Thread James Stroud
Daniel Jonsson wrote: > So, I've reached the point where my building pipeline tools actually > needs to be used by other people in my company. By this reason I > actually need to think about the usability, and I've come to the > conclusion that I need a GUI. So, which of the two packages should

Re: Are there sprintf in Python???

2007-01-23 Thread Manuel Graune
"questions?" <[EMAIL PROTECTED]> writes: > Are there any sprintf in Python? > I know you can print to files(or redefine sys.stout) and later open the > file content. Are you looking for something like this? http://norvig.com/python-iaq.html or http://aspn.activestate.com/ASPN/Cookbook/Python/

My python programs need a GUI, wxPython or PyQt4?

2007-01-23 Thread Daniel Jonsson
So, I've reached the point where my building pipeline tools actually needs to be used by other people in my company. By this reason I actually need to think about the usability, and I've come to the conclusion that I need a GUI. So, which of the two packages should I learn, and which one is eas

Re: Overloading assignment operator

2007-01-23 Thread Kay Schluehr
Achim Domma schrieb: > Hi, > > I want to use Python to script some formulas in my application. The user > should be able to write something like > > A = B * C > > where A,B,C are instances of some wrapper classes. Overloading * is no > problem but I cannot overload the assignment of A. I understa

Re: Noob Question: Force input to be int?

2007-01-23 Thread Daniel Jonsson
Ah, thank you for the respone! I have not gotten around to test it yet, but I hope it will work! :) -Daniel 2007-01-23 10:59:37 [EMAIL PROTECTED] wrote in message <[EMAIL PROTECTED]> > Hello everyone! > I have a piece of code that looks like this: > > if len(BuildList) > 0: > print "The sc

Re: instancemethod

2007-01-23 Thread Gert Cuykens
import MySQLdb class Db(object): def __enter__(self): pass def __init__(self,server,user,password,database): self._db=MySQLdb.connect(server , user , password , database) self._db.autocommit(True) self.cursor=self._db.cursor() def execute(self,cmd):

newbie question: ftp.storbinary()

2007-01-23 Thread Scott Ballard
Sorry for the lame question, I'm still trying to pick up Python and new to the list here. Question: I'm trying to write a python script that will access an FTP site and upload some files. I've gotten everything working except for the actual uploading of the files. I'm assuming that I should u

Re: free variables /cell objects question

2007-01-23 Thread Duncan Booth
"gangesmaster" <[EMAIL PROTECTED]> wrote: > ugliness :) > > so this is why [lambda: i for i in range(10)] will always return 9. > imho that's a bug, not a feature. Horses for courses. There are cases where you need to get the latest value of the bound variable, and there are cases where you wa

Re: best package for a physical simulation?

2007-01-23 Thread Stef Mientki
[EMAIL PROTECTED] wrote: > Hello everyone, > i would like to use python to perform some simulation involving collisions > of colloidal particles. > which is the best package/engine to do that in python? > thanks, > T > Maybe this is what you're looking for ... http://simmodel.tigris.org/ ... bu

Re: Rendering text question (context is MSWin UI Automation)

2007-01-23 Thread Chris Mellon
On 23 Jan 2007 12:06:35 -0800, imageguy <[EMAIL PROTECTED]> wrote: > > I am trying to use UI Automation to drive an MS Windows app (with > > pywinauto). > > > > I need to scrape the app's window contents and use some form of OCR to get > > at > > the texts (pywinauto can't get at them). > > > > A

Re: Rendering text question (context is MSWin UI Automation)

2007-01-23 Thread imageguy
> I am trying to use UI Automation to drive an MS Windows app (with pywinauto). > > I need to scrape the app's window contents and use some form of OCR to get at > the texts (pywinauto can't get at them). > > As an alternative to integrating an OCR engine, and since I know the fonts and > sizes use

Re: Overloading assignment operator

2007-01-23 Thread Erik Max Francis
Achim Domma wrote: > I want to use Python to script some formulas in my application. The user > should be able to write something like > > A = B * C > > where A,B,C are instances of some wrapper classes. Overloading * is no > problem but I cannot overload the assignment of A. I understand that

Simple Matrix class

2007-01-23 Thread Paul McGuire
I've posted a simple Matrix class on my website as a small-footprint package for doing basic calculations on matrices up to about 10x10 in size (no theoretical limit, but performance on inverse is exponential). Includes: - trace - transpose - conjugate - determinant - inverse - eigenvectors/values

Re: Overloading assignment operator

2007-01-23 Thread Paul McGuire
On Jan 23, 12:24 pm, Achim Domma <[EMAIL PROTECTED]> wrote: > Hi, > > I want to use Python to script some formulas in my application. The user > should be able to write something like > > A = B * C > > where A,B,C are instances of some wrapper classes. Overloading * is no > problem but I cannot ove

Re: best package for a physical simulation?

2007-01-23 Thread km
Hi, checkout MMTK package http://dirac.cnrs-orleans.fr/MMTK/ regards, KM On 1/24/07, Robert Kern <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote: > Hello everyone, > i would like to use python to perform some simulation involving collisions > of colloidal particles. > which is the best pac

Re: best package for a physical simulation?

2007-01-23 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Hello everyone, > i would like to use python to perform some simulation involving collisions > of colloidal particles. > which is the best package/engine to do that in python? What kind of numerical methods does such simulation require? -- Robert Kern "I have come to

Re: Reading character from keyboard

2007-01-23 Thread Gabriel Genellina
At Tuesday 23/1/2007 15:28, [EMAIL PROTECTED] wrote: > A very simple question. I would like to read a single character from the > keyboard (y or n). I have tried to look in my Python books and a google Actually, if you want to read only one character from keyboard, you will need to use terminal

Re: Overloading assignment operator

2007-01-23 Thread Peter Otten
Achim Domma wrote: > I want to use Python to script some formulas in my application. The user > should be able to write something like > > A = B * C > > where A,B,C are instances of some wrapper classes. Overloading * is no > problem but I cannot overload the assignment of A. I understand that >

Re: How to use time.clock() function in python

2007-01-23 Thread Nick Craig-Wood
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I am following this python example trying to time how long does an > operation takes, like this: > > My question is why the content of the file (dataFile) is just '0.0'? > I have tried "print >>dataFile, timeTaken" or "print >>dataFile,str( > tim

Re: Reading character from keyboard

2007-01-23 Thread consmash
Tommy Grav napisal(a): > A very simple question. I would like to read a single character from the > keyboard (y or n). I have tried to look in my Python books and a google > search, but have come up empty. I am sure the info s out there, but I > guess I am unable to find the right question or sear

Overloading assignment operator

2007-01-23 Thread Achim Domma
Hi, I want to use Python to script some formulas in my application. The user should be able to write something like A = B * C where A,B,C are instances of some wrapper classes. Overloading * is no problem but I cannot overload the assignment of A. I understand that this is due to the nature o

Re: match nested parenthesis

2007-01-23 Thread Neil Cerutti
On 2007-01-23, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > hi > i wish to find an reg exp for matching nested parenthesis of > varying level like > string = It is not possible, because the set of strings containing balanced parenthesis is not regular. Python re's aren't *really* regular express

Re: smtplib starttls gmail example

2007-01-23 Thread Jean-Paul Calderone
On Tue, 23 Jan 2007 17:25:24 GMT, py <[EMAIL PROTECTED]> wrote: >from smtplib import SMTP >from socket import sslerror #if desired >server = SMTP('smtp.gmail.com') >server.set_debuglevel(0) # or 1 for verbosity >server.ehlo('[EMAIL PROTECTED]') >server.starttls() >server.ehlo('[EMAIL PROTEC

Re: Reading character from keyboard

2007-01-23 Thread [EMAIL PROTECTED]
Tommy Grav wrote: > A very simple question. I would like to read a single character from the > keyboard (y or n). I have tried to look in my Python books and a google > search, but have come up empty. I am sure the info s out there, but I > guess I am unable to find the right question or search ke

smtplib starttls gmail example

2007-01-23 Thread py
from smtplib import SMTP from socket import sslerror #if desired server = SMTP('smtp.gmail.com') server.set_debuglevel(0) # or 1 for verbosity server.ehlo('[EMAIL PROTECTED]') server.starttls() server.ehlo('[EMAIL PROTECTED]') # say hello again server.login('[EMAIL PROTECTED]', 'yourpasswo

Re: best package for a physical simulation?

2007-01-23 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Hello everyone, | i would like to use python to perform some simulation involving collisions | of colloidal particles. | which is the best package/engine to do that in python? | thanks, I would start with numpy/scipy and perhaps look

Re: Best way to document Python code...

2007-01-23 Thread Neil Cerutti
On 2007-01-22, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Boris Ozegovic: >> Does Python has API just like in Java, for example >> http://java.sun.com/j2se/1.5.0/docs/api/allclasses-noframe.html ctrl-f and >> than click on class you are searching for, and finally you get clean list >> of all fi

Re: Are there sprintf in Python???

2007-01-23 Thread Neil Cerutti
On 2007-01-22, questions? <[EMAIL PROTECTED]> wrote: > Are there any sprintf in Python? > I know you can print to files(or redefine sys.stout) and later open the > file content. > > Are there similar function to sprintf in C? No, but you can compose a similar function very easily. def sprintf(for

Reading character from keyboard

2007-01-23 Thread Tommy Grav
A very simple question. I would like to read a single character from the keyboard (y or n). I have tried to look in my Python books and a google search, but have come up empty. I am sure the info s out there, but I guess I am unable to find the right question or search keyword :o/ Any hints or hel

Re: free variables /cell objects question

2007-01-23 Thread Paul Rubin
"gangesmaster" <[EMAIL PROTECTED]> writes: > so this is why [lambda: i for i in range(10)] will always return 9. > imho that's a bug, not a feature. Use [(lambda j: lambda: j)(i) for i in range(10)] or the Python idiom [(lambda i=i: i) for i in range(10)] -- http://mail.python.org/mailman/listinf

2007 DST Changes

2007-01-23 Thread Kevin Kelley
Is python affected by the 2007 DST changes in the US? Other than making sure the OS is patched correctly (Win 2K and Solaris 8) is there anything else that needs to be done from a Python point of view? Thanks, Kevin Kelley -- http://mail.python.org/mailman/listinfo/python-list

Re: Rendering text question (context is MSWin UI Automation)

2007-01-23 Thread Chris Mellon
On 1/23/07, Boris Borcic <[EMAIL PROTECTED]> wrote: > Hello, > > I am trying to use UI Automation to drive an MS Windows app (with pywinauto). > > I need to scrape the app's window contents and use some form of OCR to get at > the texts (pywinauto can't get at them). > > As an alternative to integr

IE Toolbar (OT)

2007-01-23 Thread Shitiz Bansal
Hi, I need to build a toolbar for internet explorer which will have an embedded paintbrush like application. The user should be able to draw on the drawing canvas of that application and submit to post his drawings on my server. I have built up a toolbar and a standalone paintbrush app in VC++. H

Rendering text question (context is MSWin UI Automation)

2007-01-23 Thread Boris Borcic
Hello, I am trying to use UI Automation to drive an MS Windows app (with pywinauto). I need to scrape the app's window contents and use some form of OCR to get at the texts (pywinauto can't get at them). As an alternative to integrating an OCR engine, and since I know the fonts and sizes used

Re: free variables /cell objects question

2007-01-23 Thread gangesmaster
ugliness :) so this is why [lambda: i for i in range(10)] will always return 9. imho that's a bug, not a feature. thanks. -tomer Duncan Booth wrote: > "gangesmaster" <[EMAIL PROTECTED]> wrote: > > > what problem does the cell object solve? > > The closure represents the variable, not the object

Re: How to instantiate a different class in a constructor?

2007-01-23 Thread Paul McGuire
On Jan 23, 5:09 am, GiBo <[EMAIL PROTECTED]> wrote: > Hi all, > > I have a class URI and a bunch of derived sub-classes for example > HttpURI, FtpURI, HttpsURI, etc. (this is an example, I know there is > module urllib & friends, however my actual problem however maps very > well to this example).

urllib2 question

2007-01-23 Thread Laszlo Nagy
Hi All, I would like to save a URL into a file. I need to manage cookies and use my own HTTP headers so I'm using urllib2 and a custom openerdirector. Here is a code fragment: while True: data = openerdirector.read(1024)

best package for a physical simulation?

2007-01-23 Thread sittner
Hello everyone, i would like to use python to perform some simulation involving collisions of colloidal particles. which is the best package/engine to do that in python? thanks, T -- http://mail.python.org/mailman/listinfo/python-list

Re: beep or sound playing under linux

2007-01-23 Thread hg
Chuck Rhode wrote: > hg wrote this on Mon, Jan 22, 2007 at 04:12:50PM +0100. My reply is > below. > >> Is there a way to do that? (Make noise.) > > In Gnome there is: > > gtk.gdk.beep() > > -- > .. Chuck Rhode, Sheboygan, WI, USA > .. Weather: http://LacusVeris.com/WX > .. 28° ? Wind WSW 10

Re: beep or sound playing under linux

2007-01-23 Thread hg
hg wrote: > Hi, > > Is there a way to do that ? > > Regards, > > hg Thanks to all ... got some reading to do. hg -- http://mail.python.org/mailman/listinfo/python-list

Python on AIX required files

2007-01-23 Thread Gerard Flanagan
Hello Problem: I want to send a Python script to someone running AIX Unix but who can't (or won't) compile or otherwise install the Python interpreter. If I have compiled Python on the same version of AIX, what would I need to provide to the user to enable him to run the script? Thanks Gerard

Re: PyQt4 strangeness

2007-01-23 Thread Tina I
Phil Thompson wrote: > The module structure of PyQt reflects the library structure of Qt. Qt4 has > different libraries to Qt3 so PyQt4 has different modules to PyQt3. > > The top level PyQt4 module ensures that PyQt3, PyQt4 (and eventually PyQt5) > can all be installed side by side in the same

Re: Getting to an SSH account over a HTTP proxy

2007-01-23 Thread Anders Arnholm
Jorgen Grahn <[EMAIL PROTECTED]> skriver: > I am pretty sure there is. Or at least TCP-over-HTTP, or IP-over-HTTP. An > acquaintance of mine used it to tonnel home through a corporate firewall. I > think -- I didn't want to know the details. Ypu can tunnel ip over anything. (Even email if you like

PythonCard installation

2007-01-23 Thread dudds
Anyone had any joy with this using FC6?? When I try to run code editor I get the error "Traceback (most recent call last): File "/usr/lib/python2.4/PythonCard-0.8.2/tools/codeEditor/codeEditor.py", line 13, in ? from PythonCard import about, configuration, dialog, log, menu, model, resource,

Re: PyQt4 strangeness

2007-01-23 Thread Phil Thompson
On Tuesday 23 January 2007 10:31 am, Tina I wrote: > I'm trying to 'convert' my self from Qt3 to Qt4 (it rocks!) and one > thing seem strange: > With Qt3 I usually did "from qt import *", but this does not seem to > work with Qt4. I have to use "from PyQt4 import QtGui , QtCore" and also > have to

Re: Working with shared folders

2007-01-23 Thread Eugene Antimirov
Marcpp wrote: > Any idea to work with windows shared folders? > Which library is needed to execute console comands? > Don't you want to look at fusesmb first and then work with windows files and dirs as well as with any others. -- Sincerely, Eugene Antimirov PortaOne, Inc., SIP Support Engine

Re: I need suggests

2007-01-23 Thread Laurent Pointal
Pat a écrit : > I have to do a big programm. Could someone give me some suggests about > IDE (on Linux) and books to learn. > + For the IDE: http://wiki.python.org/moin/IntegratedDevelopmentEnvironments Test some, take the one corresponding to your taste/feeling. + For books: http://wiki.python

Re: free variables /cell objects question

2007-01-23 Thread Duncan Booth
"gangesmaster" <[EMAIL PROTECTED]> wrote: > what problem does the cell object solve? The closure represents the variable, not the object. So if x is rebound to a different object your inner function g() will now access the new object. If the object itself was passed to MAKE_CLOSURE then g woul

Re: free variables /cell objects question

2007-01-23 Thread Peter Otten
gangesmaster wrote: > why does CPython require to wrap the free variables if > closure functions by a cell objects? > why can't it just pass the object itself? > def f(x): > ... def g(): > ... return x+2 > ... return g > ... g5 = f(5) dis(g5) > 3 0 L

Re: PyQt4 strangeness

2007-01-23 Thread Jeremy Sanders
Tina I wrote: > > self.connect(self.ui.testButton, QtCore.SIGNAL("clicked()"), > self.doSomething) > > Anyone know why this is? Or am I missing something very basic here? (I'm > still very much a noob I guess) If you want to import both you can do something like: import PyQt4.Qt as Qt which i

free variables /cell objects question

2007-01-23 Thread gangesmaster
why does CPython require to wrap the free variables if closure functions by a cell objects? why can't it just pass the object itself? >>> def f(x): ... def g(): ... return x+2 ... return g ... >>> g5 = f(5) >>> dis(g5) 3 0 LOAD_DEREF 0 (x)

Re: I need suggests

2007-01-23 Thread Caleb Hattingh
Pat wrote: > I have to do a big programm. Could someone give me some suggests about > IDE (on Linux) and books to learn. http://groups.google.com/groups/search?q=python+ide&qt_s=Search Lots and lots to read :) Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: I need suggests

2007-01-23 Thread Marcpp
Hi, I'm using SPE (Stani's Python Editor) http://projects.blender.org/projects/spe It works very good and incorporates WX support. Pat wrote: > I have to do a big programm. Could someone give me some suggests about > IDE (on Linux) and books to learn. -- http://mail.python.org/mailman/listinfo/

I need suggests

2007-01-23 Thread Pat
I have to do a big programm. Could someone give me some suggests about IDE (on Linux) and books to learn. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to instantiate a different class in a constructor?

2007-01-23 Thread Diez B. Roggisch
> I have a class URI and a bunch of derived sub-classes for example > HttpURI, FtpURI, HttpsURI, etc. (this is an example, I know there is > module urllib & friends, however my actual problem however maps very > well to this example). > > Now I want to pass a string to constructor of URI() and get

How to instantiate a different class in a constructor?

2007-01-23 Thread GiBo
Hi all, I have a class URI and a bunch of derived sub-classes for example HttpURI, FtpURI, HttpsURI, etc. (this is an example, I know there is module urllib & friends, however my actual problem however maps very well to this example). Now I want to pass a string to constructor of URI() and get an

Re: Try to porting Python2.5 to Zaurus

2007-01-23 Thread Sang Kim
Glad to see another Zaurus lovin' Pythonite. ;-) and also thanks to you -- http://mail.python.org/mailman/listinfo/python-list

Working with shared folders

2007-01-23 Thread Marcpp
Any idea to work with windows shared folders? Which library is needed to execute console comands? Thankyou. -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >