page. Classes should precede unittest as the latter
uses a new style class.
Perhaps the thing to do is to add links to the tutorial for those
seeking further enlightenment. If your page gets much bigger it will
lose its original attraction.
--
Pete Forman-./\.- Disclaimer:
of the box then look at Enthought.
--
Pete Forman-./\.- Disclaimer: This post is originated
WesternGeco -./\.- by myself and does not represent
[EMAIL PROTECTED]-./\.- the opinion of Schlumberger or
http://petef.port5.com -./\.- WesternGeco.
-
cussed and it is
currently based on Python 2.4.3.
http://code.enthought.com/enthon/
--
Pete Forman-./\.- Disclaimer: This post is originated
WesternGeco -./\.- by myself and does not represent
[EMAIL PROTECTED]-./\.- the opinion of Schlum
gates. Operations based on concatenation
will conform to Unicode, whether or not there are surrogates in the
strings.
--
Pete Forman-./\.- Disclaimer: This post is originated
WesternGeco -./\.- by myself and does not represent
[EMAIL PROTECTED]-./\.- the opin
Quick question, probably quite a simple matter. Take the follow start of
a method:
def review(filesNeedingReview):
for item in filesNeedingReview:
(tightestOwner, logMsg) = item
if (logMsg != None):
for logInfo in logMsg.changed_paths:
This generates the
A.T.Hofkamp wrote:
> On 2007-10-25, Pete Bartonly <[EMAIL PROTECTED]> wrote:
>> Quick question, probably quite a simple matter. Take the follow start of
>> a method:
>>
>>
>> def review(filesNeedingReview):
>>
>> for item in filesNeedin
A.T.Hofkamp wrote:
> On 2007-10-25, Pete Bartonly <[EMAIL PROTECTED]> wrote:
>> Quick question, probably quite a simple matter. Take the follow start of
>> a method:
> With respect to compactness and style, you can move your multi-assignment
> statement in the for loop
Peter Otten wrote:
> Pete Bartonly wrote:
>
>> Quick question, probably quite a simple matter. Take the follow start of
>> a method:
>>
>>
>> def review(filesNeedingReview):
>>
>> for item in filesNeedingReview:
>> (tightestO
Pete Bartonly wrote:
>
> Quick question, probably quite a simple matter. Take the follow start of
> a method:
>
>
> def review(filesNeedingReview):
>
> for item in filesNeedingReview:
> (tightestOwner, logMsg) = item
>
> if (logMsg != No
ally represents the result of an invalid operation. Using it
for missing value is not in the draft standard, though it is not
forbidden either.
If NaNs in your data are important then you must take care in explicit
and implicit comparisons to consider unordered results.
ords they
never return NaN unless all their arguments are NaN.
int(nan) should raise an exception. I note that in Python 2.5.1
int(inf) already does.
--
Pete Forman-./\.- Disclaimer: This post is originated
WesternGeco -./\.- by myself and does
ed after a set of calculations. With pipelining the
exact cause of the exception will be unknown.
--
Pete Forman-./\.- Disclaimer: This post is originated
WesternGeco -./\.- by myself and does not represent
[EMAIL PROTECTED]-./\.- t
standards.iso.org/ittf/PubliclyAvailableStandards/index.html
--
Pete Forman-./\.- Disclaimer: This post is originated
WesternGeco -./\.- by myself and does not represent
[EMAIL PROTECTED]-./\.- the opinion of Schlumberger or
http:
actually *implement* such ideas, not just to plan for them.
--
Pete Forman-./\.- Disclaimer: This post is originated
WesternGeco -./\.- by myself and does not represent
[EMAIL PROTECTED]-./\.- the opinion of Schlumberger or
http://petef.
re's a better way of doing this,
> some kind of enum-like thing or somesuch.
https://launchpad.net/munepy describes itself as yet another Python
enum implementation. Its author is Barry Warsaw.
--
Pete Forman-./\.- Disclaimer: This post is originated
WesternGeco
> I know what the argument for the results of Pycon 2008 will be: we
> needed the money. My answer: it's not worth it. If this is what you
> have to do to grow the conference, then don't. If the choice is
> between selling my experience to vendors and reducing the size of the
> conference, then cut
Well on a FreeBSD/Unix system you can use the .forward to pipe the
incoming mail for a user to a program. Below is the contents of my
.forward that invokes procmail.
"|/usr/local/bin/procmail -m /path/to/conf/.procmailrc"
So I imagine you could do something like this in a .forward.
"|/path/myp
,
> I see why I'd never find it. The BM entry does not show "Google". It
> does now. ;-)
As well as the site: modifier check out inurl: and friends.
http://www.google.com/help/operators.html
--
Pete Forman-./\.- Disclaimer: This post is originated
Wester
. You
might also like to check out Jython 2.5 which is in beta.
Jython 2.2 needs optparse.py and textwrap.py. These can be copied
from Python 2.3 or Optik 1.4.1 or later. May also need gettext.py
and locale.py.
--
Pete Forman-./\.- Disclaimer: This post is originated
W
uage, dammit! Ours, ours, ours!
>
> This decision was actually taken at a meeting of the Society of
> British pedants on November 23, 1786. This led to a schism between
> the British and the newly-independent Americans, who responded by
> taking the "u" o
> >> out of colour, valour, and aluminium.
>>
>> > Darn Americans and their alminim ;-)
>>
>> > Next thing you know, they'll be putting an I in TEAM.[1]
>>
>> It's called humour. Or humor. Or incompetence ;-)
>
> There's an
e to embed the image. AFAIK a downside is that
MS are only starting to support that in IE8.
--
Pete Forman-./\.- Disclaimer: This post is originated
WesternGeco -./\.- by myself and does not represent
[EMAIL PROTECTED]-./\.- the opinion of Schlumberger or
htt
2 is not equal to '2'
--
http://mail.python.org/mailman/listinfo/python-list
Peter Otten <[EMAIL PROTECTED]> writes:
> you're wrong.
Indeed I am, sorry for the waste of time.
--
Pete Forman-./\.- Disclaimer: This post is originated
WesternGeco -./\.- by myself and does not represent
[EMAIL PROTECTED]-./\.-
later?
>>> int('09'.lstrip('0'))
9
Is the documentation for int([x[, radix]]) correct? I'd say that the
default for radix has become 0.
http://docs.python.org/library/functions.html#int
--
Pete Forman-./\.- Disclaimer: This post is originated
I would suggest that using an interface at compile time is not the
only approach. Unit tests can be run on classes to check that they do
indeed quack.
--
Pete Forman-./\.- Disclaimer: This post is originated
WesternGeco -./\.- by myself and does not represent
alex23 <[EMAIL PROTECTED]> writes:
> Which is very handy, like most of IPython.
+1 QOTW
--
Pete Forman-./\.- Disclaimer: This post is originated
WesternGeco -./\.- by myself and does not represent
[EMAIL PROTECTED]-./\.- the opinion of Schlum
now if there's some pit waiting for me to fall into.
Pete
--
http://mail.python.org/mailman/listinfo/python-list
2008/6/29 Dan Stromberg <[EMAIL PROTECTED]>:
>
> On Sun, 29 Jun 2008 11:20:45 +0200, Sebastian \"lunar\" Wiesner wrote:
>
> > Dan Stromberg <[EMAIL PROTECTED]>:
> >
> >> things like passing a method as a function parameter is a no-brainer
> >> (requires extra syntax in java because of the cautious
ittle more difficult for XPath processing.
Pete
--
http://mail.python.org/mailman/listinfo/python-list
The O'Reilly Spidering Hacks book is also really good, albeit a little
too focussed on Perl.
On Apr 2, 9:54 am, [EMAIL PROTECTED] wrote:
> On Apr 2, 6:37 am, abeen <[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > I would want to know which could be the best programming language for
> > developing we
from the terminal and the mac pop-up window from the crash.
Any help would be very much appreciated!
Cheers,
Pete.
The terminal says:
> Error: Target org.macports.build returned: shell command " cd "/opt/
> local/var/macports/build/
> _opt_local_var_macports_sources_rsyn
On 16/04/2008, at 9:38 PM, [EMAIL PROTECTED] wrote:
>
> which python ? from macports or macpython ?
> --
> http://mail.python.org/mailman/listinfo/python-list
>
MacPorts. It automatically downloaded 2.5.2.
My original message is reproduced below.
On 16/04/2008, at 5:50
(i.e. into /opt/local/)?
Thanks,
Pete.
On 16/04/2008, at 9:56 PM, Diez B. Roggisch wrote:
>
> Pete Crite wrote:
>
>> Hello,
>>
>> I've been trying to install Gnumeric via MacPorts recently, but I
>> can't get past the installation of py25-numpy.
>
looks as if that Large Hadron Collider is having ill effects
already. A week has been stretched into 6 years. ;-)
http://lists.xml.org/archives/xml-dev/200302/msg00259.html
--
Pete Forman-./\.- Disclaimer: This post is originated
WesternGeco -./\.- by myself and
ore '
'the results tarball',
'previousrel': 'Top level dir of previous release for regression '
'analysis'}
parser.add_option('-q', '--quiet', action="store_false",
dest='verbose
x27; % i + ('s' if i != 1 else '')
for i in range(4):
print '%d thing%s' % (i, ('s', '')[i==1])
for i in range(4):
print '%d thing%s' % (i, 's' if i != 1 else '')
--
Pete Forman-./\.- Disclaim
erred", defer.Deferred, DeferredProxy)
This, however, fails, because "cb" and "eb" cannot be pickled. I don't
actually need to pickle them, though, because I want them to run on
the machine on which they were created. Is there a way, in
multiprocessing, that I
anti-virus. Several products put a long list of blacklist sites in
the hosts file. Windows can be rather slow to process that file.
--
Pete Forman-./\.-
West Sussex, UK -./\.-
http://petef.22web.net -./\.-
petef4+use...@gmail.com -./\.-
--
http://mail.python.org/mailman/listinfo/python-list
I've written my first python program, and would love suggestions for
improvement.
I'm a perl programmer and used a perl version of this program to guide
me. So in that sense, the python is "perlesque"
This script parses /etc/hosts for hostnames, and based on terms given
on the command line (argv)
Great responses, thank you all very much. I read Jonathan Gardner's
solution first and investigated sets. It's clearly superior to my
first cut.
I love the comment about regular expressions. In perl, I've reached
for regexes WAY too much. That's a big lesson learned too, and from my
point of view
Thanks for your response, further questions inline.
On Mar 4, 11:07 am, Tim Wintle wrote:
> On Thu, 2010-03-04 at 10:39 -0800, Pete Emerson wrote:
> > I am looking for advice along the lines of "an easier way to do this"
> > or "a more python way" (I
On Mar 5, 7:00 am, Duncan Booth wrote:
> Jean-Michel Pichavant wrote:
> > And tell me how not using regexp will ensure the /etc/hosts processing
> > is correct ? The non regexp solutions provided in this thread did not
> > handled what you rightfully pointed out about host list and commented
> >
On Mar 5, 10:19 am, "sjdevn...@yahoo.com" wrote:
> On Mar 5, 10:53 am, Pete Emerson wrote:
>
>
>
>
>
> > Thanks for your response, further questions inline.
>
> > On Mar 4, 11:07 am, Tim Wintle wrote:
>
> > > On Thu, 2010-03-04 at 10:39 -08
ething else.
In other words, I don't want to create a dependency of foobar on foo.
My failed search for solving this makes me wonder if I'm approaching
this all wrong.
Thanks in advance,
Pete
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 5, 11:24 am, Pete Emerson wrote:
> In a module, how do I create a conditional that will do something
> based on whether or not another module has been loaded?
>
> Suppose I have the following:
>
> import foo
> import foobar
>
> print foo()
> print foobar()
&g
On Fri, Mar 5, 2010 at 12:17 PM, Chris Rebert wrote:
> On 3/5/10, Pete Emerson wrote:
>> In a module, how do I create a conditional that will do something
>> based on whether or not another module has been loaded?
>>
>> Suppose I have the following:
>>
>>
On Mar 5, 12:06 pm, "Martin P. Hellwig"
wrote:
> On 03/05/10 19:24, Pete Emerson wrote:
>
> > In a module, how do I create a conditional that will do something
> > based on whether or not another module has been loaded?
> >
> > If someone is using foo
On Mar 5, 11:57 am, MRAB wrote:
> Pete Emerson wrote:
> > In a module, how do I create a conditional that will do something
> > based on whether or not another module has been loaded?
>
> > Suppose I have the following:
>
> > import foo
> > import fo
On Mar 5, 1:14 pm, Chris Rebert wrote:
> On Fri, Mar 5, 2010 at 12:25 PM, Pete Emerson wrote:
> > On Fri, Mar 5, 2010 at 12:17 PM, Chris Rebert wrote:
> >> On 3/5/10, Pete Emerson wrote:
> >>> In a module, how do I create a conditional that will do something
"more rigid" way of doing things common throughout
python, and is it best that I not fight it, but embrace it?
Your thoughts and comments are very much appreciated. I think my brain
already knows some of the answers, but my heart ... well, perl and I
go way back. Loving python so far, though.
Pete
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 5, 6:10 pm, Andreas Waldenburger
wrote:
> On Fri, 5 Mar 2010 17:22:14 -0800 (PST) Pete Emerson
>
>
>
>
>
> wrote:
> > [snip]
> > >>> data['one'] = {}
> > >>> data['one']['two'] = 'three
On Mar 5, 8:24 pm, Steven D'Aprano wrote:
> On Fri, 05 Mar 2010 17:22:14 -0800, Pete Emerson wrote:
> > Why isn't the behavior of collections.defaultdict the default for a
> > dict?
>
> Why would it be?
>
> If you look up a key in a dict:
>
> add
On Mar 5, 6:26 pm, MRAB wrote:
> Pete Emerson wrote:
> > I've been wrestling with dicts. I hope at the very least what I
> > discovered helps someone else out, but I'm interested in hearing from
> > more learned python users.
>
> > I found out that
On Mar 6, 2:38 pm, Vinay Sajip wrote:
> On Mar 5, 9:29 pm, Pete Emerson wrote:
>
>
>
> > I have written my first module called "logger" that logs to syslog via
> > the syslog module but also allows forloggingto STDOUT in debug mode
> > at multiple levels (
anually control-c it.
I think that I need *all* threads to close and not just the current
one, so I'm not quite sure how to proceed. Pointers in the right
direction are appreciated. And if there's a "better" way to do this
threading httpd server (subject
e to hold the
result of the condition and then the if statement is more readable.
--
Pete Forman-./\.-
West Sussex, UK -./\.-
http://petef.22web.net -./\.-
petef4+use...@gmail.com -./\.-
--
http://mail.python.org/mailman/listinfo/python-list
ports and grab the parent classes to
insert into the editor view. Any suggestions? Maybe there are better
ways of navigating inheritance but it does seem logical to expose the
whole class code in one place, suitably annotated. I feel a plugin
coming on.
Ta, Pete
--
https://mail.python.org/ma
Is Python on shared hosting dead?
> I don't need a whole VM and something I
> have to sysadmin, just a small shared
> hosting account.
I use OpenShift from Red Hat on their free hosting package. They offer
Python 3.5, 3.3 and 2.7.
--
Pete Forman
https://payg-petef.rhcloud.com
--
h
FC 8143) describes the use of TLS with NNTP. It
enhances the connection between NNTP client and server, primarily with
encryption but optionally with other benefits.
Of course it does nothing to improve the content of Usenet.
--
Pete Forman
--
https://mail.python.org/mailman/listinfo/python-list
gt; operator either.
>
>
>
> Thoughts?
This seems to me to be rather similar to sort() and sorted(). How about
giving equals() an optional parameter key, and perhaps the older cmp?
Using casefold or upper or lower would satisfy many use cases but also
allow Unicode or more locale specific normalization to be applied.
The shortcircuiting in a character based comparison holds little appeal
for me. I generally find that a string is a more useful concept than a
collection of characters.
+1 for using an affix in the name to represent a normalized version of
the input.
--
Pete Forman
--
https://mail.python.org/mailman/listinfo/python-list
I've been using compiler.ast.flatten, but I have comments indicating it will
need be replaced if/when I move to Python 3.
I don't pollute my code base with flatten, I just call my own version in my
utility library that is currently redirecting to flatten.
flatten works equally well with tuples
Don't underestimate the value of morale. Python is a scripting language. You
don't need to teach them very much python to get something working, and you can
always revisit the initial code and refactor it for better coding hygiene.
Someday they might have jobs, and be required to learn things i
>
> Just awesome, not only do we have double line spacing and single line
>
> paragraphs, we've also got top posting, oh boy am I a happy bunny :)
>
> I'll leave someone3 else to explain, I just can't be bothered.
>
>
Do you get paid to be a jerk, or is it just for yuks? If the latter, yo
On Thursday, April 10, 2014 3:40:22 PM UTC-7, Rhodri James wrote:
> It's called irony, and unfortunately Mark is reacting to an all-to-common
> situation that GoogleGroups foists on unsuspecting posters like yourself.
People who say "I can't be bothered to correct this" while posting a wise a
modify the test_var variable form another module?
Pete
--
http://mail.python.org/mailman/listinfo/python-list
101 - 166 of 166 matches
Mail list logo