Re: Technical Answer - Protecting code in python

2007-03-22 Thread Steven D'Aprano
On Thu, 22 Mar 2007 09:11:51 +1100, Ben Finney wrote: > "Steven D'Aprano" <[EMAIL PROTECTED]> writes: > >> Is your program valuable? Is it worth money? Then the 90% of script >> kiddies will just wait three days, and download the program off the >> Internet after the real hackers have broken your

Color Segmentation w/ PIL?

2007-03-22 Thread MooMaster
I'm trying to write a Digital Image Processing program using the PIL library, and upon consultation of the Handbook I see that it seems to have built in functions to run Edge Detection (in the ImageFilter module), but I don't see anything about Segmentation. Are there any built-in tools to do this

Re: Garbage collection

2007-03-22 Thread Steve Holden
Alex Martelli wrote: > Tom Wright <[EMAIL PROTECTED]> wrote: > >> real programs. I can't help thinking that there are some situations where >> you need a lot of memory for a short time though, and it would be nice to >> be able to use it briefly and then hand most of it back. Still, I see the >>

Re: Python 3000 idea: reversing the order of chained assignments

2007-03-22 Thread Steve Holden
Terry Reedy wrote: > "Mark T" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > | This is interesting: > | > | >>> class Test(object): > | ... def __getattribute__(self,n): > | ... print 'reading',n > | ... return object.__getattribute__(self,n) > | ... def __setattr__(se

Re: [JOB] Sr. Python Developer, Northern VA

2007-03-22 Thread Anton Vredegoor
Steven D. Arnold wrote: > Neosynapse is seeking a senior software developer located in or Subtract ten points from your credibility for writing senior here. > willing to relocate to the Northern VA area to join a project > building one of the largest grid computing data platforms in the >

Re: Regexp problem with `('

2007-03-22 Thread Steve Holden
Zeng Nan wrote: > On Thu, Mar 22, 2007 at 01:26:22AM -0700, Johny wrote: >> I have the following text >> >> Goods Item 146 (174459989) - OurWebSite >> >> from which I need to extract >> `Goods Item 146 ' >> >> Can anyone help with regexp? >> Thank you for help >> L. > > (Goods\s+Item\s+146\s+)

Re: Mastering Python

2007-03-22 Thread Michael Bentley
>> > For future reference, and I hope you don't mind the lesson, the past > tense of "bind" is "bound" (I can't state it as a firm rule, but many > *ind words seem to go *ound: bind, find, wind [as in wrap, not blowing > in the...], grind -> bound, found, wound [not to confuse with an > injur

How to use unix_md5_crypt from Perl in Python?

2007-03-22 Thread Nico Grubert
Dear list members, I have a Perl script which crypts a password using a clearteaxt password and a username. Example: username = '[EMAIL PROTECTED]' password = 'root' The crypted password is: 'roK20XGbWEsSM' The crypted password always starts with the first 2 characters of the username (

Re: Python 3000 idea: reversing the order of chained assignments

2007-03-22 Thread Steve Holden
Mark T wrote: > "Alex Martelli" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> John Nagle <[EMAIL PROTECTED]> wrote: >> >>> Marcin Ciura wrote: >>> Neither would I. I must have expressed myself not clearly enough. Currently x = y = z is roughly equivalent to >

Re: Python 3000 idea: reversing the order of chained assignments

2007-03-22 Thread Duncan Booth
"Virgil Dupras" <[EMAIL PROTECTED]> wrote: > I think I see what Marcin means. The 'node' is changed too fast in the > chain, and next is assigned to 'nextnode' instead of being assigned to > node. I can see why Marcin was confused. Many other languages assignment is an expression, so a=b=c is si

Regexp problem with `('

2007-03-22 Thread Johny
I have the following text Goods Item 146 (174459989) - OurWebSite from which I need to extract `Goods Item 146 ' Can anyone help with regexp? Thank you for help L. -- http://mail.python.org/mailman/listinfo/python-list

Re: why brackets & commas in func calls can't be ommited? (maybe it could be PEP?)

2007-03-22 Thread Laurent Pointal
Dennis Lee Bieber a écrit : > On Thu, 22 Mar 2007 03:27:37 +1100, Steven D'Aprano > <[EMAIL PROTECTED]> declaimed the following in > comp.lang.python: > >> So what should "a b c d" be? >> >> (a, b, c, d) >> a(b, c, d) >> a(b, (c, d)) >> a(b(c, d)) >> a(b(c(d))) >> >> Have I missed anything? Which

Re: [Swig-user] How to receive a FILE* from Python under MinGW?

2007-03-22 Thread Giovanni Bajo
On 22/03/2007 3.46, Carl Douglas wrote: > Hi Giovanni, > > I was wondering if gccmrt can be used with older 3.x versions of GCC? > > Thanks I think so, but I have not tried it. You just need to copy gccmrt to the bin directory, and then copy "libmsvcrt.a" into "libmsvcr60.a", and "libmsvcrtd.a

Re: Regexp problem with `('

2007-03-22 Thread Zeng Nan
On Thu, Mar 22, 2007 at 01:26:22AM -0700, Johny wrote: > I have the following text > > Goods Item 146 (174459989) - OurWebSite > > from which I need to extract > `Goods Item 146 ' > > Can anyone help with regexp? > Thank you for help > L. (Goods\s+Item\s+146\s+) -- Zeng Nan MY

Re: How to receive a FILE* from Python under MinGW?

2007-03-22 Thread Giovanni Bajo
On 22/03/2007 3.13, John Pye wrote: >> I suggest people to try my GCC 4.1.2 binary installer for Windows which fully >> integrates with Python and has scripts in place to solve the MSVCR71.DLL >> problem. It was announced on this very list a few days ago: >> >> http://www.develer.com/oss/GccWinBin

Re: Python 3000 idea: reversing the order of chained assignments

2007-03-22 Thread Steve Holden
Duncan Booth wrote: > "Virgil Dupras" <[EMAIL PROTECTED]> wrote: > >> I think I see what Marcin means. The 'node' is changed too fast in the >> chain, and next is assigned to 'nextnode' instead of being assigned to >> node. > > I can see why Marcin was confused. Many other languages assignment is

Python Oracle 10g odbc blob insertion problem

2007-03-22 Thread Godzilla
Dear all, I cannot find a solution for my problem with inserting a blob object (>4000 in length) into an ORACLE database via ODBC. I have tried the two ways of inserting the blob object (a zip file): 1) fp = open("c:/test/test.zip", "r+b") data = fp.read() s = odbc.odbc(cs) qry = s.cursor() qr

Re: [JOB] Sr. Python Developer, Northern VA

2007-03-22 Thread Anton Vredegoor
Steve Holden wrote: >> /rant >> > Feel better now? Yes! But *now* I'm afraid it will have negative consequences for my future employability. However if it will lead to adjusting the kind of submissions at http://www.python.org/community/jobs/ it was probably worth it. A. 'thanks for asking' -

Re: Python Oracle 10g odbc blob insertion problem

2007-03-22 Thread Steve Holden
Godzilla wrote: > Dear all, > > I cannot find a solution for my problem with inserting a blob object > (>4000 in length) into an ORACLE database via ODBC. > > > I have tried the two ways of inserting the blob object (a zip file): > > > 1) > fp = open("c:/test/test.zip", "r+b") > data = fp.read

Re: [JOB] Sr. Python Developer, Northern VA

2007-03-22 Thread Steve Holden
Anton Vredegoor wrote: > Steven D. Arnold wrote: > [...] > /rant > Feel better now? regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://del.icio.us/steve.holden Recent Ramblings http://hol

Re: Regexp problem with `('

2007-03-22 Thread Bruno Desthuilliers
Johny a écrit : > I have the following text > > Goods Item 146 (174459989) - OurWebSite > > from which I need to extract > `Goods Item 146 ' > > Can anyone help with regexp? Sure : the documentation is here: http://docs.python.org/lib/module-re.html And there's a nice tutorial here: http:/

Re: How to use unix_md5_crypt from Perl in Python?

2007-03-22 Thread Paul Rubin
Nico Grubert <[EMAIL PROTECTED]> writes: > Example: >username = '[EMAIL PROTECTED]' >password = 'root' > > The crypted password is: 'roK20XGbWEsSM' that looks like you want crypt(3), not md5. See: http://docs.python.org/lib/module-crypt.html Sample session: >>> import crypt

Re: On Java's Interface (the meaning of interface in computer programing)

2007-03-22 Thread Jim Burton
On 21 Mar, 19:11, Lew <[EMAIL PROTECTED]> wrote: > Dr. Who wrote: > > Don't Feed The Trolls :-) > > But, but - you fed me!? > [blah] > > We could put up a contest - whoever finds and corrects the most errors in the > post wins. Ties broken by the quality of the correct explanations. Incorrect > exp

Re: why brackets & commas in func calls can't be ommited? (maybe it could be PEP?)

2007-03-22 Thread Sebastian Kaliszewski
dmitrey wrote: > if you want > result = func1(func2(arg)) > you should use > result = func1 (func2 arg) This is in conflict with current meanig, Ergo it breaks old code rgds \SK -- http://mail.python.org/mailman/listinfo/python-list

Re: interpreting glyph outlines from ttfquery?

2007-03-22 Thread Wojciech Muła
swiftset wrote: > I'm try to convert a glyph into a format I can easily numerically > manipulate. So far I've figured out how to use ttfquery to get a list > that represents the outline of a contour in a glyph: > > from ttfquery import describe, glyphquery, glyph > f = describe.openFont("/usr/shar

Re: Garbage collection

2007-03-22 Thread Alex Martelli
Tom Wright <[EMAIL PROTECTED]> wrote: > real programs. I can't help thinking that there are some situations where > you need a lot of memory for a short time though, and it would be nice to > be able to use it briefly and then hand most of it back. Still, I see the > practical difficulties with

Re: Python Oracle 10g odbc blob insertion problem

2007-03-22 Thread Steve Holden
Godzilla wrote: > Dear all, > > I cannot find a solution for my problem with inserting a blob object > (>4000 in length) into an ORACLE database via ODBC. > > > I have tried the two ways of inserting the blob object (a zip file): > > > 1) > fp = open("c:/test/test.zip", "r+b") > data = fp.read

Re: Python Oracle 10g odbc blob insertion problem

2007-03-22 Thread Paul Boddie
On 22 Mar, 10:21, "Godzilla" <[EMAIL PROTECTED]> wrote: > > I cannot find a solution for my problem with inserting a blob object > (>4000 in length) into an ORACLE database via ODBC. This brings back "happy" memories with Oracle 9i and JDBC. > I have tried the two ways of inserting the blob objec

Re: Python-URL! - weekly Python news and links (Mar 22)

2007-03-22 Thread Bruno Desthuilliers
Cameron Laird a écrit : > This is the first time you've received "Python-URL!" in 2007. No, > that's not the fault of your mail server; we've just been on sabbatical. > Now we're back. Great ! I was a bit worried... -- http://mail.python.org/mailman/listinfo/python-list

Re: Python-URL! - weekly Python news and links (Mar 22)

2007-03-22 Thread Tim Golden
Bruno Desthuilliers wrote: > Cameron Laird a écrit : >> This is the first time you've received "Python-URL!" in 2007. No, >> that's not the fault of your mail server; we've just been on sabbatical. >> Now we're back. > > Great ! I was a bit worried... > Seconded; I've always looked forward to

Re: On Java's Interface (the meaning of interface in computer programing)

2007-03-22 Thread Markus E Leypold
Lew <[EMAIL PROTECTED]> writes: > Xah Lee wrote: >> In a functional language, a function can be specified by its name and > > Are you sure you know what a "functional language" is? > >> parameter specs. For example: >> f(3) >> f(3, [9,2]) >> f("some string") > > This is not really "typical" synta

Re: Python Oracle 10g odbc blob insertion problem

2007-03-22 Thread Godzilla
On Mar 22, 10:56 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Godzilla wrote: > > Dear all, > > > I cannot find a solution for my problem with inserting a blob object > > (>4000 in length) into an ORACLE database via ODBC. > > > I have tried the two ways of inserting the blob object (a zip file):

Re: On Java's Interface (the meaning of interface in computer programing)

2007-03-22 Thread Lew
Jim Burton wrote: > Or you could stop feeding the trolls. People need to stop saying that. The original post was a detailed if incorrect exposition of Java information. How in the world do you rate that trollish? I have absolutely no reason to rate the OP as a troll or their post as trollish. -

Re: On Java's Interface (the meaning of interface in computer programing)

2007-03-22 Thread Sherm Pendley
Lew <[EMAIL PROTECTED]> writes: > Jim Burton wrote: >> Or you could stop feeding the trolls. > > Does not apply. The OP was not being trollish You obviously don't know Xah. He's been doing this for years, cross- posting to various language groups trying to start an argument between them. He even

Re: fine grain logging cotrol

2007-03-22 Thread Steve Holden
Eric S. Johansson wrote: > I need to to be able to conditionally log based on the method the log > statement is in and one other factor like a log level. in order to do > so, I need to be able to automatically find out the name of the method > and its class but I haven't found out how to do tha

fine grain logging cotrol

2007-03-22 Thread Eric S. Johansson
I need to to be able to conditionally log based on the method the log statement is in and one other factor like a log level. in order to do so, I need to be able to automatically find out the name of the method and its class but I haven't found out how to do that yet. for example, class catus

Re: Removing a particular index from a list

2007-03-22 Thread Steve Holden
Srikanth wrote: > Hi, > > list.remove(item) removes the first item from the list, but how do I > say to remove a particular index from a list without using it's value? > > Let's say I have 4 items in my list as > li = ["sri", "s", "srikanth", "s"] > > And if I want to remove the last item

Re: Removing a particular index from a list

2007-03-22 Thread Cyril Cheneson
>>> li = ["sri", "s", "srikanth", "s"] > And if I want to remove the last item ("s"), how do I remove it? > li.remove(-1) doesn't do it. This is my problem. > > Thanks, > Srikanth > li.pop() will remove the last element Cyril -- http://mail.python.org/mailman/listinfo/python-list

Re: Removing a particular index from a list

2007-03-22 Thread Peter Otten
Srikanth wrote: > list.remove(item) removes the first item from the list, but how do I > say to remove a particular index from a list without using it's value? > > Let's say I have 4 items in my list as > li = ["sri", "s", "srikanth", "s"] > > And if I want to remove the last item ("s"), h

Re: Removing a particular index from a list

2007-03-22 Thread Steve Holden
Peter Otten wrote: > Srikanth wrote: > >> list.remove(item) removes the first item from the list, but how do I >> say to remove a particular index from a list without using it's value? >> >> Let's say I have 4 items in my list as >> > li = ["sri", "s", "srikanth", "s"] >> And if I want to remo

Re: Removing a particular index from a list

2007-03-22 Thread Srikanth
Thanks Steve, Cyril and Peter. > > This, or not reading the tutorial. > > http://docs.python.org/tut/node7.html#SECTION00720 > > Peter I read this 2 months ago and I expected it to be a method of list, but I sound like I am making an excuse. Thanks a lot. Regards, Srikanth -- h

Re: Python 3000 idea: reversing the order of chained assignments

2007-03-22 Thread Duncan Booth
Steve Holden <[EMAIL PROTECTED]> wrote: > Help me out here. It looks as though the real syntax should > be something like > > assignment_stmt ::= (target_list "=")+ expression_list | > (target_list "=")+ assignment_stmt That is precisely the point. I

Removing a particular index from a list

2007-03-22 Thread Srikanth
Hi, list.remove(item) removes the first item from the list, but how do I say to remove a particular index from a list without using it's value? Let's say I have 4 items in my list as >>> li = ["sri", "s", "srikanth", "s"] And if I want to remove the last item ("s"), how do I remove it? li.remov

Re: Removing a particular index from a list

2007-03-22 Thread Peter Otten
Steve Holden wrote: > Peter Otten wrote: >> Srikanth wrote: >> >>> list.remove(item) removes the first item from the list, but how do I >>> say to remove a particular index from a list without using it's value? >>> >>> Let's say I have 4 items in my list as >>> >> li = ["sri", "s", "srikanth"

Re: fine grain logging cotrol

2007-03-22 Thread Peter Otten
Eric S. Johansson wrote: > I need to to be able to conditionally log based on the method the log > statement is in and one other factor like a log level. in order to do > so, I need to be able to automatically find out the name of the method > and its class but I haven't found out how to do that

My MVC critique

2007-03-22 Thread scott . w . white
Looking at different MVC frameworks from many langauges from PHP to Python, I've concluded that the explosion of MVC frameworks is mainly due to undisciplined & unexperienced programmers. Nobody would argue about the separation of the layers because this is not the problem I have with it, if anyth

Re: [JOB] Sr. Python Developer, Northern VA

2007-03-22 Thread skip
> "Anton" == Anton Vredegoor <[EMAIL PROTECTED]> writes: Anton> Steve Holden wrote: >> Feel better now? Anton> Yes! But *now* I'm afraid it will have negative consequences for Anton> my future employability. However if it will lead to adjusting the Anton> kind of submissio

Re: Garbage collection

2007-03-22 Thread Alex Martelli
Steve Holden <[EMAIL PROTECTED]> wrote: ... > > a. fork > > b. do the memory-hogging work in the child process > > c. meanwhile the parent just waits > > d. the child sends back to the parent the small results > > e. the child terminates > > f. the parent proceeds merrily > > > > I learned this

Re: On Java's Interface (the meaning of interface in computer programing)

2007-03-22 Thread jim burton
On 22 Mar, 12:45, Lew <[EMAIL PROTECTED]> wrote: > Jim Burton wrote: > > Or you could stop feeding the trolls. > > People need to stop saying that. The original post was a detailed if incorrect > exposition of Java information. How in the world do you rate that trollish? > > I have absolutely no re

Re: How to receive a FILE* from Python under MinGW?

2007-03-22 Thread John Pye
On Mar 22, 7:23 pm, Giovanni Bajo <[EMAIL PROTECTED]> wrote: > I personally don't use MSYS so I don't know exactly. I use SCons too, and I > simply run it from the normal command prompt. > > I *believe* it's sufficient to unpack MSYS somewhere (you can either unpack it > *over* the directory where

Re: My MVC critique

2007-03-22 Thread Michael Bentley
On Mar 22, 2007, at 9:29 AM, [EMAIL PROTECTED] wrote: > mickey mouse Well, at least you spelled Mickey Mouse right... :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3000 idea: reversing the order of chained assignments

2007-03-22 Thread Steve Holden
Duncan Booth wrote: > Steve Holden <[EMAIL PROTECTED]> wrote: > >> Help me out here. It looks as though the real syntax should >> be something like >> >> assignment_stmt ::= (target_list "=")+ expression_list | >> (target_list "=")+ assignment_stmt >

Re: On Java's Interface (the meaning of interface in computer programing)

2007-03-22 Thread Slartibartfast
"jim burton" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 22 Mar, 12:45, Lew <[EMAIL PROTECTED]> wrote: >> Jim Burton wrote: >> > Or you could stop feeding the trolls. >> >> People need to stop saying that. The original post was a detailed if >> incorrect >> exposition of Jav

Re: Python 3000 idea: reversing the order of chained assignments

2007-03-22 Thread Steve Holden
Duncan Booth wrote: > Steve Holden <[EMAIL PROTECTED]> wrote: > >>> As a matter of interest do PyLint or PyChecker check for this situation >>> (chained assignment where the target of an assignment is also a >>> subexpression of a later assignment)? >>> >> Where's the published syntax for chaine

Re: fine grain logging cotrol

2007-03-22 Thread Eric S. Johansson
Peter Otten wrote: > Eric S. Johansson wrote: > >> I need to to be able to conditionally log based on the method the log >> statement is in and one other factor like a log level. in order to do >> so, I need to be able to automatically find out the name of the method >> and its class but I haven'

Re: parsing tables with beautiful soup?

2007-03-22 Thread Duncan Booth
"cjl" <[EMAIL PROTECTED]> wrote: > This works: > > for row in soup.find("table",{"class": "class_name"}): > for cell in row: > print cell.contents[0] > > Is there a better way to do this? > It may work for the page you are testing against, but it wouldn't work if your page cont

Re: interpreting glyph outlines from ttfquery?

2007-03-22 Thread Mike C. Fletcher
Wojciech Muła wrote: > swiftset wrote: > >> I'm try to convert a glyph into a format I can easily numerically >> manipulate. So far I've figured out how to use ttfquery to get a list >> that represents the outline of a contour in a glyph: >> >> from ttfquery import describe, glyphquery, glyph >>

Been a while...

2007-03-22 Thread John Salerno
Hi guys. It's been a while since I've used Python, so I got a little rusty, but I really want to start using it again, just out of habit and for fun. Can anyone suggest a book or a website with little projects I could work on to keep me busy? (I do have Beginning Python with the 10 projects in

Re: Python 3000 idea: reversing the order of chained assignments

2007-03-22 Thread Duncan Booth
Steve Holden <[EMAIL PROTECTED]> wrote: > In other words, > > assignment_stmt ::= (target_list "=") expression_list | > (target_list "=") assignment_stmt > > and > > assignment_stmt ::= (target_list "=") assignment_stmt | >

Re: Been a while...

2007-03-22 Thread Michael Bentley
On Mar 22, 2007, at 10:34 AM, John Salerno wrote: > Hi guys. It's been a while since I've used Python, so I got a little > rusty, but I really want to start using it again, just out of habit > and > for fun. Can anyone suggest a book or a website with little projects I > could work on to keep m

Question regarding __new__

2007-03-22 Thread Frank Benkstein
Hi, the behaviour I always observed when creating instances by calling the class A is that '__init__' is always only called when the object returned by A.__new__ is an instance of A. This can be observed by the following code: class A(object): def __new__(cls, *args, **kwds): print "A

Re: #!/usr/bin/env python > 2.4?

2007-03-22 Thread starGaming
On Mar 21, 11:11 pm, Sander Steffann <[EMAIL PROTECTED]> wrote: > Hi, > > Op 21-mrt-2007, om 20:41 heeft [EMAIL PROTECTED] het volgende > geschreven: > > > > > On Mar 21, 11:07 am, Jon Ribbens <[EMAIL PROTECTED]> wrote: > >> In article <[EMAIL PROTECTED]>, Stargaming wrote: > >>> from sys import ve

Re: Python 3000 idea: reversing the order of chained assignments

2007-03-22 Thread Ziga Seilnacht
John Nagle wrote: > > That's fascinating. Is that a documented feature of the language, > or a quirk of the CPython interpreter? > Its a documented feature of the language. From the Reference Manual: "An assignment statement evaluates the expression list (remember that this can be a single ex

Re: Regexp problem with `('

2007-03-22 Thread Paul McGuire
On Mar 22, 3:26 am, "Johny" <[EMAIL PROTECTED]> wrote: > I have the following text > > Goods Item 146 (174459989) - OurWebSite > > from which I need to extract > `Goods Item 146 ' > > Can anyone help with regexp? > Thank you for help > L. Here's the immediate answer to your question. import r

Re: Regexp problem with `('

2007-03-22 Thread John Nagle
Johny wrote: > I have the following text > > Goods Item 146 (174459989) - OurWebSite > > from which I need to extract > `Goods Item 146 ' > > Can anyone help with regexp? > Thank you for help > L. In general, parsing HTML with regular expressions is a bad idea. Usually, you use somethin

challenge ?

2007-03-22 Thread alain
I have a problem I wonder if it has been solved before. I have a dictionnary and I want the values in the dictionnary to be annotated with the rank that would be obtained by sorting the values def annotate_with_rank(my_dict): return my_annotated_dict In other words, any value

Re: #!/usr/bin/env python > 2.4?

2007-03-22 Thread Jon Ribbens
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > I don't see any problem with:: > > if version_info[0] <= 2 and version_info[1] < 4: > raise RuntimeError() What if the version number is 1.5? -- http://mail.python.org/mailman/listinfo/python-list

State of the Art Software Development Practices

2007-03-22 Thread dant262
Dan Turk Colorado State University 26 Rockwell Hall Fort Collins, CO 80523-1277 USA March 22, 2007 My name is Dan Turk, and I am a faculty member in the Department of Computer Information Systems at Colorado State University. My colleague, Leo Vijayasarathy, and I are conducting a study to be

Re: Python 3000 idea: reversing the order of chained assignments

2007-03-22 Thread John Nagle
Mark T wrote: > > "Alex Martelli" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >> John Nagle <[EMAIL PROTECTED]> wrote: >> >>> Marcin Ciura wrote: >>> >>> > Neither would I. I must have expressed myself not clearly enough. >>> > Currently >>> > x = y = z >>> > is roughly equiv

Re: why brackets & commas in func calls can't be ommited? (maybe it could be PEP?)

2007-03-22 Thread Bart Willems
dmitrey wrote: > 1st still is shorter by 1 char; considering majority of people use > space after comma & number of parameters can be big it yileds > foo bar baz bar2 bar3 bar4 > vs > foo(bar, baz, bar2, bar3, bar4) I think most readers already agree on the ambiguities part. Now, for the length o

ZSI, SOAP and .NET web services - problem

2007-03-22 Thread Jaroslaw Zabiello
I try to connect to web services (written in C#/.NET) with latest ZSI 2.0rc3 library. It just does not work. from ZSI.ServiceProxy import ServiceProxy wsdl = 'http://192.168.0.103/NewWebServices/TemplateInsert.asmx?wsdl' print ServiceProxy(wsdl, tracefile=sys.stdout) "C:\opt\Python25\lib\site-

Re: Printing __doc__

2007-03-22 Thread Bart Ogryczak
On Mar 21, 8:47 pm, "gtb" <[EMAIL PROTECTED]> wrote: > Greetings, > > Don't know the daily limit for dumb questions so I will ask one or > more. > > In a function I can use the statement n = > sys._getframe().f_code.co_name to get the name of the current > function. Given that I can get the name ho

Re: [JOB] Sr. Python Developer, Northern VA

2007-03-22 Thread Anton Vredegoor
[EMAIL PROTECTED] wrote: > I think the steady increase in the number of active listings over the > past couple years bodes well for the job prospects of Python > programmers as a whole. There are currently 99 job postings on the > job board dating back to mid-December. A year ago there were a

Re: Technical Answer - Protecting code in python

2007-03-22 Thread Thomas Heller
Bart Willems schrieb: > Aaah, *now* we're getting somewhere... :-) > >>> All he wants is something that turns 'readable, >>> changeable python' into 'unreadable, immutable python'. >> >> chown scriptuser script.py # a unique user >> chmod a-rwx script.py >> chmod u+rx script.py >> >> I believe

Re: Technical Answer - Protecting code in python

2007-03-22 Thread Bart Willems
Aaah, *now* we're getting somewhere... :-) >> All he wants is something that turns 'readable, >> changeable python' into 'unreadable, immutable python'. > > chown scriptuser script.py # a unique user > chmod a-rwx script.py > chmod u+rx script.py > > I believe that fully meets the functional r

Re: challenge ?

2007-03-22 Thread Frank Benkstein
Hi, On 22 Mar 2007 09:41:43 -0700 "alain" <[EMAIL PROTECTED]> wrote: > I have a problem I wonder if it has been solved before. > I have a dictionnary and I want the values in the dictionnary to be > annotated with the rank that would be obtained by sorting the values > > def annotate_with_rank(m

Kamaelia & Google's Summer of Code 2007

2007-03-22 Thread Michael
Hi, We're (BBC Research) participating in Google's Summer of Code as a mentor organisation again, and I thought it worth spreading some extra publicity where I think there might be some interested people. (I perhaps should've sent this sooner!) * What's Google Summer of Code? (I suspect most pe

Re: On Java's Interface (the meaning of interface in computer programing)

2007-03-22 Thread Nigel Wade
Lew wrote: > Jim Burton wrote: >> Or you could stop feeding the trolls. > > People need to stop saying that. The original post was a detailed if > incorrect > exposition of Java information. How in the world do you rate that trollish? a) Xah's posting history. b) the cross-posting c) the advoc

Re: Been a while...

2007-03-22 Thread kyosohma
On Mar 22, 11:21 am, Michael Bentley <[EMAIL PROTECTED]> wrote: > On Mar 22, 2007, at 10:34 AM, John Salerno wrote: > > > Hi guys. It's been a while since I've used Python, so I got a little > > rusty, but I really want to start using it again, just out of habit > > and > > for fun. Can anyone sugg

Re: challenge ?

2007-03-22 Thread Raymond Hettinger
On Mar 22, 9:41 am, "alain" <[EMAIL PROTECTED]> wrote: > I have a problem I wonder if it has been solved before. > I have a dictionnary and I want the values in the dictionnary to be > annotated with the rank that would be obtained by sorting the values > > def annotate_with_rank(my_dict): >

Re: Python 3000 idea: reversing the order of chained assignments

2007-03-22 Thread Erik Johnson
"Virgil Dupras" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > class Node: > > > ... pass > > > ... > > node = Node() > > nextnode = Node() > > backup_node = node > > node = node.next = nextnode > > node.next is node > > > True > > hasattr(ba

Re: challenge ?

2007-03-22 Thread Frank Benkstein
Hi, again, On Thu, 22 Mar 2007 18:11:46 +0100 Frank Benkstein <[EMAIL PROTECTED]> wrote: > On 22 Mar 2007 09:41:43 -0700 > "alain" <[EMAIL PROTECTED]> wrote: > > > I have a problem I wonder if it has been solved before. > > I have a dictionnary and I want the values in the dictionnary to be > >

Re: flattening/rolling up/aggregating a large sorted text file

2007-03-22 Thread Eddie Corns
[EMAIL PROTECTED] writes: >Hi, >Given a large ascii file (delimited or fixed width) with one ID field >and dimensions/measures fields, sorted by dimensions, I'd like to >"flatten" or "rollup" the file by creating new columns: one for each >combination of dimension level, and summing up measures o

Problem with time

2007-03-22 Thread ian
Hi, i have a problem with time in python. 1) i got 2 values from mysql db (fields are "time" type) 2) python get it as "" (why timedelta???) 3) i need to compare 2 fields with actual time ... EG: if ArrOutputsAuto[i].TimeFrom >= GNow and ArrOutputsAuto[i].TimeTo <= GNow: i need actual time, and

Re: ZSI, SOAP and .NET web services - problem

2007-03-22 Thread Laszlo Nagy
> I tried to use different library - SOAPpy, but I couldn't. It requires > fpconst library which cannot be installed because its server does not > respond at all. What a shit... > I concur! When I tried to use ZSI the first time, it turned out it has no support for attachments. Next time I it

Re: parsing tables with beautiful soup?

2007-03-22 Thread cjl
DB: Thank you, that worked perfectly. -CJL -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with time

2007-03-22 Thread Michael Bentley
> > 1) i got 2 values from mysql db (fields are "time" type) > 2) python get it as "" (why timedelta???) > 3) i need to compare 2 fields with actual time ... EG: > if ArrOutputsAuto[i].TimeFrom >= GNow and ArrOutputsAuto[i].TimeTo > <= GNow: > > i need actual time, and 2 fields from DB in datetim

testing

2007-03-22 Thread anita_group1
This is a test. -- http://mail.python.org/mailman/listinfo/python-list

Re: [JOB] Sr. Python Developer, Northern VA

2007-03-22 Thread Anton Vredegoor
Michael Bentley wrote: > Perhaps it is different where you live, but here you can put on your > resume relevant things that aren't paying jobs. Otherwise nobody > would ever get their first job, right? Sure you can. But around here if one has been unemployed for a while it's nearly impossib

Re: [JOB] Sr. Python Developer, Northern VA

2007-03-22 Thread Michael Bentley
On Mar 22, 2007, at 12:07 PM, Anton Vredegoor wrote: > Agreed. There's now probably even room on the job market for those who > don't belong to the select elite of early adopters. We might even root > out the professionalist attitude and address the problem of tying > people > to their resumes.

Re: Python 3000 idea: reversing the order of chained assignments

2007-03-22 Thread Erik Johnson
Actually, after studying this a bit more: http://docs.python.org/ref/assignment.html I guess that makes sense. Sorry if I muddied the water for anyone else in my boat: n1 = n1.next = n2 The first thing that happens is the expression list is evaluated which is the thing on the far right, n2. That

Re: challenge ?

2007-03-22 Thread Paul Rubin
"alain" <[EMAIL PROTECTED]> writes: > def annotate_with_rank(my_dict): > > return my_annotated_dict > > In other words, any value a_value would become a 2-tuple > (a_value,rank_of_a_value) > > I seek an elegant solution. Untested: def annotate_with_rank(my_dict): s =

Re: why brackets & commas in func calls can't be ommited? (maybe it could be PEP?)

2007-03-22 Thread Steve Holden
Bart Willems wrote: > dmitrey wrote: >> 1st still is shorter by 1 char; considering majority of people use >> space after comma & number of parameters can be big it yileds >> foo bar baz bar2 bar3 bar4 >> vs >> foo(bar, baz, bar2, bar3, bar4) > > I think most readers already agree on the ambiguiti

Re: why brackets & commas in func calls can't be ommited? (maybe it could be PEP?)

2007-03-22 Thread Paul Rubin
Steve Holden <[EMAIL PROTECTED]> writes: > > I agree that in you example the first syntax yields a full /five/ > > spaces less than the second syntax. However, it ignores the fact > > that if you are creating functions with that many arguments, you are > > probably doing something wrong. Can't thos

Re: [JOB] Sr. Python Developer, Northern VA

2007-03-22 Thread Michael Bentley
On Mar 22, 2007, at 1:00 PM, Anton Vredegoor wrote: > So HRM people keep asking questions like 'But > what have you been doing?' In the end I just started my own > company, and > while I'm not always employed as a freelancer I can at least now > say I'm > running my own business. Yeah, I've

[ANN] Python courses this Spring

2007-03-22 Thread wesley chun
I'll be giving a variety of Python courses this Spring. Daytime courses are for visitors and locals who need Python training in the shortest amount of time possible via consecutive workdays. Python is certainly gaining momentum as our February course filled up completely! Although I had planned

Re: challenge ?

2007-03-22 Thread Michael Spencer
alain wrote: > I have a problem I wonder if it has been solved before. > I have a dictionnary and I want the values in the dictionnary to be > annotated with the rank that would be obtained by sorting the values > > def annotate_with_rank(my_dict): > > return my_annotated_dict >

Re: Python 3000 idea: reversing the order of chained assignments

2007-03-22 Thread Terry Reedy
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Terry Reedy wrote: | > The assignment order is specified in the language reference. | | Where? I'm looking at | | http://docs.python.org/ref/assignment.html | | right now. The first line of the syntax grammar is: assi

How can I tar each sub-directories inside a directory

2007-03-22 Thread [EMAIL PROTECTED]
Hi, how can I do * for each sub-directory of the current directory * tar that to a tar file * remove that sub-directory -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3000 idea: reversing the order of chained assignments

2007-03-22 Thread Duncan Booth
Steve Holden <[EMAIL PROTECTED]> wrote: >> As a matter of interest do PyLint or PyChecker check for this situation >> (chained assignment where the target of an assignment is also a >> subexpression of a later assignment)? >> > Where's the published syntax for chained assignment? http://docs.p

  1   2   >