On Feb 17, 10:48 pm, Sreejith K wrote:
> Hi everyone,
>
> I need to implement custom import hooks for an application
> (http://www.python.org/dev/peps/pep-0302/). I want to restrict an application
> to import certain modules (say socket module). Google app engine is
> using a module hook to do th
DANNY wrote:
>
>Hm, well I see that and now I am thinking of using reference software
>for MPEG4/10 which is written in c++ http://iphome.hhi.de/suehring/tml/
>just to use it as a decoder on my client side, save the file in that
>format and then play it in my player using pyffmpeg
>http://code.go
On Thu, 18 Feb 2010 00:03:51 -0800, Jonathan Gardner wrote:
> On Feb 17, 10:48 pm, Sreejith K wrote:
>> Hi everyone,
>>
>> I need to implement custom import hooks for an application
>> (http://www.python.org/dev/peps/pep-0302/). I want to restrict an
>> application to import certain modules (say
It would be highly appreciated if you could share this announcement
with your colleagues, students and individuals whose research is in
software engineering, software testing, software quality assurance,
software design and related areas.
Draft paper submission deadline is extended: SETP-10, Orlan
Hello
Is there is any Python library that allow such things:
Given a string expression as: x + 5 + x * (y + 2), any library that
can develop the equation for example.
Or if we say factor with "x" then it renders the expression with x *
( rest of expression ).
There could be a functionality where
On Thu, Feb 18, 2010 at 1:09 AM, lallous wrote:
> Hello
>
> Is there is any Python library that allow such things:
>
> Given a string expression as: x + 5 + x * (y + 2), any library that
> can develop the equation for example.
> Or if we say factor with "x" then it renders the expression with x *
> Given a string expression as: x + 5 + x * (y + 2), any library that
> can develop the equation for example.
> Or if we say factor with "x" then it renders the expression with x *
> ( rest of expression ).
> There could be a functionality where when x,y are given then the
> expression can be evalu
Jonathan Gardner wrote:
> On Feb 17, 12:02 am, Lawrence D'Oliveiro central.gen.new_zealand> wrote:
>> In message
>> <8ca440b2-6094-4b35-80c5-81d000517...@v20g2000prb.googlegroups.com>,
>>
>> Jonathan Gardner wrote:
>> > I used to think anonymous functions (AKA blocks, etc...) would be a
>> > nic
On Feb 18, 1:57 pm, Steven D'Aprano
wrote:
> On Thu, 18 Feb 2010 00:03:51 -0800, Jonathan Gardner wrote:
> > On Feb 17, 10:48 pm, Sreejith K wrote:
> >> Hi everyone,
>
> >> I need to implement custom import hooks for an application
> >> (http://www.python.org/dev/peps/pep-0302/). I want to restri
Mark Lawrence a écrit :
Ben Finney wrote:
Bruno Desthuilliers writes:
Mmmm... Let's try to explain the whole damn thing. It's really (and
IMHO beautifully) simple once you get it, but I agree it's a bit
peculiar when compared to most mainstream OO languages.
[…]
Bruno, that's the first time
Stephen Hansen wrote:
Or just leave it as a top level function where it was perfectly happy to
live :)
Yes. This is probably the sanest solution anyway, because probably
having many such functions to use, packing them into smth like
package.utils anyway is a good idea. I'm trying mainly to le
Hi,
is anybody aware of any updated and / or maintained library for
accessing AWS/PAA with Python? I found the dusty pyamazon and a
derivate of it, pyaws, but both of them do not seem to support request
signatures which must be used by August 15, 2009 to use the Amazon
Services, and generally seem
Bruno Desthuilliers writes:
> perhaps a lighter introductory text could be helpful. So guys, if you
> think a revised version of my post would be of interest, I'll take you
> on words: provide the hosting, I'll provide the content !-)
Here, let me work my hosting magic: http://wiki.python.org/>.
Sreejith K wrote:
On Feb 18, 1:57 pm, Steven D'Aprano
wrote:
On Thu, 18 Feb 2010 00:03:51 -0800, Jonathan Gardner wrote:
On Feb 17, 10:48 pm, Sreejith K wrote:
Hi everyone,
I need to implement custom import hooks for an application
(http://www.python.org/dev/peps/pep
Arnaud Delobelle writes:
> Descriptors to the rescue :)
>
> def read_body_from(filename):
> print "** loading content **"
> return "" % filename
>
> # This is a kind of class property
> class TemplateFilename(object):
> def __get__(self, obj, cls):
> return "%s.tmpl" % cls._
>> Given a string expression as: x + 5 + x * (y + 2), any library that
>> can develop the equation for example.
>> Or if we say factor with "x" then it renders the expression with x *
>> ( rest of expression ).
>> There could be a functionality where when x,y are given then the
>> expression can be
On Sat, Feb 13, 2010 at 09:19:59PM -0500, Chris Colbert wrote:
>You'll need acpi installed:
>In [6]: import subprocess
Thanks for that code, I'll try putting something together this weekend.
Dan
--
http://mail.python.org/mailman/listinfo/python-list
Hello everyone,
Disclaimer: I'm doing this mainly for learning purposes, to feel what
it's good for.
I'm trying to get print_internal_date become a static method AND to
refer to it in a class attribute 'tagdata' dict.
class PYFileInfo(FileInfo):
'python file properties'
@staticmeth
I'm not sure I have those files, but I'll look a little harder this
weekend when I put together the script.
Thanks for your help,
Dan
On Sat, Feb 13, 2010 at 08:23:28PM -0600, Tim Chase wrote:
> Daniel Dalton wrote:
> >On Sat, Feb 13, 2010 at 05:26:02PM -0800, Chris Rebert wrote:
> >>It's proba
On Sun, Feb 14, 2010 at 03:22:11AM +0100, Daniel Fetchinson wrote:
> /proc/acpi/battery/BAT0/info
> /proc/acpi/battery/BAT0/state
Had a quick look, but that path doesn't seem to exist, I'll look harder
on the weekend when I put the script together, because it has to be
somewhere.
Thanks,
Dan
--
Ben Finney a écrit :
Bruno Desthuilliers writes:
perhaps a lighter introductory text could be helpful. So guys, if you
think a revised version of my post would be of interest, I'll take you
on words: provide the hosting, I'll provide the content !-)
Here, let me work my hosting magic: http:/
Hi,
- I checked some ways doing this, and starting over with a new thing
will give you a lot of headaches - all XSLT processors have one or
another problem - success depends very much on how you where using
wikipedia (plugins?) and you will have to expect a lot of poking
around with details and s
mk, 18.02.2010 12:12:
> I'm trying to get print_internal_date become a static method AND to
> refer to it in a class attribute 'tagdata' dict.
>
> class PYFileInfo(FileInfo):
> 'python file properties'
>
> @staticmethod
> def print_internal_date(filename):
> f = open(filename
mk a écrit :
I'm trying to get print_internal_date become a static method AND to
refer to it in a class attribute 'tagdata' dict.
class PYFileInfo(FileInfo):
'python file properties'
@staticmethod
def print_internal_date(filename):
f = open(filename + 'c', "rb")
da
On Feb 18, 3:49 pm, Jean-Michel Pichavant
wrote:
> Sreejith K wrote:
> > On Feb 18, 1:57 pm, Steven D'Aprano
> > wrote:
>
> >> On Thu, 18 Feb 2010 00:03:51 -0800, Jonathan Gardner wrote:
>
> >>> On Feb 17, 10:48 pm, Sreejith K wrote:
>
> Hi everyone,
>
> I need to implement custom impo
Hello,
I am still fairly new to Python. Can someone explain to me why there
is a difference in f and g:
def make_power(n):
return lambda x: x ** n
# Create a set of exponential functions
f = [lambda x: x ** n for n in xrange(2, 5)]
g = [make_power(n) for n in xrange(2, 5)]
print f[0](3), f[
Sreejith K wrote:
On Feb 18, 3:49 pm, Jean-Michel Pichavant
wrote:
Sreejith K wrote:
On Feb 18, 1:57 pm, Steven D'Aprano
wrote:
On Thu, 18 Feb 2010 00:03:51 -0800, Jonathan Gardner wrote:
On Feb 17, 10:48 pm, Sreejith K wrote:
Hi everyone,
I
Leo Breebaart writes:
> Arnaud Delobelle writes:
>
>> Descriptors to the rescue :)
>>
>> def read_body_from(filename):
>> print "** loading content **"
>> return "" % filename
>>
>> # This is a kind of class property
>> class TemplateFilename(object):
>> def __get__(self, obj, cls)
Bruno Desthuilliers wrote:
I think I know where the problem is: what resides in tagdata is a
static method 'wrapper', not the function itself, according to:
Indeed. Sorry, I'm afraid I gave you bad advice wrt/ using a
staticmethod here - I should know better :( (well, OTHO staticmethods
are n
I'm looking at your code and was thinking ... why writing code that is
difficult to understand?
To answer your question though, they're different because in case "f", your
lambda experssion is only evaluated once. That means the variable 'n' is
ever only created once, and replaced repeatedly. In t
lallous writes:
> Hello,
>
> I am still fairly new to Python. Can someone explain to me why there
> is a difference in f and g:
>
> def make_power(n):
> return lambda x: x ** n
>
> # Create a set of exponential functions
> f = [lambda x: x ** n for n in xrange(2, 5)]
> g = [make_power(n) for
Bruno Desthuilliers wrote:
Thanks, that worked. But in order to make it work I had to get rid of
'self' in print_internal_date signature
Indeed. Using it that way, the print_internal_date will not be wrapped
in a method object.
Hold on! How does Python know what to wrap and what not to wrap,
Yes it should be listed somewhere, now I get it. Thanks Arnaud.
--
Elias
On Feb 18, 1:47 pm, Arnaud Delobelle wrote:
> lallous writes:
> > Hello,
>
> > I am still fairly new to Python. Can someone explain to me why there
> > is a difference in f and g:
>
> > def make_power(n):
> > return la
On Thu, 18 Feb 2010 04:28:00 -0800 (PST)
lallous wrote:
> def make_power(n):
> return lambda x: x ** n
Hint: type(make_power(2))
Did you expect that to return "int"?
> # Create a set of exponential functions
> f = [lambda x: x ** n for n in xrange(2, 5)]
> g = [make_power(n) for n in xrange
mk a écrit :
Bruno Desthuilliers wrote:
(snip)
class Foo2(object):
""" naive solution : kinda work, BUT will fail
with the real code that has plain functions
in 'tagada'
"""
@staticmethod
def bar(baaz):
print baaz
tagada = {'bar': bar}
def test
On Feb 18, 1:56 pm, "D'Arcy J.M. Cain" wrote:
> On Thu, 18 Feb 2010 04:28:00 -0800 (PST)
>
> lallous wrote:
> > def make_power(n):
> > return lambda x: x ** n
>
> Hint: type(make_power(2))
>
> Did you expect that to return "int"?
>
No, I expect to see a specialized function.
> > # Create a
Arnaud Delobelle writes:
> > One observation: if I implement the descriptor solution as
> > given above, the code works perfectly, but running the code
> > through pychecker now causes an error, because that again
> > causes an attempt to read from the non-existant base class
> > template file "F
mk wrote:
> Bruno Desthuilliers wrote:
>>> Thanks, that worked. But in order to make it work I had to get rid of
>>> 'self' in print_internal_date signature
>>
>> Indeed. Using it that way, the print_internal_date will not be wrapped
>> in a method object.
>
> Hold on! How does Python know what to
mk a écrit :
Bruno Desthuilliers wrote:
Thanks, that worked. But in order to make it work I had to get rid of
'self' in print_internal_date signature
Indeed. Using it that way, the print_internal_date will not be wrapped
in a method object.
Hold on! How does Python know what to wrap and what
On Feb 18, 2010, at 12:20 AM, alex23 wrote:
MRAB wrote:
Python 3.0 had a relatively short run before it was superseded by
Python
3.1 due to certain issues, so, IMHO, I wouldn't worry about it unless
someone especially requests/requires it.
And even then, I'd just tell them I accept patche
Bruno Desthuilliers wrote:
class Foo4(object):
""" working solution 2 : use a lambda """
@staticmethod
def bar(baaz):
print baaz
tagada = {'bar': lambda x : Foo4.bar(x)}
def test(self, baaz):
self.tagada['bar'](baaz)
Huh? How does this one work? After al
On Feb 17, 7:38 pm, Steven D'Aprano
wrote:
> On Wed, 17 Feb 2010 17:13:23 -0800, Jonathan Gardner wrote:
> > And once you realize that every program is really a compiler, then you
> > have truly mastered the Zen of Programming in Any Programming Language
> > That Will Ever Exist.
>
> In the same w
On Wed, Feb 17, 2010 at 2:37 PM, Stephen Hansen wrote:
> On Wed, Feb 17, 2010 at 10:14 AM, Victor Subervi
> wrote:
>
>> Obviously, the removeCSS isn't going to work in that last line. What can I
>> put there to remove the splash page after 5 seconds?
>>
>
> Even though you're generating this with
On Feb 18, 1:23 am, Duncan Booth wrote:
> Jonathan Gardner wrote:
> > On Feb 17, 12:02 am, Lawrence D'Oliveiro > central.gen.new_zealand> wrote:
> >> In message
> >> <8ca440b2-6094-4b35-80c5-81d000517...@v20g2000prb.googlegroups.com>,
>
> >> Jonathan Gardner wrote:
> >> > I used to think anonymo
mk a écrit :
Bruno Desthuilliers wrote:
class Foo4(object):
""" working solution 2 : use a lambda """
@staticmethod
def bar(baaz):
print baaz
tagada = {'bar': lambda x : Foo4.bar(x)}
def test(self, baaz):
self.tagada['bar'](baaz)
Huh? How does this one
Hello,
I have a routine that sends an email (this is how a Django view
notifies me that an event has happened). I want to unit test that
routine. So I gave each mail a unique subject line and I want to use
python's mailbox package to look for that subject. But sometimes the
mail gets delivered
Wes James wrote:
> I have been trying to create a list form a string. The string will be
> a list (this is the contents will look like a list). i.e. "[]" or
> "['a','b']"
>
> The "[]" is simple since I can just check if value == "[]" then return []
>
> But with "['a','b']" I have tried and get:
In article
,
commander_coder wrote:
> The real puzzler for me is that the test reliably fails every third
> time. For instance, if I try it six times then it succeeds the first,
> second, fourth, and fifth times. I have to say that I cannot
> understand this at all but it certainly makes the
Wes James wrote:
I have been trying to create a list form a string. The string will be
a list (this is the contents will look like a list). i.e. "[]" or
"['a','b']"
The "[]" is simple since I can just check if value == "[]" then return []
But with "['a','b']" I have tried and get:
a="['a','b
On Feb 18, 9:55 am, Roy Smith wrote:
> Just a wild guess here, but maybe there's some DNS server which
> round-robins three address records for some hostname you're using, one of
> which is bogus.
>
> I've seen that before, and this smells like the right symptoms.
Everything happens on my laptop,
On Thu, Feb 18, 2010 at 4:09 AM, lallous wrote:
> Hello
>
> Is there is any Python library that allow such things:
>
> Given a string expression as: x + 5 + x * (y + 2), any library that
> can develop the equation for example.
> Or if we say factor with "x" then it renders the expression with x *
Dear Group,
I was reading on SOA or Service Oriented Architecture for last few
days and got some questions. As this is a room for the expert computer
scientists, if you can help me solve my queries.
As per I read and felt SOA is an architecture, which relies on few
basic principles as,
the system
Bruno Desthuilliers wrote:
I think you broke something somewhere. Assuming you're using Python 2.x
(>= 2.3 IIRC), my above code works.
ARGH! Forgot the "delayed staticmethod" line -- in effect I called
staticmethod twice:
@staticmethod
def print_internal_date(filename):
f =
This one works for the product API.
http://pypi.python.org/pypi/python-amazon-product-api/0.2.1
On Thu, Feb 18, 2010 at 5:09 AM, Snaky Love wrote:
> Hi,
>
> is anybody aware of any updated and / or maintained library for
> accessing AWS/PAA with Python? I found the dusty pyamazon and a
> derivat
I have a Python app which I converted to an EXE (all files separate;
single EXE didn't work properly) via py2exe - I plan on distributing
this and would like the ability to remotely upgrade the program (for
example, via HTTP/HTTPS). Looks like it's not just the EXE that I
will need need to replac
Steve Howell wrote:
> If this is an argument against using anonymous functions, then it is a
> quadruple strawman.
>
> Shipping buggy code is a bad idea, even with named functions.
I doubt very much whether I have ever shipped any bug-free code but
even if it was fit for purpose when shipped it
On Feb 18, 10:27 am, Bruno Desthuilliers wrote:
> you could just mock the send_mail
> function to test that your app does send the appropriate mail - which is
> what you really want to know.
That's essentially what I think I am doing.
I need to send a relatively complex email, multipart, with b
Bruno, I talked to someone who explained to me how what you said
gives a way around my difficulty. Please ignore the other reply.
I'll do what you said. Thank you; I appreciate your help.
Jim
--
http://mail.python.org/mailman/listinfo/python-list
joy99, 18.02.2010 16:36:
> SOA is an architecture which is now a days governed like XML by W3C.
> The latest version is SOAP 1.2.
SOA has nothing to do with SOAP. SOAP is a (rather bloated) protocol for
remote procedure calls. SOA is a system architecture, be it distributed or not.
Stefan
--
htt
It seems intuitive to me that the magic methods for overriding the +, -, <,
==, >, etc. operators should have no sideffects on their operands. Also,
that == should be commutative and transitive, that > and < should be
transitive, and anti-commutative.
Is this intuition written up in a PEP, or assu
On Feb 18, 7:50 am, Duncan Booth wrote:
> Steve Howell wrote:
> > If this is an argument against using anonymous functions, then it is a
> > quadruple strawman.
>
> > Shipping buggy code is a bad idea, even with named functions.
>
> I doubt very much whether I have ever shipped any bug-free code
On Thu, Feb 18, 2010 at 8:19 AM, Andrey Fedorov wrote:
> It seems intuitive to me that the magic methods for overriding the +, -, <,
> ==, >, etc. operators should have no sideffects on their operands. Also,
> that == should be commutative and transitive, that > and < should be
> transitive, and
>
> It may be intuitive to you, but its not true, written down anywhere, nor
> assumed by the language, and the mathematical meaning of the operators
> doesn't matter to Python. Python purposefully does not enforce anything for
> these methods.
Right, so neither is anything in PEP-8, but it's sti
On Thu, Feb 18, 2010 at 11:19 AM, Andrey Fedorov wrote:
> It seems intuitive to me that the magic methods for overriding the +, -, <,
> ==, >, etc. operators should have no sideffects on their operands. Also,
> that == should be commutative and transitive, that > and < should be
> transitive, and
Arnaud Delobelle wrote:
Here is a very simple way to improve what you do, which won't require
you to change the way you work or to learn a new paradigm:
Instead of testing your functions interactively, put your testing code
in a file, e.g. 'program_tests.py'. Your can then type
python prog
On 2010-02-18 10:19 AM, Andrey Fedorov wrote:
It seems intuitive to me that the magic methods for overriding the +, -,
<, ==, >, etc. operators should have no sideffects on their operands.
Also, that == should be commutative and transitive, that > and < should
be transitive, and anti-commutative.
2010/2/17 Arnaud Delobelle :
> I know some people will point at more 'pro' ways of testing but this has
> the merit of being very straightforward. Then when you move on to more
> sophisticated techniques, I think you will understand better the
> motivations behind them.
Oh, I don't know. I like t
Andrey Fedorov wrote:
It may be intuitive to you, but its not true, written down
anywhere, nor assumed by the language, and the mathematical
meaning of the operators doesn't matter to Python. Python
purposefully does not enforce anything for these methods.
Right, so neither is
Sorry to bother everyone again, but I have this problem bugging me:
#!/usr/bin/python -i
class Foo(object):
def nostat(self,val):
print val
nostat.__orig_get__ = nostat.__get__
@staticmethod
def nostatget(*args, **kwargs):
print 'args:', args, 'kwargs:', kwarg
On 18 February 2010 15:36, joy99 wrote:
> (iv) Is SOAPpy fine?
AFAIK, SOAPpy is unsupported, and a bit on the stale side. Those poor
souls forced to make SOAP calls with Python seem to be using Suds
mostly these days,.
--
Cheers,
Simon B.
--
http://mail.python.org/mailman/listinfo/python-li
Does anyone know what happened to pyjs.org ?
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
Daniel Fetchinson wrote:
Does anyone know what happened to pyjs.org ?
Cheers,
Daniel
According to google cache it was fine 13/02/2010 and it's down according
to this.
http://downforeveryoneorjustme.com/pyjs.org
HTH.
Mark Lawrence
--
http://mail.python.org/mailman/listinfo/python-list
it's working for me.
On Thu, Feb 18, 2010 at 1:16 PM, Daniel Fetchinson <
fetchin...@googlemail.com> wrote:
> Does anyone know what happened to pyjs.org ?
>
> Cheers,
> Daniel
>
>
> --
> Psss, psss, put it down! - http://www.cafepress.com/putitdown
> --
> http://mail.python.org/mailman/listinfo/p
>> Does anyone know what happened to pyjs.org ?
>
> it's working for me.
That's odd, it's unpingable for me from both Europe and the US, ping
says unknown host.
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
I'm doing a code review of an application that occassionally
writes blocks of secure data to temp files created with
tempfile.TemporaryFile( delete=True ).
How secure are temp files created via tempfile.TemporaryFile(
delete=True )?
Are there OS specific nuances I should be concerned about
regard
Down from here (NH, US).
S
On Feb 18, 2010, at 1:44 PM, Chris Colbert wrote:
>
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Feb 18, 2010 at 8:18 AM, Tim Chase
wrote:
> Wes James wrote:
>
> Just to add to the list of solutions I've seen, letting the built-in csv
> module do the heavy lifting:
>
> >>> s = "['a','b']"
> >>> import csv
> >>> no_brackets = s[1:-1] # s.strip(' \t[]')
> >>> c = csv.reader([no_br
pyt...@bdurham.com wrote:
I'm doing a code review of an application that occassionally writes
blocks of secure data to temp files created with tempfile.TemporaryFile(
delete=True ).
How secure are temp files created via tempfile.TemporaryFile( delete=True )?
Are there OS specific nuances I s
John Nagle wrote:
I look at this as Python's answer to multicore CPUs and "Go".
On that note, I went to a talk at Stanford yesterday by one of the
designers of Intel's Nelahem core. The four-core, eight thread
version is out now. The six-core, twelve thread version is working;
the spea
On Thu, Feb 18, 2010 at 12:32 PM, Wes James wrote:
> On Thu, Feb 18, 2010 at 8:18 AM, Tim Chase
> wrote:
>> Wes James wrote:
>
>
>>
>> Just to add to the list of solutions I've seen, letting the built-in csv
>> module do the heavy lifting:
>>
>> >>> s = "['a','b']"
>> >>> import csv
>> >>> no
Your question is borderline if not out of topic in this group. I will
make a few comments though.
On Feb 18, 3:36 pm, joy99 wrote:
> Dear Group,
>
> I was reading on SOA or Service Oriented Architecture for last few
> days and got some questions. As this is a room for the expert computer
> scient
MRAB,
> Well, the contents of temp files aren't encrypted, if that's what you're
> asking
I understand the contents of temp files aren't encrypted.
> if you're writing unencrypted data to a temp file then other applications
> could read it.
That's my concern - can other applications really re
import csv
class IS_LIST():
def __init__(self, format='', error_message='must be a list!'):
self.format = format
self.error_message = error_message
def __call__(self, value):
try:
if value=='[]' or value=='':
value=[]
else:
commander_coder wrote:
> I have a routine that sends an email (this is how a Django view
> notifies me that an event has happened). I want to unit test that
> routine.
Are you opening SMTP and POP3 sockets??
If you are not developing that layer itself, just use Django's built-
in mock system. H
ah, yep, i was viewing the page chrome had cached. It's down for me too. I
lose the trace in Washington:
3 G3-0-873.TAMPFL-LCR-08.verizon-gni.net (130.81.110.222) 14.399 ms
17.917 ms 18.040 ms
4 so-6-1-0-0.TPA01-BB-RTR2.verizon-gni.net (130.81.29.242) 18.666 ms
18.890 ms 19.232 ms
5 ge
I just happened to look at a compiled Python 2.6.4 .PYC file in
an editor and noticed that the full path and file name of the
compiled module showed up in my .PYC file at least 10 different
times. Is there a reason for full vs. relative path names and why
does the module name need to be duplicated
On Thu, Feb 18, 2010 at 2:56 PM, Wes James wrote:
>
> I get an error (when I take the "try" out):
>
> AttributeError: 'function' object has no attribute 'reader'
>
You have a function called "csv" that's defined after the import csv
statement is executed. That function has no attribute 'reader",
Muhammad Alkarouri wrote:
Your question is borderline if not out of topic in this group. I will
make a few comments though.
This might be a Python group, but threads often drift way off topic,
which added to the language itself make this a great group to read. If
you don't like the way a threa
John Nagle wrote:
John Nagle wrote:
I look at this as Python's answer to multicore CPUs and "Go".
On that note, I went to a talk at Stanford yesterday by one of the
designers of Intel's Nelahem core. The four-core, eight thread
version is out now. The six-core, twelve thread version i
Quickly, I have a Mac Intel with Windows XP installed. Tried installing
Python 2.6.4 from the binary and also ActivePython 2.6.4.10. Both
installations acted the same. There seemed to be no problems during
installation (used default options), but when I try to run Python I get
an error message:
In article ,
Wes James wrote:
>
>try:
>if value=3D=3D'[]' or value=3D=3D'':
> value=3D[]
>else:
> no_brackets =3D value[1:-1] # s.strip(' \t[]')
> c =3D csv.reader([no_brackets], quotechar=3D"'")
> value=3Dc.n
Hello All,
The USENIX Large Installation System Administration Conference is now
accepting paper proposals.
If you are interested in submitting a paper, please check out this
blog post about submitting a paper
(http://www.usenix.org/events/lisa10/cfp/), or feel free to contact me
directly if you th
In article <5yudnafyso8houtwnz2dnuvz_tidn...@westnet.com.au>,
R (Chandra) Chandrasekhar wrote:
>
>---
>import subprocess
>
>width = 5
>height = 30
>colors = ['#abcdef]', '#456789']
>filename = "/tmp/image.png"
>
># I want to get the equivalent of variable interpolation in Perl
># so that the comma
On Thu, 18 Feb 2010 18:28:44 +0100, mk wrote:
> nostat.__orig_get__ = nostat.__get__
I should point out that leading-and-trailing-double-underscore names are
reserved for use by the language.
It's unlikely that Python will introduce a special method named
__orig_get__, and in truth the pr
On Thu, Feb 18, 2010 at 11:58 AM, John Nagle wrote:
> On that note, I went to a talk at Stanford yesterday by one of the
> designers of Intel's Nelahem core. The four-core, eight thread
> version is out now. The six-core, twelve thread version is working;
> the speaker has one in his lab. Th
On Thu, 18 Feb 2010 11:58:32 -0800, John Nagle wrote:
> John Nagle wrote:
>
>>I look at this as Python's answer to multicore CPUs and "Go".
>
> On that note, I went to a talk at Stanford yesterday by one of the
> designers of Intel's Nelahem core. The four-core, eight thread version
> i
On Thu, 18 Feb 2010 06:15:20 -0800, Steve Howell wrote:
> On Feb 18, 1:23 am, Duncan Booth wrote:
>> Jonathan Gardner wrote:
>> > On Feb 17, 12:02 am, Lawrence D'Oliveiro > > central.gen.new_zealand> wrote:
>> >> In message
>> >> <8ca440b2-6094-4b35-80c5-81d000517...@v20g2000prb.googlegroups.com
This has to be a stupid question, but :)
I have some generators that do stuff, then start yielding results. On
occasion, I don't want them to yield anything ever-- they're only really
"generators" because I want to call them /as/ a generator as part of a
generalized system.
The only way I can fig
On Feb 18, 4:28 am, lallous wrote:
>
> f = [lambda x: x ** n for n in xrange(2, 5)]
This is (pretty much) what the above code does.
>>> f = []
>>> n = 2
>>> f.append(lambda x: x**n)
>>> n = 3
>>> f.append(lambda x: x**n)
>>> n = 4
>>> f.append(lambda x: x**n)
>>> n = 5
>>> f.append(lambda x: x**
On 19 February 2010 08:07, Mark Lawrence wrote:
> Muhammad Alkarouri wrote:
>>
>> Your question is borderline if not out of topic in this group. I will
>> make a few comments though.
>
> This might be a Python group, but threads often drift way off topic, which
> added to the language itself make
1 - 100 of 166 matches
Mail list logo