ANN: MoinMoin 1.5.5a (advanced wiki engine) released

2006-09-21 Thread Alexander Schremmer
__ /\/\ ___ (_)_ __ /\/\ ___ (_)_ __ /\ / _ \| | '_ \ /\ / _ \| | '_ \ __ / /\/\ \ (_) | | | | / /\/\ \ (_) | | | | | /| |_ \/\/\___/|_|_| |_\/\/\___/|_|_| |_| |.__)

ANN: Python-2.5 available at WebFaction

2006-09-21 Thread remi
Hello everyone, I'm happy to announce that WebFaction have now installed Python-2.5 on all their servers. WebFaction (formerly Python-Hosting.com) support all the major Python web frameworks (Django, TurboGears, CherryPy, mod_python, Pylons, web.py, ...) People using Python CGI or

html 0.4.0 released

2006-09-21 Thread Jürgen Urner
Just released the 0.4.0 version of my html package. What is html? Bet you know. But this module lets you parse and construct html content without templating languages. Goal was to wrap tags in the simplest way python allows to. Sample code: f = ( HtmlFile() ( Doctype(),

ANN: Stackless Python for Python 2.5

2006-09-21 Thread richard . m . tew
Stackless Python for Python 2.5 is now available. What is Stackless Python? = Stackless Python is an enhanced version of the Python programming language. It allows programmers to reap the benefits of thread-based programming without the performance and complexity

pexpect baudrate and mode settings

2006-09-21 Thread Bryce Bolton
Hi, I've written a short script in pexpect to open the serial port and get 100 bytes. The script does receive a string of garbage, but not the good text seen when I open a minicom terminal and look at ttyS0. I know that the baud rate is wrong, and the other settings (such as 8N1) are unknown to

Re: wxPython - very small frame

2006-09-21 Thread Wildemar Wildenburger
Francach wrote: Hi, I'd like to create a very small Frame without the usual minimise and maximise icons on the top. Does anyone know how to do this with wxPython? I've tried creating a Frame with the style wx.DOUBLE_BORDER, which gives me a nice small window. But I can't move it around the

Re: pexpect baudrate and mode settings

2006-09-21 Thread Bryce Bolton
Hi, I've written a short script in pexpect to open the serial port and get 100 bytes. The script does receive a string of garbage, but not the good text seen when I open a minicom terminal and look at ttyS0. I know that the baud rate is wrong, and the other settings (such as 8N1) are unknown to

Re: naming objects from string

2006-09-21 Thread Ben Finney
manstey [EMAIL PROTECTED] writes: If I have a string, how can I give that string name to a python object, such as a tuple. The thing I'd like to know before answering this is: how will you be using that name to refer to the object later? -- \ If you ever catch on fire, try to avoid

Re: Is it possible to change a picture resolution with Python?

2006-09-21 Thread Tim Roberts
Lad [EMAIL PROTECTED] wrote: from image: http://www.pythonware.com/library/pil/handbook/image.htm This is some example code: from PIL import Image im = Image.open(1.jpg) nx, ny = im.size im2 = im.resize((int(nx*1.5), int(ny*1.5)), Image.BICUBIC) im2.save(2.png) Bye, bearophile, Thank

Re: naming objects from string

2006-09-21 Thread Tim Roberts
manstey [EMAIL PROTECTED] wrote: If I have a string, how can I give that string name to a python object, such as a tuple. e.g. a = 'hello' b=(1234) That's not a tuple. That's an integer. (1234,) is a tuple. and then a function name(b) = a which would mean: hello=(1234) is this possible?

Re: naming objects from string

2006-09-21 Thread Gabriel Genellina
At Thursday 21/9/2006 00:59, manstey wrote: If I have a string, how can I give that string name to a python object, such as a tuple. e.g. a = 'hello' b=(1234) and then a function name(b) = a which would mean: hello=(1234) is this possible? You may use another object as a namespace:

Re: Is it possible to change a picture resolution with Python?

2006-09-21 Thread Lad
Tim Roberts wrote: Lad [EMAIL PROTECTED] wrote: from image: http://www.pythonware.com/library/pil/handbook/image.htm This is some example code: from PIL import Image im = Image.open(1.jpg) nx, ny = im.size im2 = im.resize((int(nx*1.5), int(ny*1.5)), Image.BICUBIC)

Re: view page source or save after load

2006-09-21 Thread Gabriel Genellina
At Thursday 21/9/2006 02:26, alex23 wrote: page = urllib.urlopen('http://some.address') add .read() at the end open('saved_page.txt','w').write(page).close() write() does not return the file object, so this won't work; you have to bind the file to a temporary variable to be able to close

Re: view page source or save after load

2006-09-21 Thread alex23
Gabriel Genellina wrote: fixes for my stupidity Thanks for the corrections, Gabriel. I really need to learn to cutpaste working code :) Cheers. -alex23 -- http://mail.python.org/mailman/listinfo/python-list

Is it possible to save a running program and reload next time ?

2006-09-21 Thread [EMAIL PROTECTED]
Hi, I have a program which will continue to run for several days. When it is running, I can't do anything except waiting because it takes over most of the CUP time. Is it possible that the program can save all running data to a file when I want it to stop, and can reload the data and continue

Re: get process id...

2006-09-21 Thread billie
[EMAIL PROTECTED] ha scritto: SpreadTooThin wrote: How does one get the process id? Is there a method for windows and unix (mac os x etc...) under linux, do: import os os.getpid() Under Windows: import ctypes ctypes.windll.kernel32.GetCurrentProcessId() --

Re: new string method in 2.5 (partition)

2006-09-21 Thread Fredrik Lundh
Irmen de Jong wrote: Because the result of partition is a non mutable tuple type containing three substrings of the original string, is it perhaps also the case that partition works without allocating extra memory for 3 new string objects and copying the substrings into them? nope. the core

Re: get process id...

2006-09-21 Thread Tim Golden
billie wrote: [EMAIL PROTECTED] ha scritto: SpreadTooThin wrote: How does one get the process id? Is there a method for windows and unix (mac os x etc...) under linux, do: import os os.getpid() Under Windows: import ctypes ctypes.windll.kernel32.GetCurrentProcessId()

Re: Do we need to delete ImageDraw.Draw after using it?

2006-09-21 Thread Fredrik Lundh
Steve Holden wrote: Is there any general rule that we must delete the object after using it? Just consider it good hygiene. in this specific case, it may not be obvious for the casual reader that the global draw variable will contain an indirect reference to the original image object, so

Re: get process id...

2006-09-21 Thread Fredrik Lundh
billie wrote: under linux, do: import os os.getpid() Under Windows: import ctypes ctypes.windll.kernel32.GetCurrentProcessId() getpid() works just fine on Windows too: import ctypes ctypes.windll.kernel32.GetCurrentProcessId() 1916 import os os.getpid() 1916 /F --

Re: naming objects from string

2006-09-21 Thread Fredrik Lundh
manstey wrote: so they might provide a list of names, like 'bob','john','pete', with 3 structures per name, such as 'apple','orange','red' and I need 9 tuples in my code to store their data: bob_apple=() bob_orange=() .. pete_red=() I then populate the 9 tuples with data they provide

Re: Request for elucidation: enhanced generators

2006-09-21 Thread Michele Simionato
Ben Sizer wrote: But do you have an example of such a use case? Here is a 69 lines implementation of the idea of applying extended generators to manage Web forms (obviously this is only a proof of concept and it contains many mistakes, but you have something to get started). Notice that I am not

Re: Using py2exe to wrap a service?

2006-09-21 Thread MaR
Thanks guys! :o) It seems that no module is missing since the Service starts and the error message seem to indicate an error in the COM call to the AD. I would expect some other exception.. I do have a separate thread for the asyncore.loop() as I otherwise would risk a lockup. I do not call

Re: Is it possible to save a running program and reload next time ?

2006-09-21 Thread Iain King
[EMAIL PROTECTED] wrote: Hi, I have a program which will continue to run for several days. When it is running, I can't do anything except waiting because it takes over most of the CUP time. Is it possible that the program can save all running data to a file when I want it to stop, and can

Re: Is it possible to save a running program and reload next time ?

2006-09-21 Thread MonkeeSage
[EMAIL PROTECTED] wrote: Is it possible that the program can save all running data to a file when I want it to stop, and can reload the data and continue to run from where it stops when the computer is free ? This isn't what you asked for (I have no idea how to do that), but given your

Evaluation of Truth Curiosity

2006-09-21 Thread James Stroud
Hello All, I'm curious, in py 0 | (1 == 1) 1 py False | (1 == 1) True What is the logic of the former expression not evaluating to True (or why the latter not 1?)? Is there some logic that necessitates the first operand's dictating the result of the evaluation? Or is this an artefact of the

Python and CORBA

2006-09-21 Thread rodmc
Can anyone recommend an easy to install COBRA implementation which works with Python? I am using Windows XP. Thanks in advance. Best, rod -- http://mail.python.org/mailman/listinfo/python-list

RE: Using py2exe to wrap a service?

2006-09-21 Thread Tim Golden
[MaR] | I do not call pythoncom.CoInitialize () as I tend to expect a module | wrapping COM stuff to do that. Hmmm. A slightly philosophical point. As the author of the said module, I think I'd have said that the other way round: I do not call CoInit... because I expect a user of the module

Re: Is it possible to save a running program and reload next time ?

2006-09-21 Thread Jeremy Sanders
[EMAIL PROTECTED] wrote: I have a program which will continue to run for several days. When it is running, I can't do anything except waiting because it takes over most of the CUP time. Is it possible that the program can save all running data to a file when I want it to stop, and can

Re: naming objects from string

2006-09-21 Thread Jeremy Sanders
manstey wrote: so they might provide a list of names, like 'bob','john','pete', with 3 structures per name, such as 'apple','orange','red' and I need 9 tuples in my code to store their data: bob_apple=() bob_orange=() .. pete_red=() I really think you should be using dictionaries here.

Re: Is it possible to save a running program and reload next time ?

2006-09-21 Thread Roland.Csaszar
On 2006-09-21, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is it possible that the program can save all running data to a file when I want it to stop, and can reload the data and continue to run from where it stops when the computer is free ? Well, on Irix you could use cpr

how to use timer in python

2006-09-21 Thread yxh
how to use timer in python. the functionnality is like the MFC SetTimer() -- http://mail.python.org/mailman/listinfo/python-list

Re: Evaluation of Truth Curiosity

2006-09-21 Thread MonkeeSage
James Stroud wrote: What is the logic of the former expression not evaluating to True (or why the latter not 1?)? Is there some logic that necessitates the first operand's dictating the result of the evaluation? Or is this an artefact of the CPython implementation? If I understand correctly,

Re: how to use timer in python

2006-09-21 Thread Gabriel Genellina
At Thursday 21/9/2006 06:03, yxh wrote: how to use timer in python. the functionnality is like the MFC SetTimer() Use the Timer class. Gabriel Genellina Softlab SRL __ Preguntá. Respondé. Descubrí. Todo

Re: Evaluation of Truth Curiosity

2006-09-21 Thread Fredrik Lundh
James Stroud wrote: I'm curious, in py 0 | (1 == 1) 1 py False | (1 == 1) True What is the logic of the former expression not evaluating to True (or why the latter not 1?)? Is there some logic that necessitates the first operand's dictating the result of the evaluation? Or is this

Re: Evaluation of Truth Curiosity

2006-09-21 Thread Christophe
James Stroud a écrit : Hello All, I'm curious, in py 0 | (1 == 1) 1 py False | (1 == 1) True What is the logic of the former expression not evaluating to True (or why the latter not 1?)? Is there some logic that necessitates the first operand's dictating the result of the

Re: Python and CORBA

2006-09-21 Thread Simon Brunning
On 21 Sep 2006 01:48:55 -0700, rodmc [EMAIL PROTECTED] wrote: Can anyone recommend an easy to install COBRA implementation which works with Python? I am using Windows XP. http://omniorb.sourceforge.net/ is the 2nd hit if you go to http://www.google.com/search?q=python+corba. ;-) -- Cheers,

Re: Python Threading

2006-09-21 Thread Calvin Spealman
On 20 Sep 2006 00:27:07 -0700, daniel [EMAIL PROTECTED] wrote: Hello, Can anyone explain the main points in working with threads in Python. Why use threading and not Thread.I have read an article that i have to subclass the Thread class and override some function. I repeat this all the time,

Re: Using py2exe to wrap a service?

2006-09-21 Thread MaR
Tim Golden wrote: [MaR] | I do not call pythoncom.CoInitialize () as I tend to expect a module | wrapping COM stuff to do that. Hmmm. A slightly philosophical point. [snip] :o) I agree! I have added the CoInit.. call to the __init__() of the threaded class (I understood the documentation

Re: Python Threading

2006-09-21 Thread Fredrik Lundh
Dennis Lee Bieber wrote: ... slightly simpler to use without subclassing (at the simplest level, you just pass the function that is to be run, and a list of the arguments/parameters it needs, to the threading creation class). that's exactly how thread.start_new_thread(func, args) works, of

RE: Using py2exe to wrap a service?

2006-09-21 Thread Tim Golden
[MaR] | Tim Golden wrote: | [MaR] | | | I do not call pythoncom.CoInitialize () as I tend to | expect a module | | wrapping COM stuff to do that. | | Hmmm. A slightly philosophical point. | [snip] | | :o) I agree! | | I have added the CoInit.. call to the __init__() of the threaded class

Re: Is it possible to save a running program and reload next time ?

2006-09-21 Thread Duncan Booth
Jeremy Sanders [EMAIL PROTECTED] wrote: For Linux (and other Unix like OSs), there are several checkpointing libraries available which allow programs to be saved to disk, and restarted later. Another option which will work on just about anything would be to run the program in a vmware

Can I inherit member variables?

2006-09-21 Thread lm401
I'm trying to work with the following idea: class animal: def __init__(self, weight, colour): self.weight = weight self.colour = colour class bird(animal): def __init__(self, wingspan): self.wingspan = wingspan print self.weight, self.colour, self.wingspan class

Re: Python and CORBA

2006-09-21 Thread Eric Brunel
On Thu, 21 Sep 2006 10:48:55 +0200, rodmc [EMAIL PROTECTED] wrote: Can anyone recommend an easy to install COBRA implementation which works with Python? I am using Windows XP. I used to use fnorb (http://sourceforge.net/projects/fnorb), but the project seems to be dead. It still seems to

Re: Can I inherit member variables?

2006-09-21 Thread Benjamin Niemann
Hello, [EMAIL PROTECTED] wrote: I'm trying to work with the following idea: class animal: def __init__(self, weight, colour): self.weight = weight self.colour = colour class bird(animal): def __init__(self, wingspan): self.wingspan = wingspan print self.weight,

Re: Evaluation of Truth Curiosity

2006-09-21 Thread James Stroud
Everyone wrote: [something intelligent] Ah, clarity. My confusion can undoubtedly be traced to a non-existent formal training in computer programming. Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: Can I inherit member variables?

2006-09-21 Thread MonkeeSage
[EMAIL PROTECTED] wrote: When I run my code from within the derived class, self.weight and self.colour are not inherited (although methods are inherited as I would have expected). Animal is never initialized and you're not passing weight and color into it anyway. You need something like:

Priority based concurrent execution

2006-09-21 Thread Willi Richert
Hi, I have a simulation application (PlayerStage) in which the robot is asked every ~200ms for an action. In the meantime the robot has to do some calculation with the perception. As the calculation gets more and more time consuming I am thinking about outsourcing it into a concurrently

Re: view page source or save after load

2006-09-21 Thread James Stroud
Gabriel Genellina wrote: At Thursday 21/9/2006 02:26, alex23 wrote: page = urllib.urlopen('http://some.address') add .read() at the end open('saved_page.txt','w').write(page).close() write() does not return the file object, so this won't work; you have to bind the file to a

Re: Can I inherit member variables?

2006-09-21 Thread LorcanM
Thanks for the reply. I think there's a basic misunderstanding about the nature of inheritance on my side. What I want to do is instantiate the sub class (derived class) from within the animal class. I then expect the sub class to have inherited some basic properties that it knows it has

Re: Can I inherit member variables?

2006-09-21 Thread Gabriel Genellina
At Thursday 21/9/2006 06:52, [EMAIL PROTECTED] wrote: class animal: def __init__(self, weight, colour): self.weight = weight self.colour = colour class bird(animal): def __init__(self, wingspan): self.wingspan = wingspan print self.weight, self.colour, self.wingspan class

Re: Can I inherit member variables?

2006-09-21 Thread Gabriel Genellina
At Thursday 21/9/2006 07:34, LorcanM wrote: I think there's a basic misunderstanding about the nature of inheritance on my side. What I want to do is instantiate the sub class (derived class) from within the animal class. I then expect the sub class to have inherited some basic properties that

Re: Can I inherit member variables?

2006-09-21 Thread Benjamin Niemann
LorcanM wrote: Benjamin Niemann wrote: You'll have to invoke the __init__ method of the superclass, this is not done implicitly. And you probably want to add the weight and colour attributes to your subclass in order to pass these to the animal constructor. class fish(animal): def

Re: pexpect baudrate and mode settings

2006-09-21 Thread Ganesan Rajagopal
Bryce Bolton [EMAIL PROTECTED] writes: In short, setting of critical parameters is unclear under pexpect's documentation, but may be obvious to those more familiar with os.open or other filesystem internals. Try using stty program on Linux to set these parameters before you use pexpect.

Re: Installing Python on a 64-Bit OS

2006-09-21 Thread Nico Grubert
Several changes have been made to Python 2.4 and 2.5 to support AMD64-Linux better, and not all of these changes have been incorporated into Python 2.3, as this software is no longer maintained. As others have said: you should really try to use the python 2.4 that comes with the operating

Re: get process id...

2006-09-21 Thread Chris
SpreadTooThin wrote: How does one get the process id? Is there a method for windows and unix (mac os x etc...) http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/442477 hth -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and CORBA

2006-09-21 Thread rodmc
Thanks to everyone for their help. I had tried OmniORB and while the base library worked ok, the Python bit OmniORBpy seems to dislike working... Perhaps there is something wrong with my settings. I will also try the Python only suggestion. cheers, rod --

Re: naming objects from string

2006-09-21 Thread Terry Reedy
James Stroud [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Depends on your namespace, but for the local namespace, you can use this: py a = object() py a object object at 0x40077478 py locals()['bob'] = a py bob object object at 0x40077478 If you put this code within a

Re: Can I inherit member variables?

2006-09-21 Thread MonkeeSage
Hi Lorcan, Mabye thinking of it like this will help: birds and fishes (I love that word, even if it is incorrect) can _do_ all the things that all animals have in common: eat, drink, die, reproduce, c; but that is generic. class animal(object): def eat(self, food): pass ... class

Re: Can I inherit member variables?

2006-09-21 Thread LorcanM
Thanks a lot folks for all the help. Its a lot clearer now. If I could summarise my original misunderstanding about inheritance: I belived that a sub class inherited a *specific instance* of the super class. This is clearly not right - the misunderstanding arose as I was instantiating the super

Re: ANN: Pocoo (bulletin board software) 0.1 beta released

2006-09-21 Thread robin
Georg Brandl [EMAIL PROTECTED] wrote: The 0.1 release is not meant to be feature complete. It's more like a preview to show off what's already there. If you like the idea, *feel free to join us!* Looks very nice so far. Will fill an important gap in Python apps. Oh, and you've been blogged:

Re: Can I inherit member variables?

2006-09-21 Thread bearophileHUGS
MonkeeSage: If you have multiple inheritance do you need the old style init anyway? class Animal1(object): def __init__(self, weight, colour): self.weight = weight self.colour = colour class Animal2(object): def __init__(self, name): self.name = name class Bird(Animal1,

Re: Can I inherit member variables?

2006-09-21 Thread MonkeeSage
[EMAIL PROTECTED] wrote: If you have multiple inheritance do you need the old style init anyway? I guess so, I'm not really sure. This page http://fuhm.net/super-harmful/ talks about super() and MRO and such, but I have only glanced over it the other day. I will read it more fully sometime. I

Changing behaviour of namespaces

2006-09-21 Thread Mikael Olofsson
Hi! This is in Python 2.3.4 under WinXP. I have a situation where I think changing the behaviour of a namespace would be very nice. The goal is to be able to run a python file from another in a separate namespace in such a way that a NameError is not raised if a non-existing variable is used

Re: Priority based concurrent execution

2006-09-21 Thread [EMAIL PROTECTED]
Willi Richert wrote: Hi, I have a simulation application (PlayerStage) in which the robot is asked every ~200ms for an action. In the meantime the robot has to do some calculation with the perception. As the calculation gets more and more time consuming I am thinking about outsourcing it

Working with email and mailbox module

2006-09-21 Thread Nirnimesh
I want to extract emails from an mbox-type file which contains a number of individual emails. I tried the python mailbox and email modules individually, but I'm unable to combine them to get what I want. Mailbox allows me to iterate over all the mails but doesn't give me access the individual

mxCGIPython

2006-09-21 Thread Oleg Broytmann
Hello! For quite some time I was a maintainer of mxCGIPython. Now I am going to stop. There will no be mxCGIPython for Python 2.5. Python is quite popular these days, it is hard to find hosting without it. Original author abandoned mxCGIPython long ago, and I only provided some simple patches

Re: Can I inherit member variables?

2006-09-21 Thread Bruno Desthuilliers
Gabriel Genellina wrote: (snip) When you construct an object instance, it is of a certain type from that precise moment, and you can't change that afterwards. Err... Actually, in Python, you can. It's even a no-brainer. (snip) -- bruno desthuilliers python -c print

Re: Using py2exe to wrap a service?

2006-09-21 Thread MaR
Tim Golden wrote: [snip..] At this point there are several options open to us: (in no particular order) 1) You could nudge the code at line 217 to make use of that suggestion. 2) I could do that and send you the result. 3) I could alter the module so it doesn't use gencache at all. I

Re: text representation of HTML

2006-09-21 Thread Ksenia Marasanova
Sorry for the late reply... better too late than never :) Thanks to all for the tips. Stripogram is the winner, since it is the most configurable and accept line-length parameter, which is handy for email... Ksenia. On 7/19/06, Laurent Rahuel [EMAIL PROTECTED] wrote: Hi, I guess stripogram

Re: naming objects from string

2006-09-21 Thread Roberto Bonvallet
manstey wrote: [...] bob_apple=() bob_orange=() .. pete_red=() I then populate the 9 tuples with data [...] You cannot populate a tuple. If you want to insert the values individually, you have to use a list. If you insert them all together, like this: bob_apple = (1, 2, ..., 9), you

Re: Can I inherit member variables?

2006-09-21 Thread Bruno Desthuilliers
LorcanM wrote: (snip) What I'm doing is a bit more abstract: I'm instantiating a 'world' (as a super class) and then various 'worldviews' as sub-classes. The 'worldviews' must know about various aspects of the 'world' from which they are instantiated to be able to do what they need to do

Re: Can I inherit member variables?

2006-09-21 Thread Wildemar Wildenburger
Bruno Desthuilliers wrote: Gabriel Genellina wrote: When you construct an object instance, it is of a certain type from that precise moment, and you can't change that afterwards. Err... Actually, in Python, you can. It's even a no-brainer. Oh yeah, let's confuse the newbie, shall we :) The

Re: Changing behaviour of namespaces

2006-09-21 Thread Peter Otten
Mikael Olofsson wrote: This is in Python 2.3.4 under WinXP. To feed an arbitrary mapping object to execfile() you need to upgrade to Python 2.4. http://docs.python.org/dev/lib/built-in-funcs.html#l2h-26 Peter -- http://mail.python.org/mailman/listinfo/python-list

Decorator cllass hides docstring from doctest?

2006-09-21 Thread Berthold Höllmann
Saving the following code to a file and running the code through python does not give the expected error. disableling the @decor line leads to the expected error message. Is this a bug or an overseen feature? --- snip dectest.py --- class decor(object): def __init__(self, f): self.f

Re: Priority based concurrent execution

2006-09-21 Thread Jean-Paul Calderone
On 21 Sep 2006 04:56:46 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Willi Richert wrote: Hi, I have a simulation application (PlayerStage) in which the robot is asked every ~200ms for an action. In the meantime the robot has to do some calculation with the perception. As the

Re: Nested Looping SQL Querys

2006-09-21 Thread Carsten Haese
On Thu, 2006-09-21 at 01:12, Dennis Lee Bieber wrote: On Wed, 20 Sep 2006 13:21:54 -0400, Steve Holden [EMAIL PROTECTED] declaimed the following in comp.lang.python: .execute() is a cursor method, not a connection method. Some DB API modules do implement it as a connection method, but

http://mail.python.org/pipermail/python-list/2006-January/320434.html

2006-09-21 Thread filippo randello
Hello, if after your command: ie.Document.login_form.submit() I write: doc = ie.Document s = doc.documentElement.outerHTML print s I can see the HTML of the document before the submit command, but I would like to see the HTML of the page after the submit command: do you know how to solve this

Re: Python and CORBA

2006-09-21 Thread Diez B. Roggisch
rodmc wrote: Thanks to everyone for their help. I had tried OmniORB and while the base library worked ok, the Python bit OmniORBpy seems to dislike working... Perhaps there is something wrong with my settings. Omniorb is very actively developed, try and post your problems on the mailing list:

Re: Decorator cllass hides docstring from doctest?

2006-09-21 Thread Duncan Booth
[EMAIL PROTECTED] (Berthold =?iso-8859-15?Q?H=F6llmann?=) wrote: Saving the following code to a file and running the code through python does not give the expected error. disableling the @decor line leads to the expected error message. Is this a bug or an overseen feature? It's a problem

Re: Decorator cllass hides docstring from doctest?

2006-09-21 Thread Felipe Almeida Lessa
2006/9/21, Berthold Höllmann [EMAIL PROTECTED]: Saving the following code to a file and running the code through python does not give the expected error. disableling the @decor line leads to the expected error message. Is this a bug or an overseen feature? Try the new_decor class described

How to get ip setting, dynamic ip or static ip?

2006-09-21 Thread kode4u
How to use python get my windows box's ip setting type? Dynamic ip, or static ip? If it's static ip, what's the exact value? -- http://mail.python.org/mailman/listinfo/python-list

Re: Trying to run an external program

2006-09-21 Thread Larry Bates
Brant Sears wrote: Hi. I'm new to Python and I am trying to use the latest release (2.5) on Windows XP. What I want to do is execute a program and have the results of the execution assigned to a variable. According to the documentation the way to do this is as follows: import commands x

Re: Changing behaviour of namespaces - solved, I think

2006-09-21 Thread Mikael Olofsson
Peter Otten wrote: To feed an arbitrary mapping object to execfile() you need to upgrade to Python 2.4. Thanks! As clear as possible. I will do that. FYI: I think I managed to achieve what I want in Py2.3 using the compiler module: def getNamesFromAstNode(node,varSet): if

Re: Is it possible to save a running program and reload next time ?

2006-09-21 Thread [EMAIL PROTECTED]
Dennis Lee Bieber wrote: On Thu, 21 Sep 2006 15:34:21 +0800, [EMAIL PROTECTED] [EMAIL PROTECTED] declaimed the following in comp.lang.python: Is it possible that the program can save all running data to a file when I want it to stop, and can reload the data and continue to run from

Re: Can I inherit member variables?

2006-09-21 Thread MonkeeSage
Ps. Aristotle can rest easy tonight: class mortal(object): pass class man(mortal): pass Socrates = man() all_men = mortal() if Socrates == all_men: print Socrates == all_man else: print Undistributed Middle is indeed a fallacy ;) Regards, Jordan --

Re: Is it possible to save a running program and reload next time ?

2006-09-21 Thread Larry Bates
[EMAIL PROTECTED] wrote: Hi, I have a program which will continue to run for several days. When it is running, I can't do anything except waiting because it takes over most of the CUP time. Is it possible that the program can save all running data to a file when I want it to stop, and

Re: Decorator cllass hides docstring from doctest?

2006-09-21 Thread Michele Simionato
Berthold Höllmann wrote: Saving the following code to a file and running the code through python does not give the expected error. disableling the @decor line leads to the expected error message. Is this a bug or an overseen feature? Others have already pointed out the mistake. I wrote a

Python 2.5 WinXP AMD64

2006-09-21 Thread Brendan
Hello, I just tried to use the Windows XP installer for Python 2.5 AMD64 but I get the error message: Installation package not supported by processor type I am running Windows XP Pro on an AMD Athon 64 Processor. Do I need to have a 64-bit OS to use this version? --

Re: Python and CORBA

2006-09-21 Thread Paul McGuire
rodmc [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thanks to everyone for their help. I had tried OmniORB and while the base library worked ok, the Python bit OmniORBpy seems to dislike working... Perhaps there is something wrong with my settings. I will also try the Python only

Re: Decorator cllass hides docstring from doctest?

2006-09-21 Thread Peter Otten
Berthold Höllmann wrote: Saving the following code to a file and running the code through python does not give the expected error. disableling the @decor line leads to the expected error message. Is this a bug or an overseen feature? Neither, I'd say. Just an unfortunate interaction between

Re: How to get ip setting, dynamic ip or static ip?

2006-09-21 Thread Duncan Booth
kode4u [EMAIL PROTECTED] wrote: How to use python get my windows box's ip setting type? Dynamic ip, or static ip? If it's static ip, what's the exact value? Here's one way: def ipinfo(interface=Local Area Connection): dhcpenabled = False staticip = None subnetmask

Tk eventloop

2006-09-21 Thread swell
Hi I try/struggle to use an ActiveX component in a Tk app. When i execute it i can catch the first event and then when i try to change the value of the w widget everything blocks and nothing is updated anymore. Does someone have an idea of what is wrong and how to smartly integrate these events

How to return an not string' error in function?

2006-09-21 Thread breakfastea
first of all I have to claim that I'm a noob so please help me don't blame me:) for example: def test(s): if type(s) != ? : return #So here I want establish a situation about that if s is not string #then return, but how should write the ? ? #Or is there any other way to do it?

Re: Python 2.5 WinXP AMD64

2006-09-21 Thread Christophe
Brendan a écrit : Hello, I just tried to use the Windows XP installer for Python 2.5 AMD64 but I get the error message: Installation package not supported by processor type I am running Windows XP Pro on an AMD Athon 64 Processor. Do I need to have a 64-bit OS to use this version? To be

Re: Changing behaviour of namespaces - solved, I think

2006-09-21 Thread Peter Otten
Mikael Olofsson wrote: Peter Otten wrote: To feed an arbitrary mapping object to execfile() you need to upgrade to Python 2.4. Thanks! As clear as possible. I will do that. FYI: I think I managed to achieve what I want in Py2.3 using the compiler module: def

Re: How to return an not string' error in function?

2006-09-21 Thread Tim Chase
def test(s): if type(s) != ? : return #So here I want establish a situation about that if s is not string #then return, but how should write the ? ? #Or is there any other way to do it? isinstance(hello, basestring) True isinstance(uhello, basestring) True This will

Re: Python 2.5 WinXP AMD64

2006-09-21 Thread Brendan
Thanks. Christophe wrote: Brendan a écrit : Hello, I just tried to use the Windows XP installer for Python 2.5 AMD64 but I get the error message: Installation package not supported by processor type I am running Windows XP Pro on an AMD Athon 64 Processor. Do I need to have a

Re: How to return an not string' error in function?

2006-09-21 Thread Jean-Paul Calderone
On Thu, 21 Sep 2006 09:26:20 -0500, Tim Chase [EMAIL PROTECTED] wrote: def test(s): if type(s) != ? : return #So here I want establish a situation about that if s is not string #then return, but how should write the ? ? #Or is there any other way to do it?

Re: How to return an not string' error in function?

2006-09-21 Thread breakfastea
Thank you so much it answers my humble question perfectly:) -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >