Re: LastWriteTime in windows registry

2007-10-02 Thread Tim Golden
Peters, Matthew J. ET3 wrote: > I'm looking for a way to read the lastwritetime property of > a windows registry key. ... I found the function in perl So what does the Perl source say? It presumably hooks some kind of Windows API. Take that and, if it isn't already exposed via pywin32

Re: Python 3.0 migration plans?

2007-10-02 Thread Alia Khouri
Couldn't agree with you more. What would be fantastic is if I could drop into the Pypi (and/or use easy_install) and download automatically compiled versions of extension modules for different versions of python. I'm sure the community at large would be happy to chip in an annual fee to help build

Re: reliable unit test logging

2007-10-02 Thread Vyacheslav Maslov
Ben Finney wrote: > Vyacheslav Maslov <[EMAIL PROTECTED]> writes: > >> I have many many many python unit test, which are used for testing >> some remote web service. > > Part of your confusion comes from the fact that "test a remote > service" isn't what a unit test does. > > A unit test is one

Re: Question about quoting style.

2007-10-02 Thread Bruno Desthuilliers
Gabriel Genellina a écrit : > En Mon, 01 Oct 2007 19:10:11 -0300, James Stroud <[EMAIL PROTECTED]> > escribi�: > >> Bruno Desthuilliers wrote: >>> First point is that Python has no "variable interpolation". >> >> If you squint, it kind of does*: >> >> >>> print '%(language)s has %(#)03d quote

Re: Question about quoting style.

2007-10-02 Thread Bruno Desthuilliers
J. Cliff Dyer a écrit : (snip) > You missed another dimension of python string types. I didn't "missed" - I choosed to skip the subject since it was not about quoting style. Not to say I necessarily made the best choice... -- http://mail.python.org/mailman/listinfo/python-list

Re: s.split() on multiple separators

2007-10-02 Thread Antoon Pardon
On 2007-10-01, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Sun, 30 Sep 2007 16:16:30 -0300, <[EMAIL PROTECTED]> escribi?: > >>> From my POV, if I want sequence from here to there, it should include >> both here and there. >> >> I do understand the consequences of making high bound exclusive,

Re: Select as dictionary...

2007-10-02 Thread Duncan Booth
Abandoned <[EMAIL PROTECTED]> wrote: > ( I don't want to use FOR and APPEND because the > query have 2 million result and i want to speed) > How many times do you plan on doing this? On my system I just timed adding 2 million elements to a dictionary: it took 0.35 seconds. Appending 2 million

Re: Tapping into the access of an int instance

2007-10-02 Thread Piet van Oostrum
> [EMAIL PROTECTED] (CM) wrote: >CM> On Sep 20, 1:21 pm, "Tor Erik Sønvisen" <[EMAIL PROTECTED]> wrote: >>> Hi, >>> >>> Does anyone know how to interrupt the lookup of an integer value? I >>> know I need to subclass int, since builtin types can't be altered >>> directly... >>> >>> Below is h

Re: s.split() on multiple separators

2007-10-02 Thread Hrvoje Niksic
Antoon Pardon <[EMAIL PROTECTED]> writes: > It may be convincing if you only consider natural numbers in > ascending order. Suppose you have the sequence a .. b and you want > the reverse. If you work with included bounds the reverse is just b > .. a. If you use the python convention, things beco

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-02 Thread Diez B. Roggisch
> Maybe a better question is, how has Tk managed to keep beating up the > newer, more modern, more featureful, better documented toolkits > encroaching on his territory? What's Tk's secret weapon? There is no secret weapon. It's a question about dependencies, maintenance, stability and supported p

Re: Overriding Logging Config FileHandler Filename

2007-10-02 Thread Peter Otten
Kenneth Love wrote: > My (probably erroneous) speculation is that I can retrieve a handler > specified in the INI file and dynamically change the filename argument > to the desired value. So far, I have been unable to figure out how to > do this. Here's a brute-force approach (tweaking the confi

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-02 Thread Paul Boddie
On 2 Okt, 04:54, bramble <[EMAIL PROTECTED]> wrote: > > Maybe the key I'm missing is this: maybe GvR and company think that a > language absolutely should come off-the-shelf with GUI toolkit > bindings. So, given that, they feel they've gotta pick just one, and > they've already got Tkinter and it

Using ImageGrab (PIL) to capture screen of remote computer

2007-10-02 Thread jorma kala
Hi, Is it possible to use ImageGrab of the Python Imaging Library to capture the screen of a remote computer? I'm running my python program on a computer that is connected directly via a ethernet crossover cable to another computer. Can I somehow get ImageGrab to grab the display of the remote co

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-02 Thread Kamen TOMOV
On Sun, Sep 30 2007, Klaus Schilling wrote: > ... > private property is unethical How I craved to read that! Viva la revolution! Ест человек - ест проблем, Нет человек - нет проблем! The End justify the means! Long live communism! -- Камен -- http://mail.python.org/mailman/listinfo/pytho

Re: reliable unit test logging

2007-10-02 Thread Ben Finney
Vyacheslav Maslov <[EMAIL PROTECTED]> writes: > I understand your opinion Hopefully you mean "explanation", not "opinion". I gave what appear to me to be facts, not opinion, about the definition of a unit test. > you are right, i use unit tests for some other kind of work. More accurately: you

Re: s.split() on multiple separators

2007-10-02 Thread Antoon Pardon
On 2007-10-02, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > Antoon Pardon <[EMAIL PROTECTED]> writes: > >> It may be convincing if you only consider natural numbers in >> ascending order. Suppose you have the sequence a .. b and you want >> the reverse. If you work with included bounds the reverse i

problem with special built-in method __contains__,

2007-10-02 Thread [EMAIL PROTECTED]
if i have a dictionary name number and i want toask the list whether a particular key already exists. >>> print number {'octal': '1234567', 'binary': '10100101', 'decimal': '1234567890', 'hexadecimal': '1-9,a-f'} i got error..after execute >>>number._contains_("test") Traceback (mos

readline() - problem

2007-10-02 Thread piotr
Hi! I'm a new user of python, and have problem. I have a plain ascii file: 11..1 12..1 11..1 I want to create a new file which contains only lines with '1' on 15th position. I've tried this: import string f=open('/test/test.asc','r') o=open('/test/ou

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-02 Thread Carsten Haese
On Tue, 2007-10-02 at 03:04 +, bramble wrote: > But Py3k is all about breaking compatibility That's a complete distortion of Python 3.0's mission. Python 3.0 breaks backwards compatibility only where there exist good reasons to do so. As Guido put it in a recent Python-3000 post, "Python 3000

Re: problem with special built-in method __contains__,

2007-10-02 Thread Paul Hankin
On Oct 2, 12:14 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > if i have a dictionary name number and i want toask the list > whether a particular key already > exists. > > >>> print number > > {'octal': '1234567', 'binary': '10100101', 'decimal': '1234567890', > 'hexadecimal': '1-9,

Re: readline() - problem

2007-10-02 Thread Paul Hankin
On Oct 2, 12:25 pm, [EMAIL PROTECTED] wrote: > Hi! > I'm a new user of python, and have problem. > I have a plain ascii file: > 11..1 > 12..1 > 11..1 > I want to create a new file which contains only lines with '1' on 15th > position. > I've tried thi

Re: readline() - problem

2007-10-02 Thread Ben Finney
[EMAIL PROTECTED] writes: > import string Why import 'string' if you're not using it? > f=open('/test/test.asc','r') > o=open('/test/out.asc','w') > for line in f: > s= f.readline() Your line object is already bound to the 'line' name in each iteration. You need to use that, not attempt to

Re: Using fractions instead of floats

2007-10-02 Thread Neil Cerutti
On 2007-10-01, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > On Oct 1, 6:26 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote: >> On 2007-10-01, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: >> >> > Finally, arithmetic would become very confusing if there were >> > three distinct numeric types; it already c

Re: readline() - problem

2007-10-02 Thread Wesley Brooks
Given a file: t.txt 1 2 1 1 3 1 ### end of file ### file = open('t.txt', 'r') for i, line in enumerate(file): print "Line:", i, "Text:", line would give the result: Line: 0 Text: 1 2 Line: 1 Text: 1 1 Line: 2 Text: 3 1 To check the third character in each line: for line in file

Re: readline() - problem

2007-10-02 Thread piotr
On 2 Pa , 13:39, Ben Finney <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] writes: > > import string > > Why import 'string' if you're not using it? > > > f=open('/test/test.asc','r') > > o=open('/test/out.asc','w') > > for line in f: > > s= f.readline() > > Your line object is already bound to

Re: problem with special built-in method __contains__,

2007-10-02 Thread J. Clifford Dyer
On Tue, Oct 02, 2007 at 11:14:38AM -, [EMAIL PROTECTED] wrote regarding problem with special built-in method __contains__,: > > if i have a dictionary name number and i want toask the list > whether a particular key already > exists. > > >>> print number > {'octal': '1234567', 'bi

file open dialog from within PythonWin

2007-10-02 Thread aine_canby
Hi, I want to open a file seach dialog from within my python script which I run from within PythonWin. I also have the wxPython package installed. How might I do this? Thanks, Aine -- http://mail.python.org/mailman/listinfo/python-list

Inheriting from int or long

2007-10-02 Thread snorble
I started creating a simple "bits" class, intended to act like a array of bits. This was my initial idea, basically just overriding the string representation to display the bitmask (so far): class bits(long): def __str__ (self): s = '' if self == 0L: s += '-'

Re: Creating a custom python python distribution

2007-10-02 Thread kyosohma
On Sep 30, 10:18 pm, shailesh <[EMAIL PROTECTED]> wrote: > Hi, > I wish to create a Python distribution includind Python and some other > libraries (Zope 3, PyWin32, numpy, lxml, etc.) which are required for > my applications. e.g. there are Enthough and ASPN distributions of > Python. > > Unfortun

Re: setuptools without unexpected downloads

2007-10-02 Thread kyosohma
On Sep 27, 10:44 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > What would it entail to do this? Using py2exe + some installer (like > > Inno Setup) to create an installer that basically copies/installs the > > files into the site-packages folder or wherever the user ch

Re: I earn $36800 a month with google adsense

2007-10-02 Thread alain
On 2 okt, 03:41, panguohua <[EMAIL PROTECTED]> wrote: > On 10 1 , 8 06 , panguohua <[EMAIL PROTECTED]> wrote: > > > On 10 1 , 1 13 , panguohua <[EMAIL PROTECTED]> wrote: > > > >www.space666.com > > > > a good website for making money with your blog.more information there > > > support!!

Re: Inheriting from int or long

2007-10-02 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > I started creating a simple "bits" class, intended to act like a array > of bits. This was my initial idea, basically just overriding the > string representation to display the bitmask (so far): > > class bits(long): > def __str__ (self): > s = '' >

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-02 Thread Kevin Walzer
bramble wrote: > > Maybe a better question is, how has Tk managed to keep beating up the > newer, more modern, more featureful, better documented toolkits > encroaching on his territory? What's Tk's secret weapon? > Wouldn't license compatability be an issue? Tk's license is BSD-style, which m

access __doc__ from within function without reference to function name

2007-10-02 Thread SanPy
The subject of this message might be a little cryptic, so here's an example of what I mean: def foo(): """doc string of foo""" print foo.__doc__ >>> foo() doc string of foo What I want to know is whether it is possible to call __doc__ against some builtin method, like __func__ or somethi

Re: file open dialog from within PythonWin

2007-10-02 Thread kyosohma
On Oct 2, 7:56 am, [EMAIL PROTECTED] wrote: > Hi, > > I want to open a file seach dialog from within my python script which > I run from within PythonWin. I also have the wxPython package > installed. > > How might I do this? > > Thanks, > > Aine Aine, I recommend downloading the wxPython Demo as

Re: file open dialog from within PythonWin

2007-10-02 Thread kyosohma
On Oct 2, 7:56 am, [EMAIL PROTECTED] wrote: > Hi, > > I want to open a file seach dialog from within my python script which > I run from within PythonWin. I also have the wxPython package > installed. > > How might I do this? > > Thanks, > > Aine Oh yeah. You might find this helpful too: http://w

random keypress bounce in a terminal

2007-10-02 Thread István
Hi all, I'm a novice in the world of Python and to begin with something useful I want to create a small tool for my microcontroller work. So I wrote a binary file compare (called bfc). It is just a few lines and put here with two sample files: http://www.evoran.hu/tmp I have found a keypress han

Re: python 2.5 and 3gb switch

2007-10-02 Thread Magnus Lycka
neil wrote: > I see python is not really there for 64 bit yet but most of the people I think you mean "Windows is not really there for 64 bit yet". Python works well on real 64 bit operating system. Blender does too I presume. -- http://mail.python.org/mailman/listinfo/python-list

Re: access __doc__ from within function without reference to function name

2007-10-02 Thread Duncan Booth
SanPy <[EMAIL PROTECTED]> wrote: > So basically, my question is: is there a way to access a function from > within itself without using its name? > Not really, no. Python is executing a code block, it has no idea which function referenced that code block. You can get the current code object qui

Re: Why doesn't Python's "robotparser" like Wikipedia's "robots.txt" file?

2007-10-02 Thread Filip Salomonsson
On 02/10/2007, John Nagle <[EMAIL PROTECTED]> wrote: > > But there's something in there now that robotparser doesn't like. > Any ideas? Wikipedia denies _all_ access for the standard urllib user agent, and when the robotparser gets a 401 or 403 response when trying to fetch robots.txt, it is equiv

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-02 Thread Terry Reedy
"bramble" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | I don't know... As I meant to imply above, it's looking like Tkinter | will be playing its expected role in Py3k as the GUI toolkit of | choice. And from what I've seen of the Py3k effort, there's been | really excellent work

Adding behaviour for managing "task" dependencies

2007-10-02 Thread m . pricejones
Hi, I'm currently writing an animation pipeline in Python which is a system for controlling the flow of work and assets for a team of people working on a computer animated film. The system will be fairly large with a database backend. One particular problem that I'd like to address is the need fo

Re: access __doc__ from within function without reference to function name

2007-10-02 Thread Tim Chase
> The subject of this message might be a little cryptic, so here's an > example of what I mean: > > def foo(): > """doc string of foo""" > print foo.__doc__ > foo() > doc string of foo > > What I want to know is whether it is possible to call __doc__ against > some builtin method, l

Re: sorteddict [was a PEP proposal, but isn't anymore!]

2007-10-02 Thread Terry Reedy
"Duncan Booth" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Subclassing doesn't have to imply a common implementation, just a common | interface. True, but in Python, subclassing is usually done to reuse implementation. Interface subclassing is usually from a common abstract ba

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-02 Thread jim-on-linux
On Monday 01 October 2007 21:04, bramble wrote: > What is the backstory to why Python includes Tk bindings, as > opposed to some other set of bindings? > > I've written a few little Tkinter-based apps, and it's nice and > simple. I like it well enough. That said though, I keep feeling the > gravita

Dictionary invalid token error

2007-10-02 Thread brad
This works: >>> area_group = {001:06, 002:04, 003:04, 006:9} This does not (one the end, 09 is used instead of 9) >>> area_group = {001:06, 002:04, 003:04, 006:09} File "", line 1 area_group = {001:06, 002:04, 003:04, 006:09} SyntaxError: invalid token Why does 09 cause an invalid tok

Re: Dictionary invalid token error

2007-10-02 Thread Tim Chase
> This works: > > >>> area_group = {001:06, 002:04, 003:04, 006:9} > > This does not (one the end, 09 is used instead of 9) > > >>> area_group = {001:06, 002:04, 003:04, 006:09} >File "", line 1 > area_group = {001:06, 002:04, 003:04, 006:09} > SyntaxError: invalid token > > Why does

Re: Dictionary invalid token error

2007-10-02 Thread Richard Brodie
"brad" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Why does 09 cause an invalid token while 9 does not? 9 isn't a valid octal digit. You probably want to use strings for storing telephone number like codes, if leading zeroes are significant. -- http://mail.python.org/mailma

Re: How popular is Django ?

2007-10-02 Thread Terry Reedy
"Thomas Guettler" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: | comp.lang.python is a usenet group. which means that it is independently hosted on newsservers around the world. It is also a mailing list hosted by python.org and a gmane group. |django-u

Re: Dictionary invalid token error

2007-10-02 Thread brad
Tim Chase wrote: > Numbers with leading zeros are parsed as octal. 8 and 9 are invalid > digits in octal. Thus, it falls over. 00 through 07 will work fine, > but 08 and 09 will go kaput. > > http://docs.python.org/ref/integers.html > > -tkc Thanks... that makes sense. I'll store them as st

Re: Why doesn't Python's "robotparser" like Wikipedia's "robots.txt" file?

2007-10-02 Thread John Nagle
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, John Nagle > wrote: > >> For some reason, Python's parser for "robots.txt" files >> doesn't like Wikipedia's "robots.txt" file: >> >> >>> import robotparser >> >>> url = 'http://wikipedia.org/robots.txt' >> >>> chk = robotparser.R

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-02 Thread Chris Mellon
On 10/1/07, bramble <[EMAIL PROTECTED]> wrote: > What is the backstory to why Python includes Tk bindings, as opposed > to some other set of bindings? > > I've written a few little Tkinter-based apps, and it's nice and > simple. I like it well enough. That said though, I keep feeling the > gravitat

Subprocesses on Windows

2007-10-02 Thread Nachiket Joshi
Hey Guys! Well before I explain my problem, let me tell you all that I am not a professional programmer and new to python too. I just write some scripts as and when required and this time it seems I am stuck somewhere in trying to create subprocesses. The problem is something like this

Re: Why doesn't Python's "robotparser" like Wikipedia's "robots.txt" file?

2007-10-02 Thread John Nagle
Filip Salomonsson wrote: > On 02/10/2007, John Nagle <[EMAIL PROTECTED]> wrote: >> But there's something in there now that robotparser doesn't like. >> Any ideas? > > Wikipedia denies _all_ access for the standard urllib user agent, and > when the robotparser gets a 401 or 403 response when trying

Re: win32com COMAdminCatalogObject Value method

2007-10-02 Thread rc
> Try objCOMAdminCatalogObject.SetValue("ID", AppID). > > Roger- Hide quoted text - > > - Show quoted text - When I try that I get exception: AttributeError: Add.SetValue I think the only valid methods are: Key(), Name(), Valid() and Value() The thing I'm most confused about is that it

Question on overriding implicit lookups

2007-10-02 Thread David Ells
In Python we have a wonderful facility for customizing attribute access by defining __getattr__ or __getattribute__ in our classes. Unfortunately (or perhaps fortunately, for reasons I don't know), this facility only works for explicit attribute access, i.e. accessing foo.bar. What I am in need of,

Re: access __doc__ from within function without reference to function name

2007-10-02 Thread Duncan Booth
Tim Chase <[EMAIL PROTECTED]> wrote: >> So basically, my question is: is there a way to access a function from >> within itself without using its name? > > > Well, I don't know if it's the best way to do it, but the > following code I just threw together does the trick for me: The original req

Re: ANN: PyPE 2.8.7

2007-10-02 Thread Josiah Carlson
On Sep 26, 12:50 am, stef <[EMAIL PROTECTED]> wrote: > thebjorn wrote: > > On Sep 25, 12:37 pm, stef <[EMAIL PROTECTED]> wrote: > > >> Josiah Carlson wrote: > > >>> === What isPyPE? === > >>>PyPE(Python Programmers' Editor) was written in order to offer a > >>> lightweight but powerful editor for t

Re: Inheriting from int or long

2007-10-02 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |I started creating a simple "bits" class, intended to act like a array | of bits. This was my initial idea, basically just overriding the | string representation to display the bitmask (so far): For this purpose, for the reason you dis

Re: I earn $36800 a month with google adsense

2007-10-02 Thread panguohua
I am only a publisher!!! really it is useful -- http://mail.python.org/mailman/listinfo/python-list

Re: random keypress bounce in a terminal

2007-10-02 Thread Bjoern Schliessmann
István wrote: > It works fine as long as I hit keys normally, but gives extra > characterts if I keep pressing some key, e.g. up or down arrow > keys. It runs on a Linux system. What's the wrong with it? Nothing. Linux VTs will generate multiple characters for special keys. Regards, Björn --

Re: I earn $36800 a month with google adsense

2007-10-02 Thread Diez B. Roggisch
> > Wow ! I have a question though. > > If you really make $38600 a month, how come you even bother to spam > us? Please, don't reply - and especially, don't reply quoting the spammer's site, so his page-rank inncreases... diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Can you please give me some advice?

2007-10-02 Thread Thorsten Kampe
* Bruno Desthuilliers (Sat, 29 Sep 2007 19:17:43 +0200) > [EMAIL PROTECTED] a écrit : > (snip) > > I know nothing of Ruby, but just the fact that in Ruby the Hello World > > program is > > > > puts 'Hello, World!' > > > > whereas the Python Hello World program is > > > > print 'Hello, World!' >

toprettyxml messes up with whitespaces

2007-10-02 Thread Jorgen Bodde
Hi all, I parse an XML file, replace a node with a new one (like updating cache) and write it back. Every write, new spaces are added. For example, first read - update - write cycle; My First App Second cycle:

Re: Using fractions instead of floats

2007-10-02 Thread Arnaud Delobelle
On Oct 2, 12:42 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote: > On 2007-10-01, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > > Scheme has prefix numeric operators, so that 1/2 is > > unambiguously (for the interpreter and the user) a litteral for > > 'the fraction 1/2'. You can't avoid the confusion

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-02 Thread Frank Goenninger
On 2007-10-01 23:37:28 +0200, Wildemar Wildenburger <[EMAIL PROTECTED]> said: > Frank Goenninger wrote: >> On 2007-09-29 01:27:04 +0200, Damien Kick <[EMAIL PROTECTED]> said: >> >>> If you were referring to the "free" in "free Mumia Abu Jamal", I would >>> agree with you. I don't think anyone

Re: access __doc__ from within function without reference to function name

2007-10-02 Thread Tim Chase
> The original request was to do it without using the function's > name, but you are depending on that name so your code is easy > enough to break. e.g. change the definition of f1 to: > >def f2(func): > "this is f1" > s = func() > print s > return s >f1 = f2 >del f

Re: Adding behaviour for managing "task" dependencies

2007-10-02 Thread Stargaming
On Tue, 02 Oct 2007 14:28:35 +, m.pricejones wrote: > Hi, > > I'm currently writing an animation pipeline in Python which is a system > for controlling the flow of work and assets for a team of people working > on a computer animated film. The system will be fairly large with a > database bac

Re: module confusion

2007-10-02 Thread Robert Kern
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Robert > Kern wrote: > >> Not all of the modules in a package are imported by importing the >> top-level package. > > You can't import packages, only modules. > >> os.path is a particularly weird case because it is just an alias to the

Re: Using fractions instead of floats

2007-10-02 Thread Neil Cerutti
On 2007-10-02, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > On Oct 2, 12:42 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote: >> On 2007-10-01, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: >> > Scheme has prefix numeric operators, so that 1/2 is >> > unambiguously (for the interpreter and the user) a lit

Air Conditioners

2007-10-02 Thread freeaircon
http://freeaircon.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Mysqldb printing sql and params no matter what I do

2007-10-02 Thread Sells, Fred
I had some code originally that printed the sql and params when I called the .execute method. I removed it but it still prints. I rebooted and renamed files and still it prints. I am totally stumped; I tried google but perhaps didn't use the right search; got a lot of hits but no clues. I'm usi

Re: Adding behaviour for managing "task" dependencies

2007-10-02 Thread m . pricejones
Stargaming: Thanks, that's given me plenty to think about. Some wise words. I guess I should appreciate that with my particular goal there aren't going to be easy solutions but I definitely don't want to dive down the wrong track if it can be avoided. Cheers, Mike -- http://mail.python.org/mail

Re: access __doc__ from within function without reference to function name

2007-10-02 Thread Duncan Booth
Tim Chase <[EMAIL PROTECTED]> wrote: > The parser also has to accomodate "raw" and "unicode" string > prefixes, as they're valid too: > >def f(x): > r"raw!" > pass > >def f(x): > u"Unicode" > pass > > > in addition. Okay...in most of these cases, the pathological

Corrupted C Runtime on app exit via Dispatch

2007-10-02 Thread rsybel
I'm new to Python, but I am trying to support a product at work. We're running under Win XP, using Python 2.4. We're using Python to run optimizations, generating a bunch of test conditions and having existing products evaluate the solutions. The programs we're running are MFC apps, built with VS

Re: Combine two dictionary...

2007-10-02 Thread George Sakkis
On Oct 1, 2:01 pm, Abandoned <[EMAIL PROTECTED]> wrote: > I want to total score.. > For example > > > > dict1={1: 4, 3: 5}... and 2 millions element > > > dict2={3: 3, 8: 6}... and 3 millions element > > result should be dict3={1:4, 3:8, 8:6} Unless you have some prior knowledge about the dicts

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-02 Thread Wildemar Wildenburger
Kamen TOMOV wrote: > On Sun, Sep 30 2007, Klaus Schilling wrote: > >> ... >> private property is unethical > > How I craved to read that! > > Viva la revolution! > > Ест человек - ест проблем, > Нет человек - нет проблем! > > The End justify the means! > > Long live communism! > ENDUT! HOC

Re: Creating a custom python python distribution

2007-10-02 Thread Wildemar Wildenburger
shailesh wrote: > Hi, > I wish to create a Python distribution includind Python and some other > libraries (Zope 3, PyWin32, numpy, lxml, etc.) which are required for > my applications. e.g. there are Enthough and ASPN distributions of > Python. > > Unfortunately, I have not been able to find the

Re: I earn $36800 a month with google adsense

2007-10-02 Thread Wildemar Wildenburger
panguohua wrote: > I am only a publisher!!! > > > really it is useful > Wow! That has got to be the first response by a spammer with some form of "meaningful" remark. I'm impressed. Dude, you, even as a spammer, can learn a lot from this group. As Diez pointed out, you will want to quote the

Re: Adding behaviour for managing "task" dependencies

2007-10-02 Thread Paddy
On Oct 2, 3:28 pm, [EMAIL PROTECTED] wrote: > Hi, > > I'm currently writing an animation pipeline in Python which is a > system for controlling the flow of work and assets for a team of > people working on a computer animated film. The system will be fairly > large with a database backend. > > One

wana watch latest hindi hot videos?

2007-10-02 Thread diprat7
wana watch latest hindi hot videos? than www.yedil.com is the site you are looking for have a nice time with www.yedil.com .Log on now -- http://mail.python.org/mailman/listinfo/python-list

Re: Question on overriding implicit lookups

2007-10-02 Thread Bruno Desthuilliers
David Ells a écrit : > In Python we have a wonderful facility for customizing attribute > access by defining __getattr__ or __getattribute__ in our classes. > Unfortunately (or perhaps fortunately, for reasons I don't know), this > facility only works for explicit attribute access, i.e. accessing >

WCCM8 & ECCOMAS 2008 - Mini-Symposium on Computational Bioimaging and Visualization - Announce & Call for Contributions

2007-10-02 Thread [EMAIL PROTECTED]
___ Mini-Symposium on Computational Bioimaging and Visualization Within the WCCM8 & ECCOMAS 2008 International Conference (http://www.iacm-eccomascongress2008.org ) Venice, Italy, 30 June - 5 July 2008 _

Re: Can you please give me some advice?

2007-10-02 Thread Bruno Desthuilliers
Thorsten Kampe a écrit : > * Bruno Desthuilliers (Sat, 29 Sep 2007 19:17:43 +0200) > >>[EMAIL PROTECTED] a écrit : >>(snip) >> >>>I know nothing of Ruby, but just the fact that in Ruby the Hello World >>>program is >>> >>>puts 'Hello, World!' >>> >>>whereas the Python Hello World program is >>> >>

Re: Creating a custom python python distribution

2007-10-02 Thread azrael
Maybe you should check the Slax distro. Go to www.slax.org. There is one special slax distro caled Frodo. I think that it includes nearly nothing but the core. There are also several packages for the distro that you can put inside the distro and create your own distribution. There are also detailed

RE: Mysqldb printing sql and params ... NEVER MIND

2007-10-02 Thread Sells, Fred
el stupido here "accidently" put a couple of print statements into a mysqldb module when eclipse opened it from the link in the stacktrace; -- http://mail.python.org/mailman/listinfo/python-list

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-02 Thread bramble
On Oct 2, 5:29 am, Paul Boddie <[EMAIL PROTECTED]> wrote: > On 2 Okt, 04:54, bramble <[EMAIL PROTECTED]> wrote: > > > Maybe the key I'm missing is this: maybe GvR and company think that a > > language absolutely should come off-the-shelf with GUI toolkit > > bindings. So, given that, they feel they

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-02 Thread bramble
On Oct 2, 7:33 am, Carsten Haese <[EMAIL PROTECTED]> wrote: > On Tue, 2007-10-02 at 03:04 +, bramble wrote: > > But Py3k is all about breaking compatibility > > That's a complete distortion of Python 3.0's mission. Python 3.0 breaks > backwards compatibility only where there exist good reasons

Re: Algebraic Modules For Python

2007-10-02 Thread Shawn Milochik
On 10/1/07, Brandon McGinty <[EMAIL PROTECTED]> wrote: > > > Hi All, > I know that there is probably a great deal of literature on this on the net, > but I don't have any time to go searching. -- > Brandon McGinty > McGinty Soft Ltd. > Website design, configuration, and maintenance > Python and

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-02 Thread James Stroud
bramble wrote: > Maybe a better question is, how has Tk managed to keep beating up the > newer, more modern, more featureful, better documented toolkits > encroaching on his territory? What's Tk's secret weapon? On the OS vendor level, it may not be beating Tkinter. OSX 10.4 comes out of the box

Re: toprettyxml messes up with whitespaces

2007-10-02 Thread kyosohma
On Oct 2, 11:43 am, "Jorgen Bodde" <[EMAIL PROTECTED]> wrote: > Hi all, > > I parse an XML file, replace a node with a new one (like updating > cache) and write it back. Every write, new spaces are added. For > example, first read - update - write cycle; > > > My First App > > > Second cycle

List Question

2007-10-02 Thread brad
How is this expressed in Python? If x is in y more than three times: print x y is a Python list. -- http://mail.python.org/mailman/listinfo/python-list

Re: Mysqldb printing sql and params ... NEVER MIND

2007-10-02 Thread Steve Holden
Sells, Fred wrote: > el stupido here "accidently" put a couple of print statements into a > mysqldb module when eclipse opened it from the link in the stacktrace; > :-) -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb

Re: List Question

2007-10-02 Thread Michael Bentley
On Oct 2, 2007, at 2:06 PM, brad wrote: > How is this expressed in Python? > > If x is in y more than three times: > print x > > y is a Python list. # Try using help -- help(list) or help(list.count) for instance... if y.count(x) > 3: print x -- http://mail.python.org/mailman/listinf

Re: List Question

2007-10-02 Thread Paul Hankin
On Oct 2, 10:06 pm, brad <[EMAIL PROTECTED]> wrote: > How is this expressed in Python? > > If x is in y more than three times: > print x > > y is a Python list. Simple and readable: if len([a for a in y if x == a]) > 3: print x Or the slightly-too-flashy version: if sum(1 for a in y if x

Re: List Question

2007-10-02 Thread Paul Hankin
On Oct 2, 10:20 pm, Paul Hankin <[EMAIL PROTECTED]> wrote: > On Oct 2, 10:06 pm, brad <[EMAIL PROTECTED]> wrote: > > > How is this expressed in Python? > > > If x is in y more than three times: > > print x > > > y is a Python list. > > Simple and readable: > if len([a for a in y if x == a]) >

Re: Using ImageGrab (PIL) to capture screen of remote computer

2007-10-02 Thread Michael Bentley
On Oct 2, 2007, at 2:33 AM, jorma kala wrote: Is it possible to use ImageGrab of the Python Imaging Library to capture the screen of a remote computer? I'm running my python program on a computer that is connected directly via a ethernet crossover cable to another computer. Can I somehow g

Re: Using fractions instead of floats

2007-10-02 Thread [EMAIL PROTECTED]
On Oct 2, 1:12 am, Robert Kern <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > On Oct 1, 8:17?pm, [EMAIL PROTECTED] wrote: > >> On Oct 1, 9:03 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > >>> On Oct 1, 7:20 pm, [EMAIL PROTECTED] wrote: > On Oct 1, 8:30 am, Nick Craig-Wood <

Re: readline() - problem

2007-10-02 Thread Wayne Brehaut
On Tue, 02 Oct 2007 12:13:21 -, [EMAIL PROTECTED] wrote: >On 2 Pa , 13:39, Ben Finney <[EMAIL PROTECTED]> >wrote: >> [EMAIL PROTECTED] writes: >> > import string >> >> Why import 'string' if you're not using it? >> >> > f=open('/test/test.asc','r') >> > o=open('/test/out.asc','w') >> > for lin

Re: List Question

2007-10-02 Thread Pablo Ziliani
Paul Hankin wrote: > On Oct 2, 10:06 pm, brad <[EMAIL PROTECTED]> wrote: > >> How is this expressed in Python? >> >> If x is in y more than three times: >> print x >> >> y is a Python list. >> > > Simple and readable: > if len([a for a in y if x == a]) > 3: > print x > > Or the sli

  1   2   >