Re: is decorator the right thing to use?

2008-09-24 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 whic

Re: curses.setsyx()?

2008-09-24 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: >> >> > >> > [EM

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

2008-09-24 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: Off topic: Sent from my Foo messages

2008-09-24 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 si

Re: How to parse a string completely into a list

2008-09-24 Thread john . ford
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: > >> On Wed, Sep 24, 2008 at 8:30 PM,  <[EMAIL PROTECTED]> wrote: > >>> I want to take a long alpha-numeric string with \n and white-space and >

Re: multiple processes with private working dirs

2008-09-24 Thread alex23
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? http://groups.google.com/group/comp.lang.python/browse_frm/thread/42c13cbb84f88f2b -- http://mail.python.org/

Re: How to parse a string completely into a list

2008-09-24 Thread Matt Nordhoff
[EMAIL PROTECTED] wrote: > On Sep 24, 9:44 pm, "Chris Rebert" <[EMAIL PROTECTED]> wrote: >> On Wed, Sep 24, 2008 at 8:30 PM, <[EMAIL PROTECTED]> wrote: >>> 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 >

multiple processes with private working dirs

2008-09-24 Thread Tim Arnold
I have a bunch of processes to run and each one needs its own working directory. I'd also like to know when all of the processes are finished. (1) First thought was threads, until I saw that os.chdir was process-global. (2) Next thought was fork, but I don't know how to signal when each child is

The Python computer language

2008-09-24 Thread ROSEEE
http://pythoncomputer.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: How to parse a string completely into a list

2008-09-24 Thread john . ford
On Sep 24, 9:44 pm, "Chris Rebert" <[EMAIL PROTECTED]> wrote: > On Wed, Sep 24, 2008 at 8:30 PM,  <[EMAIL PROTECTED]> wrote: > > 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 separat

Re: is decorator the right thing to use?

2008-09-24 Thread Dmitry S. Makovey
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 which property of A has instanc

Re: is decorator the right thing to use?

2008-09-24 Thread Dmitry S. Makovey
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 call to A, that is an A

Re: How to parse a string completely into a list

2008-09-24 Thread Chris Rebert
On Wed, Sep 24, 2008 at 8:30 PM, <[EMAIL PROTECTED]> wrote: > 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 wit

Re: Off topic: Sent from my Foo messages

2008-09-24 Thread Terry Reedy
Steven D'Aprano wrote: I'm seeing more and more posts from various people, on this list and others, with statements like the following: On Wed, 24 Sep 2008 18:45:35 -0400, David Di Biase wrote: Sent from my iPhone Also "Sent from my Blackberry" and similar. Without wishing to be rude to Da

Re: is decorator the right thing to use?

2008-09-24 Thread Dmitry S. Makovey
[EMAIL PROTECTED] wrote: > Your code below is very abstract, so it's kind of hard to figure out > what problem you're trying to solve, but it seems to me that you're > using the B proxy class to decorate the A target class, which means > you want one of these options: Sorry for unclarities in orig

Re: Schwartzian transform for tuple in list

2008-09-24 Thread Terry Reedy
David Di Biase wrote: When you say slightly, is it enough to make a difference? Why would getitems be faster even - not sure I can think why... Using key is faster than cmp because key is called just once for each item whereas cmp is called once for each of the O(nlogn) compares. Operator.

Re: is decorator the right thing to use?

2008-09-24 Thread Aaron "Castironpi" Brady
On Sep 24, 5:21 pm, "Dmitry S. Makovey" <[EMAIL PROTECTED]> wrote: > Hi, > > after hearing a lot about decorators and never actually using one I have > decided to give it a try. My particular usecase is that I have class that > acts as a proxy to other classes (i.e. passes messages along to those >

How to parse a string completely into a list

2008-09-24 Thread john . ford
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 don't believe that it has the power

Re: multiple processes, private working directories

2008-09-24 Thread Carl Banks
On Sep 24, 9:27 pm, Tim Arnold <[EMAIL PROTECTED]> wrote: > (2) Next thought was fork, but I don't know how to signal when each > child is > finished. Consider the multiprocessing module, which is available in Python 2.6, but it began its life as a third-party module that acts like threading modul

Re: python syntax for conditional is unfortunate

2008-09-24 Thread Aaron "Castironpi" Brady
On Sep 24, 9:49 pm, Asun Friere <[EMAIL PROTECTED]> wrote: > On Sep 25, 11:57 am, "Aaron \"Castironpi\" Brady" > > <[EMAIL PROTECTED]> wrote: > > On Sep 24, 8:40 pm, Asun Friere <[EMAIL PROTECTED]> wrote: > > > ... I think > > > your last version ('%d thing%s' % (i, 's' if i != 1 else '')), holding

Re: multiple processes, private working directories

2008-09-24 Thread Karthik Gurusamy
On Sep 24, 6:27 pm, Tim Arnold <[EMAIL PROTECTED]> wrote: > I have a bunch of processes to run and each one needs its own working > directory. I'd also like to know when all of the processes are > finished. > > (1) First thought was threads, until I saw that os.chdir was process- > global. > (2) Ne

Re: Off topic: Sent from my Foo messages

2008-09-24 Thread Sean DiZazzo
> -- > Steven I don't appreciate the two lines you put above your name in your posts. Please remove them in the future. ~Sean -- http://mail.python.org/mailman/listinfo/python-list

Re: Off topic: Sent from my Foo messages

2008-09-24 Thread Chris Rebert
On Wed, Sep 24, 2008 at 7:38 PM, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > I'm seeing more and more posts from various people, on this list and > others, with statements like the following: > > On Wed, 24 Sep 2008 18:45:35 -0400, David Di Biase wrote: > >> Sent from my iPhone > > Also "Sent from

Re: python syntax for conditional is unfortunate

2008-09-24 Thread Asun Friere
On Sep 25, 11:57 am, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]> wrote: > On Sep 24, 8:40 pm, Asun Friere <[EMAIL PROTECTED]> wrote: > > ... I think > > your last version ('%d thing%s' % (i, 's' if i != 1 else '')), holding > > all variables for placeholders in the tuple, is better. It's certa

Off topic: Sent from my Foo messages

2008-09-24 Thread Steven D'Aprano
I'm seeing more and more posts from various people, on this list and others, with statements like the following: On Wed, 24 Sep 2008 18:45:35 -0400, David Di Biase wrote: > Sent from my iPhone Also "Sent from my Blackberry" and similar. Without wishing to be rude to David, who I'm sure is a ni

Re: Comparing float and decimal

2008-09-24 Thread Steven D'Aprano
On Wed, 24 Sep 2008 04:30:03 -0500, Nick Craig-Wood wrote: > Both the Fraction module and the Decimal module could represent floats > exactly and reversibly since floats are of the form > > mantissa * 2**exponent > > which is exactly representable as a fraction (rational) and also as > > m

Re: urllib error on urlopen

2008-09-24 Thread Steven D'Aprano
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 worked great until the middle of the afternoon yesterday. Now I get > the

Re: Making small executive file for distribution

2008-09-24 Thread Grant Edwards
On 2008-09-25, Larry Bates <[EMAIL PROTECTED]> wrote: > Marin Brkic wrote: >> Not commercial distribution, but an academic kind of sorts - giving >> the exe file to coleagues, so they can use it in their work. Giving >> .py file is not an option, since due to centralized computer >> maintenance, th

Re: empty csv file attachments

2008-09-24 Thread Sean DiZazzo
On Sep 24, 1:17 pm, Bobby Roberts <[EMAIL PROTECTED]> wrote: > hi group. > > I'm new to python but a veteran at programming.  This one has me > stumped.  I have a simple contact form which the user fills out.  The > email is sent to the site user as well and it is delivered with the > content in th

Re: Making small executive file for distribution

2008-09-24 Thread Larry Bates
Marin Brkic wrote: Not commercial distribution, but an academic kind of sorts - giving the exe file to coleagues, so they can use it in their work. Giving .py file is not an option, since due to centralized computer maintenance, they don't (and cannot) have installed python (except the ones that

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

2008-09-24 Thread Steven D'Aprano
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() > after printing an error

Re: Linq to Python

2008-09-24 Thread r0g
Duncan Booth wrote: > r0g <[EMAIL PROTECTED]> wrote: > >> OK so maybe I'm being naive here but it looks to me like this new >> paradigm's big idea is to use a python + SQL type syntax to access data >> in random objects. Big whoop. It's not that difficult to write a >> generators that wraps XML fi

Re: is decorator the right thing to use?

2008-09-24 Thread [EMAIL PROTECTED]
On Sep 24, 3:21 pm, "Dmitry S. Makovey" <[EMAIL PROTECTED]> wrote: > Hi, > > after hearing a lot about decorators and never actually using one I have > decided to give it a try. My particular usecase is that I have class that > acts as a proxy to other classes (i.e. passes messages along to those >

Re: multiple processes, private working directories

2008-09-24 Thread Michael Palmer
On Sep 24, 9:27 pm, Tim Arnold <[EMAIL PROTECTED]> wrote: > I have a bunch of processes to run and each one needs its own working > directory. I'd also like to know when all of the processes are > finished. > > (1) First thought was threads, until I saw that os.chdir was process- > global. > (2) Ne

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

2008-09-24 Thread Steven D'Aprano
On Wed, 24 Sep 2008 10:54:40 -0500, Grant Edwards wrote: > You're right. I had forgotten that sys.exit() is actually raising the > system exit exception, and that the application calling the library > could handle that exception. Could but shouldn't. The exception hierarchy was re-designed in P

Re: multiple processes, private working directories

2008-09-24 Thread Cameron Simpson
On 24Sep2008 18:27, Tim Arnold <[EMAIL PROTECTED]> wrote: | I have a bunch of processes to run and each one needs its own working | directory. I'd also like to know when all of the processes are | finished. | | (1) First thought was threads, until I saw that os.chdir was process- | global. Yep. B

Re: python syntax for conditional is unfortunate

2008-09-24 Thread Aaron "Castironpi" Brady
On Sep 24, 8:40 pm, Asun Friere <[EMAIL PROTECTED]> wrote: > On Sep 25, 3:16 am, Pete Forman <[EMAIL PROTECTED]> wrote: > > > Asun Friere <[EMAIL PROTECTED]> writes: > > >  > A canonical use of the conditional operator is in > >  > pluralising words, (eg. '%s dollar' % n + 's' if n!=1 else ''). > >

Re: multiple processes, private working directories

2008-09-24 Thread r0g
Tim Arnold wrote: > I have a bunch of processes to run and each one needs its own working > directory. I'd also like to know when all of the processes are > finished. > > (1) First thought was threads, until I saw that os.chdir was process- > global. > (2) Next thought was fork, but I don't know h

Re: python syntax for conditional is unfortunate

2008-09-24 Thread Asun Friere
On Sep 25, 3:16 am, Pete Forman <[EMAIL PROTECTED]> wrote: > Asun Friere <[EMAIL PROTECTED]> writes: > > > A canonical use of the conditional operator is in > > pluralising words, (eg. '%s dollar' % n + 's' if n!=1 else ''). > > That fails for n == 1. So what is best? > Sorry missing paranthese

Re: python syntax for conditional is unfortunate

2008-09-24 Thread Asun Friere
On Sep 25, 3:16 am, Pete Forman <[EMAIL PROTECTED]> wrote: > Asun Friere <[EMAIL PROTECTED]> writes: > > > A canonical use of the conditional operator is in > > pluralising words, (eg. '%s dollar' % n + 's' if n!=1 else ''). > > That fails for n == 1. So what is best? > Sorry missing parenthese

multiple processes, private working directories

2008-09-24 Thread Tim Arnold
I have a bunch of processes to run and each one needs its own working directory. I'd also like to know when all of the processes are finished. (1) First thought was threads, until I saw that os.chdir was process- global. (2) Next thought was fork, but I don't know how to signal when each child is

Re: Linq to Python

2008-09-24 Thread Grant Edwards
On 2008-09-24, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > hrishy a écrit : > (snip) > > >> I apologise >> (I thought Python programmers were smart and they did know what LINQ was) > > Is there really any relation between "being smart" and knowing anything > about the latest MS fad ? God, I

Er, one -lime- or two.

2008-09-24 Thread Aaron "Castironpi" Brady
A Python walks into a bar and orders a complex data structure. Bartender says, "One line or two?" -- http://mail.python.org/mailman/listinfo/python-list

Re: PyRun_SimpleFile() crashes

2008-09-24 Thread lixinyi . 23
On 9月25日, 午前1:05, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]> wrote: > On Sep 24, 6:30 am, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > > > > > [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > my code: > > > main.cpp > > > #include > > > > int main(int argc, char **argv) > > > { > > >

Re: urllib error on urlopen

2008-09-24 Thread Michael Palmer
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 until the middle of the afternoon yesterday. Now I get > the

Re: Making small executive file for distribution

2008-09-24 Thread Marin Brkic
On Wed, 24 Sep 2008 14:50:56 -0700 (PDT), sturlamolden <[EMAIL PROTECTED]> wrote: >On Sep 24, 3:17 pm, Marin Brkic <[EMAIL PROTECTED]> wrote: > >> Has anyone had a situation like this ? All your inputs and suggestions >> are more then welcomed. > >Send them the .py file and confirm that it does wo

Re: Folder Actions on Mac OSX Leopard?

2008-09-24 Thread Sean DiZazzo
On Sep 24, 12:31 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Greetings, > > I've been trying to figure out if it's possible to attach a Python > script to an action via Mac OSX Leopard's File Actions system. I'm > wanting to call a Python script every time a file is added to the > monitore

Re: Folder Actions on Mac OSX Leopard?

2008-09-24 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: Greetings, I've been trying to figure out if it's possible to attach a Python script to an action via Mac OSX Leopard's File Actions system. I'm wanting to call a Python script every time a file is added to the monitored folder. Just adding a .py file doesn't seem to d

Re: Linq to Python

2008-09-24 Thread Thomas G. Willis
On Sep 24, 4:59 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: ... > I haven't yet had occasion to use LINQ in anger yet, so I have no idea > whether its an idea to love or to hate. I do think it is good that C# has > effectively sprouted list comprehensions (not to mention anonymous types > and type

Re: Schwartzian transform for tuple in list

2008-09-24 Thread David Di Biase
When you say slightly, is it enough to make a difference? Why would getitems be faster even - not sure I can think why... Sent from my iPhone On 24-Sep-08, at 5:46 PM, Matt Nordhoff <[EMAIL PROTECTED]> wrote: Chris Rebert wrote: On Wed, Sep 24, 2008 at 2:02 PM, David Di Biase <[EMAIL PROT

is decorator the right thing to use?

2008-09-24 Thread Dmitry S. Makovey
Hi, after hearing a lot about decorators and never actually using one I have decided to give it a try. My particular usecase is that I have class that acts as a proxy to other classes (i.e. passes messages along to those classes) however hand-coding this type of class is rather tedious, so I decid

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

2008-09-24 Thread Craig Allen
> Why, yes, I am wearing my BOFH hat. How could you tell? > > -- > Tim Rowe evil, but I think you may be a BSEFH, not a BOFH. -- http://mail.python.org/mailman/listinfo/python-list

Re: Making small executive file for distribution

2008-09-24 Thread sturlamolden
On Sep 24, 3:17 pm, Marin Brkic <[EMAIL PROTECTED]> wrote: > Has anyone had a situation like this ? All your inputs and suggestions > are more then welcomed. Send them the .py file and confirm that it does work. The lack of Python can be blamed on the incompetent BOFH. Chances are the situation w

Re: Schwartzian transform for tuple in list

2008-09-24 Thread Matt Nordhoff
Chris Rebert wrote: > On Wed, Sep 24, 2008 at 2:02 PM, David Di Biase <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I have a rather large list structure with tuples contained in them (it's >> part of a specification I received) looks like so: >> [(x1,y1,r1,d1),(x2,y2,r2,d2)...] >> >> The list can range f

Re: Linq to Python

2008-09-24 Thread sturlamolden
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 SQL like expressions which > will work

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

2008-09-24 Thread Ross Ridge
Grant Edwards <[EMAIL PROTECTED]> wrote: > Same here. It's like an automotive engine controls designer > asking if a failed O2 sensor should turn on the check engine > light or blow up the car. Ross Ridge <[EMAIL PROTECTED]> wrote: > No, it's more like asking if the failed sensor should turn on

Re: Schwartzian transform for tuple in list

2008-09-24 Thread Chris Rebert
On Wed, Sep 24, 2008 at 2:02 PM, David Di Biase <[EMAIL PROTECTED]> wrote: > Hi, > > I have a rather large list structure with tuples contained in them (it's > part of a specification I received) looks like so: > [(x1,y1,r1,d1),(x2,y2,r2,d2)...] > > The list can range from about 800-1500 tuples in

Schwartzian transform for tuple in list

2008-09-24 Thread David Di Biase
Hi, I have a rather large list structure with tuples contained in them (it's part of a specification I received) looks like so: [(x1,y1,r1,d1),(x2,y2,r2,d2)...] The list can range from about 800-1500 tuples in size and I'm currently sorting it with this: a_list.sort(lambda a, b: cmp(b[3], a[3]))

Re: Linq to Python

2008-09-24 Thread Duncan Booth
r0g <[EMAIL PROTECTED]> wrote: > OK so maybe I'm being naive here but it looks to me like this new > paradigm's big idea is to use a python + SQL type syntax to access data > in random objects. Big whoop. It's not that difficult to write a > generators that wraps XML files and databases is it? >

Re: Linq to Python

2008-09-24 Thread sturlamolden
On Sep 24, 9:11 pm, [EMAIL PROTECTED] wrote: > In the meantime where I > live lot of people will keep using C# instead of Python and CLisp, > natural selection at work indeed. Please explain to me what Linq can do that Python does not. Put you emphasis on why this can't be done with a library, an

Re: Linq to Python

2008-09-24 Thread Bruno Desthuilliers
hrishy a écrit : (snip) I apologise (I thought Python programmers were smart and they did know what LINQ was) Is there really any relation between "being smart" and knowing anything about the latest MS fad ? -- http://mail.python.org/mailman/listinfo/python-list

Fwd: Twisted vs. CherryPy vs. ??? for light-weight web servers

2008-09-24 Thread Michael Mabin
I just want to be able to write simple scripts to serve xml data and don't want the headache of administrating an apache server. I want to collect some data from some of our production servers and share them with a sharepoint website. On Wed, Sep 24, 2008 at 12:29 PM, Jean-Paul Calderone <[EMAIL

empty csv file attachments

2008-09-24 Thread Bobby Roberts
hi group. I'm new to python but a veteran at programming. This one has me stumped. I have a simple contact form which the user fills out. The email is sent to the site user as well and it is delivered with the content in the body of the email as well in nice order. I have modified my code to a

Re: Linq to Python

2008-09-24 Thread r0g
[EMAIL PROTECTED] wrote: > sturlamolden: >> No, because Python already has list comprehensions and we don't need the XML >> buzzword.< > > LINQ is more than buzzwords. Python misses several of those features. > So maybe for once the Python crowd may recognize such C# feature as > much better than

empty csv file attachments

2008-09-24 Thread Bobby Roberts
hi group. I'm new to python but a veteran at programming. This one has me stumped. I have a simple contact form which the user fills out. The email is sent to the site user as well and it is delivered with the content in the body of the email as well in nice order. I have modified my code to a

online pharmacy perscription.dt8v1

2008-09-24 Thread gherlylu
Start saving, best online pharmacy here http://defgjkmahl.nufehrurald.net/?bciahlxwvrsydefgjkzchcmm -- http://mail.python.org/mailman/listinfo/python-list

Re: PyRun_SimpleFile() crashes

2008-09-24 Thread Aaron "Castironpi" Brady
On Sep 24, 11:05 am, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]> wrote: > On Sep 24, 6:30 am, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > > > > > [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > >  my code: > > >  main.cpp > > >  #include > > > >  int main(int argc, char **argv) > > >  { > >

Quick & Secured Pharmacy Online. rdjr0

2008-09-24 Thread gherlylu
Start saving, best online pharmacy here http://fjmgilbh.zarubanlo.net/?acdekbhxwvrsyfjmzchcmgil -- http://mail.python.org/mailman/listinfo/python-list

Folder Actions on Mac OSX Leopard?

2008-09-24 Thread [EMAIL PROTECTED]
Greetings, I've been trying to figure out if it's possible to attach a Python script to an action via Mac OSX Leopard's File Actions system. I'm wanting to call a Python script every time a file is added to the monitored folder. Just adding a .py file doesn't seem to do anything at all, and I can'

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

2008-09-24 Thread Bruno Desthuilliers
Ross Ridge a écrit : (snip) Grant Edwards <[EMAIL PROTECTED]> wrote: Same here. It's like an automotive engine controls designer asking if a failed O2 sensor should turn on the check engine light or blow up the car. Ross Ridge <[EMAIL PROTECTED]> wrote: No, it's more like asking if the fail

Re: Linq to Python

2008-09-24 Thread Chris Mellon
On Wed, Sep 24, 2008 at 2:11 PM, <[EMAIL PROTECTED]> wrote: > sturlamolden: >>No, because Python already has list comprehensions and we don't need the XML >>buzzword.< > > LINQ is more than buzzwords. Python misses several of those features. > So maybe for once the Python crowd may recognize such

Re: ANN: Python GUI development using XULRunner

2008-09-24 Thread Joe Hrbek
Todd, this is great! Thanks for your work on this. I've been using your extension for awhile, successfully creating little apps. Your gui_app template has been a huge help in advancing my understanding of how things fit together...takes some of the guesswork out. :) Thanks again, -j On Sep 16

RE: More regex help

2008-09-24 Thread Support Desk
Kirk, That's exactly what I needed. Thx! -Original Message- From: Kirk Strauser [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2008 11:42 AM To: python-list@python.org Subject: Re: More regex help At 2008-09-24T16:25:02Z, "Support Desk" <[EMAIL PROTECTED]> writes: > I am w

Re: Linq to Python

2008-09-24 Thread Tim Golden
[EMAIL PROTECTED] wrote: sturlamolden: No, because Python already has list comprehensions and we don't need the XML buzzword.< LINQ is more than buzzwords. Python misses several of those features. So maybe for once the Python crowd may recognize such C# feature as much better than things pres

Re: Linq to Python

2008-09-24 Thread bearophileHUGS
sturlamolden: >No, because Python already has list comprehensions and we don't need the XML >buzzword.< LINQ is more than buzzwords. Python misses several of those features. So maybe for once the Python crowd may recognize such C# feature as much better than things present in Python. Said that, I

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

2008-09-24 Thread Ross Ridge
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > Presumably somebody has suggested that calling sys.exit() was a good > option. I'm curious to what possible reason they could give for such a > poor choice. Grant Edwards <[EMAIL PROTECTED]> wrote: >Same here. It's like an automotive engine controls

Re: Linq to Python

2008-09-24 Thread sturlamolden
On Sep 24, 5:22 pm, hrishy <[EMAIL PROTECTED]> wrote: > Well wouldn't it be a lot easier to query and join a xml source with a > relational source with LINQ capabilites in Python. > > Hmm what am i missing here is there a site that takes all LINQ examples and > does them using list comprehension

Re: Making small executive file for distribution

2008-09-24 Thread Sebastian Bassi
On Wed, Sep 24, 2008 at 10:17 AM, Marin Brkic <[EMAIL PROTECTED]> wrote: > As far as I know py2exe is the only option which can do such a thing > (make exe files from scripts). Is there a way to make those exe files > a little smaller (for a small script they easily go up to 5-10 mb). An alternati

Re: Python is slow?

2008-09-24 Thread sturlamolden
I have updated the cookbook entry for yesterday to also include parallel processing for large data sets. Even if you're not interested in kd-trees, it is a good example of what the new multiprocessing standard module can do. There are still people being scared by the GIL, thinking it prevents Pyth

Re: Making small executive file for distribution

2008-09-24 Thread Marin Brkic
On Wed, 24 Sep 2008 07:32:56 -0700 (PDT), [EMAIL PROTECTED] wrote: >If you don't create a monolithic EXE, then most of the extra files >(that make up the bulk of the size) can be shared between other >converted scripts. That is, if you convert foo.py, and send the bundle >to your colleague, then c

Re: problem updating variable in a module

2008-09-24 Thread Terry Reedy
[EMAIL PROTECTED] wrote: Hi, I've a problem updating my variable in a module. In my main program, I call a function from mod1 to update a variable of mod1 As soon as I update this varibale, I check it back in the mail program but it the variable from mod1 does not get updated. main Program:

Re: Twisted vs. CherryPy vs. ??? for light-weight web servers

2008-09-24 Thread Jean-Paul Calderone
On Tue, 23 Sep 2008 21:22:08 -0500, Michael Mabin <[EMAIL PROTECTED]> wrote: Is there any consensus on what the best lightweight web-server is? Or rather would Twisted be a better choice to choose as a framework that allows me to serve html or xml data for light webservices. Or is CherryPy just

Re: python syntax for conditional is unfortunate

2008-09-24 Thread Pete Forman
Asun Friere <[EMAIL PROTECTED]> writes: > A canonical use of the conditional operator is in > pluralising words, (eg. '%s dollar' % n + 's' if n!=1 else ''). That fails for n == 1. So what is best? for i in range(4): print '%d thing' % i + ('s' if i != 1 else '') for i in range(4): p

Re: Comparing float and decimal

2008-09-24 Thread Terry Reedy
Mark Dickinson wrote: On Sep 23, 7:31 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: Decimal is something of an anomaly in Python because it was written to exactly follow an external standard, with no concessions to what would be sensible for Python. It is possible that that standard mandates that

Re: Python is slow?

2008-09-24 Thread sturlamolden
For those who are interested: I've updated the cookbook tutorial on the kd-tree: http://scipy.org/Cookbook/KDTree It now also includes parallel search for multicore CPUs (multiprocessing standard module). Even if you are not genuinely interested in kd-trees, it shows how to do parallel processi

Re: More regex help

2008-09-24 Thread Kirk Strauser
At 2008-09-24T16:25:02Z, "Support Desk" <[EMAIL PROTECTED]> writes: > I am working on a python webcrawler, that will extract all links from an > html page, and add them to a queue, The problem I am having is building > absolute links from relative links, as there are so many different types of > r

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

2008-09-24 Thread Mathieu Prevot
2008/9/24 Jaime Huerta Cepas <[EMAIL PROTECTED]>: > Hi all, > > I have developed a set python libraries that provide several scientific > methods to analyse and visualize certain type of biological data. This > libraries are based on many external python modules, such as python-mysql > python-sip

More regex help

2008-09-24 Thread Support Desk
I am working on a python webcrawler, that will extract all links from an html page, and add them to a queue, The problem I am having is building absolute links from relative links, as there are so many different types of relative links. If I just append the relative links to the current url, some w

how to build a MacOS universal python package including external dependencies

2008-09-24 Thread Jaime Huerta Cepas
Hi all, I have developed a set python libraries that provide several scientific methods to analyse and visualize certain type of biological data. This libraries are based on many external python modules, such as python-mysql python-sip or python-qt4. I use GNU/linux to develop my tools and I foun

Filthy Pink Sneakers. By Marina Cooper

2008-09-24 Thread fernandena
SEXY story. The cute doorman gives me an enigmatic look when I say I'm here to see you. I am not sure if maybe he thinks I am your daughter. You are not quite old enough for that, I am not quite young enough - but we are pretty close. Am I wrong for thinking that's hot? Definitely. I think... http

Re: PyRun_SimpleFile() crashes

2008-09-24 Thread Aaron "Castironpi" Brady
On Sep 24, 6:30 am, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >  my code: > >  main.cpp > >  #include > > >  int main(int argc, char **argv) > >  { > >  Py_Initialize(); > > >  FILE *file_1 = fopen("a2l_reader.py","r+"); > >  PyRun_SimpleFile(file_

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

2008-09-24 Thread Grant Edwards
On 2008-09-24, Ross Ridge <[EMAIL PROTECTED]> wrote: > Steven D'Aprano <[EMAIL PROTECTED]> wrote: >> Presumably somebody has suggested that calling sys.exit() was a good >> option. I'm curious to what possible reason they could give for such a >> poor choice. > > Grant Edwards <[EMAIL PROTECTED]

Re: problem updating variable in a module

2008-09-24 Thread dudeja . rajat
>I take it you do have a *really* good reason to use a global? Please suggest some way other than using global. I want to get rid of it -- Regards, Rajat -- http://mail.python.org/mailman/listinfo/python-list

urllib error on urlopen

2008-09-24 Thread Mike Driscoll
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 until the middle of the afternoon yesterday. Now I get the following traceback: Traceback (most recent call last): File "", line 1,

Re: Linq to Python

2008-09-24 Thread Thomas G. Willis
On Wed, Sep 24, 2008 at 11:25 AM, hrishy <[EMAIL PROTECTED]> wrote: > Hi Tom > > This is what i like and feel of the Python programmers smarter then every > other langauge i know of. > > But i am not comfortable with your second statement XML i never need it > one day everybody would need it. > >

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

2008-09-24 Thread Ross Ridge
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > Presumably somebody has suggested that calling sys.exit() was a good > option. I'm curious to what possible reason they could give for such a > poor choice. Grant Edwards <[EMAIL PROTECTED]> wrote: >Same here. It's like an automotive engine controls

Re: Linq to Python

2008-09-24 Thread hrishy
Hi Tom This is what i like and feel of the Python programmers smarter then every other langauge i know of. But i am not comfortable with your second statement XML i never need it one day everybody would need it. regards Hrishy --- On Tue, 23/9/08, Thomas G. Willis <[EMAIL PROTECTED]> wrote:

Re: problem updating variable in a module

2008-09-24 Thread dudeja . rajat
Thanks Tim, Yes, I mean 'mod' only. But this does not work for me On Wed, Sep 24, 2008 at 4:19 PM, Tim Rowe <[EMAIL PROTECTED]> wrote: > 2008/9/24 <[EMAIL PROTECTED]>: > > Hi, > > > > I've a problem updating my variable in a module. > > > > In my main program, I call a function from mod1 to u

Re: Linq to Python

2008-09-24 Thread hrishy
Hi Well wouldn't it be a lot easier to query and join a xml source with a relational source with LINQ capabilites in Python. Hmm what am i missing here is there a site that takes all LINQ examples and does them using list comprehensions and makes them sound easy ? wasn't python supposed to ma

Re: Linq to Python

2008-09-24 Thread hrishy
Hi Terry Oops i never realised the mistake i have commited I apologise (i thought changing the subject line would make a new thread) I apologise (I thought Python programmers were smart and they did know what LINQ was) I don't apologise ( i dont apologise for the third one not sounding cocky her

  1   2   >