urllib equivalent for HTTP requests

2008-10-07 Thread K
Hello everyone, I understand that urllib and urllib2 serve as really simple page request libraries. I was wondering if there is a library out there that can get the HTTP requests for a given page. Example: URL: http://www.google.com/test.html Something like: urllib.urlopen('http://www.google.com

Problem while reading an outlook in box using python.

2008-10-07 Thread venutaurus539
Hello, I was getting an error in Cocreate instance while trying to access "Outlook" using python script. The python script looks like: from win32com.client import Dispatch session = Dispatch("MAPI.session") session.Logon('OUTLOOK') # MAPI profile name inbox = session.Inbox W

Re: Python pre-release announcements

2008-10-07 Thread Ben Finney
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > > Is there some policy document or release management guide that could > > be updated for release teams to follow on this without needing to have > > this discussion every time? > > It's in PEP 101. Thank you. > If it matters to you, please submit

Re: Python pre-release announcements

2008-10-07 Thread Martin v. Löwis
> Is there some policy document or release management guide that could > be updated for release teams to follow on this without needing to have > this discussion every time? It's in PEP 101. If it matters to you, please submit a patch to that document (which is in subversion) to bugs.python.org. I

Re: Three days with some of the coolest people in ruby and rails

2008-10-07 Thread Chris Rebert
Not that I particularly have anything against Ruby or Rails, but your post isn't quite germane to this mailinglist, which is about Python, not Ruby. Though they are similar languages, your post is entirely devoid of even any reference to Python and thus is not at all relevant. Cheers, Chris -- Fo

Losing curses decorations.

2008-10-07 Thread Joe Keen
I'm working on a small curses application that opens an external editor occasionally; in the current case I'm testing its running vi. Once I exit vi and return to the curses application I lose the background color, window frames, and any text I had on the screen before I opened vi. I can still see

Re: If an OS was to be written in Python, how'w it look?

2008-10-07 Thread James Mills
On Wed, Oct 8, 2008 at 10:40 AM, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > web.archive.org contains the site history: > http://web.archive.org/web/*re_/http://www.unununium.org > Going back to Jan 2007 is enough to discover that their repository was at > http://www.unununium.org/darcs/ - and i

Three days with some of the coolest people in ruby and rails

2008-10-07 Thread hjk1127
What could be cooler than Ruby and Rails authors, experts, and hundreds of professionals that work with Ruby on a daily basis – all together in one location for great discussions and debates? That’s what will happen at the Voices That Matter: Professional Ruby Conference coming to Boston, November

Re: Reading from stdin

2008-10-07 Thread George Sakkis
On Oct 7, 8:13 pm, Luis Zarrabeitia <[EMAIL PROTECTED]> wrote: > On Tuesday 07 October 2008 05:33:18 pm George Sakkis wrote: > > > Not an answer to your actual question, but you can keep the 'for' loop > > instead of rewriting it with 'while' using the iter(function, > > sentinel) idiom: > > > for

Re: time

2008-10-07 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Gabriel Rossetti wrote: > If I look at my clock, it's 16:59 (4:59pm), if I type "date" in a > terminal, it says the same thing. Try this: date gives local time, while TZ=UTC date gives UTC time. > I'm wanting to write a simple NTP-type server/client (i

EARN 5000$TO 10000$IN EVERY MONTH

2008-10-07 Thread chinu
hai, i am srinu from india. i am sending a blog url for yours use. click on the blog and get more information to choose yours job. the blog url is: http://earnmonthlyincome.blogspot.com/ goodluck -- http://mail.python.org/mailman/listinfo/python-list

Re: Array of dict or lists or ....?

2008-10-07 Thread Gabriel Genellina
En Tue, 07 Oct 2008 23:15:54 -0300, Pat <[EMAIL PROTECTED]> escribió: Dennis Lee Bieber wrote: On Mon, 06 Oct 2008 19:45:07 -0400, Pat <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: I can't figure out how to set up a Python data structure to read in data that looks something

Re: Using subprocess module to launch a shell shell script that itself forks a process

2008-10-07 Thread Gabriel Genellina
En Tue, 07 Oct 2008 21:43:41 -0300, Samuel A. Falvo II <[EMAIL PROTECTED]> escribió: I have a shell script script.sh that launches a Java process in the background using the &-operator, like so: #!/bin/bash java ... arguments here ... & In my Python code, I want to invoke this shell script

Re: Python 2.6, GUI not working on vista?

2008-10-07 Thread Steve Holden
Lawrence D'Oliveiro wrote: [...] > Is that why Dimdows device drivers are so crap? Because they're written by > people like you, who think they know better than Microsoft? Why the hostility? Dimdows device drivers are crap because they live in a crap operating system. Which the majority of compute

Re: Python 2.6, GUI not working on vista?

2008-10-07 Thread Steve Holden
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Thorsten Kampe > wrote: > >> * Lawrence D'Oliveiro (Mon, 06 Oct 2008 23:18:10 +1300) >> >>> In message <[EMAIL PROTECTED]>, Thorsten Kampe >>> wrote: * Lawrence D'Oliveiro (Sun, 05 Oct 2008 22:13:46 +1300) > In message <[EM

Re: HARD REAL TIME PYTHON

2008-10-07 Thread Kurt Mueller
Am 08.10.2008 um 06:59 schrieb Hendrik van Rooyen: "Blubaugh, David A." wrote: I have done some additional research into the possibility of utilizing Python for hard real time development. I have seen on various websites where this has been discussed before on the internet. However, I was

Re: ssh problem using paramiko?

2008-10-07 Thread Steve Holden
sa6113 wrote: > I use this code : > > > import paramiko > import socket > > hostname = "192.168.1.4" > username = "test" > port = 22 > password = ''123456" > > # now connect > try: > sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > sock.connect((hostname, port)) > except Excep

Using subprocess module to launch a shell shell script that itself forks a process

2008-10-07 Thread Samuel A. Falvo II
I have a shell script script.sh that launches a Java process in the background using the &-operator, like so: #!/bin/bash java ... arguments here ... & In my Python code, I want to invoke this shell script using the Subprocess module. Here is my code: def resultFromRunning_(command): """I

Re: Race condition when generating .pyc files

2008-10-07 Thread Steve Holden
[EMAIL PROTECTED] wrote: > I have a large body of Python code which runs on many different (Unix) > machines concurrently. Part of the code lives in one place, but most > of it lives in directories which I find at runtime. I only have one > copy of each Python source file and I think I'm hitting

Re: If an OS was to be written in Python, how'w it look?

2008-10-07 Thread Gabriel Genellina
En Tue, 07 Oct 2008 19:30:24 -0300, James Mills <[EMAIL PROTECTED]> escribió: On Tue, Oct 7, 2008 at 4:02 PM, Gabriel Genellina <[EMAIL PROTECTED]> wrote: There was an experiment ("Unununium"), now abandoned: http://unununium.org/ Yeah does anyone have or know where one can get the source

Re: Reading from stdin

2008-10-07 Thread Luis Zarrabeitia
On Tuesday 07 October 2008 05:12:28 pm Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Luis > > Zarrabeitia wrote: > > I have a problem with this piece of code: > > > > > > import sys > > for line in sys.stdin: > > print "You said!", line > > > > > > Namely, it seems that

Re: Array of dict or lists or ....?

2008-10-07 Thread Ben Finney
George Sakkis <[EMAIL PROTECTED]> writes: > On Oct 7, 10:15 pm, Pat <[EMAIL PROTECTED]> wrote: > > I don't understand why I need a database when it should just be a > > matter of defining the data structure. > > Picking an appropriate data structure depends on the kind of > functionality you want

Re: Race condition when generating .pyc files

2008-10-07 Thread Gabriel Genellina
En Tue, 07 Oct 2008 12:21:40 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: I have a large body of Python code which runs on many different (Unix) machines concurrently. Part of the code lives in one place, but most of it lives in directories which I find at runtime. I only have one

Re: Reading from stdin

2008-10-07 Thread Luis Zarrabeitia
On Tuesday 07 October 2008 05:33:18 pm George Sakkis wrote: > Not an answer to your actual question, but you can keep the 'for' loop > instead of rewriting it with 'while' using the iter(function, > sentinel) idiom: > > for line in iter(sys.stdin.readline, ""): > print "You said!", line You're

Re: Array of dict or lists or ....?

2008-10-07 Thread George Sakkis
On Oct 7, 10:15 pm, Pat <[EMAIL PROTECTED]> wrote: > Dennis Lee Bieber wrote: > > On Mon, 06 Oct 2008 19:45:07 -0400, Pat <[EMAIL PROTECTED]> declaimed the > > following in comp.lang.python: > > >> I can't figure out how to set up a Python data structure to read in data > >> that looks something l

Re: HARD REAL TIME PYTHON

2008-10-07 Thread James Mills
On Tue, Oct 7, 2008 at 7:27 PM, Kurt Mueller <[EMAIL PROTECTED]> wrote: > To be more helpful, we should know what you mean by "HARD REAL TIME". > Do you mean: > - Handle at least 70 interrupt per second("SPEED") > - If one fails, this is catastrophic for the application ("HARD")

Re: HARD REAL TIME PYTHON

2008-10-07 Thread James Mills
On Tue, Oct 7, 2008 at 6:42 PM, <[EMAIL PROTECTED]> wrote: > AFAIK, the requirement for hard real time, is that response time have > to be predictable, rather than > generally 'fast'. > Very high level languages like python use many features which are by > their nature unpredictable or > difficult

Re: If an OS was to be written in Python, how'w it look?

2008-10-07 Thread James Mills
On Tue, Oct 7, 2008 at 4:02 PM, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > There was an experiment ("Unununium"), now abandoned: http://unununium.org/ Yeah does anyone have or know where one can get the source code and any other materials relating to Unununium ? It not only seems to be abando

Re: Python on JavaScript VM's (such as V8)?

2008-10-07 Thread Fuzzyman
On Oct 2, 1:06 pm, lkcl <[EMAIL PROTECTED]> wrote: > On Sep 3, 10:02 pm, [EMAIL PROTECTED] wrote: > > > Berco Beute: > > > > I wonder what it would take to implement Python in JavaScript so it > >  it's been done.  http://pyjamas.sf.net > That's hardly an implementation of Python in Javascript - i

Re: Python 2.6: Determining if a method is inherited

2008-10-07 Thread Fuzzyman
On Oct 7, 2:29 am, Terry Reedy <[EMAIL PROTECTED]> wrote: > Fuzzyman wrote: > > On Oct 6, 7:02 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: > >> fuzzyman wrote: > >>> Doesn't sound like a particularly *good* solution to me. :-) > >>  From what you posted, 'type object at' should work. > > > It's stil

Re: how to start thread by group?

2008-10-07 Thread Gabriel Genellina
En Tue, 07 Oct 2008 13:25:01 -0300, Terry Reedy <[EMAIL PROTECTED]> escribió: Lawrence D'Oliveiro wrote: In message <[EMAIL PROTECTED]>, Gabriel Genellina wrote: Usually it's more efficient to create all the MAX_THREADS at once, and continuously feed them with tasks to be done. Given that

Re: Python 2.6, GUI not working on vista?

2008-10-07 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Thorsten Kampe wrote: > * Lawrence D'Oliveiro (Mon, 06 Oct 2008 23:18:10 +1300) > >> In message <[EMAIL PROTECTED]>, Thorsten Kampe >> wrote: >>> >>> * Lawrence D'Oliveiro (Sun, 05 Oct 2008 22:13:46 +1300) >>> In message <[EMAIL PROTECTED]>, Michel Claveau - >>

Re: Python 2.6, GUI not working on vista?

2008-10-07 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Tim Roberts wrote: > Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: > >>In message <[EMAIL PROTECTED]>, Thorsten Kampe >>wrote: >> >>> * Lawrence D'Oliveiro (Sun, 05 Oct 2008 22:13:46 +1300) >>> In message <[EMAIL PROTECTED]>, Michel Claveau - NoSpam SVP

RE: Array of dict or lists or ....?

2008-10-07 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Pat > Sent: Tuesday, October 07, 2008 10:16 PM > To: python-list@python.org > Subject: Re: Array of dict or lists or ? > > > The Perl routine works fine and I'd like to emulate that behavi

Re: execute a function before and after any method of a parent class

2008-10-07 Thread Gabriel Genellina
En Tue, 07 Oct 2008 10:34:44 -0300, Michele Simionato <[EMAIL PROTECTED]> escribió: On Oct 3, 9:23 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: Ok, but then you have to explicitely decorate every method. To avoid this,   you may use a metaclass; this article by Michael Foord explains

Re: Reading from stdin

2008-10-07 Thread George Sakkis
Luis Zarrabeitia wrote: > I have a problem with this piece of code: > > > import sys > for line in sys.stdin: > print "You said!", line > > > Namely, it seems that the stdin buffers the input, so there is no reply until > a huge amount of text has bin written. The iterator returned by

Re: ABCs -> infix syntax for isinstance() ?

2008-10-07 Thread Bruno Desthuilliers
Boris Borcic a écrit : Bruno Desthuilliers wrote: Boris Borcic a écrit : Given the ABC innovation, maybe an infix syntax for isinstance() would be good. Possibilities : - stealing "is" away from object identity. As a motivation, true use cases for testing object identity are rare; "x is No

Re: Python pre-release announcements

2008-10-07 Thread Ben Finney
Terry Reedy <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > Can I request, in the interest of reducing confusion, that any > > announcements of pre-release versions of 2.5.3 (or any other > > Python release) be announced *without* saying “RELEASED: A > > not-really-release version of Python”.

Re: type-checking support in Python?

2008-10-07 Thread Aaron "Castironpi" Brady
On Oct 7, 3:52 pm, Erik Max Francis <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > (e.g., man-day-widgets for > questions like, "If it takes one man three days to make two widgets, how > many widgets can five men make in two weeks?"). Wouldn't that be 'widgets per man-day'? -- http://mail

Re: Reading from stdin

2008-10-07 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Luis Zarrabeitia wrote: > I have a problem with this piece of code: > > > import sys > for line in sys.stdin: > print "You said!", line > > > Namely, it seems that the stdin buffers the input, so there is no reply > until a huge amount of text has bi

Re: How do you get rid of useless warnings?

2008-10-07 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Martin Geisler wrote: > Take a look at the -W command line option to python. From the man page: > > -W argument > > The simplest form of argument is one of the following action > strings (or a unique abbreviation): ignore to ignore all warn-

Re: type-checking support in Python?

2008-10-07 Thread Erik Max Francis
[EMAIL PROTECTED] wrote: I also wrote a units package which I'm using for a project of my own (a spiking neural network simulator package called 'Brian'), released separately as a package called Piquant which you can get at sourceforge: http://sourceforge.net/projects/piquant I'm also looking

Re: Tuple parameter unpacking in 3.x

2008-10-07 Thread bearophileHUGS
Brett C.: > There are two things to realize about the tuple unpacking that acted > as motivation. One is supporting them in the compiler is a pain. > ... > Second, tuple unpacking in parameters breaks introspection horribly. Are there ways to re-implement from scratch similar native pattern- match

Demand that Obama release his college records! Where is the media?

2008-10-07 Thread Micky
Why is it important to see Obama's college records? Because the media has created fantasies around Obama on every issue. You should start dispelling them with the easiest one, i.e. the fantasy of Obama's "academic degrees and honors". Obama has been fighting desperately to block all access to his

Re: Tuple parameter unpacking in 3.x

2008-10-07 Thread Brett C.
On Oct 5, 9:13 am, Terry Reedy <[EMAIL PROTECTED]> wrote: > Martin Geisler wrote: > > Steven D'Aprano <[EMAIL PROTECTED]> writes: > >>> From reading the PEP-3113 I got the impression that the author > >>> thought that this feature was unused and didn't matter. > > And that there were good alternati

Reading from stdin

2008-10-07 Thread Luis Zarrabeitia
I have a problem with this piece of code: import sys for line in sys.stdin: print "You said!", line Namely, it seems that the stdin buffers the input, so there is no reply until a huge amount of text has bin written. The iterator returned by xreadlines has the same behavior. The

Re: [Python-Dev] Python 2.5.3: call for patches

2008-10-07 Thread Martin v. Löwis
> Just to emphasize this, "changes" means "bugfixes". (I'm mentioning this > mainly because of the people who joined for 2.6/3.0.) For more info, > see PEP6 about bugfix releases: > http://www.python.org/dev/peps/pep-0006/ Thanks for clarifying this. For the last 2.5.x release in particular, we

Re: type-checking support in Python?

2008-10-07 Thread dg . google . groups
I also wrote a units package which I'm using for a project of my own (a spiking neural network simulator package called 'Brian'), released separately as a package called Piquant which you can get at sourceforge: http://sourceforge.net/projects/piquant I'm also looking for people to help improve i

Re: print command don't work (subscripted) word[2:4]

2008-10-07 Thread Jerry Hill
On Tue, Oct 7, 2008 at 2:50 PM, <[EMAIL PROTECTED]> wrote: > Why is this not working ? > > bla = 'hondenriem' > print bla[0:4] # correct ! (= hond) > print bla[3:2] # nothing ! (= en) Why do you think the right answer is 'en'? bla[3:2] is asking for the slice starting at position 3, ending bef

Re: print command don't work (subscripted) word[2:4]

2008-10-07 Thread skip
gcmartijn> Why is this not working ? gcmartijn> bla = 'hondenriem' gcmartijn> print bla[0:4] # correct ! (= hond) gcmartijn> print bla[3:2] # nothing ! (= en) gcmartijn> print bla[6:3] # nothing ! (= riem) gcmartijn> Why don't bla[3:2] and bla[6:3] won't work ? Because

Re: print command don't work (subscripted) word[2:4]

2008-10-07 Thread Tim Chase
[EMAIL PROTECTED] wrote: Why is this not working ? bla = 'hondenriem' print bla[0:4] # correct ! (= hond) print bla[3:2] # nothing ! (= en) print bla[6:3] # nothing ! (= riem) Why don't bla[3:2] and bla[6:3] won't work ? I use this version: Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [

Re: type-checking support in Python?

2008-10-07 Thread Sebastien Binet
hi, On Oct 7, 3:24 am, Bas <[EMAIL PROTECTED]> wrote: > I have heard about some python package which overloads numbers and > calculations to include units (quick google found unum, not sure if > that is the only one). I guess that unless you are dealing with life- > critical equipment or are using

print command don't work (subscripted) word[2:4]

2008-10-07 Thread gcmartijn
Why is this not working ? bla = 'hondenriem' print bla[0:4] # correct ! (= hond) print bla[3:2] # nothing ! (= en) print bla[6:3] # nothing ! (= riem) Why don't bla[3:2] and bla[6:3] won't work ? I use this version: Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]

Re: time

2008-10-07 Thread Alan Franzoni
Gabriel Rossetti was kind enough to say: > I'm a UTC/GMT +1, I tried obtaining the UTC time, it says it's 2 hours > earlier than the current time (14:59). I tried various other methods, I > still get the wrong time. Does anyone have an idea with what is wrong? I don't see your IP since I'm read

Re: ssh problem using paramiko?

2008-10-07 Thread Johny
On Oct 7, 2:40 pm, sa6113 <[EMAIL PROTECTED]> wrote: > I use this code : > > import paramiko > import socket > > hostname = "192.168.1.4" > username = "test" > port = 22 > password = ''123456" > > # now connect > try: > sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > sock.connect

Re: Compiler, ast and forwards/backwards compatibility

2008-10-07 Thread Terry Reedy
Orestis Markou wrote: On Tue, Oct 7, 2008 at 5:39 PM, Terry Reedy <[EMAIL PROTECTED]> wrote: Orestis Markou wrote: Hello, I'm the developer of PySmell ( http://github.com/orestis/pysmell ), a static analysis/intellisense provider for Python. I am targeting Python 2.4 code so I'm using the comp

Re: How do you get rid of useless warnings?

2008-10-07 Thread Jean-Paul Calderone
On Tue, 07 Oct 2008 14:12:06 -0400, Terry Reedy <[EMAIL PROTECTED]> wrote: Peter Otten wrote: Grant Edwards wrote: I'm getting awfully tired of constant warnings about what's going to happen at some point in the future. Warnings like this: ./surfplot.py:313: Warning: 'with' will become a rese

Re: Builing Python 2.6 on AIX 5.2

2008-10-07 Thread Jesse Noller
Thanks for posting this to the tracker mattias - as soon as I can steal some time, I'll dig into it and see if I can get it teed up for the patch release. On Tue, Oct 7, 2008 at 6:24 AM, brasse <[EMAIL PROTECTED]> wrote: > On Oct 6, 10:16 am, brasse <[EMAIL PROTECTED]> wrote: >> Hello! >> >> I am

Re: Race condition when generating .pyc files

2008-10-07 Thread Terry Reedy
[EMAIL PROTECTED] wrote: If you package your apps using setup, pyc should be automatically generated. Don't know if it can apply to your problem. But surely I'd go this way (ie : automating pyc creation one way or another). Yeah, I don't package up my code, it's all integrated into my build sys

Re: How do you get rid of useless warnings?

2008-10-07 Thread Terry Reedy
Peter Otten wrote: Grant Edwards wrote: I'm getting awfully tired of constant warnings about what's going to happen at some point in the future. Warnings like this: ./surfplot.py:313: Warning: 'with' will become a reserved keyword in Python 2.6 The "with" and "as" warnings bypass the warnin

Re: Making Non Callable Objects Callable

2008-10-07 Thread exiquio
On Oct 7, 1:56 pm, Christian Heimes <[EMAIL PROTECTED]> wrote: > exiquio wrote: > > I am trying to figure out if there is a way to make an object in > > python callable, modules in particular. I wrongly assume that defining > > '__call__' in the the objects __dict__ would work. Any help would be >

Re: Making Non Callable Objects Callable

2008-10-07 Thread exiquio
On Oct 7, 1:56 pm, Christian Heimes <[EMAIL PROTECTED]> wrote: > exiquio wrote: > > I am trying to figure out if there is a way to make an object in > > python callable, modules in particular. I wrongly assume that defining > > '__call__' in the the objects __dict__ would work. Any help would be >

Re: automatically insert text in ms-word properties

2008-10-07 Thread Tim Rowe
2008/10/7 Peter Wang <[EMAIL PROTECTED]>: > "gita ziabari" <[EMAIL PROTECTED]> writes: > >> All, >> >> I wanna use python to automatically insert text in ms-word properties. >> Anyone could help me? > Why not use VBA for that work? Why use VBA? It's actually not a straight choice. VBA is pretty m

Re: Python 2.6, GUI not working on vista?

2008-10-07 Thread Mensanator
On Oct 7, 12:40 pm, Thorsten Kampe <[EMAIL PROTECTED]> wrote: > * Lawrence D'Oliveiro (Mon, 06 Oct 2008 23:18:10 +1300) > > > In message <[EMAIL PROTECTED]>, Thorsten Kampe > > wrote: > > > * Lawrence D'Oliveiro (Sun, 05 Oct 2008 22:13:46 +1300) > > > >> In message <[EMAIL PROTECTED]>, Michel Clave

Re: Making Non Callable Objects Callable

2008-10-07 Thread Christian Heimes
exiquio wrote: I am trying to figure out if there is a way to make an object in python callable, modules in particular. I wrongly assume that defining '__call__' in the the objects __dict__ would work. Any help would be appreciated. No, that doesn't work. Several magic methods (__*__) aren't lo

Re: Python 2.6, GUI not working on vista?

2008-10-07 Thread Thorsten Kampe
* Lawrence D'Oliveiro (Mon, 06 Oct 2008 23:18:10 +1300) > In message <[EMAIL PROTECTED]>, Thorsten Kampe > wrote: > > * Lawrence D'Oliveiro (Sun, 05 Oct 2008 22:13:46 +1300) > > > >> In message <[EMAIL PROTECTED]>, Michel Claveau - > >> NoSpam SVP ; merci wrote: > >> > >> > Another way is to de-ac

Re: Python pre-release announcements

2008-10-07 Thread Terry Reedy
Ben Finney wrote: "Martin v. Löwis" <[EMAIL PROTECTED]> writes: Within a few weeks, we will release Python 2.5.3. I'm glad to see this. Thank you to all involved in the ongoing work of coordinating Python releases. Can I request, in the interest of reducing confusion, that any announcements

Making Non Callable Objects Callable

2008-10-07 Thread exiquio
I am trying to figure out if there is a way to make an object in python callable, modules in particular. I wrongly assume that defining '__call__' in the the objects __dict__ would work. Any help would be appreciated. -- http://mail.python.org/mailman/listinfo/python-list

re: HARD REAL TIME PYTHON

2008-10-07 Thread Hendrik van Rooyen
"Blubaugh, David A." wrote: >I have done some additional research into the possibility of utilizing >Python for hard real time development. I have seen on various websites >where this has been discussed before on the internet. However, I was >wondering as to how successful anyone has truly be

re : do something in time interval

2008-10-07 Thread Hendrik van Rooyen
"Petr Jakeš" <[EMAIL PROTECTED]> wrote: >"Leon Zhang" <[EMAIL PROTECTED]> wrote: > >> >> I am not an expert, but why not to use time.sleep(5)? >> If you are using wxPython, you may also try wx.Timer, in which you could >> set its interval. >> >> >Thanks for your reply. >During the 5s period my sc

Re: how can we send keys to keyboard

2008-10-07 Thread mhangman
On 7 Ekim, 19:50, Jason Scheirer <[EMAIL PROTECTED]> wrote: > On Oct 7, 9:28 am, mhangman <[EMAIL PROTECTED]> wrote: > > > > > On 7 Ekim, 18:57, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > > > On Oct 7, 10:42 am, mhangman <[EMAIL PROTECTED]> wrote: > > > > > On 7 Ekim, 18:34, Mike Driscoll <[EMAIL

Re: Compiler, ast and forwards/backwards compatibility

2008-10-07 Thread Orestis Markou
On Tue, Oct 7, 2008 at 5:39 PM, Terry Reedy <[EMAIL PROTECTED]> wrote: > Orestis Markou wrote: >> >> Hello, >> >> I'm the developer of PySmell ( http://github.com/orestis/pysmell ), a >> static analysis/intellisense provider for Python. I am targeting >> Python 2.4 code so I'm using the compiler pa

Re: How do you get rid of useless warnings?

2008-10-07 Thread Peter Otten
Grant Edwards wrote: > I'm getting awfully tired of constant warnings about what's > going to happen at some point in the future. > > Warnings like this: > > ./surfplot.py:313: Warning: 'with' will become a reserved keyword in > Python 2.6 The "with" and "as" warnings bypass the warning mechani

Re: How do you get rid of useless warnings?

2008-10-07 Thread Terry Reedy
Grant Edwards wrote: /usr/lib/python2.5/site-packages/scipy/linalg/__init__.py:32: DeprecationWarning: NumpyTest will be removed in the next release; please update your code to use nose or unittest I'm also not using "the next release" of scipy, I'm using _this_ release of scipy. I've no

Re: equivalent of py2exe in other os

2008-10-07 Thread Benjamin Kaplan
On Tue, Oct 7, 2008 at 10:58 AM, Joe Strout <[EMAIL PROTECTED]> wrote: > On Oct 7, 2008, at 8:43 AM, Benjamin Kaplan wrote: > > I believe that all (or nearly all) Unix variants come with Python >> preinstalled. Ubuntu, at least, has a lot of system programs written in >> Python. Even Mac OS X req

Re: type-checking support in Python?

2008-10-07 Thread Aaron "Castironpi" Brady
On Oct 7, 5:24 am, Bas <[EMAIL PROTECTED]> wrote: > On Oct 7, 8:36 am, Lawrence D'Oliveiro <[EMAIL PROTECTED] > > central.gen.new_zealand> wrote: > > In message <[EMAIL PROTECTED]>, Gabriel > > > Genellina wrote: > > > As an example, in the oil industry here in my country there is a mix of > > > me

Re: Race condition when generating .pyc files

2008-10-07 Thread [EMAIL PROTECTED]
> If you package your apps using setup, pyc should be automatically > generated. Don't know if it can apply to your problem. But surely I'd go > this way (ie : automating pyc creation one way or another). Yeah, I don't package up my code, it's all integrated into my build system, not an actual del

Re: how can we send keys to keyboard

2008-10-07 Thread Jason Scheirer
On Oct 7, 9:28 am, mhangman <[EMAIL PROTECTED]> wrote: > On 7 Ekim, 18:57, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > > > > On Oct 7, 10:42 am, mhangman <[EMAIL PROTECTED]> wrote: > > > > On 7 Ekim, 18:34, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > > > > On Oct 7, 10:13 am, mhangman <[EMAIL PRO

Re: Race condition when generating .pyc files

2008-10-07 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : I have a large body of Python code which runs on many different (Unix) machines concurrently. Part of the code lives in one place, but most of it lives in directories which I find at runtime. I only have one copy of each Python source file and I think I'm hitting a r

Re: Race condition when generating .pyc files

2008-10-07 Thread Aaron "Castironpi" Brady
On Oct 7, 10:21 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I have a large body of Python code which runs on many different (Unix) > machines concurrently.  Part of the code lives in one place, but most > of it lives in directories which I find at runtime.  I only have one > copy of each P

Re: Array of dict or lists or ....?

2008-10-07 Thread Aaron "Castironpi" Brady
On Oct 7, 10:16 am, "Barak, Ron" <[EMAIL PROTECTED]> wrote: > Would the following be suitable data structure: > ... > struct = {} > struct["Nebraska"] = "Wabash" > struct["Nebraska"]["Wabash"] = "Newville" > struct["Nebraska"]["Wabash"]["Newville"]["topics"] = "Math" > struct["Nebraska"]["Wabash"][

Re: Compiler, ast and forwards/backwards compatibility

2008-10-07 Thread Terry Reedy
Orestis Markou wrote: Hello, I'm the developer of PySmell ( http://github.com/orestis/pysmell ), a static analysis/intellisense provider for Python. I am targeting Python 2.4 code so I'm using the compiler package. I've been toying around yesterday with the ast module in Python 2.6 and it seems

Re: automatically insert text in ms-word properties

2008-10-07 Thread Peter Wang
"gita ziabari" <[EMAIL PROTECTED]> writes: > All, > > I wanna use python to automatically insert text in ms-word properties. > Anyone could help me? Why not use VBA for that work? > > Thanks > -- > http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/pyt

Re: how can we send keys to keyboard

2008-10-07 Thread mhangman
On 7 Ekim, 18:57, Mike Driscoll <[EMAIL PROTECTED]> wrote: > On Oct 7, 10:42 am, mhangman <[EMAIL PROTECTED]> wrote: > > > > > On 7 Ekim, 18:34, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > > > On Oct 7, 10:13 am, mhangman <[EMAIL PROTECTED]> wrote: > > > > > how can we send keys to keyboard? i wan

Re: how to start thread by group?

2008-10-07 Thread Terry Reedy
Lawrence D'Oliveiro wrote: In message <[EMAIL PROTECTED]>, Gabriel Genellina wrote: Usually it's more efficient to create all the MAX_THREADS at once, and continuously feed them with tasks to be done. Given that the bottleneck is most likely to be the internet connection, I'd say the "prematu

Re: time

2008-10-07 Thread Mike Driscoll
On Oct 7, 11:11 am, "Richard Brodie" <[EMAIL PROTECTED]> wrote: > "Gabriel Rossetti" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > . > > > I'm a UTC/GMT +1, I tried obtaining the UTC time, it says it's 2 hours > > earlier than the > > current time (14:59). I tried various other

Re: how to get the thighest bit position in big integers?

2008-10-07 Thread mmgarvey
> See also http://bugs.python.org/issue3439 > where there's a proposal to expose the _PyLong_NumBits method.  This > would give an O(1) solution. > > In every case I can think of, I've wanted (0).numbits() to be 0. Here is surely the wrong place to respond to http://bugs.python.org/msg71384 but

Re: time

2008-10-07 Thread Richard Brodie
"Gabriel Rossetti" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] . > I'm a UTC/GMT +1, I tried obtaining the UTC time, it says it's 2 hours > earlier than the > current time (14:59). I tried various other methods, I still get the wrong > time. Does > anyone have an idea with wha

Re: how can we send keys to keyboard

2008-10-07 Thread Mike Driscoll
On Oct 7, 10:42 am, mhangman <[EMAIL PROTECTED]> wrote: > On 7 Ekim, 18:34, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > > > > On Oct 7, 10:13 am, mhangman <[EMAIL PROTECTED]> wrote: > > > > how can we send keys to keyboard? i want to write a script that will > > > push keyboard buttons and do what

Re: Race condition when generating .pyc files

2008-10-07 Thread Gerhard Häring
[EMAIL PROTECTED] wrote: I have a large body of Python code which runs on many different (Unix) machines concurrently. Part of the code lives in one place, but most of it lives in directories which I find at runtime. I only have one copy of each Python source file and I think I'm hitting a race

Re: time

2008-10-07 Thread Mike Driscoll
On Oct 7, 10:05 am, Gabriel Rossetti <[EMAIL PROTECTED]> wrote: > Hello everyone! > > I trying to work with time and I a bit confused... If I look at my > clock, it's 16:59 (4:59pm), if I type "date" in a terminal, it says the > same thing. I'm wanting to write a simple NTP-type server/client (it's

Re: How do you get rid of useless warnings?

2008-10-07 Thread Grant Edwards
On 2008-10-07, Martin Geisler <[EMAIL PROTECTED]> wrote: > Grant Edwards <[EMAIL PROTECTED]> writes: > >> I'm getting awfully tired of constant warnings about what's >> going to happen at some point in the future. >> >> Warnings like this: >> >> ./surfplot.py:313: Warning: 'with' will become a re

Re: how can we send keys to keyboard

2008-10-07 Thread mhangman
On 7 Ekim, 18:34, Mike Driscoll <[EMAIL PROTECTED]> wrote: > On Oct 7, 10:13 am, mhangman <[EMAIL PROTECTED]> wrote: > > > how can we send keys to keyboard? i want to write a script that will > > push keyboard buttons and do what i want. its for a macro prog. there > > are some kinds at c++ and at

Re: How do you get rid of useless warnings?

2008-10-07 Thread Martin Geisler
Grant Edwards <[EMAIL PROTECTED]> writes: > I'm getting awfully tired of constant warnings about what's > going to happen at some point in the future. > > Warnings like this: > > ./surfplot.py:313: Warning: 'with' will become a reserved keyword in > Python 2.6 > > And this: > > /usr/lib/pyth

Re: how can we send keys to keyboard

2008-10-07 Thread Mike Driscoll
On Oct 7, 10:13 am, mhangman <[EMAIL PROTECTED]> wrote: > how can we send keys to keyboard? i want to write a script that will > push keyboard buttons and do what i want. its for a macro prog. there > are some kinds at c++ and at java. for example actools prog. but i > want to this in python... > >

Re: How do you get rid of useless warnings?

2008-10-07 Thread skip
Grant> In the meantime, how do I get rid of this useless warning? I thought something like this would work: % python2.5 -W 'ignore:.*:Warning:.*:0' Python 2.5.3a0 (release25-maint:66627M, Sep 26 2008, 14:40:24) [GCC 4.2.2] on sunos5 Type "help", "copyright", "credits" or "lice

Race condition when generating .pyc files

2008-10-07 Thread [EMAIL PROTECTED]
I have a large body of Python code which runs on many different (Unix) machines concurrently. Part of the code lives in one place, but most of it lives in directories which I find at runtime. I only have one copy of each Python source file and I think I'm hitting a race condition where two hosts

RE: Array of dict or lists or ....?

2008-10-07 Thread Barak, Ron
Would the following be suitable data structure: ... struct = {} struct["Nebraska"] = "Wabash" struct["Nebraska"]["Wabash"] = "Newville" struct["Nebraska"]["Wabash"]["Newville"]["topics"] = "Math" struct["Nebraska"]["Wabash"]["Newville"]["Math"]["Max Allowed Students"] = 20 struct["Nebraska"]["Wabas

Re: gif creator

2008-10-07 Thread Peter Pearson
On Mon, 6 Oct 2008 08:18:14 -0700 (PDT), [EMAIL PROTECTED] wrote: > has anyone written a gif creator program purely in python that doesn't > require PIL or tons of other claptrap? If you would be interested in an old and simpleminded Python program for manipulating PNM files, contact me by email.

Re: Favorite Python System Administration Examples

2008-10-07 Thread Mike Driscoll
On Oct 6, 2:05 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > I'm giving a talk at LISA this year, and while the slides are ready I > would like to go armed with as many examples of good system > administration code as possible. > > If you have a favorite administration tool that you wouldn't mind m

  1   2   >