Re: Classes derived from dict and eval

2005-09-22 Thread Jeremy Sanders
On Tue, 20 Sep 2005 13:59:50 -0700, Robert Kern wrote: > globals needs to be a real dictionary. The implementation uses the C > API, it doesn't use the overridden __getitem__. The locals argument, > apparently can be some other kind of mapping. It seems that on Python 2.3 then neither globals or

Newbie regular expression and whitespace question

2005-09-22 Thread googleboy
Hi. I am trying to collapse an html table into a single line. Basically, anytime I see ">" & "<" with nothing but whitespace between them, I'd like to remove all the whitespace, including newlines. I've read the how-to and I have tried a bunch of things, but nothing seems to work for me: -- t

Small python24.dll / how to strip off asian codecs to separate package(s) ?

2005-09-22 Thread Robert
updating a py2exe'd software I was impressed by python24.dll's footprint - double size of python23.dll Is there a version without/separate asianc codecs (which seem to mainly blow up python24.dll)? Or how to build one? Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie regular expression and whitespace question

2005-09-22 Thread Bruno Desthuilliers
googleboy a écrit : > Hi. > > I am trying to collapse an html table into a single line. Basically, > anytime I see ">" & "<" with nothing but whitespace between them, I'd > like to remove all the whitespace, including newlines. I've read the > how-to and I have tried a bunch of things, but noth

Re: NTEventLogHandler not logging `info'?

2005-09-22 Thread Jaime Wyant
On 22 Sep 2005 12:23:50 -0700, Vinay Sajip <[EMAIL PROTECTED]> wrote: > Jaime Wyant wrote: > > I must be missing something. This is what I read from the documentation: > > > > When a logger is created, the level is set to NOTSET (which causes all > > messages to be processed in the root logger, or

Re: Newbie regular expression and whitespace question

2005-09-22 Thread Paul McGuire
"googleboy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi. > > I am trying to collapse an html table into a single line. Basically, > anytime I see ">" & "<" with nothing but whitespace between them, I'd > like to remove all the whitespace, including newlines. I've read the > h

Wrapping classes

2005-09-22 Thread Jeremy Sanders
Is it possible to implement some sort of "lazy" creation of objects only when the object is used, but behaving in the same way as the object? For instance: class Foo: def __init__(self, val): """This is really slow.""" self.num = val # this doesn't call Foo.__init__ yet a = lazyclass(F

Re: Newbie regular expression and whitespace question

2005-09-22 Thread Fredrik Lundh
Paul McGuire wrote: > If you're absolutely stuck on using RE's, then others will have to step > forward. Meanwhile, here's a pyparsing solution (get pyparsing at > http://pyparsing.sourceforge.net): so, let's see. using ... from pyparsing import * import re data = """ ... table example from o

Re: Wrapping classes

2005-09-22 Thread Peter Hansen
Jeremy Sanders wrote: > Is it possible to implement some sort of "lazy" creation of objects only > when the object is used, but behaving in the same way as the object? > > For instance: > > class Foo: > def __init__(self, val): > """This is really slow.""" > self.num = val > > # this d

authentication for xmlrpc via cgi

2005-09-22 Thread qhfgva
I'm using python 2.2 (hopefully we'll be upgrading our system to 2.3 soon) and I'm trying to prototype some xml-rpc via cgi functionality. If I override the Transport class on the xmlrpclib client and add some random header like "Junk", then when I have my xmlrpc server log it's environment when ru

in-memory db? gadfly?

2005-09-22 Thread chris
I'm looking for a completely in-memory sql db. I have seen gadfly, but its startup method seems to require a directory for the on-disk file storage. I have a script and I want to create a database/tables in the script, insert some data (not much), and execute some queries, all in-memory. Don't n

Re: How to show percentage

2005-09-22 Thread George Sakkis
"Sen-Lung Chen" <[EMAIL PROTECTED]> wrote: > Dear All: > I have a question of show percentage. > For example ,I want to show the percentage of 1/3 = 33.33% > > I use the 1*100/3 = 33 > it is 33 not 33.33 , how to show the 33.33 % > Thanks "%.2f%%" % (100./3.) Not quite the most readable expres

Re: win32 service and time.sleep()

2005-09-22 Thread Steve Horsley
Oracle wrote: > On Tue, 20 Sep 2005 10:49:13 -0400, rbt wrote: > >> I have a win32 service written in Python. It works well. It sends a >> report of the status of the machine via email periodically. The one >> problem I have is this... while trying to send an email, the script >> loops until a sen

Re: in-memory db? gadfly?

2005-09-22 Thread Peter Hansen
chris wrote: > I'm looking for a completely in-memory sql db. I have seen gadfly, but > its startup method seems to require a directory for the on-disk file > storage. I have a script and I want to create a database/tables in the > script, insert some data (not much), and execute some queries, al

Os.fork() replacement for windows.

2005-09-22 Thread Payton, Zack
Title: Os.fork() replacement for windows. Ok ladies and gentlemen, I'm attemtping to port a unix based app written in python over to windows.  However this app relies on the os.fork() to achieve parallelism for sending and receiving network packets.  I need to 'fork' the code to send a seri

Module import via sys.path and py2exe

2005-09-22 Thread flupke
Hi, i have a program with is built like this: startup.py dir1/__init__.py dir1/file1.py dir2/__init__.py dir2/file2.py dir3/__init__.py dir3/file3.py The program works but now i want to add the functionality into an existing program 2. This is program 2: program2.py program2dir1/__init__.py pro

[no subject]

2005-09-22 Thread Dane Ensign
Hi all, Im new to python. Please can someone suggest a url for validating user input in python reliably? upon building a small terminal app, it appears that using the raw_input function combined with try-catch for the input conversion to integer, might be a good way to go. ? I need users to e

Re: How to show percentage

2005-09-22 Thread Terry Hancock
On Thursday 22 September 2005 12:51 pm, Sen-Lung Chen wrote: > Dear All: > I have a question of show percentage. > For example ,I want to show the percentage of 1/3 = 33.33% > > I use the 1*100/3 = 33 > it is 33 not 33.33 , how to show the 33.33 % > Thanks In addition to needing a floating poi

[no subject]

2005-09-22 Thread Dane Ensign
Hi all, Im new to python. Please can someone suggest a url for reading or solution to validating user input in python reliably? upon building a small terminal app, it appears that using the raw_input function combined with try-catch for the input conversion to integer, might be a good way to go.

Re: C#3.0 and lambdas

2005-09-22 Thread Erik Wilsher
And I think the discussion that followed proved your point perfectly Fredrik. Big discussion over fairly minor things, but no "big picture". Where are the initiatives on the "big stuff" (common documentation format, improved build system, improved web modules, reworking the standard library to men

Re: authentication for xmlrpc via cgi

2005-09-22 Thread David M. Cooke
[EMAIL PROTECTED] writes: > I'm using python 2.2 (hopefully we'll be upgrading our system to 2.3 > soon) and I'm trying to prototype some xml-rpc via cgi functionality. > If I override the Transport class on the xmlrpclib client and add some > random header like "Junk", then when I have my xmlrpc

Re: Module import via sys.path and py2exe

2005-09-22 Thread flupke
flupke wrote: > Hi, > > i have a program with is built like this: > startup.py > dir1/__init__.py > dir1/file1.py > dir2/__init__.py > dir2/file2.py > dir3/__init__.py > dir3/file3.py > > The program works but now i want to add the functionality into an > existing program 2. This is program 2: >

Re: Question About Logic In Python

2005-09-22 Thread Terry Hancock
On Thursday 22 September 2005 12:26 pm, Ron Adam wrote: > Steve Holden wrote: > > Ron Adam wrote: > >> >>> True * True > >> 1 # Why not return True here as well? > >> > > Why not return 42? Why not return a picture of a banana? > > My question still stands. Could it be helpful

Re: Noobie Starting New Project

2005-09-22 Thread megafrenzy
Well, I'm not too worried about the serial communications aspect, I've developed perhaps a dozen different RS-232, 422, 485, and even SPI, CANBUS interfaces in the past year for embedded systems. And also, the Subaru protocol is easier than OBDII, no need to change the baud to 5, its fixed at 4800

subprocess.Popen and replacing the shell pipe line

2005-09-22 Thread Tom Brown
I need to chain together three linux commands and get the final output. I read the documentation for Popen in the subprocess module for replacing the shell pipe line. I followed the example and keep getting a 0 where I should be getting a 1. I am trying to do this: grep "Sep 22" /var/log/auth.

Re: C#3.0 and lambdas

2005-09-22 Thread Reinhold Birkenfeld
Erik Wilsher wrote: > And I think the discussion that followed proved your point perfectly > Fredrik. Big discussion over fairly minor things, but no "big picture". > Where are the initiatives on the "big stuff" (common documentation > format, improved build system, improved web modules, reworking

Re: strange import phenomenon

2005-09-22 Thread Christoph Zwerschke
Thank you, Dieter! Bingo. When I think about it now, it is very logical: There must be another mechanism besides sys.path, otherwise modules inside packages would not find their siblings or subpackages. But whereever the search path is explained, only sys.path was mentioned, so I took that at

Re: Threading, real or simulated?

2005-09-22 Thread Sam
Antoon Pardon writes: Assuming you mean threading.Thread, this is a native thread. It is not a simulation. Something else is going wrong. Then I must have something locked. Here's what I do: Yes you have locked the GIL. Take a look at the following URL: http://docs.python.org/api/threads

Re: C#3.0 and lambdas

2005-09-22 Thread Steven Bethard
Reinhold Birkenfeld wrote: > > This is Open Source. If you want an initiative, start one. +1 QOTW. STeVe -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess.Popen and replacing the shell pipe line

2005-09-22 Thread jepler
Probably the quoting of the argument to grep. try this instead: > p1 = Popen(['grep', 'Sep 22', '/var/log/auth.log'], stdout=PIPE) etc Jeff -- http://mail.python.org/mailman/listinfo/python-list

Re: Question About Logic In Python

2005-09-22 Thread Bengt Richter
On Thu, 22 Sep 2005 14:12:52 -0400, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > >"Steve Holden" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] >> Which is yet another reason why it makes absolutely no sense to apply >> arithmetic operations to Boolean values. > >Except for counting t

Re: Finding where to store application data portably

2005-09-22 Thread Tony Houghton
In <[EMAIL PROTECTED]>, Ron Adam <[EMAIL PROTECTED]> wrote: > Tony Houghton wrote: > >> > This works on Win XP. Not sure if it will work on Linux. >> > >> > import os >> > >> > parent = os.path.split(os.path.abspath(os.sys.argv[0]))[0] >> > file = parent + os.sep + '.bombz' >> >> Ooh, no,

Anyone else getting posts back as email undeliverable bounces?

2005-09-22 Thread Bengt Richter
It seems lately all my posts have been coming back to me as bounced emails, and I haven't emailed them ;-( I've been getting bounce messages like (excerpt): ... ___ This is the Postfix program at host deimos.liage.net. I'm sorry to have to inform you

Re: Newbie regular expression and whitespace question

2005-09-22 Thread George Sakkis
"googleboy" <[EMAIL PROTECTED]> wrote: > Hi. > > I am trying to collapse an html table into a single line. Basically, > anytime I see ">" & "<" with nothing but whitespace between them, I'd > like to remove all the whitespace, including newlines. I've read the > how-to and I have tried a bunch of

Re: The .NET Framework SDK needs to be installed before building

2005-09-22 Thread Claudio Grondi
I mean I have seen this error already in the past installing another package requiring compilation of C sources. As I can remember, the actual problem was, that C++ .NET 2003 compiler environment was not installed - so this message seems to point in the wrong direction (is created somewhere inside

Re: time challenge

2005-09-22 Thread Bengt Richter
On Thu, 22 Sep 2005 08:11:26 -0500, nephish <[EMAIL PROTECTED]> wrote: > >Hey there, >i am doing a plotting application. >i am using mxRelativeDateTimeDiff to get how much time is between >date x and date y > >now what i need to do is divide that time by 20 to get 20 even time >slots >for plotting

Re: Question About Logic In Python

2005-09-22 Thread Ron Adam
Terry Hancock wrote: > On Thursday 22 September 2005 12:26 pm, Ron Adam wrote: > >>Steve Holden wrote: >> >>>Ron Adam wrote: >>> >>> True * True 1 # Why not return True here as well? >>> >>>Why not return 42? Why not return a picture of a banana? >> >>My question st

Re: Anyone else getting posts back as email undeliverable bounces?

2005-09-22 Thread Ron Adam
Bengt Richter wrote: > It seems lately all my posts have been coming back to me as bounced emails, > and I haven't emailed them ;-( > > I've been getting bounce messages like (excerpt): > ... Yes, I get them too. Plugging http://deimos.liage.net/ into a browser get: This domain is parked

Re: Anyone else getting posts back as email undeliverable bounces?

2005-09-22 Thread James Stroud
This is an autoreply to your message. Oh wait, no its not, its really me. Yes, I am getting the same trash. I hope whoever it is at liage.net, gets tired of mail related threads like this and disables their damn autobounce. Perhaps they will check to see if they are responsible before the chime

optimizing a program that just shuffles data, a bit like cat...

2005-09-22 Thread Dan Stromberg
...but with much bigger blocksizes, and with a netcat-like ability to use sockets. The program is at http://dcs.nac.uci.edu/~strombrg/pnetcat I'm a bit concerned about the program's performance, because it actually seems to get slower sometimes with larger blocksizes, which really isn't what I'd

Re: Alternatives to Stackless Python?

2005-09-22 Thread simonwittber
> I found LGT http://lgt.berlios.de/ but it didn't seem as if the > NanoThreads module had the same capabilites as stackless. What specific capabilities of Stackless are you looking for, that are missing from NanoThreads? Sw. -- http://mail.python.org/mailman/listinfo/python-list

What is "self"?

2005-09-22 Thread Wayne Sutton
OK, I'm a newbie... I'm trying to learn Python & have had fun with it so far. But I'm having trouble following the many code examples with the object "self." Can someone explain this usage in plain english? Thanks, Wayne -- http://mail.python.org/mailman/listinfo/python-list

words relating to networks that I should probably know

2005-09-22 Thread John Walton
Hello, again. I'm back with my instant messenger project. My teacher has assigned us to write our papers, excluding the procedure, results, and conclusion. One of my topics is going to be networks. Does anyone know a list of words relating to networking/networks that I should know for this proj

Re: Newbie regular expression and whitespace question

2005-09-22 Thread googleboy
Thanks for the great positive responses. I was close with what I was trying, I guess, but close only counts in horseshoes and um.. something else that close counts in. :-) googleboy -- http://mail.python.org/mailman/listinfo/python-list

Re: Anyone else getting posts back as email undeliverable bounces?

2005-09-22 Thread Terry Reedy
"Bengt Richter" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > It seems lately all my posts have been coming back to me as bounced > emails, > and I haven't emailed them ;-( They are gatewayed to the general python email list. But bouncing list emails back to authors instead of

Re: What is "self"?

2005-09-22 Thread Sam Pointon
self is the class instance that the bound function being called belongs to. This example should illustrate a bit. class Foo(object): def __init__(self, value): self.value = value # so the Foo instance now has an attribute, value def get_value(self): return self.value # Th

Re: What is "self"?

2005-09-22 Thread marduk
On Thu, 2005-09-22 at 21:36 -0400, Wayne Sutton wrote: > OK, I'm a newbie... > I'm trying to learn Python & have had fun with it so far. But I'm having > trouble following the many code examples with the object "self." Can > someone explain this usage in plain english? "self" references the ob

Re: What is "self"?

2005-09-22 Thread Ron Adam
Wayne Sutton wrote: > OK, I'm a newbie... > I'm trying to learn Python & have had fun with it so far. But I'm having > trouble following the many code examples with the object "self." Can > someone explain this usage in plain english? > > Thanks, > Wayne I'll give it a try.. When you have

Re: What is "self"?

2005-09-22 Thread James Stroud
I'm sure there are answers to this out there, but I'm typing this one up so I can show it to people that I try to teach this language. They consistently get hung up on what self is. So here is my try: == Self is one of those python concepts that new python programmers have a little difficulty

Re: Ide RAD for linux?

2005-09-22 Thread DaveInSidney
Komodo is my multi-platform IDE. -- .. Remove NOSPAM. before replying Pursuant to U.S. code, title 47, Chapter 5, Subchapter II, Section 227 Any and all unsolicited commercial E-mail sent to this address is subject to a fee of U

Re: What is "self"?

2005-09-22 Thread Erik Max Francis
Ron Adam wrote: > When you call a method of an instance, Python translates it to... > > leader.set_name(leader, "John") It actually translates it to Person.set_name(leader, "John") -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20

Re: Anyone else getting posts back as email undeliverable bounces?

2005-09-22 Thread Ron Adam
Terry Reedy wrote: > "Bengt Richter" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>It seems lately all my posts have been coming back to me as bounced >>emails, >>and I haven't emailed them ;-( > > > They are gatewayed to the general python email list. But bouncing list

Weekly Python Patch/Bug Summary

2005-09-22 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 337 open ( -6) / 2941 closed (+14) / 3278 total ( +8) Bugs: 908 open ( +0) / 5262 closed (+17) / 6170 total (+17) RFE : 194 open ( +5) / 187 closed ( +2) / 381 total ( +7) New / Reopened Patches __ use LIST_

Re: Alternatives to Stackless Python?

2005-09-22 Thread Peter Hansen
[EMAIL PROTECTED] wrote: >>I found LGT http://lgt.berlios.de/ but it didn't seem as if the >>NanoThreads module had the same capabilites as stackless. > > What specific capabilities of Stackless are you looking for, that are > missing from NanoThreads? While I can't speak for the OP, isn't it the

Character Sequence Generation

2005-09-22 Thread Jeff Schwab
What's the best way to generate a sequence of characters in Python? I'm looking for something like this Perl code: 'a' .. 'z' . -- http://mail.python.org/mailman/listinfo/python-list

Re: Character Sequence Generation

2005-09-22 Thread [EMAIL PROTECTED]
Jeff Schwab wrote: > What's the best way to generate a sequence of characters in Python? I'm > looking for something like this Perl code: 'a' .. 'z' . >>> import string >>> print string.ascii_lowercase abcdefghijklmnopqrstuvwxyz Others: ascii_letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL

Re: Character Sequence Generation

2005-09-22 Thread Jeff Schwab
[EMAIL PROTECTED] wrote: > Jeff Schwab wrote: > >>What's the best way to generate a sequence of characters in Python? I'm >>looking for something like this Perl code: 'a' .. 'z' . > > import string > > print string.ascii_lowercase > > abcdefghijklmnopqrstuvwxyz Thanks. Is there a g

Re: Alternatives to Stackless Python?

2005-09-22 Thread D H
[EMAIL PROTECTED] wrote: > After recently getting excited about the possibilities that stackless > python has to offer > (http://harkal.sylphis3d.com/2005/08/10/multithreaded-game-scripting-with-stackless-python/) > and then discovering that the most recent version of stackless > available on stack

Sniffing Text Files

2005-09-22 Thread David Pratt
Hi. I have files that I will be importing in at least four different plain text formats, one of them being tab delimited format, a couple being token based uses pipes (but not delimited with pipes), another being xml. There will likely be others as well but the data needs to be extracted and re

Re: Character Sequence Generation

2005-09-22 Thread Pedro Werneck
On Thu, 22 Sep 2005 23:26:58 -0400 Jeff Schwab <[EMAIL PROTECTED]> wrote: > What's the best way to generate a sequence of characters in Python? > I'm looking for something like this Perl code: 'a' .. 'z' . If you want arbitrary sequences, you may use something like: >>> [chr(x) for x in xrang

Re: Character Sequence Generation

2005-09-22 Thread Devan L
Jeff Schwab wrote: > [EMAIL PROTECTED] wrote: > > Jeff Schwab wrote: > > > >>What's the best way to generate a sequence of characters in Python? I'm > >>looking for something like this Perl code: 'a' .. 'z' . > > > > > import string > > > > > print string.ascii_lowercase > > > > abcdefghi

Re: C#3.0 and lambdas

2005-09-22 Thread Erik Wilsher
Python developement is discussed, decided and usually developed within the members of python-dev. Have you seen any discussions about xml-literals in python-dev lately? -- http://mail.python.org/mailman/listinfo/python-list

Re: Sniffing Text Files

2005-09-22 Thread Mike Meyer
David Pratt <[EMAIL PROTECTED]> writes: > Hi. I have files that I will be importing in at least four different > plain text formats, one of them being tab delimited format, a couple > being token based uses pipes (but not delimited with pipes), another > being xml. There will likely be others as w

Re: Newbie regular expression and whitespace question

2005-09-22 Thread Paul McGuire
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > > timeit -s "import test" "test.test3()" > 100 loops, best of 3: 6.73 msec per loop > > > timeit -s "import test" "test.test4()" > 1 loops, best of 3: 27.8 usec per loop > > that's a 240x slowdown. hmm. > > > > W

Help on regular expression match

2005-09-22 Thread Johnny Lee
Hi, I've met a problem in match a regular expression in python. Hope any of you could help me. Here are the details: I have many tags like this: xxxhttp://xxx.xxx.xxx"; xxx>xxx xx xxxhttp://xxx.xxx.xxx"; xxx>xxx . And I want to find all the "http://xxx.xxx.

How to use a timer in Python?

2005-09-22 Thread Nico Grubert
Hi there, on a Linux machine running Python 2.3.5. I want to create a file 'newfile' in a directory '/tmp' only if there is no file 'transfer.lock' in '/temp'. A cronjob creates a file 'transfer.lock' in '/temp' directory every 15 minutes while the cronjob is doing something. This job takes aro

Re: How to use a timer in Python?

2005-09-22 Thread Sybren Stuvel
Nico Grubert enlightened us with: > How can I use a timer that waits e.g. 10 seconds if 'transfer.lock' > is present and then checks again if 'transfer.lock' is still there? Make a while loop in which you sleep. Or use the threading module if you want to go multi-threading. Sybren -- The problem

Re: How to use a timer in Python?

2005-09-22 Thread Wolfram Kraus
Nico Grubert wrote: > Hi there, > > on a Linux machine running Python 2.3.5. I want to create a file > 'newfile' in a directory '/tmp' only if there is no file 'transfer.lock' > in '/temp'. > A cronjob creates a file 'transfer.lock' in '/temp' directory every 15 > minutes while the cronjob is d

Re: words relating to networks that I should probably know

2005-09-22 Thread Alessandro Bottoni
John Walton wrote: > Hello, again. I'm back with my instant messenger > project. My teacher has assigned us to write our > papers, excluding the procedure, results, and > conclusion. One of my topics is going to be networks. > Does anyone know a list of words relating to > networking/networks

Re: Help on regular expression match

2005-09-22 Thread Fredrik Lundh
Johnny Lee wrote: > I've met a problem in match a regular expression in python. Hope > any of you could help me. Here are the details: > > I have many tags like this: > xxxhttp://xxx.xxx.xxx"; xxx>xxx > xx > xxxhttp://xxx.xxx.xxx"; xxx>xxx > . > And I want to find

Re: Character Sequence Generation

2005-09-22 Thread Peter Otten
Jeff Schwab wrote: > What's the best way to generate a sequence of characters in Python? I'm > looking for something like this Perl code: 'a' .. 'z' . >>> import re >>> def char_set(a_z, all_chars="".join(map(chr, range(256: ... return re.compile("[%s]" % a_z).findall(all_chars) ... >>>

Re: Help w/ easy python problem

2005-09-22 Thread Tomasz Lisowski
[EMAIL PROTECTED] napisał(a): > Actually, it is not a sin curve i need to plot, it is dots running down > the page in the shape of a sin curve like this > > . > . >. > etc... > Seems, like a homework to me :-) Anyway, use the following hints: math.sin() is your sine function, ranging, fr

Re: Help w/ easy python problem

2005-09-22 Thread Mikael Olofsson
[EMAIL PROTECTED] wrote: > I am very much a beginner to python. I have been working on writing a > very simple program and cannot get it and was hoping someone could help > me out. Basically i need to write a code to print a sin curve running > down the page from top to bottom. The trick is I ha

Re: plateform info.

2005-09-22 Thread Maurice LING
Mikael Olofsson wrote: > Monu Agrawal wrote: > >> Hi I want to know whether the program is being run on windows or on >> Xnix. Is there any variable or method which tells me that it's windows? > > > Will this help? > > >>> import sys > >>> sys.platform > 'win32' > > There is also the platfor

Re: Do thread die?

2005-09-22 Thread Maurice LING
Frithiof Andreas Jensen wrote: > "Maurice LING" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > >>I do have another dumb question which is OT here. Say aFunc method >>instantiates a SOAP server that serves forever, will it prevent bFunc >>from running as a separate thread? > >

Re: plateform info.

2005-09-22 Thread Maurice LING
Mikael Olofsson wrote: > Monu Agrawal wrote: > >> Hi I want to know whether the program is being run on windows or on >> Xnix. Is there any variable or method which tells me that it's windows? > > > Will this help? > > >>> import sys > >>> sys.platform > 'win32' > > There is also the platfo

RELEASED Python 2.4.2, release candidate 1

2005-09-22 Thread Anthony Baxter
On behalf of the Python development team and the Python community, I'm happy to announce the release of Python 2.4.2 (release candidate 1). Python 2.4.2 is a bug-fix release. See the release notes at the website (also available as Misc/NEWS in the source distribution) for details of the more tha

Re: Object default value

2005-09-22 Thread Bengt Richter
On 20 Sep 2005 12:31:19 -0700, "ago" <[EMAIL PROTECTED]> wrote: >Is it possible to have a default value associated python objects? I.e. >to flag an attribute in such a way that the assignment operator for the >object returns the default attribute instead of the object itself, but >calls to other o

Re: Object default value

2005-09-22 Thread Reinhold Birkenfeld
ago wrote: > Is it possible to have a default value associated python objects? I.e. > to flag an attribute in such a way that the assignment operator for the > object returns the default attribute instead of the object itself, but > calls to other object attributes are properly resolved? (I don't t

Re: Do thread die?

2005-09-22 Thread Maurice LING
Frithiof Andreas Jensen wrote: > "Maurice LING" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > >>I do have another dumb question which is OT here. Say aFunc method >>instantiates a SOAP server that serves forever, will it prevent bFunc >>from running as a separate thread? > >

COM error Access is denied

2005-09-22 Thread Fabian Skivee
Hello, I try to make web testing using Pamie and it use win32com to call Internet Explorer. A access denied COM_error occurs and I don't know how to solve it. I'm administrator of my workstation and I install myself Pyton and win32com Any idea ?   File "D:\pyatf\Browser.py", line 32, in do

python image library TIFF

2005-09-22 Thread bryan rasmussen
Hi does anyone have any experience using the Python Image library to determine if a Tiff is in the G4 or G3 codec? -- http://mail.python.org/mailman/listinfo/python-list

Re: Question About Logic In Python

2005-09-22 Thread Steve Holden
Ron Adam wrote: > Steven D'Aprano wrote: > > >>>So.. >>> >>> bool(a and b) * value >>> >>>Would return value or zero, which is usually what I want when I do this >>>type of expression. > > >>That's all very interesting, and valuable advice for somebody who doesn't >>understand how Python's l

Re: python image library TIFF

2005-09-22 Thread Michele Petrazzo
bryan rasmussen wrote: > Hi > does anyone have any experience using the Python Image library to > determine if a Tiff is in the G4 or G3 codec? PIL don't support G3/G4 encoding. You can use freeimagepy that is another python graphic package. Michele (freeimagepy developer :) ) -- http://mail.p

Re: wxPython Notebook crash when pressing alt key

2005-09-22 Thread Steve Holden
Kreedz wrote: > Did it freeze for you too with the alt+f while focus on the tab? > No, the program appears to work perfectly normally. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.holdenweb.com PyCon TX 2006

Re: Noobie Starting New Project

2005-09-22 Thread Rubinho
Having looked in these sorts of areas before and having a general interest in it, I'd like to make some suggestions. I wouldn't go an implement OBD-II yourself in Python, especially not in a serial port. There are in fact (at least) 4 different OBD-II protocols that I won't rattle off the names o

Re: best solution to for loop

2005-09-22 Thread Dan
> Hi, I have several apps which connect to a database, fetch some data > an put this into a gtk.TreeStore, but if the result set is 1500 row > long, the app response slowly The first thing to test is whether it's Python or the database that's the bottleneck. 1500 rows isn't all that much for a da

Re: python image library TIFF

2005-09-22 Thread pantagruel
Thanks! I hadn't known about FreeImage either so double thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Help w/ easy python problem

2005-09-22 Thread bruno modulix
[EMAIL PROTECTED] wrote: > I am very much a beginner to python. I have been working on writing a > very simple program and cannot get it and was hoping someone could help > me out. Basically i need to write a code to print a sin curve running > down the page from top to bottom. The trick is I ha

Re: Finding where to store application data portably

2005-09-22 Thread Steven D'Aprano
On Thu, 22 Sep 2005 02:14:57 +, Ron Adam wrote: >>>Don't all file managers have an option to hide files beginning with '.'? >> >> >> I don't want to hide them. I just don't want them in my face when I open >> my home directory. > > +1 > > This has been a gripe of mine on windows as well, a

Re: Chronological Processing of Files

2005-09-22 Thread yoda
Just to clarify: Newest== modified last The processing\sorting should apply to all the files found recursively during the entire walk. That being said, thanks for all the responses. I'll test the code shortly and get back to everyone. ps. This is why comp.lang.python is truly the greatest list

Re: Finding where to store application data portably

2005-09-22 Thread Tony Houghton
Ron Adam wrote: > Tony Houghton wrote: > >> >> I'm using pygame to write a game called Bombz which needs to save some >> data in a directory associated with it. In Unix/Linux I'd probably use >> "~/.bombz", in Windows something like >> "C:\Documents And Settings\\Applicacation Data\Bombz".

Re: Looking for system/network monitoring tool written in Python

2005-09-22 Thread Eddie Corns
Mike Meyer <[EMAIL PROTECTED]> writes: >I've found a fair number of systems/network monitoring tools (things >like Big Brother, Big Sister, cricket, etc.) written in Perl. Depressing isn't it! >I'm curious if there are any written in Python. I couldn't find any after extensive searching. I was

Re: Looking for system/network monitoring tool written in Python

2005-09-22 Thread Simon Brunning
On 9/22/05, Mike Meyer <[EMAIL PROTECTED]> wrote: > I've found a fair number of systems/network monitoring tools (things > like Big Brother, Big Sister, cricket, etc.) written in Perl. I'm > curious if there are any written in Python. There's EDDIE - . I've never used it my

Re: Finding where to store application data portably

2005-09-22 Thread Steve Holden
Ron Adam wrote: > Tony Houghton wrote: > >>I'm using pygame to write a game called Bombz which needs to save some >>data in a directory associated with it. In Unix/Linux I'd probably use >>"~/.bombz", in Windows something like >>"C:\Documents And Settings\\Applicacation Data\Bombz". >> >>There are

Re: Finding where to store application data portably

2005-09-22 Thread rbt
On Tue, 2005-09-20 at 23:03 +0100, Tony Houghton wrote: > I'm using pygame to write a game called Bombz which needs to save some > data in a directory associated with it. In Unix/Linux I'd probably use > "~/.bombz", in Windows something like > "C:\Documents And Settings\\Applicacation Data\Bombz".

idle

2005-09-22 Thread TK
Hi, is there no IDLE in Python2.4? o-o Thomas -- http://mail.python.org/mailman/listinfo/python-list

How to use writelines to append new lines to an existing file

2005-09-22 Thread Nico Grubert
Hi there, I would like to open an existing file that contains some lines of text in order to append a new line at the end of the content. My first try was: >>> f = open('/tmp/myfile', 'w') #create new file for writing >>> f.writelines('123') #write first line >>> f.close() >>> f

Re: Brute force sudoku cracker

2005-09-22 Thread Antoon Pardon
Op 2005-09-21, Tom Anderson schreef <[EMAIL PROTECTED]>: > On Mon, 19 Sep 2005, Antoon Pardon wrote: > >> Op 2005-09-17, Tom Anderson schreef <[EMAIL PROTECTED]>: >>> On Fri, 16 Sep 2005, Bas wrote: >>> -any ideas how to easily incorporate advanced solving strategies? solve(problem1) and

Re: How to use writelines to append new lines to an existing file

2005-09-22 Thread Grigoris Tsolakidis
Use file = open(open('/tmp/myfile', 'a')) the second time when you want to append line "Nico Grubert" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi there, > > I would like to open an existing file that contains some lines of text in > order to append a new line at the end of t

  1   2   >