Nagare web framework - 0.1.0

2008-09-25 Thread Alain Poirier
Hi all, I'm pleased to announce that the first (0.1.0) version of the Nagare web framework is released! To read about its features: http://www.nagare.org/trac/wiki/NagareFeatures Release info and download page: http://pypi.python.org/pypi/nagare/ Source and documentation are available

Re: Off topic: Sent from my Foo messages

2008-09-25 Thread Steven D'Aprano
On Wed, 24 Sep 2008 20:04:14 -0700, Sean DiZazzo wrote: -- Steven I don't appreciate the two lines you put above your name in your posts. Please remove them in the future. I don't like them either, but it is an email and Usenet standard to separate the body of your post from the

Re: Time.sleep(0.0125) not available within Linux

2008-09-25 Thread Steven D'Aprano
On Wed, 24 Sep 2008 22:18:05 +1200, Lawrence D'Oliveiro wrote: Just a thought, your minimum sleep time is probably limited by the resolution of the system HZ clock. Type less /proc/config.gz $ less /proc/config.gz /proc/config.gz: No such file or directory What OS are you using?

Re: curses.setsyx()?

2008-09-25 Thread Tim Roberts
[EMAIL PROTECTED] wrote: On Sep 23, 4:16 pm, [EMAIL PROTECTED] wrote: On Sep 22, 11:24 pm, Tim Roberts [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: On Sep 19, 6:42 pm, [EMAIL PROTECTED] wrote: On Sep 19, 1:24 am, Tim Roberts [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote:

Re: is decorator the right thing to use?

2008-09-25 Thread Diez B. Roggisch
Dmitry S. Makovey schrieb: Dmitry S. Makovey wrote: In my real-life case A is a proxy to B, C and D instances/objects, not just one. forgot to mention that above would mean that I need to have more than one decorator function like AproxyB, AproxyC and AproxyD or make Aproxy smarter about

Re: How to parse a string completely into a list

2008-09-25 Thread Tino Wildenhain
[EMAIL PROTECTED] wrote: On Sep 24, 10:12 pm, Matt Nordhoff [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: On Sep 24, 9:44 pm, Chris Rebert [EMAIL PROTECTED] wrote: Could you please define exactly what you mean by elements of a string? If you mean characters, then just use list():

Re: empty csv file attachments

2008-09-25 Thread Peter Otten
Bobby Roberts wrote: I'm new to python but a veteran at programming.   Hm, your code doesn't show that. The time to read the tutorial would be time well spend. After that, a quick look at what the standard library has to offer wouldn't hurt. E. g. reading/writing CSV files is a solved problem

Re: Comparing float and decimal

2008-09-25 Thread Tim Roberts
Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: On Tue, 23 Sep 2008 07:08:07 -0700, Michael Palmer wrote: This seems to break the rule that if A is equal to B and B is equal to C then A is equal to C. I don't see why transitivity should apply to Python objects in general. Well, for

Connecting to SMB share in python

2008-09-25 Thread Ronnie Kwok
Hello, I am trying to write a script that copy files from my local machine to a samba share. I've notice a library call Pysamba which is a wrapper on smb service but it requires a compilation of SAMBA with some amendment in order to use it. Are there alternative method that I could do the same

Re: How to parse a string completely into a list

2008-09-25 Thread Tim Roberts
[EMAIL PROTECTED] wrote: The string draws a map that I then want to be able to traverse through. If I can count through the individual characters of a list I can create an x-y coordinate plane for navigation. Well, the point Matt was making is that traversing through a list and traversing

python sorting 2dim. array ?

2008-09-25 Thread fredo66
hello, Can someone help me with this: I have a array like this list[rowindex][colomindex] where rows are the records and colom the fields. If I use the .sort() method on 'list' the data is sorted on the items of the first colom. But I want to sort on the second colom as first (and as second

Re: Python style: exceptions vs. sys.exit()

2008-09-25 Thread Bruno Desthuilliers
Steven D'Aprano a écrit : On Wed, 24 Sep 2008 17:11:28 -0400, Ross Ridge wrote: Plenty of people were quick to say that the exception should be passed through to the caller. No one said this behaviour should be documented. There may be little practical difference bewteen calling sys.exit()

Re: How to parse a string completely into a list

2008-09-25 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : I want to take a long alpha-numeric string with \n and white-space and place ALL elements of the string (even individual parts of a long white-space) into separate list elements. The most common way I've seen this performed is with the split() function, however I

Re: Linq to Python

2008-09-25 Thread Duncan Booth
sturlamolden [EMAIL PROTECTED] wrote: On Sep 24, 10:59 pm, Duncan Booth [EMAIL PROTECTED] wrote: Simple LINQ expressions like the one you gave map easily to Python list comprehensions. What Microsoft have done though is provide a consistent implementation which allows you to write complex

Re: Er, one -lime- or two.

2008-09-25 Thread Bruno Desthuilliers
Aaron Castironpi Brady a écrit : A Python walks into a bar and orders a complex data structure. Bartender says, One line or two? I don't think that one will have much success in parties !-) -- http://mail.python.org/mailman/listinfo/python-list

Re: how to build a MacOS universal python package including external dependencies

2008-09-25 Thread Jaime Huerta Cepas
Thanks Mathieu, I think MacPorts will be the easiest way (all dependencies are available). I could even base the installation script on port commands. The major problem will be to compile Qt4, which takes hours and requires X11. thnks, again. Jaime. On Wed, Sep 24, 2008 at 6:44 PM, Mathieu

Re: python sorting 2dim. array ?

2008-09-25 Thread fredo66
remark: The server is using python server version 2.3.4 -- http://mail.python.org/mailman/listinfo/python-list

unable to parse the content using the regular expression

2008-09-25 Thread dudeja . rajat
Hello, I've the following results from Difflib.Compare() which I want to parse them using the regular expression to find out the the values that have changed. ## Testing DLL interface

Re: Connecting to SMB share in python

2008-09-25 Thread Tim Golden
Ronnie Kwok wrote: Hello, I am trying to write a script that copy files from my local machine to a samba share. Can't you just mount the share (albeit temporarily) and copy the files over in the normal way? You haven't said what OS you're on, but I'm assuming Linux otherwise you'd simply be

Re: python sorting 2dim. array ?

2008-09-25 Thread Peter Otten
[EMAIL PROTECTED] wrote: hello, Can someone help me with this: I have a array like this list[rowindex][colomindex] where rows are the records and colom the fields. If I use the .sort() method on 'list' the data is sorted on the items of the first colom. But I want to sort on the

Re: is decorator the right thing to use?

2008-09-25 Thread Bruno Desthuilliers
Dmitry S. Makovey a écrit : Aaron Castironpi Brady wrote: It might help to tell us the order of events that you want in your program. You're not using 'mymethod' or 'mymethod2', and you probably want 'return fnew' for the future. Something dynamic with __getattr__ might work. Any method

Tkinter: Unable to update the text scroll

2008-09-25 Thread dudeja . rajat
Hi, I've a Tkinter application which has some widgets and a textbox with scrollbar, I call it txtScroll. The txtScroll is used to display the processing log that application is doing. Well the problem is that the txtSxroll is not able to display the log at the time some thing is processed.

Re: Linq to Python

2008-09-25 Thread sturlamolden
On 25 Sep, 10:08, Duncan Booth [EMAIL PROTECTED] wrote: A lot of what LINQ does is already easy to do in Python, and most of the rest can probably be added fairly easily, but it does provide a consistent framework which may make it easier to do complex LINQ statements than complex list

RE: Regex Help

2008-09-25 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Support Desk wrote: Thanks for the reply ... A: The vulture doesn't get Frequent Poster miles. Q: What's the difference between a top-poster and a vulture? -- http://mail.python.org/mailman/listinfo/python-list

Re: The Python computer language

2008-09-25 Thread sturlamolden
On 25 Sep, 06:02, ROSEEE [EMAIL PROTECTED] wrote: http://pythoncomputer.blogspot.com I wonder where the usenet cancelbots have gone? -- http://mail.python.org/mailman/listinfo/python-list

Re: Comparing float and decimal

2008-09-25 Thread Mark Dickinson
On Sep 24, 6:18 pm, Terry Reedy [EMAIL PROTECTED] wrote: If there is not now, there could be in the future, and the decimal authors are committed to follow the standard wherever it goes. Therefore, the safe course, to avoid possible future deprecations due to doing too much, is to only do what

Re: translating ascii to binary

2008-09-25 Thread Lie
On Sep 17, 11:34 pm, Fredrik Lundh [EMAIL PROTECTED] wrote: Lie wrote: Any advice about this matter would be very appreciated. Thanks in advance. It'd be easier to make a one-char version of ascii2bin then make the string version based on the one-char version. And it'd be a lot easier

Re: Linq to Python

2008-09-25 Thread hrishy
Hi If i rephrase my question how will i do this in Python http://informationr.net/ir/13-2/TB0806.html Watch this query on the page Where he joins all different kind of things with ease and elegance(as per my opinion) [code] var stoogeGuys = Beginning with the XML source from

Re: Comparing float and decimal

2008-09-25 Thread Mark Dickinson
On Sep 25, 8:55 am, Tim Roberts [EMAIL PROTECTED] wrote: Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: 0.1 actually is In [98]: '%.50f' % 0.1 Out[98]: '0.1555111512312578270211815834045410' ? Actually, it's not.  Your C run-time library is generating random digits

[OT] Looking for developers: platform for fast and effective learning

2008-09-25 Thread Adam Dziendziel
Hello everybody, I'm working on a website for fast and effective learning using spaced repetition technique. This is the same method used in SuperMemo, Mnemosyne, FullRecall or Anki software. I'd want to create an online version, supporting easy adding of own material and sharing with others. The

Re: Linq to Python

2008-09-25 Thread hrishy
Hi Grant haha :-) i discounted that perspective :-) regards Hrishy --- On Thu, 25/9/08, Grant Edwards [EMAIL PROTECTED] wrote: From: Grant Edwards [EMAIL PROTECTED] Subject: Re: Linq to Python To: python-list@python.org Date: Thursday, 25 September, 2008, 2:22 AM On 2008-09-24, Bruno

Re: Connecting to SMB share in python

2008-09-25 Thread Ronnie Kwok
Thank you for the reply! Yes, I am running the script under linux and it will be doing some processing before copying it over to the samba mount. It's totally fine to mount it with os.sys(...) approach but I am just thinking if there's other option. ronnie On 2008-09-25 16:36:35 +0800,

Re: Linq to Python

2008-09-25 Thread hrishy
Hi Roger I am impressed (i always suspected Python programmers are smart no doubt about it). But what about the case where they join different sources like the one here http://informationr.net/ir/13-2/TB0806.html Thanks for teaching me :-) i am thankful for that regards Hrishy names =

Re: python sorting 2dim. array ?

2008-09-25 Thread bearophileHUGS
[EMAIL PROTECTED]: list[rowindex][colomindex] I want to sort on the second colom as first (and as second sortfield the first colom). A good way, in Python 2.5: from operator import itemgetter a = [[1, 2], [3, 1], [2, 5], [7, 1]] a.sort(key=itemgetter(1, 0)) a [[3, 1], [7, 1], [1, 2], [2,

Re: Connecting to SMB share in python

2008-09-25 Thread Diez B. Roggisch
Ronnie Kwok wrote: Thank you for the reply! Yes, I am running the script under linux and it will be doing some processing before copying it over to the samba mount. It's totally fine to mount it with os.sys(...) approach but I am just thinking if there's other option. None that is any

Re: Comparing float and decimal

2008-09-25 Thread Nick Craig-Wood
Tim Roberts [EMAIL PROTECTED] wrote: Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: On Tue, 23 Sep 2008 07:08:07 -0700, Michael Palmer wrote: This seems to break the rule that if A is equal to B and B is equal to C then A is equal to C. I don't see why transitivity should apply

Re: Linq to Python

2008-09-25 Thread sturlamolden
On 25 Sep, 12:06, hrishy [EMAIL PROTECTED] wrote: var stoogeGuys =      Beginning with the XML source      from xmlGuys in xmlSource.Descendants(Stooge)      Join to the array on the common element stoogeName      join arrayGuys in familyFacts            on xmlGuys.Element(stoogeName).Value

How to get the filename in the right case ?

2008-09-25 Thread Stef Mientki
hello, How can I find the correct case of a filename ? Background in my program I use case sensitive filenames, just like Python requires. Now I've integrated pdb into the program, but pdb acts somwhat strange: upon a breakpoint it gives the filename always in lowercase (probably this only

Re: Linq to Python

2008-09-25 Thread hrishy
Hi Tim I am not a LINQ expert just a LINQ user and (was a little envious why the langauge i fantasize doesnt have it (pardon my ignorance of python)) LINQ as far as i know allows you to query all sources using a consistent interface . You can query a message queue ,xml document ,array object

Question about reading a xml

2008-09-25 Thread xiaowei.lin
Hi all, I am working on SunOS 5.8, Python 2.2.2 When I run the python grogram below: #Beginning import xml.dom.minidom xml_str = \ test aapos; this is a/a bcapos; this is b/b cthis is c/c /test dom = xml.dom.minidom.parseString(xml_str) na =

Re: How to get the filename in the right case ?

2008-09-25 Thread Diez B. Roggisch
Stef Mientki wrote: hello, How can I find the correct case of a filename ? Background in my program I use case sensitive filenames, just like Python requires. Now I've integrated pdb into the program, but pdb acts somwhat strange: upon a breakpoint it gives the filename always in

Re: Linq to Python

2008-09-25 Thread sturlamolden
On 25 Sep, 12:06, hrishy [EMAIL PROTECTED] wrote: [code] var stoogeGuys =      Beginning with the XML source      from xmlGuys in xmlSource.Descendants(Stooge)      Join to the array on the common element stoogeName      join arrayGuys in familyFacts            on

Re: Comparing float and decimal

2008-09-25 Thread Mark Dickinson
On Sep 23, 1:58 pm, Robert Lehmann [EMAIL PROTECTED] wrote: I don't see why transitivity should apply to Python objects in general. Hmmm. Lack of transitivity does produce some, um, interesting results when playing with sets and dicts. Here are sets s and t such that the unions s | t and t | s

Re: Linq to Python

2008-09-25 Thread hrishy
Hi Pardon my ignorance again but id ont see any join in python or did i miss something ? regards Hrishy --- On Thu, 25/9/08, sturlamolden [EMAIL PROTECTED] wrote: From: sturlamolden [EMAIL PROTECTED] Subject: Re: Linq to Python To: python-list@python.org Date: Thursday, 25 September,

Re: Linq to Python

2008-09-25 Thread sturlamolden
On 25 Sep, 13:08, hrishy [EMAIL PROTECTED] wrote: Pardon my ignorance again but id ont see any join in python or did i miss something ? It's more Pythonic to use the syntax of dictionary lookups. -- http://mail.python.org/mailman/listinfo/python-list

Re: Linq to Python

2008-09-25 Thread hrishy
Hi Thank you very much I appreciate taking the pain to explain this to me. regards Hrishy --- On Thu, 25/9/08, sturlamolden [EMAIL PROTECTED] wrote: From: sturlamolden [EMAIL PROTECTED] Subject: Re: Linq to Python To: python-list@python.org Date: Thursday, 25 September, 2008, 12:16 PM On

Spring Python 0.7.0 is released

2008-09-25 Thread Goldfish
Release 0.7.0 was completed last night, and released to sourceforge.net. NOTE: This release included a lot of API scrubbing, in order to bring things more in tune with PEP-0008 (python's style guide). You're existing apps PROBABLY were impacted, if you used any of Spring Python's utility classes.

Re: Folder Actions on Mac OSX Leopard?

2008-09-25 Thread has
On 25 Sep, 00:30, Sean DiZazzo [EMAIL PROTECTED] wrote: I always wondered about Folder Actions...  I just tested.  You can have applescript call python scripts via `do shell script`.  But it seemed a bit flakey. Should work in theory. For which values of flakey? e.g. Is it a technical problem

Re: How to get the filename in the right case ?

2008-09-25 Thread Stef Mientki
Diez B. Roggisch wrote: Stef Mientki wrote: hello, How can I find the correct case of a filename ? Background in my program I use case sensitive filenames, just like Python requires. Now I've integrated pdb into the program, but pdb acts somwhat strange: upon a breakpoint it gives the

Re: multiple processes with private working dirs

2008-09-25 Thread Tim Arnold
On Sep 25, 12:11 am, alex23 [EMAIL PROTECTED] wrote: On Sep 25, 3:37 am, Tim Arnold [EMAIL PROTECTED] wrote: Am I missing something? Do you mean something other than the replies you got the last time you asked the exact same question?

Re: multiple processes with private working dirs

2008-09-25 Thread sturlamolden
On 24 Sep, 19:37, Tim Arnold [EMAIL PROTECTED] wrote: Am I missing something? Is there a better way? Use the pyprocessing module (to appear as standard module multiprocessing in Python 2.6). It has almost the same interface as Python's threading and Queue standard modules, except you are

Re: Connecting to SMB share in python

2008-09-25 Thread Tim Golden
Ronnie Kwok wrote: Yes, I am running the script under linux and it will be doing some processing before copying it over to the samba mount. It's totally fine to mount it with os.sys(...) approach but I am just thinking if there's other option. I'm not really a Linux person but from all I

Re: How to get the filename in the right case ?

2008-09-25 Thread Diez B. Roggisch
Yes I'm pretty sure, two reasons: 1. when I perform a step_into, jumping into a file that doesn't have breakpoints itself (meaning my program doesn't even know of this file), pdb returns a lowercase filename What has that to do with potential output postprocessing? 2. rpdb2 (probably

Re: Linq to Python

2008-09-25 Thread Duncan Booth
sturlamolden [EMAIL PROTECTED] wrote: On 25 Sep, 10:08, Duncan Booth [EMAIL PROTECTED] wrote: A lot of what LINQ does is already easy to do in Python, and most of the rest can probably be added fairly easily, but it does provide a consistent framework which may make it easier to do complex

Re: Linq to Python

2008-09-25 Thread sturlamolden
On 25 Sep, 14:22, Duncan Booth [EMAIL PROTECTED] wrote: No Python's syntax is fine. The api's aren't as consistent though: Microsoft added a common set of extension methods which work on databases, xml, builtin sequences and can be easily extended to include other custom sequences. That is

multiprocessing eats memory

2008-09-25 Thread Max Ivanov
I'm playing with pyprocessing module and found that it eats lot's of memory. I've made small test case to show it. I pass ~45mb of data to worker processes and than get it back slightly modified. At any time in main process there are shouldn't be no more than two copies of data (one original data

what does python -i use as input stream (stdin)?

2008-09-25 Thread Almar Klein
Hi, I want to start python -i from a subprocess and change its stdin stream, so I get control over the commands I feed the interpreter. I thought just changing sys.stdin to my custom file-like object would suffice, but this does not work. Neither does changing sys.__stdin__. I guess the

Re: Linq to Python

2008-09-25 Thread bearophileHUGS
Duncan Booth: Microsoft added a common set of extension methods which work on databases, xml, builtin sequences and can be easily extended to include other custom sequences. When the processing is done in memory, LINQ may also work well with multi-core CPUs, see PLINQ. Bye, bearophile --

Re: urllib error on urlopen

2008-09-25 Thread Mike Driscoll
On Sep 24, 7:08 pm, Michael Palmer [EMAIL PROTECTED] wrote: On Sep 24, 11:46 am, Mike Driscoll [EMAIL PROTECTED] wrote: Hi, I have been using the following code for over a year in one of my programs: f = urllib2.urlopen('https://www.companywebsite.com/somestring') It worked great

Re: urllib error on urlopen

2008-09-25 Thread Mike Driscoll
On Sep 24, 9:36 pm, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: On Wed, 24 Sep 2008 08:46:56 -0700, Mike Driscoll wrote: Hi, I have been using the following code for over a year in one of my programs: f = urllib2.urlopen('https://www.companywebsite.com/somestring') It

ANN: eGenix pyOpenSSL Distribution 0.7.0-0.9.8i-1

2008-09-25 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com pyOpenSSL Distribution Version 0.7.0-0.9.8i-1 An easy to install and use repackaged distribution of the pyOpenSSL Python

Re: How to get the filename in the right case ?

2008-09-25 Thread Stef Mientki
Diez B. Roggisch wrote: Yes I'm pretty sure, two reasons: 1. when I perform a step_into, jumping into a file that doesn't have breakpoints itself (meaning my program doesn't even know of this file), pdb returns a lowercase filename What has that to do with potential output postprocessing?

Python OOP question

2008-09-25 Thread k3xji
Hi all, I am trying to develop a game-server in python. Design is as following: - ConnectionManager - handling/distributing incoming connections - IOManager - handling IO recv/send operations on sockets. (inheritable) - Socket - basic async socket object - SocketServer - handling multiple socket

Re: How to parse a string completely into a list

2008-09-25 Thread john . ford
On Sep 25, 1:51 am, Tino Wildenhain [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: On Sep 24, 10:12 pm, Matt Nordhoff [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: On Sep 24, 9:44 pm, Chris Rebert [EMAIL PROTECTED] wrote: Could you please define exactly what you mean by

Re: matplotlib in interactive mode locks when run from subprocess

2008-09-25 Thread Almar Klein
To who cares, I found out what my problem was. Testing interactivity with Tk in a normal Python console gave proper results, just like IPython. Also running python -i gives the interactive behaviour I wanted. But running python -i from a subprocess did not. I was startled, because it worked out

which python as a python command?

2008-09-25 Thread chardish
Hello, I'm trying to find out in a script where the location of the current python is. (I'm writing an installer script in python for a simple server application, so i'm going to do a find-replace in a bunch of files to give them the absolute path of the python binary. One thought might be to

Re: which python as a python command?

2008-09-25 Thread Carsten Haese
[EMAIL PROTECTED] wrote: Hello, I'm trying to find out in a script where the location of the current python is. import sys print sys.executable HTH, -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

PID management with popen and spawn

2008-09-25 Thread EEK
Hello, My goal is to start and stop separate Linux processes from a python program by specific PID. The output of these processes needs to have their stderr and stdout piped to a particular file, respectively. I've been able to make this work with subprocess.Popen only if the shell variable

Re: which python as a python command?

2008-09-25 Thread chardish
On Sep 25, 11:14 am, Carsten Haese [EMAIL PROTECTED] wrote: import sys print sys.executable This is exactly what I needed. Thanks! -- http://mail.python.org/mailman/listinfo/python-list

How can I customize builtin module search path to prefix/lib to prefix/lib64?

2008-09-25 Thread js
Hi list, Is it possible to change module search path (PYTHONPATH) built-in to Python interpreter? I thought I can change it with configure --libdir but it didn't work for me. I also tried patching around python source tree replacing lib to lib64 but it didn't work either. Adjusting sys.path

Re: is decorator the right thing to use?

2008-09-25 Thread Dmitry S. Makovey
Diez B. Roggisch wrote: Dmitry S. Makovey schrieb: Dmitry S. Makovey wrote: In my real-life case A is a proxy to B, C and D instances/objects, not just one. forgot to mention that above would mean that I need to have more than one decorator function like AproxyB, AproxyC and AproxyD or

Re: How to get the filename in the right case ?

2008-09-25 Thread OKB (not okblacke)
Stef Mientki wrote: import Module1 d:\data_python_25\pylab_works\module1.py(3)module() - print hello (Pdb) Then we know if PDB is really the culprit. So pdb is the problem. Yep, it does the same thing for me. Apart from that, is that really a problem that the filenames

Re: is decorator the right thing to use?

2008-09-25 Thread Dmitry S. Makovey
Thanks Bruno, your comments were really helpful (so was the improved version of code). My replies below: Bruno Desthuilliers wrote: So decorators inside of B just identify that those methods will be proxied by A. On one hand from logical standpoint it's kind of weird to tell class that it

Re: How to get the filename in the right case ?

2008-09-25 Thread Stef Mientki
OKB (not okblacke) wrote: Stef Mientki wrote: import Module1 d:\data_python_25\pylab_works\module1.py(3)module() - print hello (Pdb) Then we know if PDB is really the culprit. So pdb is the problem. Yep, it does the same thing for me.

text processing

2008-09-25 Thread [EMAIL PROTECTED]
I have string like follow 12560/ABC,12567/BC,123,567,890/JK I want above string to group like as follow (12560,ABC) (12567,BC) (123,567,890,JK) i try regular expression i am able to get first two not the third one. can regular expression given data in different groups --

Re: is decorator the right thing to use?

2008-09-25 Thread Bruno Desthuilliers
Dmitry S. Makovey a écrit : Thanks Bruno, your comments were really helpful (so was the improved version of code). My replies below: Bruno Desthuilliers wrote: So decorators inside of B just identify that those methods will be proxied by A. On one hand from logical standpoint it's kind of

Re: Er, one -lime- or two.

2008-09-25 Thread Aaron Castironpi Brady
On Sep 25, 3:09 am, Bruno Desthuilliers bruno. [EMAIL PROTECTED] wrote: Aaron Castironpi Brady a écrit : A Python walks into a bar and orders a complex data structure. Bartender says, One line or two? I don't think that one will have much success in parties !-) It doesn't go to any. =P

Re: text processing

2008-09-25 Thread Marc 'BlackJack' Rintsch
On Thu, 25 Sep 2008 15:51:28 +0100, [EMAIL PROTECTED] wrote: I have string like follow 12560/ABC,12567/BC,123,567,890/JK I want above string to group like as follow (12560,ABC) (12567,BC) (123,567,890,JK) i try regular expression i am able to get first two not the third one. can

Lotus Domino and Python via DIIOP or similar?

2008-09-25 Thread Michael Ströder
HI! Anybody here with experience in accessing Lotus Domino with Python via DIIOP? In particular I'd like to be able to register Notes users with a Python script. Preferrably without having to use Win32 COM although it would be better than nothing. Adding address Notes book entries via LDAP is

Re: is decorator the right thing to use?

2008-09-25 Thread Aaron Castironpi Brady
On Sep 25, 12:19 pm, Bruno Desthuilliers bruno. [EMAIL PROTECTED] wrote: Dmitry S. Makovey a écrit : Thanks Bruno, your comments were really helpful (so was the improved version of code). My replies below: Bruno Desthuilliers wrote: So decorators inside of B just identify that

Hello guys!!!!!

2008-09-25 Thread Goran Barac Cvrcko
Hello, this is Goran Barac from town Banjaluka, Bosnia and Herzegovina, also known as Cvrcko Does anyone know of any bars in town where I can swallow a bucket of cum? It can be either dog, horse or human cum. Also, does anyone know of any sex bars where people will shit in your mouth? I also like

Re: How can I customize builtin module search path to prefix/lib to prefix/lib64?

2008-09-25 Thread Mike Driscoll
On Sep 25, 10:41 am, js [EMAIL PROTECTED] wrote: Hi list, Is it possible to change module search path (PYTHONPATH) built-in to Python interpreter? I thought I can change it with configure --libdir but it didn't work for me. I also tried patching around python source tree replacing lib to

Re: is decorator the right thing to use?

2008-09-25 Thread Dmitry S. Makovey
Aaron Castironpi Brady wrote: You should write it like this: class B(object): @A.proxy def bmethod(self,a): Making 'proxy' a class method on A. makes sense. In case different A instances (do you have more than one BTW?) yep. I have multiple instances of class A, each

Re: is decorator the right thing to use?

2008-09-25 Thread Aaron Castironpi Brady
On Sep 25, 1:22 pm, Dmitry S. Makovey [EMAIL PROTECTED] wrote: Aaron Castironpi Brady wrote: You should write it like this: class B(object):     [EMAIL PROTECTED]      def bmethod(self,a): Making 'proxy' a class method on A.   makes sense. In case different A instances (do you

Re: python timers and COM/directshow

2008-09-25 Thread Sayanan Sivaraman
Ok, so I actually found a solution to this out there, and decided I'd post back here and share it. import pygtk pygtk.require('2.0') import gtk import ctypes from ctypes import * from comtypes import client from ctypes.wintypes import * import gobject def delete_event(widget,event,data=None):

Eggs, VirtualEnv, and Apt - best practices?

2008-09-25 Thread Scott Sharkey
Hello all, Our development group at work seems to be heading towards adopting python as one of our standard systems languages for internal application development (yeah!). One of the issues that's come up is the problem with apt (deb packages) vs eggs, vs virtual environments. We're

Re: text processing

2008-09-25 Thread kib2
You can do it with regexps too : -- import re to_watch = re.compile(r(?Pnumber\d+)[/](?Pletter[A-Z]+)) final_list = to_watch.findall(12560/ABC,12567/BC,123,567,890/JK) for number,word in final_list : print number:%s -- word:

PEP Proposal

2008-09-25 Thread python-pep
Hi, sorry, I have these ideas for longer than 10 years, please have a look on it and comment on it. Thx. This is another proposal for introducing types into Python. There are many reasons for incorporating types into Python, but there is also a lot of concern about doing so because of

Re: is decorator the right thing to use?

2008-09-25 Thread Bruno Desthuilliers
Aaron Castironpi Brady a écrit : (snip) You should write it like this: class B(object): @A.proxy def bmethod(self,a): Making 'proxy' a class method on A. That's exactly what I wanted to avoid here : making B depending on A. (snip) I agree that __setattr__ is the canonical

Quick sort implementation in python

2008-09-25 Thread Alex Snast
Hi guys, I've been learning python in the past week and tried to implement a q.sort algorithm in python as follows: def quick_sort(l, first, last) if first last: q = partition(a, first, last) quick_sort(a, first, q - 1) quick_sort(a, q + 1, last) def partition(a,

Re: How to get the filename in the right case ?

2008-09-25 Thread Stef Mientki
I found a partial workaround that is good enough for me: def Get_Windows_Filename ( FileName ) : if os.name == 'nt' : File = os.path.splitext ( FileName .lower ())[0] return glob.glob ( File + '.p?' ) return FileName This will translate the filename into the correct case, but not the

Re: is decorator the right thing to use?

2008-09-25 Thread Dmitry S. Makovey
Aaron Castironpi Brady wrote: I kept this part of the problem out of this discussion as I'm pretty sure I can fill those in once I figure out the basic problem of auto-population of proxy methods since for each class/method those are going to be nearly identical. If I can autogenerate those

Re: curses.setsyx()?

2008-09-25 Thread linkmaster032000
On Sep 25, 2:39 am, Tim Roberts [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: On Sep 23, 4:16 pm, [EMAIL PROTECTED] wrote: On Sep 22, 11:24 pm, Tim Roberts [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: On Sep 19, 6:42 pm, [EMAIL PROTECTED] wrote: On Sep 19, 1:24 am, Tim

Re: Eggs, VirtualEnv, and Apt - best practices?

2008-09-25 Thread Dmitry S. Makovey
Scott Sharkey wrote: Any insight into the best way to have a consistent, repeatable, controllable development and production environment would be much appreciated. you have just described OS package building ;) I can't speak for everybody, but supporting multiple platforms (PHP, Perl, Python,

Re: PEP Proposal

2008-09-25 Thread Gabriel Genellina
En Thu, 25 Sep 2008 16:24:58 -0300, [EMAIL PROTECTED] escribió: sorry, I have these ideas for longer than 10 years, please have a look on it and comment on it. Thx. This is another proposal for introducing types into Python. You got the terminology wrong. Python had types from the very

Re: adding in-place operator to Python

2008-09-25 Thread Arash Arfaee
Thank you very much Gerhard and Terry. I am trying to add undefined state to some Boolean operator. Here is what I tried to do and It is not working: class _3ph: def __init__(self): self.value = 0 def __xor__(self,item): if self.value==2 or item==2: return 2

Re: is decorator the right thing to use?

2008-09-25 Thread George Sakkis
On Sep 25, 3:36 pm, Dmitry S. Makovey [EMAIL PROTECTED] wrote: Aaron Castironpi Brady wrote: I kept this part of the problem out of this discussion as I'm pretty sure I can fill those in once I figure out the basic problem of auto-population of proxy methods since for each class/method

Re: Quick sort implementation in python

2008-09-25 Thread Bruno Desthuilliers
Alex Snast a écrit : Hi guys, I've been learning python in the past week and tried to implement a q.sort algorithm in python Is that for learning purpose ? Else, it's just a waste of time... -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP Proposal

2008-09-25 Thread python-pep
Gabriel Genellina wrote: En Thu, 25 Sep 2008 16:24:58 -0300, [EMAIL PROTECTED] escribió: sorry, I have these ideas for longer than 10 years, please have a look on it and comment on it. Thx. This is another proposal for introducing types into Python. You got the terminology wrong.

Re: Eggs, VirtualEnv, and Apt - best practices?

2008-09-25 Thread Fredrik Lundh
Dmitry S. Makovey wrote: you have just described OS package building ;) I can't speak for everybody, but supporting multiple platforms (PHP, Perl, Python, Java) we found that the only way to stay consistent is to use OS native packaging tools (in your case apt and .deb ) and if you're missing

  1   2   3   >