Re: 2**2**2**2**2 wrong? Bug?

2007-07-16 Thread Hendrik van Rooyen
"Wayne Brehaut" <[EMAIL PROTECTED]> wrote: > On Sun, 15 Jul 2007 17:37:13 -0400, Steve Holden <[EMAIL PROTECTED]> > wrote: > > >Wayne Brehaut wrote: > >> On Fri, 13 Jul 2007 14:32:03 -0700, "[EMAIL PROTECTED]" 8< - > Also,

Re: Access Object From 2 Applications or Fix Scheduler

2007-07-16 Thread Hendrik van Rooyen
Robert Rawlins - Think Blue wrote: >Hello Guys, > >I have two applications which I need to get talking and sharing an object, what ’s the best way to do this? Basically my >first application parses an XML document into a bunch of lists and tuples etc, and I need to access the data in these list

Re: 2**2**2**2**2 wrong? Bug?

2007-07-16 Thread Tim Roberts
"Jim Langston" <[EMAIL PROTECTED]> wrote: > >Gah! Python goes right to left? Dang, I haven't seen that since APL. No, *exponentiation* in Python goes right to left, as it does in all the languages I've used that support an exponentiation operator. -- Tim Roberts, [EMAIL PROTECTED] Providenza &

Re: How to determine which method was used in an inheritance heirarchy?

2007-07-16 Thread Erik Jones
On Jul 16, 2007, at 12:53 AM, Michele Simionato wrote: > On Jul 16, 7:18 am, Erik Jones <[EMAIL PROTECTED]> wrote: >> On Jul 15, 2007, at 11:23 PM, Michele Simionato wrote: >> >>> On Jul 16, 5:51 am, Erik Jones <[EMAIL PROTECTED]> wrote: Say you're given a call event frame for a method call.

How to import java class used Jython in Python?

2007-07-16 Thread datulaida ali
Hi all... How to import Semantic class used Jython in Python? here my java code.. JAVA CODE import java.text.BreakIterator ; class Semantic { // native C++ method //public native void printMessage( String message ); public native String printMessage( String message );

Re: Can a low-level programmer learn OOP?

2007-07-16 Thread Bruno Desthuilliers
Wayne Brehaut a écrit : > On Sat, 14 Jul 2007 06:01:56 +0200, Bruno Desthuilliers > <[EMAIL PROTECTED]> wrote: > >> Chris Carlen a écrit : >>> Hi: >>> >>> From what I've read of OOP, I don't get it. I have also found some >>> articles profoundly critical of OOP. I tend to relate to these artic

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-07-16 Thread Paul Rubin
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > For example, SPARK does not support dynamic allocation of memory so > things such as pointers and heap variables are not supported. Right, Spark uses a profile intended for embedded systems, so no unpredictable gc delays etc. > Which is not to say

Re: getting text inside the HTML tag

2007-07-16 Thread Stefan Behnel
Bruno Desthuilliers wrote: > [EMAIL PROTECTED] a écrit : >> On Jul 14, 12:47 pm, Nikola Skoric <[EMAIL PROTECTED]> wrote: >>> I'm using sgmllib.SGMLParser to parse HTML. I have successfuly parsed >>> start >>> tags by implementing start_something method. But, now I have to fetch >>> the >>> string

how good does PyGTK work on windows?

2007-07-16 Thread krishnakant Mane
hello, I will be writing some code in PyGTK to run on linux. but I want to know if there are any installers or distutils available for PyGTK on windows? I have heard that installing gimp or even pygtk is next to impossible and is very tedious if at all one gets success. can any one share their exp

running a Delphi part from Python ?

2007-07-16 Thread Stef Mientki
I'm starting to get used to wxPython (coming from Delphi), and it seems it can do almost everything I need. Now one thing I'm missing is a good RichEditor. I've a good RichEdit in Delphi ... ... so what are the possibilities to include that in Python ? The most simple for me to do, seems to crea

Re: How to determine which method was used in an inheritance heirarchy?

2007-07-16 Thread Gabriel Genellina
En Mon, 16 Jul 2007 03:56:18 -0300, Erik Jones <[EMAIL PROTECTED]> escribió: > Perhaps an even better example of what I'm trying to do would be in > order (this is minus any exception handling): > > import sys > > def mytrace(frame, event, arg): > if event == 'call': > func_name = fr

Re: running a Delphi part from Python ?

2007-07-16 Thread Stef Mientki
Bruno Desthuilliers wrote: > Stef Mientki a écrit : >> >> I'm starting to get used to wxPython (coming from Delphi), >> and it seems it can do almost everything I need. >> >> Now one thing I'm missing is a good RichEditor. > > Scintilla is for you, then. IIRC, there's a wxWidget widget embedding

Re: Can a low-level programmer learn OOP?

2007-07-16 Thread Bruno Desthuilliers
Wayne Brehaut a écrit : (snip) > after Bruno made the > claim: "OO is about machines - at least as conceveid by Alan Key, who > invented the term and most of the concept." Please reread more carefully the above. I do give credit to Smalltalk's author for the *term* "OOP", and *most* (not *all*)

RE: Access Object From 2 Applications or Fix Scheduler

2007-07-16 Thread Robert Rawlins - Think Blue
Thanks Hendrik & Alex for your suggestions, I'm glad to see that there are lots of options for me here, and I'll give them all of a decent exploration to see what my best option is, starting the second app in a named pipe sounds like a fair solution, but I've not don't this before, how easy is it

Re: Fetching a clean copy of a changing web page

2007-07-16 Thread Stefan Behnel
Diez B. Roggisch wrote: > John Nagle wrote: >>I'm reading the PhishTank XML file of active phishing sites, >> at "http://data.phishtank.com/data/online-valid/"; This changes >> frequently, and it's big (about 10MB right now) and on a busy server. >> So once in a while I get a bogus copy of the

Re: Fetching a clean copy of a changing web page

2007-07-16 Thread Amit Khemka
On 7/16/07, John Nagle <[EMAIL PROTECTED]> wrote: > I'm reading the PhishTank XML file of active phishing sites, > at "http://data.phishtank.com/data/online-valid/"; This changes > frequently, and it's big (about 10MB right now) and on a busy server. > So once in a while I get a bogus copy of

Re: getting text inside the HTML tag

2007-07-16 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > On Jul 14, 12:47 pm, Nikola Skoric <[EMAIL PROTECTED]> wrote: >> I'm using sgmllib.SGMLParser to parse HTML. I have successfuly parsed start >> tags by implementing start_something method. But, now I have to fetch the >> string inside the start tag and end tag too. I h

Re: Trying to choose between python and java

2007-07-16 Thread Bruno Desthuilliers
Anthony Irwin a écrit : > Hi All, > (snip) > Also does anyone else have any useful comments about python vs java > without starting a flame war. I guess I'd better not answer, then !-) -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL cutting off letters

2007-07-16 Thread nosp
test -- http://mail.python.org/mailman/listinfo/python-list

RE: Access Object From 2 Applications or Fix Scheduler

2007-07-16 Thread Robert Rawlins - Think Blue
Also Hendrik, I should probably mention that the second application is a constant running application, it's nothing something that can just be 'started' by the first one, its running non-stop and just needs data passed into it regularly when the first application finds it. Application 1

Re: running a Delphi part from Python ?

2007-07-16 Thread tool69
Stef Mientki a écrit : > AFAIK, Scintilla is a code editor. > What I need looks more like ms-word, > handling lists, tables, images, formulas. > > thanks, > Stef Mientki So you'll need the RichTextCtrl http://www.wxpython.org/docs/api/wx.richtext.RichTextCtrl-class.html See a sample in the de

Re: how good does PyGTK work on windows?

2007-07-16 Thread Jarek Zgoda
krishnakant Mane napisał(a): > I will be writing some code in PyGTK to run on linux. but I want to > know if there are any installers or distutils available for PyGTK on > windows? > I have heard that installing gimp or even pygtk is next to impossible > and is very tedious if at all one gets suc

Re: Access Object From 2 Applications or Fix Scheduler

2007-07-16 Thread Gabriel Genellina
En Mon, 16 Jul 2007 06:04:07 -0300, Robert Rawlins - Think Blue <[EMAIL PROTECTED]> escribió: > Now we may be able to avoid this if there is some type of file watcher > function available in python, my second application could then just watch > the XML file and as soon as a new one is available

intact

2007-07-16 Thread Kishore kumar Manikonda
-- http://mail.python.org/mailman/listinfo/python-list

Re: running a Delphi part from Python ?

2007-07-16 Thread Stef Mientki
tool69 wrote: > Stef Mientki a écrit : > >> AFAIK, Scintilla is a code editor. >> What I need looks more like ms-word, >> handling lists, tables, images, formulas. >> >> thanks, >> Stef Mientki > > > So you'll need the RichTextCtrl > > http://www.wxpython.org/docs/api/wx.richtext.RichTextCtrl-c

Compiling python2.5 on IBM AIX

2007-07-16 Thread bravo . loic
hi, I'm trying to make a local install of python 2.5 on AIX and I'm getting some trouble with _curses. Here is how I tried to compile it : export BASE=/usr/local/python251 cd Python.2.5.1 ./configure --prefix=${BASE}/\ LDFLAGS="-L\${BASE}/lib/"\ PPFLAGS="-I\${BASE}/include/"\ make

Python-URL! - weekly Python news and links (Jul 16)

2007-07-16 Thread Gabriel Genellina
QOTW: "That's a property of open source projects. Features nobody really needs are not implemented." - Gregor Horvath http://groups.google.com/group/comp.lang.python/msg/1fcefd79c7aa4832 "I'm working in a Java shop, with eclipse - one of the most intimate IDE-lanaguage-relationships imaginabl

Re: questions about functions inside a function

2007-07-16 Thread Duncan Booth
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > What I want is, the value of i should be bounded to the anonymous > function. And the output should like this: > > for f in a: > print f() > 0 > 1 > 4 > 9 > > How to achieve this? Use default arguments when defining your function: default ar

Re: running a Delphi part from Python ?

2007-07-16 Thread Bruno Desthuilliers
Stef Mientki a écrit : > > I'm starting to get used to wxPython (coming from Delphi), > and it seems it can do almost everything I need. > > Now one thing I'm missing is a good RichEditor. Scintilla is for you, then. IIRC, there's a wxWidget widget embedding it, and quite a few editors using it

Implementaion of random.shuffle

2007-07-16 Thread shabda raaj
I was going through the docs for module-random And I came through this, *shuffle*( x[, random]) Shuffle the sequence x in place. The optional argument random is a 0-argument function returning a random float in [0.0, 1.0); by default, this is the fun

Re: questions about functions inside a function

2007-07-16 Thread Wildemar Wildenburger
[EMAIL PROTECTED] wrote: > I want to create a list of function. > > Here is my code: > In [9]: a = [] > > In [10]: for i in range(4): > : b = lambda : i**2 > : a.append(b) > : > : > > In [11]: for f in a: > : f() > : > : > 9 > 9 >

Re: questions about functions inside a function

2007-07-16 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > I want to create a list of function. > > Here is my code: > In [9]: a = [] > > In [10]: for i in range(4): >: b = lambda : i**2 >: a.append(b) >: >: > > In [11]: for f in a: >: f() >: >: > 9 > 9 > 9

Re: questions about functions inside a function

2007-07-16 Thread Wildemar Wildenburger
Wildemar Wildenburger wrote: >> for f in a: >> print f() >> 0 >> 1 >> 4 >> 9 >> >> How to achieve this? >> >> Thanks a lot! >> >> >> > I fail to see the point, sorry. Why would you want that? If you simply > want a list of values you do: > > a = [i**2 for i in range(4)]

BeautifulSoup prettify help

2007-07-16 Thread news.sf.sbcglobal.net
Hi, Is there a way to make the prettify() use 4 spaces instead of 1 for each level of indentation? Or maybe make it use tabs instead? TIA, TEd -- http://mail.python.org/mailman/listinfo/python-list

Re: Dynamic method

2007-07-16 Thread Lawrence Oluyede
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > > I agree that in general the solution explained by Alex and you is better. > > They are not "better" - they are correct. Another way is to use the 'types' module: In [1]: class T(object): ...: pass ...: In [2]: t = T() In [3]: import

Re: Implementaion of random.shuffle

2007-07-16 Thread Steve Holden
shabda raaj wrote: > I was going through the docs for module-random > And I came through this, > > * shuffle*( x[, random]) > > > Shuffle the sequence x in place. The optional argument random is a > 0-argument function returning a rand

Re: Accessing Python variables in an extension module

2007-07-16 Thread MD
Hi Alex, Thanks for your reply. It was exactly what I was looking for. Two additional questions 1) Is there anyway to find out which modules a variable belongs to when I have only its name (and its not qualified with the complete name like module.varname) 2) Is there anyway to find the type of t

Re: questions about functions inside a function

2007-07-16 Thread [EMAIL PROTECTED]
Hi, Duncan Booth wrote: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > >> What I want is, the value of i should be bounded to the anonymous >> function. And the output should like this: >> >> for f in a: >> print f() >> 0 >> 1 >> 4 >> 9 >> >> How to achieve this? > > Use default arguments

Trouble with email package

2007-07-16 Thread Torsten Bronger
Hallöchen! I thought that with the following code snippet, I could generate a MIME email stub: #!/usr/bin/env python # -*- coding: utf-8 -*- from email.MIMEText import MIMEText from email.Generator import Generator import sys message = MIMEText(u"Hallöchen!", _charset="ut

Re: Python and Tkinter Primer/Tutorial?

2007-07-16 Thread W. Watson
Thanks for the tips to the posters above. Wow, the Grayson book is $98 on Amazon. I think I'll see if I can get a library loan! Midway on the NMT page, they fleetingly mention Lutz, but give no reference on it. From Amazon: Learning Python, Second Edition [ILLUSTRATED] (Paperback) by Mark Lutz

Embedding/Extending Python in/with C++: non-static members?

2007-07-16 Thread dmoore
Hi Folks: I have a question about the use of static members in Python/C extensions. Take the simple example from the "Extending and Embedding the Python Interpreter" docs: A simple module method: static PyObject * spam_system(PyObject *self, PyObject *args) { ... } listed in a method table: s

Re: Accessing Python variables in an extension module

2007-07-16 Thread Diez B. Roggisch
MD wrote: > Hi Alex, >Thanks for your reply. It was exactly what I was looking for. Two > additional questions > 1) Is there anyway to find out which modules a variable belongs to > when I have only its name (and its not qualified with the complete > name like module.varname) No. > 2) Is the

Re: Trouble with email package

2007-07-16 Thread Torsten Bronger
Hallöchen! Ingrid Bronger writes: > [...] > > The Content-Transfer-Encoding is wrong. Okay (well, not okay but) > then I added message["Content-Transfer-Encoding"] = "8bit" to my > code and got > > Content-Type: text/plain; charset="utf-8" > MIME-Version: 1.0 > Content-Transfer-Encod

Re: questions about functions inside a function

2007-07-16 Thread Duncan Booth
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > In order to make sure all variables be larger than 0, I tried to created > constraint function like this: > > cons = [] > for i in range(N): > c = lambda x: x[i] - 1e-10 > cons.append(c) > > But when functions in cons are evaluated, the

Re: questions about functions inside a function

2007-07-16 Thread [EMAIL PROTECTED]
On Jul 16, 4:49 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: (snipped) > > What I want is, the value of i should be bounded to the anonymous function. > And the output should like this: > > for f in a: > print f() > 0 > 1 > 4 > 9 > > How to achieve this? > > Thanks a lot! The functo

Re: running a Delphi part from Python ?

2007-07-16 Thread Chris Mellon
On 7/16/07, Stef Mientki <[EMAIL PROTECTED]> wrote: > tool69 wrote: > > Stef Mientki a écrit : > > > >> AFAIK, Scintilla is a code editor. > >> What I need looks more like ms-word, > >> handling lists, tables, images, formulas. > >> > >> thanks, > >> Stef Mientki > > > > > > So you'll need the Rich

Re: Dynamic method

2007-07-16 Thread Bruno Desthuilliers
Lawrence Oluyede a écrit : > Bruno Desthuilliers <[EMAIL PROTECTED]> > wrote: >>> I agree that in general the solution explained by Alex and you is better. >> They are not "better" - they are correct. > > Another way is to use the 'types' module: True - and that's somewhat cleaner since it doesn'

Private functions and inheritance

2007-07-16 Thread Maciej Bliziński
Hello, I've come across something that I don't quite understand about Python's inheritance. Consider the following code snippet: class A(object): def call_bar(self): return self.bar() def call___bar(self): return self.__bar() def __bar(self): return "A::__bar()" def bar(self): ret

Re: Implementaion of random.shuffle

2007-07-16 Thread shabda raaj
On Jul 16, 5:53 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > shabda raaj wrote: > > I was going through the docs for module-random > > And I came through this, > > > * shuffle*(x[, random]) > > > Shuffle the sequence x in place. The opti

win32com ppt saveas, not allowing spaces?

2007-07-16 Thread Lance Hoffmeyer
Hey all, As always, thanks in advance! I am trying to save a ppt presentation but am having problems regarding spaces and am wondering if I am doing something wrong or whether this is a bug? Also, is there a way around this other than not using spaces in paths or filenames? I can create file

Re: How to determine which method was used in an inheritance heirarchy?

2007-07-16 Thread Erik Jones
On Jul 16, 2007, at 3:37 AM, Gabriel Genellina wrote: > En Mon, 16 Jul 2007 03:56:18 -0300, Erik Jones <[EMAIL PROTECTED]> > escribió: > >> Perhaps an even better example of what I'm trying to do would be in >> order (this is minus any exception handling): >> >> import sys >> >> def mytrace(fram

Re: Accessing Python variables in an extension module

2007-07-16 Thread Alex Martelli
MD <[EMAIL PROTECTED]> wrote: > Hi Alex, >Thanks for your reply. It was exactly what I was looking for. Two > additional questions > 1) Is there anyway to find out which modules a variable belongs to > when I have only its name (and its not qualified with the complete > name like module.varnam

Re: Private functions and inheritance

2007-07-16 Thread Bjoern Schliessmann
Maciej Blizi?ski wrote: > calling B::call_bar(): B::bar() > calling B::call___bar(): A::__bar() (BTW, there is no :: operator in Python. It should be, e. g., B.bar().) > In the latter case, it calls the base class' implementation. It > probably goes along with Python's spec, but I found it surp

Re: Private functions and inheritance

2007-07-16 Thread Diez B. Roggisch
Maciej Bliziński wrote: > Hello, > > I've come across something that I don't quite understand about > Python's inheritance. Consider the following code snippet: > > class A(object): > def call_bar(self): return self.bar() > def call___bar(self): return self.__bar() > def __bar(self):

how to read python-doc in ubuntu?

2007-07-16 Thread ZelluX
Hi all, I'm a new comer to Python. I've installed python-doc module, but just don't know how to open it. Could you help me? Many thanks ^_^ -- http://mail.python.org/mailman/listinfo/python-list

Re: running a Delphi part from Python ?

2007-07-16 Thread markacy
On 16 Lip, 11:33, Stef Mientki <[EMAIL PROTECTED]> wrote: > tool69 wrote: > > Stef Mientki a écrit : > > >> AFAIK, Scintilla is a code editor. > >> What I need looks more like ms-word, > >> handling lists, tables, images, formulas. > > >> thanks, > >> Stef Mientki > > > So you'll need the RichTextC

Re: questions about functions inside a function

2007-07-16 Thread [EMAIL PROTECTED]
Duncan Booth wrote: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > >> In order to make sure all variables be larger than 0, I tried to created >> constraint function like this: >> >> cons = [] >> for i in range(N): >> c = lambda x: x[i] - 1e-10 >> cons.append(c) >> >> But when functi

Re: Implementaion of random.shuffle

2007-07-16 Thread Hrvoje Niksic
Steve Holden <[EMAIL PROTECTED]> writes: > So it would appear that the developers chose the Knuth algorithm > (with a slight variation) for *their* implementation. Now you have > to ask yourself whether your surmise is genuinely correct (in which > case the documentation may contain a bug) or whet

Re: questions about functions inside a function

2007-07-16 Thread Jeremy Sanders
[EMAIL PROTECTED] wrote: > What I want is, the value of i should be bounded to the anonymous > function. And the output should like this: ... > How to achieve this? This doesn't answer your question (others have), but another (perhaps clearer) way to do such things is something like class MyFunc

questions about functions inside a function

2007-07-16 Thread [EMAIL PROTECTED]
I want to create a list of function. Here is my code: In [9]: a = [] In [10]: for i in range(4): : b = lambda : i**2 : a.append(b) : : In [11]: for f in a: : f() : : 9 9 9 9 What I want is, the value of i should be bounded to t

Re: how to read python-doc in ubuntu?

2007-07-16 Thread Diez B. Roggisch
ZelluX wrote: > Hi all, > I'm a new comer to Python. > I've installed python-doc module, but just don't know how to open it. > Could you help me? > > Many thanks ^_^ dpkg -L will list the contents of the package at question. Doc packages usually reside under /usr/shar/doc/ diez -- http://

Re: Implementaion of random.shuffle

2007-07-16 Thread Steve Holden
Hrvoje Niksic wrote: > Steve Holden <[EMAIL PROTECTED]> writes: > >> So it would appear that the developers chose the Knuth algorithm >> (with a slight variation) for *their* implementation. Now you have >> to ask yourself whether your surmise is genuinely correct (in which >> case the documentati

Re: Private functions and inheritance

2007-07-16 Thread Neil Cerutti
On 2007-07-16, Maciej Blizi?ski <[EMAIL PROTECTED]> wrote: > Hello, > > I've come across something that I don't quite understand about > Python's inheritance. Consider the following code snippet: > > class A(object): > def call_bar(self): return self.bar() > def call___bar(self): return sel

Re: Can a low-level programmer learn OOP?

2007-07-16 Thread [EMAIL PROTECTED]
You are lucky.Our project is a cross-platform cluster computer managment system this system can run on both windows and Linux http://pluster.gf.cs.hit.edu.cn/ I tell you how we solve this problems > > 1. How to most easily learn to write simple PC GUI programs that will > send data to remote embed

Re: How to determine which method was used in an inheritance heirarchy?

2007-07-16 Thread Chris Mellon
On 7/16/07, Erik Jones <[EMAIL PROTECTED]> wrote: > On Jul 16, 2007, at 3:37 AM, Gabriel Genellina wrote: > > > En Mon, 16 Jul 2007 03:56:18 -0300, Erik Jones <[EMAIL PROTECTED]> > > escribió: > > > >> Perhaps an even better example of what I'm trying to do would be in > >> order (this is minus any

Re: Compiling python2.5 on IBM AIX

2007-07-16 Thread Gerard Flanagan
On Jul 16, 12:29 pm, [EMAIL PROTECTED] wrote: > hi, > > I'm trying to make a local install of python 2.5 on AIX and I'm > getting some trouble with _curses. > > Here is how I tried to compile it : > > export BASE=/usr/local/python251 > > cd Python.2.5.1 > ./configure --prefix=${BASE}/\ > LD

Re: how to read python-doc in ubuntu?

2007-07-16 Thread ZelluX
Got it. Thanks ;-) Diez B. Roggisch wrote: > ZelluX wrote: > >> Hi all, >> I'm a new comer to Python. >> I've installed python-doc module, but just don't know how to open it. >> Could you help me? >> >> Many thanks ^_^ > > dpkg -L > > will list the contents of the package at question. > > Do

Re: Compiling python2.5 on IBM AIX

2007-07-16 Thread Gerard Flanagan
On Jul 16, 12:29 pm, [EMAIL PROTECTED] wrote: > hi, > > I'm trying to make a local install of python 2.5 on AIX and I'm > getting some trouble with _curses. > > Here is how I tried to compile it : > > export BASE=/usr/local/python251 > > cd Python.2.5.1 > ./configure --prefix=${BASE}/\ > LD

Re: How to determine which method was used in an inheritance heirarchy?

2007-07-16 Thread Erik Jones
On Jul 16, 2007, at 10:35 AM, Chris Mellon wrote: > On 7/16/07, Erik Jones <[EMAIL PROTECTED]> wrote: >> On Jul 16, 2007, at 3:37 AM, Gabriel Genellina wrote: >> >>> En Mon, 16 Jul 2007 03:56:18 -0300, Erik Jones <[EMAIL PROTECTED]> >>> escribió: >>> Perhaps an even better example of what I'm

Re: Re-raising exceptions with modified message

2007-07-16 Thread fumanchu
On Jul 15, 2:55 am, Christoph Zwerschke <[EMAIL PROTECTED]> wrote: > Here is a simple solution, but it depends > on the existence of the args attribute that > "will eventually be deprecated" according > to the docs If you don't mind using .args, then the solution is usually as simple as: try:

Re: Fetching a clean copy of a changing web page

2007-07-16 Thread John Nagle
Miles wrote: > On Jul 16, 1:00 am, John Nagle <[EMAIL PROTECTED]> wrote: > >>I'm reading the PhishTank XML file of active phishing sites, >>at "http://data.phishtank.com/data/online-valid/"; This changes >>frequently, and it's big (about 10MB right now) and on a busy server. >>So once in a wh

Re: Re-raising exceptions with modified message

2007-07-16 Thread Gabriel Genellina
En Mon, 16 Jul 2007 13:50:50 -0300, fumanchu <[EMAIL PROTECTED]> escribió: > On Jul 15, 2:55 am, Christoph Zwerschke <[EMAIL PROTECTED]> wrote: >> Here is a simple solution, but it depends >> on the existence of the args attribute that >> "will eventually be deprecated" according >> to the docs >

Re: Pass by reference or by value?

2007-07-16 Thread John DeRosa
On 15 Jul 2007 16:07:43 -0700, [EMAIL PROTECTED] (Aahz) wrote: >[posted and e-mailed] > >[top-posting because I want to make only a one-line response] > >Please stick this on a web-page somewhere -- it makes an excellent >counterpoint to > >http://starship.python.net/crew/mwh/hacks/objectthink.htm

Re: Can a low-level programmer learn OOP?

2007-07-16 Thread Wayne Brehaut
On Mon, 16 Jul 2007 10:10:05 +0200, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: >Wayne Brehaut a écrit : >(snip) > > after Bruno made the >> claim: "OO is about machines - at least as conceveid by Alan Key, who >> invented the term and most of the concept." > >Please reread more carefully the a

Best method for inter process communications

2007-07-16 Thread JamesHoward
I am looking for a way of performing inter process communication over XML between a python program and something else creating XML data. What is the best way of performing this communication? I could bind a socket to localhost and perform the data transfer that way, but that seems inefficient due

Re: Technology solutions for Ruby?

2007-07-16 Thread vasudevram
[ Though the OP posted his message to comp.lang.ruby, I'm cross- posting it to comp.lang.python, since he mentions Python as a possible alternative he's looking at, and also because I've recommended Python for his stated needs. Also, interested to see what other Pythonistas have to say in response

Discover instance variables

2007-07-16 Thread JonathanB
Ok, I know there has to be a way to do this, but my google-fu fails me (once more). I have a class with instance variables (or should they be called attributes, I'm newish to programming and get really confused with OO sometimes), like the one in this example: class Foo(): self.a = "bar" s

Re: Can a low-level programmer learn OOP?

2007-07-16 Thread Wayne Brehaut
On Mon, 16 Jul 2007 09:55:35 +0200, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: >Wayne Brehaut a écrit : >> On Sat, 14 Jul 2007 06:01:56 +0200, Bruno Desthuilliers >> <[EMAIL PROTECTED]> wrote: >> >>> Chris Carlen a écrit : Hi: From what I've read of OOP, I don't get it. I hav

Re: Pass by reference or by value?

2007-07-16 Thread Beliavsky
On Jul 13, 11:58 pm, sturlamolden <[EMAIL PROTECTED]> wrote: > In Fortran you can only pass references. > > integer(4) :: a > a = 1 > call bar(a) > > subroutine bar(a) > integer(4) :: a > a = 0 ! side-effect > end subroutine > > That means, when a variable is used to call a function,

The ** operator ambiguous?

2007-07-16 Thread Robert Dailey
I noticed that the ** operator is used as the power operator, however I've seen it used when passing variables into a function. For example, I was researching a way to combine dictionaries. I found that if you do this: a = {"t1":"a", "t2":"b"} b = {"t3":"c"} dict( a, **b ) This combines the two

Re: The ** operator ambiguous?

2007-07-16 Thread Diez B. Roggisch
Robert Dailey schrieb: > I noticed that the ** operator is used as the power operator, however > I've seen it used when passing variables into a function. For example, > I was researching a way to combine dictionaries. I found that if you > do this: > > a = {"t1":"a", "t2":"b"} > b = {"t3":"c"} >

shutil.copyfile problem for GIS data

2007-07-16 Thread Ahmed, Shakir
Need help to copy a personal geodatabase from one location to another: Trying to copy a personal geodatabase from one location to another location where all the users are retrieving data from the second location: 1. I can copy over the updated personal geodatabase to the working location a

Re: 2**2**2**2**2 wrong? Bug?

2007-07-16 Thread Wayne Brehaut
On Mon, 16 Jul 2007 08:51:31 +0200, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > "Wayne Brehaut" <[EMAIL PROTECTED]> wrote: > >> On Sun, 15 Jul 2007 17:37:13 -0400, Steve Holden <[EMAIL PROTECTED]> >> wrote: >> >> >Wayne Brehaut wrote: >> >> On Fri, 13 Jul 2007 14:32:03 -0700, "[EMAIL PROTEC

Re: Pass by reference or by value?

2007-07-16 Thread Steve Holden
Beliavsky wrote: > On Jul 13, 11:58 pm, sturlamolden <[EMAIL PROTECTED]> wrote: > > > >> In Fortran you can only pass references. >> >> integer(4) :: a >> a = 1 >> call bar(a) >> >> subroutine bar(a) >> integer(4) :: a >> a = 0 ! side-effect >> end subroutine >> >> That means, when a

Re: Python and Tkinter Primer/Tutorial?

2007-07-16 Thread James Stroud
W. Watson wrote: > Thanks for the tips to the posters above. Wow, the Grayson book is $98 > on Amazon. I think I'll see if I can get a library loan! Its an ebook for $25.00: http://www.manning.com/grayson/ James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Ange

Re: Best method for inter process communications

2007-07-16 Thread marduk
On Mon, 2007-07-16 at 17:22 +, JamesHoward wrote: > I am looking for a way of performing inter process communication over > XML between a python program and something else creating XML data. > > What is the best way of performing this communication? I could bind a > socket to localhost and pe

Re: Best method for inter process communications

2007-07-16 Thread Steve Holden
JamesHoward wrote: > I am looking for a way of performing inter process communication over > XML between a python program and something else creating XML data. > > What is the best way of performing this communication? I could bind a > socket to localhost and perform the data transfer that way, b

Re: The ** operator ambiguous?

2007-07-16 Thread Duncan Booth
Robert Dailey <[EMAIL PROTECTED]> wrote: > However, I have no idea what the > ** operator is here. I know that when you specify ** as a parameter in > a function definition, it represents a dictionary of parameters passed > in. However, in this example it is NOT being used in a function > definiti

Re: Best method for inter process communications

2007-07-16 Thread Grant Edwards
On 2007-07-16, JamesHoward <[EMAIL PROTECTED]> wrote: > I am looking for a way of performing inter process communication over > XML between a python program and something else creating XML data. > > What is the best way of performing this communication? I could bind a > socket to localhost and pe

Re: Discover instance variables

2007-07-16 Thread Bjoern Schliessmann
JonathanB wrote: > Ok, I know there has to be a way to do this, but my google-fu > fails me (once more). I have a class with instance variables (or > should they be called attributes, I'm newish to programming and > get really confused with OO sometimes), To complete confusion, those terms vary wi

Re: Discover instance variables

2007-07-16 Thread Gabriel Genellina
En Mon, 16 Jul 2007 14:25:48 -0300, JonathanB <[EMAIL PROTECTED]> escribió: > Ok, I know there has to be a way to do this, but my google-fu fails me > (once more). I have a class with instance variables (or should they be > called attributes, I'm newish to programming and get really confused > w

Re: The ** operator ambiguous?

2007-07-16 Thread Gabriel Genellina
En Mon, 16 Jul 2007 14:40:14 -0300, Robert Dailey <[EMAIL PROTECTED]> escribió: > I noticed that the ** operator is used as the power operator, however > I've seen it used when passing variables into a function. For example, > I was researching a way to combine dictionaries. I found that if you

Re: Discover instance variables

2007-07-16 Thread Steve Holden
JonathanB wrote: > Ok, I know there has to be a way to do this, but my google-fu fails me > (once more). I have a class with instance variables (or should they be > called attributes, I'm newish to programming and get really confused > with OO sometimes), like the one in this example: > Instance v

Re: Accessing Python variables in an extension module

2007-07-16 Thread MD
Hi Alex, Thanks for the answer. Are there any C defines (for e.g. STRING, BOOLEAN) corresponding to each Python type? Thanks, -Manas On Jul 16, 9:53 am, [EMAIL PROTECTED] (Alex Martelli) wrote: > MD <[EMAIL PROTECTED]> wrote: > > Hi Alex, > >Thanks for your reply. It was exactly what I was

Re: shutil.copyfile problem for GIS data

2007-07-16 Thread Gabriel Genellina
En Mon, 16 Jul 2007 14:47:30 -0300, Ahmed, Shakir <[EMAIL PROTECTED]> escribió: > 2.But problem is that I can't copy over if the same updated > personal geodatabase to the working location, if users uses that same > geodatabase through CITRIX - ArcGIS ( user does not have permission to >

Re: Can a low-level programmer learn OOP?

2007-07-16 Thread Chris Carlen
Hendrik van Rooyen wrote: > "Chris Carlen" wrote: >>Form 2: Use Python and PySerial and TkInter or wxWidgets. >>Pro: Cross-platform goal will likely be achieved fully. Have a >>programmer nearby with extensive experience who can help. >>Con: Must learn new language and library. Must possibl

Re: Technology solutions for Ruby?

2007-07-16 Thread vasudevram
On Jul 16, 10:25 pm, vasudevram <[EMAIL PROTECTED]> wrote: > [ Though the OP posted his message to comp.lang.ruby, I'm cross- > posting it to comp.lang.python, since he mentions Python as a possible > alternative he's looking at, and also because I've recommended Python > for his stated needs. Also

Re: Technology solutions for Ruby?

2007-07-16 Thread kyosohma
On Jul 16, 1:46 pm, vasudevram <[EMAIL PROTECTED]> wrote: > On Jul 16, 10:25 pm, vasudevram <[EMAIL PROTECTED]> wrote: > > > > > [ Though the OP posted his message to comp.lang.ruby, I'm cross- > > posting it to comp.lang.python, since he mentions Python as a possible > > alternative he's looking a

Re: urllib to cache 301 redirections?

2007-07-16 Thread O.R.Senthil Kumaran
Thank you for the reply, Mr. John and I apologize for a very late response from my end. * John J. Lee <[EMAIL PROTECTED]> [2007-07-06 18:53:09]: > "O.R.Senthil Kumaran" <[EMAIL PROTECTED]> writes: > > > Hi, > > There is an Open Tracker item against urllib2 library python.org/sf/735515 > > > I a

Binary blobs to jpeg

2007-07-16 Thread jayharvard1
Hello All. I'm trying to create jpegs out of data that is stored in a binary blob format in an RDBMS (MS Access). I've tried writing the jpeg directly: while not rs.EOF: op = file(imgdir + "\\" + pic,"w") print >> op, rs.Fields[3].Value ##where rs.Fields[3].Value is the data in the

  1   2   >