Announce: Linux Desktop Testing Project (LDTP) 1.6.0 released

2009-05-11 Thread Nagappan A
Greetings all, We are proud to announce the release of LDTP 1.6.0. This release features number of important breakthroughs in LDTP as well as in the field of Test Automation. This release note covers a brief introduction on LDTP followed by the list of new features and major bug fixes which

Announce: Linux Desktop Testing Project (LDTP) 1.6.0 released

2009-05-11 Thread Nagappan A
[reposted in plaintext by a...@pythoncraft.com] Greetings all, We are proud to announce the release of LDTP 1.6.0. This release features number of important breakthroughs in LDTP as well as in the field of Test Automation. This release note covers a brief introduction on LDTP followed by the

Switchover: mail.python.org

2009-05-11 Thread Aahz
On Monday 2009-05-11, mail.python.org will be switched to another machine starting roughly at 14:00 UTC. This should be invisible (expected downtime is less than ten minutes). -- Aahz (a...@pythoncraft.com) * http://www.pythoncraft.com/ It is easier to optimize correct code

Re: Learning C++ for Python Development

2009-05-11 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 joshua.pea...@gmail.com wrote: Or, just give me some general advice on learning C++ for Python? You may want to start with Cython first. It lets you intersperse C and C level information with Python code to produce extensions. That will give you a

Re: OT (humor): 'import antigravity' in action!

2009-05-11 Thread Lawrence D'Oliveiro
In message mailman.5354.1241924166.11746.python-l...@python.org, Shawn Milochik wrote: I know you've probably all seen this 50 times, but just in case: http://xkcd.com/353/ Ironically, that's no longer valid in Python 3.0. -- http://mail.python.org/mailman/listinfo/python-list

Re: OT (humor): 'import antigravity' in action!

2009-05-11 Thread Chris Rebert
On Sun, May 10, 2009 at 11:58 PM, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message mailman.5354.1241924166.11746.python-l...@python.org, Shawn Milochik wrote: I know you've probably all seen this 50 times, but just in case: http://xkcd.com/353/ Ironically, that's no

Re: How do I test the integrity of a Python installation in Debian and Ubuntu

2009-05-11 Thread Lawrence D'Oliveiro
In message mailman.5282.1241783298.11746.python-l...@python.org, Geoff Gardiner wrote: How do I assure myself of the integrity of a Python installation acquired using apt-get install on Debian and Ubuntu? apt-get install debsums man debsums --

HTTP HEAD and docxmlrpcserver

2009-05-11 Thread Christopher Mahan
I have a docxmlrpcserver install (kissws.com) that's returning HTTP code 501 when the client makes a HEAD request. Any idea as to whether that's by design? Thanks in advance. Chris Mahan chris.ma...@gmail.com gv (818) 671-1709 -- http://mail.python.org/mailman/listinfo/python-list

Re: I'm intrigued that Python has some functional constructions in the language.

2009-05-11 Thread namekuseijin
On May 10, 7:18 pm, Carl Banks pavlovevide...@gmail.com wrote: On May 10, 12:40 pm, namekuseijin namekuseijin.nos...@gmail.com wrote: theoretical argument like, everything reduces to a function so it doesn't matter what syntax you use, yet people in the real world are out there trying to find

Re: Learning C++ for Python Development

2009-05-11 Thread Nick Craig-Wood
joshua.pea...@gmail.com joshua.pea...@gmail.com wrote: I am a recovering C# web developer who has recently picked up Django and I'm loving it. I would eventually like to get a job as a Django/Python developer. It seems that many Python jobs require that you also be a C++ developer.

Compiling Python on Windows : how to deal with modules ?

2009-05-11 Thread r2d3
Hi Pythoners, I am using Python embedded in my application (OSX,Windows) and I need to distribute Python as part of my application. On OSX, no problem, I got a self contained framework (with dynamic library and all the modules). On Windows, I manage to compile Python 2.6.2 with

Re: Learning C++ for Python Development

2009-05-11 Thread Gerhard Häring
joshua.pea...@gmail.com wrote: I am a recovering C# web developer who has recently picked up Django and I'm loving it. I would eventually like to get a job as a Django/Python developer. It seems that many Python jobs require that you also be a C++ developer. I've seen the C++/Python

cx_freeze - cannot get importer instance

2009-05-11 Thread w.p.
Hello! My application is frozen with cx_freeze. Everything is ok, but on one PC with Windows 2003 64bit i got cx_freeze fatal error cannot get importer instance. I don't use zipimport in my python code and i don't know why i get this error :/ Any idea? How test this error? w.p. --

Re: Q's on my first python script

2009-05-11 Thread Nick Craig-Wood
kj so...@987jk.com.invalid wrote: Below is my very firs python script. This was just a learning exercise; the script doesn't do anything terribly exciting: for an argument of the form YYMMDD (year, month, day) it prints out the corresponding string YYMMDDW, where W is a one-letter

Re: how GNU stow is complementary rather than alternative to distutils

2009-05-11 Thread Nick Craig-Wood
Zooko Wilcox-O'Hearn zo...@zooko.com wrote: On May 10, 2009, at 11:18 AM, Martin v. Löwis wrote: If GNU stow solves all your problems, why do you want to use easy_install in the first place? That's a good question. The answer is that there are two separate jobs: building

Re: Wrapping comments

2009-05-11 Thread Nick Craig-Wood
Rhodri James rho...@wildebst.demon.co.uk wrote: On Sun, 10 May 2009 08:32:23 +0100, Tobias Weber t...@gmx.net wrote: In article m2bpq2ngup@googlemail.com, Arnaud Delobelle arno...@googlemail.com wrote: A simple Alt-Q will reformat everything nicely. Now that's something.

Re: Code - what could be done better?

2009-05-11 Thread Bruno Desthuilliers
Florian Wollenschein a écrit : Hi all, here's the main code of thc, my txt to html converter. Since I'm a beginner it is far, far, faaar away from perfect or even good :-) What could be done better? (snip code) 1/ decouple the text = html conversion part from your (or any other) GUI

Germany will provide project-specific aid to pakistan

2009-05-11 Thread smattehulah
Germany will provide project-specific aid to the tune of 115 million euro to Pakistan for next two years. for more details visit www.empiresnews.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Tutorial or example use for python-graph library

2009-05-11 Thread Paul Moore
On May 8, 4:03 pm, Scott David Daniels scott.dani...@acm.org wrote: Paul Moore wrote: I have just discovered the python-graph library. I've been interested in graph algorithms for a long time, so I'd like to give this a try. But there seems to be very little in the way of examples, or

Re: Tutorial or example use for python-graph library

2009-05-11 Thread Paul Moore
On May 8, 3:19 pm, (e.g. emre) emregu...@gmail.com wrote: you might want to check networkx as well, it is considerably well documented:http://networkx.lanl.gov/ Interesting, I hadn't seen that before. I'll certainly check it out! Thanks, Paul --

Re: Importing from a module which contains more than one Class...

2009-05-11 Thread GKalman
alex23 wrote: GKalman kalma...@msn.com wrote: from MyClass import * from MyOtherClass import *     # error msg: no such module! As I mentioned above,  the code for MyClass MyOtherClass is in the same file . This program only works with a single Class in a file. That is when the File

Re: unicode bit me

2009-05-11 Thread anuraguni...@yahoo.com
On May 11, 10:47 am, Terry Reedy tjre...@udel.edu wrote: anuraguni...@yahoo.com wrote: so unicode(obj) calls __unicode__ on that object It will look for the existence of type(ob).__unicode__ ...   and if it isn't there __repr__ is used According to the below, type(ob).__str__ is tried

Re: [Python-Dev] how GNU stow is complementary rather than alternative to distutils

2009-05-11 Thread Giuseppe Ottaviano
Talking of stow, I take advantage of this thread to do some shameless advertising :) Recently I uploaded to PyPI a software of mine, BPT [1], which does the same symlinking trick of stow, but it is written in Python (and with a simple api) and, more importantly, it allows with another trick

Re: Decorating methods - where do my arguments go?

2009-05-11 Thread Michele Simionato
On May 8, 5:33 pm, Mikael Olofsson mik...@isy.liu.se wrote:   class test_decorator(object): ...     def __init__(self,func): ...         self._func = func ...     def __call__(self, *args): ...         print 'Decorator:', args ...         self._func(*args) Or you could use the decorator

Re: Why there is a parameter named self for classmethod function?

2009-05-11 Thread Bruno Desthuilliers
Terry Reedy a écrit : Kurt Symanzik wrote: But you might consider decorating the method as a static method instead since in your example you are not using the parameter at all. A static method would not require a parameter. @staticmethod def print_hello(): print hello Functions

Skipping unit tests

2009-05-11 Thread Ulrich Eckhardt
Hi! We have a few tests for some module here. These tests are under development and applied to older versions (with less features) of the module, too. That means that if I have module version 42, tests A and B can not possibly work. I don't want to have test failures but I also don't want to fork

win32 How to make sure a file is completely written?

2009-05-11 Thread justind
Hello, I'm using http://code.activestate.com/recipes/156178/ to watch a folder in windows. It's working perfectly, but sometimes when I try to open the file immediately after receiving the event, it's not ready to be opened--if I try to open it with PIL I get IOError: cannot identify image file

Re: win32 How to make sure a file is completely written?

2009-05-11 Thread ma
You have to wait until IO is ready. In Unix, we accomplish this with fcntl and the default signal SIGIO, I am not sure how you would do this in Windows. On Mon, May 11, 2009 at 9:51 AM, justind justin.don...@gmail.com wrote: Hello, I'm using http://code.activestate.com/recipes/156178/ to

Re: win32 How to make sure a file is completely written?

2009-05-11 Thread Tim Golden
justind wrote: Hello, I'm using http://code.activestate.com/recipes/156178/ to watch a folder in windows. Wow, that takes me back. There's a bit more info (and a different technique) here if you're interested: http://timgolden.me.uk/python/win32_how_do_i/watch_directory_for_changes.html

Re: Decorating methods - where do my arguments go?

2009-05-11 Thread Mikael Olofsson
Peter Otten wrote: You have to turn your decorator into a descriptor by providing a __get__() method. A primitive example: class test_decorator(object): def __init__(self,func): self._func = func def __call__(self, *args): print 'Decorator:', args

Re: Decorating methods - where do my arguments go?

2009-05-11 Thread Mikael Olofsson
George Sakkis wrote: Yes, just return an actual function from the decorator instead of a callable object: def test_decorator2(func): def wrapper(*args): print 'Decorator2:', args func(*args) return wrapper class cls(object): @test_decorator def

Re: win32 How to make sure a file is completely written?

2009-05-11 Thread justind
On May 11, 10:03 am, Tim Golden m...@timgolden.me.uk wrote: justind wrote: Hello, I'm usinghttp://code.activestate.com/recipes/156178/to watch a folder in windows. Wow, that takes me back. There's a bit more info (and a different technique) here if you're interested:  

Re: mod_python and xml.dom.minidom

2009-05-11 Thread dpapathanasiou
His problem is therefore likely to be something completely different. You are correct. As per the earlier advice, I switched from mod_python to mod_wsgi but I still see the same error: [Mon May 11 10:30:21 2009] [notice] Apache/2.2.11 (Unix) mod_wsgi/2.4 Python/2.5.2 configured -- resuming

Can I get a value's name

2009-05-11 Thread jalanb3
Context for this question arises from some recent code. In particular the replace_line method, which takes in a regexp to look for, and a replacement for when it matches. It is supposed to work for single lines only (we add ^ and $ to the regexp), so arguments which have '\n' in them are not

Re: [Python-Dev] .pth files are evil

2009-05-11 Thread P.J. Eby
At 04:42 PM 5/9/2009 +0200, Martin v. Löwis wrote: If you always use --single-version-externally-managed with easy_install, it will stop editing .pth files on installation. It's --multi-version (-m) that does that. --single-version-externally-managed is a setup.py install option. Both

Re: Complete frustration

2009-05-11 Thread norseman
hellcats wrote: I have Python2.5 installed on Windows XP. Whenever I double click on a something.pyw file, IDLE launches and opens something.pyw in the editor. I would prefer to actually *RUN* the program, not edit it. If I want to edit it then I'll choose the Edit with IDLE context menu. So I

Re: Wrapping comments

2009-05-11 Thread norseman
Tobias Weber wrote: Hi, the guideline (PEP 8) is hard wrap to 7x characters. The reason given is that soft wrap makes code illegible. So what if you hard wrap code but let comments and docstrings soft-wrap? Otherwise it's hugely annoying to edit them. Say you remove the first three words of

Re: unicode bit me

2009-05-11 Thread norseman
Steven D'Aprano wrote: On Fri, 08 May 2009 14:22:32 -0400, Terry Reedy wrote: Scott David Daniels wrote: rantIt would be a bit easier if people would bother to mention their Python version, as we regularly get questions from people running 2.3, 2.4, 2.5, 2.6, 2.7a, 3.0, and 3.1b. They run

Re: stand alone exec

2009-05-11 Thread Pascal Chambon
Hello It sounds indeed like a runtime library problem... You should run a dependancy finder (like dependency walker - http://www.dependencywalker.com/) on your executable, and thus see what might be lacking on other systems. I know that on *nix systems there are tools to see more precisely

Re: Decorating methods - where do my arguments go?

2009-05-11 Thread Duncan Booth
Mikael Olofsson mik...@isy.liu.se wrote: George Sakkis decorator function solution seems to work equally well for functions and methods. However, I prefer the cleaner encapsulation given by a class. Based on those observations, I think I will use the following approach: class

Re: What's the use of the else in try/except/else?

2009-05-11 Thread kj
In w_adny5q3jzyxjrxnz2dnuvz_u2dn...@pdx.net Scott David Daniels scott.dani...@acm.org writes: kj wrote: ... I can't come with an example in which the same couldn't be accomplished with try: # do something # do something else except ...: # handle exception The only

Re: How do I test the integrity of a Python installation in Debian and Ubuntu

2009-05-11 Thread Aahz
In article mailman.5375.1241962005.11746.python-l...@python.org, Geoff Gardiner ggardi...@iee.org wrote: Aahz wrote: What directory are you running this from? What happens if you switch to running python Lib/test/regrtest.py? Taking a closer look, this looks more like a plain import error.

Re: OOP Abstract Classes

2009-05-11 Thread Mike Driscoll
On May 11, 9:53 am, Adam Gaskins agaskins...@kelleramerica.com wrote: Hi all, -- Non critical info-- I am a fairly seasoned PHP developer (don't shoot, I'm changing teams!:) who is admittedly behind the curve with OOP. Like most who learned PHP, I started doing web app backend stuff, but I

Re: OOP Abstract Classes

2009-05-11 Thread Ulrich Eckhardt
Adam Gaskins wrote: Long story short, I'm tired of doing things in such a hackish manner and want to write applications that are cross platform (I'd like to get our production dept on linux eventually) and truely object oriented. Adam, there is one notion here that I seriously dislike: you

Re: mod_python and xml.dom.minidom

2009-05-11 Thread dpapathanasiou
For the record, and in case anyone else runs into this particular problem, here's how resolved it. My original xml_utils.py was written this way: from xml.dom import minidom def parse_item_attribute (item, attribute_name): item_doc = minidom.parseString(item) ... That version worked

Re: OOP Abstract Classes

2009-05-11 Thread Marco Mariani
Mike Driscoll wrote: I've never used (or heard of) the Abstract type...and the guy who wrote the FAQ was being a jerk. Who, Peter Norvig? (from wikipedia) Peter Norvig is an American computer scientist. He is currently the Director of Research (formerly Director of Search Quality) at

Re: Decorating methods - where do my arguments go?

2009-05-11 Thread Mikael Olofsson
Duncan Booth wrote: The __get__ method should be returning a new object, NOT modifying the state of the decorator. As written it will break badly and unexpectedly in a variety of situations: [snip good examples of things going bad] Ouch! So, does that mean that George's solution based on a

Re: How to debug this import problem?

2009-05-11 Thread Iwan
Mmm, we solved half of the cause of this one. Test runs are kicked off via setuptools's test command. But this happens programmatically, and successively in one process. But setuptools's test command clears all modules imported during a test run from sys.modules - hence it is intended that

Writing text to a Word Document

2009-05-11 Thread gazathome
Hi everyone, I am trying to write several attributes from a database table and using the code below I can write the values however it is only overwriting on the first line. I am new to the win32com bit and I would like to know what is the recommended reference to loop down the page and add

Re: list comprehension question

2009-05-11 Thread J Kenneth King
Steven D'Aprano st...@remove-this-cybersource.com.au writes: On Thu, 07 May 2009 13:28:10 -0400, J Kenneth King wrote: Steven D'Aprano ste...@remove.this.cybersource.com.au writes: On Wed, 06 May 2009 09:48:51 -0400, J Kenneth King wrote: Emile van Sebille em...@fenx.com writes: On

Re: Decorating methods - where do my arguments go?

2009-05-11 Thread Peter Otten
Mikael Olofsson wrote: Duncan Booth wrote: The __get__ method should be returning a new object, NOT modifying the state of the decorator. As written it will break badly and unexpectedly in a variety of situations: [snip good examples of things going bad] Ouch! So, does that mean that

Re: OOP Abstract Classes

2009-05-11 Thread Adam Gaskins
Any idea why I didn't see this reply on my ng? I only see the reply from Marco. Can't help but wonder if there is more that is not getting through here. Would someone mind forwarding me any other replies? FWIW I'm using news.east.cox.net. Thanks, -Adam Mike Driscoll wrote: I've never used

Re: Can I get a value's name

2009-05-11 Thread Scott David Daniels
jalanb3 wrote: ... Given a variable name I can use locals() to get the value Is there a way to do it the other way round Given the value, can I get the variable name ? (1) Yes you can in some cases. (2) You should not, things do not inherently have a name. With that prelude:

sqlite single transaction without foreign key or triggers

2009-05-11 Thread gert
I am trying to do this in a single transaction, the 3 separate statements work fine, but i am screwed if they are not executed together. ### db.execute('BEGIN') # db.execute('UPDATE users SET uid=? WHERE uid=?',(v['uid'],s.UID)) db.execute('UPDATE sessions SET uid=? WHERE

creating classes with mix-ins

2009-05-11 Thread samwyse
I'm writing a class that derives it's functionality from mix-ins. Here's the code: def boilerplate(what): # This used to be a decorator, but all of the ##what = f.__name__ # function bodies turned out to be 'pass'. 'Validate the user, then call the appropriate plug-in.'

Re: Can I get a value's name

2009-05-11 Thread John O'Hagan
On Mon, 11 May 2009, jalanb3 wrote: [...] def replace_line(pattern,replacement): errors = '\n' in pattern and [ 'pattern' ] or [] errors += '\n' in replacement and [ 'replacement' ] or [] values = [ locals()[e] for e in errors ] # etc, etc, and eventually: print

Re: OOP Abstract Classes

2009-05-11 Thread Nick Craig-Wood
Adam Gaskins agaskins...@kelleramerica.com wrote: I am a fairly seasoned PHP developer (don't shoot, I'm changing teams!:) who is admittedly behind the curve with OOP. Like most who learned PHP, I started doing web app backend stuff, but I have moved to full blown windows apps in the

Re: Wrapping comments

2009-05-11 Thread MRAB
norseman wrote: Tobias Weber wrote: Hi, the guideline (PEP 8) is hard wrap to 7x characters. The reason given is that soft wrap makes code illegible. So what if you hard wrap code but let comments and docstrings soft-wrap? Otherwise it's hugely annoying to edit them. Say you remove the

Re: OOP Abstract Classes

2009-05-11 Thread Peter Otten
Adam Gaskins wrote: So I was beginning to learn OOP for PHP, and it seemed to me that abstract classes were just right for my application. In my application I must communicate with several peices of test equipment that communicate via RS-232. Most use SCPI instructions, some do not and

Re: Wrapping comments

2009-05-11 Thread Simon Brunning
2009/5/10 Tobias Weber t...@gmx.net: (still not gonna use software that doesn't let me type # because it's alt+3 on a UK layout; having to re-learn or configure that is just sick) To use Aquamacs with a UK keyboard, you want to select Options, Option Key, Meta British. Things just work then.

Using Pygame with Python

2009-05-11 Thread cripplemeal
Hi. I would just like to know which of the versions of python and pygame would be best to download for use together. I am a windows xp user. -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing text to a Word Document

2009-05-11 Thread Mike Driscoll
On May 11, 11:27 am, gazath...@gmail.com wrote: Hi everyone, I am trying to write several attributes from a database table and using the code below I can write the values however it is only overwriting on the first line. I am new to the win32com bit and I would like to know what is the

Re: Using Pygame with Python

2009-05-11 Thread Mike Driscoll
On May 11, 2:54 pm, cripplem...@gmail.com wrote: Hi. I would just like to know which of the versions of python and pygame would be best to download for use together. I am a windows xp user. Look at the pygame website to see what the newest version of Python it supports and go with that unless

how to consume .NET webservice

2009-05-11 Thread bav
question from a python newbie; how can i consume in python language, a .NET web service, passing a string array as parameter in some easy steps? best regards -- http://mail.python.org/mailman/listinfo/python-list

Re: how to consume .NET webservice

2009-05-11 Thread namekuseijin
bav escreveu: question from a python newbie; how can i consume in python language, a .NET web service, passing a string array as parameter in some easy steps? Unless Microsoft extended the standard in any way, then it should be just as you consume any web service, I guess. ;) -- a game

Re: how to consume .NET webservice

2009-05-11 Thread Mike Driscoll
On May 11, 3:09 pm, bav baudewijn.verme...@skynet.be wrote: question from a python newbie;   how can i consume in python language, a .NET web service, passing   a string array as parameter in some easy steps? best regards You're being pretty vague here. Try using Google first...I got plenty

Re: OOP Abstract Classes

2009-05-11 Thread Adam Gaskins
Wow, thanks Nick! This is just what I was looking for! Thanks to Peter as well. And as for your suggestion that I probably shouldn't mess with things I don't understand and learn the basics first... well, that is probably sound advice, but I figured out years ago that I learn things best by a)

Fill Javascript form

2009-05-11 Thread Matteo
Hi everybody, I have to fill a web form to authenticate and connect to the internet. I thought it would have been easy to make a script to do that automatically on startup. Unfortunately, it turned out that the form is written in JavaScript, and urllib2 therefore fails to even fetch the form.

How to replace constructor with factory method

2009-05-11 Thread rogeeff
Hi, Just wonder if it's possible in Python. what I want is to tweak an existing Python class A with no constructor, so that A() results in fuctory method call? so o = A() instead being equivalent to: s = object() A.__init__(s) o = s becomes: o = my_factory_function( A ) Thanks, Gennadiy --

issue with twisted and reactor. Can't stop reactor

2009-05-11 Thread Gabriel
Hello all!, I'm trying to implement a simple one way communication using twisted. Sender: send message close connection Receiver: receive do something wait for other message I'm testing with this simple examples: Sender: [code] class SenderClient(protocol.Protocol): def

Your Favorite Python Book

2009-05-11 Thread Sam Tregar
Greetings. I'm working on learning Python and I'm looking for good books to read. I'm almost done with Dive into Python and I liked it a lot. I found Programming Python a little dry the last time I looked at it, but I'm more motivated now so I might return to it. What's your favorite? Why?

Re: Your Favorite Python Book

2009-05-11 Thread Shawn Milochik
It depends on what you want to do. If you still want to beef up on general knowledge, maybe skim through The Python Cookbook or something reference-like. If you feel ready to start doing something with Python, look into one of the recent titles that applies Python for a specific purpose.

Re: Fill Javascript form

2009-05-11 Thread Shawn Milochik
How is the form written in JavaScript? Is it dynamically generated? In any case, can you just send a POST request if you know the values required? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to replace constructor with factory method

2009-05-11 Thread Chris Rebert
On Mon, May 11, 2009 at 1:39 PM, roge...@gmail.com wrote: Hi, Just wonder if it's possible in Python. what I want is to tweak an existing Python class A with no constructor, so that A() results in fuctory method call? so o = A() instead being equivalent to: s = object() A.__init__(s)

Re: sqlite single transaction without foreign key or triggers

2009-05-11 Thread Rob Williscroft
gert wrote in news:d7591495-4661-4243-ad7e-f142d8244e88 @e24g2000vbe.googlegroups.com in comp.lang.python: I am trying to do this in a single transaction, the 3 separate statements work fine, but i am screwed if they are not executed together. Well you're in luck, Python DBAPI 2 connections

[silly] Re: issue with twisted and reactor. Can't stop reactor

2009-05-11 Thread Tim Harig
On 2009-05-11, Gabriel gabr...@opensuse.org wrote: Subject: issue with twisted and reactor. Can't stop reactor Not having written anything using twisted I cannot help you much with your code; but, I cannot resist commenting about your subject line: I suspect that if are having an issue with

Re: How do I test the integrity of a Python installation in Debian and Ubuntu

2009-05-11 Thread Geoff Gardiner
Aahz wrote: ... That seems to demonstrate that regrtest.py is indeed a good mechanism for finding out whether it's a b0rked install! I agree that regrtest.py looks a good mechanism. It just appears that `apt-get install python` on Debian and Ubuntu brings no tests with it. @Lawrence

Re: Nimrod programming language

2009-05-11 Thread rumpf_a
On 10 Mai, 07:36, k...@fiber-space.de wrote: On 8 Mai, 17:48, Andreas Rumpf rump...@web.de wrote: Dear Python-users, I invented a new programming language called Nimrod that combines Python's readability with C's performance. Please check it out:http://force7.de/nimrod/ Any feedback

Re: creating classes with mix-ins

2009-05-11 Thread samwyse
On May 11, 1:16 pm, samwyse samw...@gmail.com wrote: I'm writing a class that derives it's functionality from mix-ins. While waiting, I gave a try at using class decorators. Here's what I came up with: def add_methods(*m_list, **kwds): def wrapper(klass): for m_name in m_list:

Re: Your Favorite Python Book

2009-05-11 Thread Chris Rebert
On Mon, May 11, 2009 at 1:44 PM, Sam Tregar s...@tregar.com wrote: Greetings.  I'm working on learning Python and I'm looking for good books to read.  I'm almost done with Dive into Python and I liked it a lot. I found Programming Python a little dry the last time I looked at it, but I'm more

Re: How to replace constructor with factory method

2009-05-11 Thread Luis Zarrabeitia
On Monday 11 May 2009 04:39:41 pm roge...@gmail.com wrote: so o = A() instead being equivalent to: s = object() A.__init__(s) o = s Actually, it would be more like this: s = A.__new__(A) if isinstance(s,A): A.__init__(s) o = s o = my_factory_function( A ) You could tweak: *) A's

Re: Nimrod programming language

2009-05-11 Thread rumpf_a
On 10 Mai, 10:40, Paul Rubin http://phr...@nospam.invalid wrote: Andreas Rumpf rump...@web.de writes: I invented a new programming language called Nimrod that combines Python's readability with C's performance. Please check it out: http://force7.de/nimrod/Any feedback is appreciated. Looks

Re: There may be a much better way to manage artillery.

2009-05-11 Thread Tobiah
On Mon, 11 May 2009 00:48:25 +0100, Rhodri James wrote: On Mon, 11 May 2009 00:06:34 +0100, Tobiah t...@tobiah.org wrote: [Snippety snip] I wanted the bullets to be responsible for destroying themselves, but a little Googling brought me to points about dangling references and how an

Re: Your Favorite Python Book

2009-05-11 Thread python
Sam, In no specific order (I brought them all): Wesley Chun's Core Python Programming David Mertz's Text Processing in Python (older, but excellent) Mark Lutz's Learning Python All highly recommended. Best of luck on your Python journey! Regards, Malcolm --

Re: issue with twisted and reactor. Can't stop reactor

2009-05-11 Thread Jean-Paul Calderone
On Mon, 11 May 2009 17:40:57 -0300, Gabriel gabr...@opensuse.org wrote: Hello all!, I'm trying to implement a simple one way communication using twisted. [snip] When I call send the first time it works fine, when I call send a second time the sender hangs. [snip] None of the reactors in

Re: Nimrod programming language

2009-05-11 Thread rumpf_a
One question I ask myself upon seeing a new language is if it is possible to program amb (amb=ambiguous) operator in it. This page gives a very nice, code first explanation of amb and how it is supposed to work: http://www.randomhacks.net/articles/2005/10/11/amb-operator Hm. I am not sure

Re: how to consume .NET webservice

2009-05-11 Thread Diez B. Roggisch
namekuseijin schrieb: bav escreveu: question from a python newbie; how can i consume in python language, a .NET web service, passing a string array as parameter in some easy steps? Unless Microsoft extended the standard in any way, then it should be just as you consume any web service,

Re: Nimrod programming language

2009-05-11 Thread Mensanator
On May 11, 4:55 pm, rump...@web.de wrote: On 10 Mai, 10:40, Paul Rubin http://phr...@nospam.invalid wrote: Andreas Rumpf rump...@web.de writes: I invented a new programming language called Nimrod that combines Python's readability with C's performance. Please check it out:

Re: There may be a much better way to manage artillery.

2009-05-11 Thread Rhodri James
On Mon, 11 May 2009 22:59:43 +0100, Tobiah t...@tobiah.org wrote: On Mon, 11 May 2009 00:48:25 +0100, Rhodri James wrote: On Mon, 11 May 2009 00:06:34 +0100, Tobiah t...@tobiah.org wrote: [Snippety snip] I wanted the bullets to be responsible for destroying themselves, but a little

Re: issue with twisted and reactor. Can't stop reactor

2009-05-11 Thread Gabriel
Jean-Paul Calderone escribió: None of the reactors in Twisted are restartable. You can run and stop them once. After you've stopped a reactor, you cannot run it again. This is the cause of your problem. Jean-Paul I see. Is it possible to do what I want using twisted? or I should found

Re: Wrapping comments

2009-05-11 Thread Rhodri James
On Mon, 11 May 2009 08:39:48 +0100, Tobias Weber t...@gmx.net wrote: In article mailman.5400.1242000728.11746.python-l...@python.org, Rhodri James rho...@wildebst.demon.co.uk wrote: What on earth are you talking about? '#' has its own key on a UK layout Not on Apple keyboards, and the

Re: MacPython 3.0.1 installation problem, no /usr/local/bin/python*

2009-05-11 Thread Raoul Gough
Ned Deily n...@acm.org writes: In article ec96e1390905090735p40bd6c21w5606c521c4c16...@mail.gmail.com, Benjamin Kaplan benjamin.kap...@case.edu wrote: On Sat, May 9, 2009 at 4:30 AM, Raoul Gough bvdmy...@jyxk16274849.net wrote: [snip] So did something go wrong with the installer, or is

Re: sqlite single transaction without foreign key or triggers

2009-05-11 Thread gert
On 11 mei, 23:07, Rob Williscroft r...@freenet.co.uk wrote: gert wrote in news:d7591495-4661-4243-ad7e-f142d8244e88 @e24g2000vbe.googlegroups.com in comp.lang.python: I am trying to do this in a single transaction, the 3 separate statements work fine, but i am screwed if they are not

Re: Your Favorite Python Book

2009-05-11 Thread Shawn Milochik
On Mon, May 11, 2009 at 5:52 PM, pyt...@bdurham.com wrote: Sam, In no specific order (I brought them all): Wesley Chun's Core Python Programming David Mertz's Text Processing in Python (older, but excellent) Mark Lutz's Learning Python All highly recommended. Best of luck on your

Re: Nimrod programming language

2009-05-11 Thread Paul Rubin
rump...@web.de writes: I am dissatisfied with Python's (or Java's) Unicode handling: 1) IO overhead to convert UTF-8 (defacto standard on UNIX) into UTF-16. So use UTF-8 internally. You can still iterate through strings efficiently. Random access would take a performance hit. When that's an

Re: Nimrod programming language

2009-05-11 Thread Tomasz Rola
On Mon, 11 May 2009, rump...@web.de wrote: One question I ask myself upon seeing a new language is if it is possible to program amb (amb=ambiguous) operator in it. This page gives a very nice, code first explanation of amb and how it is supposed to work:

Re: how to consume .NET webservice

2009-05-11 Thread namekuseijin
Diez B. Roggisch wrote: namekuseijin schrieb: bav escreveu: question from a python newbie; how can i consume in python language, a .NET web service, passing a string array as parameter in some easy steps? Unless Microsoft extended the standard in any way, then it should be just as you

Re: Re: Complete frustration

2009-05-11 Thread Dave Angel
norseman wrote: div class=moz-text-flowed style=font-family: -moz-fixedhellcats wrote: I have Python2.5 installed on Windows XP. Whenever I double click on a something.pyw file, IDLE launches and opens something.pyw in the editor. I would prefer to actually *RUN* the program, not edit it. If

Re: Nimrod programming language

2009-05-11 Thread Lawrence D'Oliveiro
In message 57f4c81a-3537-49fa-a5f6- a0cc0d43d...@o14g2000vbo.googlegroups.com, rump...@web.de wrote: I am dissatisfied with Python's (or Java's) Unicode handling: 1) IO overhead to convert UTF-8 (defacto standard on UNIX) into UTF-16. Are you sure they're using UTF-16? I would use UCS-2 or

Re: How do I test the integrity of a Python installation in Debian and Ubuntu

2009-05-11 Thread Lawrence D'Oliveiro
In message mailman.5.1242076536.8015.python-l...@python.org, Geoff Gardiner wrote: @Lawrence D'Oliveiro: ... I see that you published my unobfuscated e-mail address on USENET for all to see. I obfuscated it for a reason, to keep the spammers away. I'm assuming this was a momentary lapse of

  1   2   >