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

ANNOUNCE: nautilus-python 0.4.1

2005-09-22 Thread Johan Dahlin
I am pleased to announce the first public release of nautilus-python. The new release is available from ftp.gnome.org: http://ftp.gnome.org/pub/GNOME/sources/nautilus-python/0.4/nautilus-python-0.4.1.tar.gz What's new since 0.4.1: * Memory leaks plugged (Gustavo) * Do not install examples

Upcoming Python talk in Toronto

2005-09-22 Thread George Belotsky
Seneca College is Canada's largest, with over 100,000 students and more than 260 programs. On October 24, 2005, Seneca will be hosting their 4th annual Free Software and Open Source Symposium in Toronto, Ontario. Here is a link to the agenda. http://cs.senecac.on.ca/soss/2005/agenda.php I

Re: Help w/ easy python problem

2005-09-22 Thread r2_r2
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... -- http://mail.python.org/mailman/listinfo/python-list

Re: Help w/ easy python problem

2005-09-22 Thread r2_r2
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... -- http://mail.python.org/mailman/listinfo/python-list

Re: Python win32com com_error: (-2147418113

2005-09-22 Thread Roger Upole
Usually this means the COM object has to run in a full ActiveX container. You can host it in IE, or Pythonwin can act as a container with some effort. See \pythonwin\pywin\Demos\ocx for some examples of using OCX objects that require a container. Roger g.franzkowiak [EMAIL PROTECTED]

Re: Intermediate to expert book

2005-09-22 Thread Tonguc Yumruk
Tony Houghton [EMAIL PROTECTED] writes: Can anyone recommend a good book for intermediate up to expert level? ... 2.4 would be a bonus. I've heard good things about Dive Into Python. I see it can be downloaded or read online, and on a very quick browse it seems to be suitably to the point

Re: Free seminar on domain-specific modeling

2005-09-22 Thread Martijn Iseger
Hello Michael, The alternate point is that during computing history, many, many, many promises were made for many, many, many, technologies based on the same principle of raising the abstraction level. Many, many, many of those technologies promised much and failed to deliver on their claims

Re: Code to read Cobol data files

2005-09-22 Thread Al Christians
none wrote: Hi, Any one know of some code to read cobol data files thanks timb I posted some here maybe 5+ years ago that would convert COBOL comp-3, comp-4, and comp-5 fields (as from Realia) to whatever. I suppose you can still find it in google somewhere. There was some help for

Re: PyEphem on winXP

2005-09-22 Thread vincent wehren
[EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] | Hi, | | I'm a (sort of) newbie to python and would like to install the PyEphem | extension to Python. I'm using Python 2.4 | I obtained PyEphem from: | http://rhodesmill.org/brandon/projects/pyephem.html | | When i ran python

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, from -1.0

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 have

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 platform module, that can

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? If the SOAP

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 platform module, that can

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

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 object

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

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? If the SOAP

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 logical operators work, but

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 :) ) --

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

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

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 have

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, and hiding

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\user\Applicacation Data\Bombz. There

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 wasn't

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 - http://eddie-tool.net/. I've never used it myself,

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\user\Applicacation Data\Bombz. There are plenty of

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\user\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 solve(problem2) give

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 the

Re: C#3.0 and lambdas

2005-09-22 Thread Christophe
Steven Bethard a écrit : Steven D'Aprano wrote: I would love to see your test code and profiling results that demonstrate that explicit tuple unpacking in the body of a function is faster than tuple unpacking (implicit or explicit) in the header of a function. Should be pretty close. I

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

2005-09-22 Thread David Wilson
See http://pynms.sourceforge.net/ Also see Google. :) David. -- http://mail.python.org/mailman/listinfo/python-list

need to divide a date

2005-09-22 Thread nephish
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 on a graph. For example, if the difference between them is 20 hours, i need 20

Re: Calling python scripts from C# programs

2005-09-22 Thread David Wilson
You should also be aware of IronPython, although it is not suitable for production use due to its reliance on a beta version of the .NET runtime. In some future time, IronPython will probably be the cleanest and simplest way to integrate Python with existing .NET code. http://www.ironpython.com/

time challenge

2005-09-22 Thread nephish
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 on a graph. For example, if the difference between them is 20 hours, i need 20

Re: unusual exponential formatting puzzle

2005-09-22 Thread Neal Becker
Paul Rubin wrote: Neal Becker [EMAIL PROTECTED] writes: Like a puzzle? I need to interface python output to some strange old program. It wants to see numbers formatted as: e.g.: 0.23456789E01 Yeah, that was normal with FORTRAN. My solution is to print to a string with the '% 16.9E'

How to tell if an exception has been caught ( from inside the exception )?

2005-09-22 Thread Paul Dale
Hi everyone, I'm writing an exception that will open a trouble ticket for certain events. Things like network failure. I thought I would like to have it only open a ticket if the exception is not caught. Is there a way to do this inside the Exception? As far as I can see there are only two

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

2005-09-22 Thread Tom Brown
On Thursday 22 September 2005 05:52, Nico Grubert wrote: Does f = open('/tmp/myfile', 'w') overwrite the existing file or does f.writelines('456') replace the first line in the existing file? Here's an excerpt from open.__doc__ The mode can be 'r', 'w' or 'a' for reading (default),

Re: How to tell if an exception has been caught ( from inside the exception )?

2005-09-22 Thread Dan
If the exception isn't caught, it is printed to standard error. This means that either __str__ or __repr__ is called (to convert it to a displayable string). If the exception is caught, those methods *probably* won't be called. -- Where you are is not as important as where you are going.

Re: Perl's documentation come of age

2005-09-22 Thread Mabden
Måns Rullgård [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] This guy deserves two ascii trolls: ___ /| /| | | ||__|| | Please do |

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

2005-09-22 Thread Max Erickson
Nico Grubert [EMAIL PROTECTED] wrote in 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 the content. My first try was: f = open('/tmp/myfile', 'w') #create new file for writing

Convert from unicode to int

2005-09-22 Thread Tor Erik S�nvisen
Hi Is there any simpler way to convert a unicode numeric to an int than: int(u'1024'.encode('ascii')) ?? regards tores -- http://mail.python.org/mailman/listinfo/python-list

re.split() problem

2005-09-22 Thread Masayuki Takemura
Hi all. re.split() doesn't work as I intend. My Python Version is 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32. For example, r = re.compile('^$', re.MULTILINE) r.split('foo\nbar\n\nbaz') ['foo\nbar\n\nbaz'] but I expected ['foo\nbar\n', 'baz']. This problem has

Re: How to tell if an exception has been caught ( from inside theexception )?

2005-09-22 Thread Fredrik Lundh
Paul Dale wrote: I'm writing an exception that will open a trouble ticket for certain events. Things like network failure. I thought I would like to have it only open a ticket if the exception is not caught. Is there a way to do this inside the Exception? As far as I can see there are only

Open PDF

2005-09-22 Thread Jorge Ramirez
Hello, I would like to know how to open a PDF document from a python script, any suggestions are appreciated. Thanks, JR -- http://mail.python.org/mailman/listinfo/python-list

Re: Threading, real or simulated?

2005-09-22 Thread Antoon Pardon
Op 2005-09-22, Sam schreef [EMAIL PROTECTED]: Jp Calderone writes: On Wed, 21 Sep 2005 18:23:33 -0500, Sam [EMAIL PROTECTED] wrote: I'm using Python 2.3.5 with pygtk 2.4.1, and I'm using the second threading approach from pygtk's FAQ 20.6 - invoking gtk.gdk.threads_init(), and wrapping all

Re: Convert from unicode to int

2005-09-22 Thread Max M
Tor Erik Sønvisen wrote: Hi Is there any simpler way to convert a unicode numeric to an int than: int(u'1024'.encode('ascii')) why doesn't: int(u'104') work for you? -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science --

Re: Convert from unicode to int

2005-09-22 Thread Grant Edwards
On 2005-09-22, Tor Erik Sønvisen [EMAIL PROTECTED] wrote: Hi Is there any simpler way to convert a unicode numeric to an int than: int(u'1024'.encode('ascii')) int(u'1024') 1024 Didn't that work for you when you tried it? -- Grant Edwards grante Yow! FIRST,

Stampare su stampante aghi

2005-09-22 Thread lux
Salve a tutti, sono alle prese con delle stampe su stampanti ad aghi... Per stampare puro testo la soluzione più gettonata sembra essere f = open(LPT1:) f.write(bla bla) f.close() devo dire che funziona benissimo, ma mi piacerebbe essere slegato falla parallela (sempre meno frequente) e inviare

Re: plateform info.

2005-09-22 Thread Mike Meyer
Maurice LING [EMAIL PROTECTED] writes: Is there a way of getting the path to the site-packages directory? import sys import os for dir in sys.path: ... if os.path.split(dir)[-1] == 'site-packages': ... print dir ... /usr/opt/lib/python2.4/site-packages But there's seldom a reason

NTEventLogHandler not logging `info'?

2005-09-22 Thread Jaime Wyant
This code doesn't seem to do what I think it should do: # python 2.3.2 # not sure of my win32 extensions version import logging from logging.handlers import NTEventLogHandler logger = logging.getLogger(testlogger) handler = NTEventLogHandler(testlogger) logger.addHandler(handler)

Re: Open PDF

2005-09-22 Thread Dan
I would like to know how to open a PDF document from a python script You mean open it and display it to the user? Under Windows you may be able to get away with just executing the file (as though it were an executable): import os os.system(c:/path/to/file.pdf) Under Linux you can probably

Re: How to tell if an exception has been caught ( from inside the exception )?

2005-09-22 Thread Rocco Moretti
Paul Dale wrote: Hi everyone, I'm writing an exception that will open a trouble ticket for certain events. Things like network failure. I thought I would like to have it only open a ticket if the exception is not caught. Is there a way to do this inside the Exception? As far as I can

Re: need to divide a date

2005-09-22 Thread Steve Holden
[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 on a graph. For example, if the difference

Re: Finding where to store application data portably

2005-09-22 Thread Mike Meyer
rbt [EMAIL PROTECTED] writes: 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

Re: idle

2005-09-22 Thread Franz Steinhaeusler
On Thu, 22 Sep 2005 14:31:22 +0200, TK [EMAIL PROTECTED] wrote: Hi, is there no IDLE in Python2.4? o-o Thomas Sure, on Windows: C:\Python24\Lib\idlelib\idle.pyw You should have a shortcuts in your StartMenu und Python 2.4 -- Franz Steinhaeusler --

Need help:Unable to make runnable Python on AIX 4.3.3

2005-09-22 Thread mkent
I have a vexing problem and seek some input on how to fix it. Starting with Python 2.4.0, I have been unable to compile a working Python on our AIX 4.3.3 development system. I can compile a working Python 2.3.x with no problem. The failure symptom is that Python 2.4.x fails its unit tests on

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

2005-09-22 Thread Mike Meyer
David Wilson [EMAIL PROTECTED] writes: See http://pynms.sourceforge.net/ Thanks for the pointer. And to Simon Brunning for the pointer to Eddie. Also see Google. :) While everything may be in Google, it's not always obvious how to get it out. I've managed to extract a score of systems from

Re: re.split() problem

2005-09-22 Thread Fredrik Lundh
Masayuki Takemura wrot: re.split() doesn't work as I intend. it works as it's supposed to work. empty matches are not considered to be valid split points, partially because it doesn't really make sense to split on nothing in most cases, but mostly because doing so will, most likely, result in

Simultaneous Adobe Reader

2005-09-22 Thread Jorge Ramirez
Hello, From windows, using a python script how can I open Adobe Reader without displaying a PDF document? Furthermore, using a script is it possible torun two Adobe Reader sessions simulatneously. Thanks in advance. Kind Regards, JR -- http://mail.python.org/mailman/listinfo/python-list

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

2005-09-22 Thread Eddie Corns
Simon Brunning [EMAIL PROTECTED] writes: 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 -

Re: Finding where to store application data portably

2005-09-22 Thread en.karpachov
On Thu, 22 Sep 2005 00:23:56 +1000 Steven D'Aprano wrote: I wish the Linux Standard Base folks would specify that settings files should all go into a subdirectory like ~/settings rather than filling up the home directory with cruft. That was acceptable in the days when people only looked at

Re: NTEventLogHandler not logging `info'?

2005-09-22 Thread Vinay Sajip
Jaime Wyant wrote: This code doesn't seem to do what I think it should do: # python 2.3.2 # not sure of my win32 extensions version import logging from logging.handlers import NTEventLogHandler logger = logging.getLogger(testlogger) handler = NTEventLogHandler(testlogger)

Re: Perl's documentation come of age

2005-09-22 Thread Mike
Steve Holden [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Jim Hugunin's keynote speech at this year's PyCon was accompanied by a projection if his interactive interpreter session, and I know I wasn't alone in finding this a convincing example of Microsoft's (well, Jim's,

Re: Open PDF

2005-09-22 Thread Mike Meyer
Dan [EMAIL PROTECTED] writes: Under Linux you can probably use xpdf or gpdf: os.system(xpdf /path/to/file.pdf) Note that you should check the return code of system to see if the execution was successful. For example, the user might not have xpdf installed. This is the problem that the

Python installation root directory problem

2005-09-22 Thread Matt Leslie
Hi, I am trying to install python 2.4.1 on a windows XP machine. Whether I choose to install 'for me' or 'for all users, and no matter where I select as the root directory, the installer always puts the python root in C:\, which is obviously a bit messy. I am running this instalaltion as a

Re: Calling python scripts from C# programs

2005-09-22 Thread Paul
Another option is to implement the needed python code in COM server and call that from C#. A simple example of python COM server can be seen about halfway down the page here http://www.oreilly.com/catalog/pythonwin32/chapter/ch12.html -- http://mail.python.org/mailman/listinfo/python-list

Re: NTEventLogHandler not logging `info'?

2005-09-22 Thread Jaime Wyant
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 delegation to the parent in non-root loggers). :/ Thanks! jw On 22 Sep 2005 08:21:48 -0700, Vinay

Re: NTEventLogHandler not logging `info'?

2005-09-22 Thread Jaime Wyant
BTW - you're suggestion worked. Thanks again! jw On 9/22/05, Jaime Wyant [EMAIL PROTECTED] 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: Calling python scripts from C# programs

2005-09-22 Thread Brett Hoerner
David Wilson wrote: http://www.ironpython.com/ It should be noted that they (?) don't seem to update that site anymore, you can find 0.9.1 here: http://workspaces.gotdotnet.com/ironpython There is also Boo, which is Python-like (with some differences) but is a .NET Language itself. I never

Indexed variables

2005-09-22 Thread python-novice
Hello, being an almost complete Python AND programming neophyte I would like to ask the following - very elementary, as I might suspect - question: How do I do the following flawed things right: a1=a2=0 def f(x): if x == a1: a1 = a1 + 1 elif x == a2: a2 = a2 + 1 Now

Re: wxPython Notebook crash when pressing alt key

2005-09-22 Thread Graham Fawcett
Kreedz wrote: Could Windows version have anything to do with this?? Else I've got some really weird issue... I'm on Windows 2000 Professional Yes, that definitely counts as a wierd issue. wink I couldn't reproduce the bug either. C:\temppython ActivePython 2.4.1 Build 247 (ActiveState

Re: Indexed variables

2005-09-22 Thread Laszlo Zsolt Nagy
a1=a2=0 def f(x): if x == a1: a1 = a1 + 1 elif x == a2: a2 = a2 + 1 Now if I call f with f(a2) only a1, of course, is incremented because the if-clause does only check for the value of the input and the values of a1 and a2 are identical. So how do I define the function

Re: Indexed variables

2005-09-22 Thread Rocco Moretti
[EMAIL PROTECTED] wrote: So how do I define the function such as to discrimate wheter I call it by f(a1) or f(a2) ? I don't want to sound rude, but I think you'll be better served by telling us why you would want to do such a thing - ten to one someone can suggest a better way to acomplish

Re: Indexed variables

2005-09-22 Thread Tom Anderson
On Thu, 22 Sep 2005 [EMAIL PROTECTED] wrote: How do I do the following flawed things right: Well, that depends on what you mean by 'right'. I'm going to give you two solutions; one that answers your apparent question, and one that addresses what i suspect is your true question. a1=a2=0

Re: Indexed variables

2005-09-22 Thread Laszlo Zsolt Nagy
If you really want to change an actual parameter inside an object, then inside a function, I mean -- http://mail.python.org/mailman/listinfo/python-list

Re: Question About Logic In Python

2005-09-22 Thread Ron Adam
Steve Holden wrote: Ron Adam wrote: 2. Expressions that will be used in a calculation or another expression. By which you appear to mean expressions in which Boolean values are used as numbers. Or compared to other types, which is common. This matters because if you aren't

Re: Writing a parser the right way?

2005-09-22 Thread beza1e1
Thanks for the hints. I just found NLTK and MontyLingua. And yes, it is just adventure game language. This means every tense except present tense is discarded as not changing world. Furthermore the parser will make a lot of assumptions, which are perhaps 90% right, not perfect: if word[-2:] ==

Re: Finding where to store application data portably

2005-09-22 Thread Ron Adam
Steve Holden wrote: 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\user\Applicacation

Re: Python installation root directory problem

2005-09-22 Thread Matt Leslie
Further diggingappears to show this is an instance of the problem documented here: http://tinyurl.com/82dt2 Running msiexec with logging revealed the following lines: MSI (s) (48:F8) [18:15:47:990]: Ignoring disallowed property X MSI (s) (48:F8) [18:15:47:990]: Ignoring disallowed property

Linux/Python - SQL*Server Connexion chain

2005-09-22 Thread Gilles Lenfant
Hi, Have you guys any good experience on connecting a Python (Zope) app running on Linux to a Windoze SQL*Server ? Many thanks by advance to report your success, failure, pitfalls (...) and used products. Even reports using commercial solutions are welcome. -- Gilles --

Re: time challenge

2005-09-22 Thread Scott David Daniels
nephish wrote: i am doing a plotting application If its 40 minutes, i need 20 plots that are 2 minutes apart. what would be a way i could pull this off? thanks Sounds like homework related to another assignment discussed above. Write your code, try to get it to work, and _then_ if you

Re: Threading, real or simulated?

2005-09-22 Thread Peter Hansen
Antoon Pardon wrote: Op 2005-09-22, Sam schreef [EMAIL PROTECTED]: What's the GIL?. The general interpretor lock. In general changing python internals That should be global (and, more pedantically, interpreter). -- http://mail.python.org/mailman/listinfo/python-list

How to show percentage

2005-09-22 Thread Sen-Lung Chen
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 -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing a parser the right way?

2005-09-22 Thread Steven Bethard
beza1e1 wrote: Verbs are the tricky part i think. There is no way to recognice them. So i will have to get a database ... work to do. ;) Try the Brill tagger[1] or MXPOST[2]. STeVe [1] http://www.cs.jhu.edu/~brill/code.html [2] ftp://ftp.cis.upenn.edu/pub/adwait/jmx/jmx.tar.gz --

Re: Perl's documentation come of age

2005-09-22 Thread Fredrik Lundh
Mike wrote: Jim Hugunin's keynote speech at this year's PyCon was accompanied by a projection if his interactive interpreter session, and I know I wasn't alone in finding this a convincing example of Microsoft's (well, Jim's, really) full integration of Python into the .net framework.

Re: Linux/Python - SQL*Server Connexion chain

2005-09-22 Thread Benji York
Gilles Lenfant wrote: Have you guys any good experience on connecting a Python (Zope) app running on Linux to a Windoze SQL*Server ? Yep. I wrote bindings to ODBTP (http://odbtp.sourceforge.net/) using ctypes. It worked really well, good performance and quite reliable. You can see an alpha

Re: Finding where to store application data portably

2005-09-22 Thread Ron Adam
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, I don't want saved data to go in the installation directory. In general that

Re: Question About Logic In Python

2005-09-22 Thread Terry Reedy
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 the number of true values. This and other legitimate uses of False/True as 0/1 (indexing,

Re: How to show percentage

2005-09-22 Thread [EMAIL PROTECTED]
Traditionally, one part of the expression has to be a float for the result to be a float (this is a holdover from C). So 100/3.0 will give you the result you want. Alternatively, you can put from __future__ import division at the top of your script, and then 100/3 will return a float.

Re: How to show percentage

2005-09-22 Thread Bill Mill
You need to convert 1 or 3 to a float. How about: def pct(num, den): return (float(num)/den) * 100 ... pct(1, 3) 33.329 Peace Bill Mill bill.mill at gmail.com On 22 Sep 2005 10:51:43 -0700, Sen-Lung Chen [EMAIL PROTECTED] wrote: Dear All: I have a question of show percentage.

  1   2   >