asy enough, but what about getting setuptools and
easy_setup working to install various packages for it? Is there a
virtualenv-based method I can use here? (And is pip a decent
replacement for setuptools on Windows yet?)
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 13, 7:29 am, cjrh wrote:
> You can just extract the windows pypy 1.5 distribution to any folder and run
> "pypy.exe" from there as if it was called "python.exe". This is how I have
> been using it. In fact, pypy has been the default python for my portable
> eclipse for a good while now
the background image and blit that to the screen at the start of
every frame you draw.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
le who really do want that behaviour, working around the warning
should involve minimal extra code, with extra clarity thrown in for
free.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
grammer will have to take these considerations
on board when writing their code, whether we want to use them or not.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
if you need to
represent bidirectional connections. Then you can perform search on
that as required. The only slight complication is avoiding infinite
loops - I might use a dictionary of address->boolean values here and
check off each address as the algorithm progresses.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
it's possible to do this with just 1 symbolic
link somewhere.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
being
unplugged, or a timeout along the way, etc. 5% is a high figure, but
perhaps you connect to hosts that are unreliable for some reason.
You don't have control over this really; just make sure you handle the
exception. Such is life, when dealing with networking.
--
Ben Sizer
--
htt
e original poster seemed to be a client (using
connect_ex) rather than a server, so I think this would only be an
issue if the code was connecting to the same host repeatedly in quick
succession.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
n the main
thread. You could perhaps use an Event object here, which has the
time-out functionality for you.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
here's little Python can do about it. ;)
Which part of the code issues the overflow error? I'm guessing it's the
draw.point() call since that's the only bit I can't test.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
em with Python and its libraries, sadly.
The same almost certainly goes for most open source projects.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
fixed for the next version.
--
Ben Sizer.
--
http://mail.python.org/mailman/listinfo/python-list
ot possibly suit
everybody? You can append "body { font-family: sans-serif; font-size:
10pt; }" to the CSS and make it look 'professional' but it doesn't make
it more readable. Really this just comes down to preconceptions over
how a site 'should' look based on ot
Björn Lindström wrote:
> Actually it does set some fonts ("avantgarde" and
> "lucidasomethignorother") as first choices. I guess you, like me, and
> probably most people in here, doesn't have those installed.
As far as I can tell, those fonts are only set for
[EMAIL PROTECTED] wrote:
> the problem is the '..' operator in perl. Is there any equivalent in
> python?
I can't think of anything with a similar operation, to be honest. I'd
try using while loops which look out for the next section delimiter.
--
Ben Sizer.
--
http
rators on an array of bytes:
>
> Actually, no, it's to xor all the bits together and store them in a single
> boolean.
I'd use 'or' rather than 'xor'. The or operator is more likely to yield
a '1' at the end of it, and a 1 is narrower than a 0, o
ot of refactoring later, but in Python this is rarely a
difficult task.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
. Are my assumptions
> correct, or am I falling prey to FUD?
Python is a good language for rapid development and hence testing. So
you could probably create a quick mock-up of your system and then write
some scripts to place it under heavy stress to see how well it holds
up.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
e many reasons that make webservices the way
> of the future (hey, even *MSFT* noticed that recently, it seems...).
But they are not suitable for all applications, and probably never will
be.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
heard, even legal fees.
I think that's a poor example - the cost hasn't come from the mere act
of adding protection, but the method in which that protection operates.
I don't think anybody here - certainly not me - is talking about
infecting a user's system to protect our
e, as Alex pointed out, all of these are just keeping honest
> people honest. The crooks have all the advantages in this game, so you
> really can't expect to win.
No, certainly not. But if you can mitigate your losses easily enough -
without infringing upon anyone else's rights, I must add - then why not
do so.
--
Ben Sizer.
--
http://mail.python.org/mailman/listinfo/python-list
py or adaptation for archival purposes".
However, this is drifting more into the legal area which I am less
interested in. Really I'd just like to be able to use Python for my
work and am interested in finding the best way of doing so.
--
Ben Sizer.
--
http://mail.python.org/mailman/listinfo/python-list
ed to manually increment index values
within a loop. If you do need the record count here, len(vlist) would
be equivalent.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
on the right hand side
you will at least get a helpful NameError.
--
Ben Sizer.
--
http://mail.python.org/mailman/listinfo/python-list
Mike Meyer wrote:
> "Ben Sizer" <[EMAIL PROTECTED]> writes:
> > Decompyle (http://www.crazy-compilers.com/decompyle/ ) claims to be
> > pretty advanced. I don't know if you can download it any more to test
> > this claim though.
>
> No, it doesn'
Mike Meyer wrote:
> "Ben Sizer" <[EMAIL PROTECTED]> writes:
> > In my
> > case, providing a free download of any lost executables or data upon
> > presentation of a legitimate license key should be adequate.
>
> My special handling for such
> things
Grant Edwards wrote:
> On 2005-11-15, Ben Sizer <[EMAIL PROTECTED]> wrote:
> >
> > myObject.value = 'value1'
> >
> > #... 100 lines of code elided...
> >
> > if myObject.value == 'Value1':
> > do_right_thing()
> >
t to be infringed. If you want to term it a
'right', feel free, but that's not what you're granted under US law or
the Berne Convention. The 'common usage' here leads to a
misinterpretation of what you're entitled to. What is actually stated
is a limitation on the copyright holder's exclusive rights, which is a
very different matter.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
ct() in my example doesn't convert be-
> tween data types; it provides a new way to view an existing data structure.
This is interesting; I would have thought that the tuple is read and a
dictionary created by inserting each pair sequentially. Is this not the
case?
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> Ben Sizer wrote:
> > This is interesting; I would have thought that the tuple is read and a
> > dictionary created by inserting each pair sequentially. Is this not the
> > case?
>
> pointers to the members of each pair, yes. but a pointer copy
idea what you're trying to convey. Perhaps it's just because
your example is too abstract to me. It does look like it obscures the
role of the classes involved however, which doesn't seem like a good
thing to me. What do you consider a 'friendship dependency'? Is this
ju
bruno at modulix wrote:
> Ben Sizer wrote:
> > I'm afraid I've read this paragraph and the code 3 times and I still
> > have no idea what you're trying to convey.
>
>
Got anything more constructive to add?
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
nding. I don't think this is intentional, as everybody
seems friendly enough, but I do see a pattern of people replying to a
query and implying that the original poster should know better than to
ask for whatever they asked, despite the Pythonic solutions suggested
often differing algorithmically fr
e class to enforce the interface, but not in Python. I don't care
what type I assign to self.auxillary as long as it supports the
methods/properties I require, and it shouldn't care whether it's being
assigned to a Skeleton or something else, as long as that object
provides the data it requires.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
um += write_tree(node)
output.append("" % sum)
return sum
write_tree(rootNode)
output.reverse()
print output
:)
(There is probably a cleaner way to do this than the quick hack above.)
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
leaf", probably 40 bits in each case. Similarly you can
calculate the aggregate attributes on the fly when it comes to
outputting the tree instead of storing them.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
fied around their own particular approach, which is not
necessarily optimal but seems to be enough for all concerned. (eg. the
proliferation of web frameworks that holds Python back as a platform in
that area.)
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
term can see benefits to the
approach when it is not just mentioned as a bizarre and arbitrary
limitation of the language.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
e done before a tool becomes
useless.
The context of your quote is that that things should be
self-documenting and obvious.You simply can't do that with programming
languages. All you can do is try to make it as consistent as possible,
so that there are few surprises and as little documentatio
t up into separate manuals doesn't seem like it would help.
Personally I'd be happy to see a lot of those modules removed from the
distribution, but I expect few will agree with me. ;)
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
simply can't do that with programming languages.
>
> Maybe not completely. Trust me though, we can do better.
Of course. However I would argue that indented scope is one way of
doing so. Scope is instantly visible, and no longer a game of 'hunt the
punctuation character, which i
Antoon Pardon wrote:
> Op 2005-12-06, Ben Sizer schreef <[EMAIL PROTECTED]>:
> > Of course. However I would argue that indented scope is one way of
> > doing so. Scope is instantly visible, and no longer a game of 'hunt the
> > punctuation character, which is in a
does not appear on
the surface to come from a library.
As an aside, personally I rarely touch the sys module. I use re,
random, threading, and even xml.dom.minidom more than sys.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
e any other options that would require a minimum of
rewriting of code? Does anybody have any experience of such a project?
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
But you could use a dict of return values, or even just assigning a
different return value in each if clause. The end result is that you
have a single well-defined exit point from the function, which is
generally considered to be preferable.
--
http://mail.python.org/mailman/listinfo/python-list
in Pything is more
> efficient. Please read the responses you've already gotten.
Grant,
Going by the Google Groups timestamps that I see, there's a good chance
that none of the other responses were visible to the OP when the above
followup was posted.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
different processing depending on which sentence type you have, then
yes, this class hierarchy may be useful to you.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
X use in Python doesn't seem to be done for some
reason.
--
Ben Sizer.
--
http://mail.python.org/mailman/listinfo/python-list
whichever way you look at
it), or there's something wrong with the Linux configuration that means it
somehow cannot find this module (despite it already having found it to get this
far).
Does anybody have any suggestions on how I can go about debugging this? Or
refactoring it to avoid whatever is happening here?
--
Ben Sizer
--
https://mail.python.org/mailman/listinfo/python-list
On Thursday, 30 April 2015 01:45:05 UTC+1, Chris Angelico wrote:
> On Thu, Apr 30, 2015 at 2:01 AM, Ben Sizer wrote:
> > 1) There clearly is a module named OMDBMap, and it's importable - it's
> > there in the 2nd line of the traceback.
> >
> > Does anybody
or some reason or other. I think the hoops we need to jump
through to ensure that the dumping and loading environments match up are too
high relative to the cost of switching to JSON or similar, especially if we
might need to load the data from something other than Python in future (god
forbid).
On Friday, 1 May 2015 13:34:41 UTC+1, Peter Otten wrote:
> Ben Sizer wrote:
>
> > So... I don't know how to fix this, but I do now know why it fails, and I
> > have a satisfactory answer for why it is acting differently on the Linux
> > server (and that is just
ts: eg. if one of the attributes is a list and I append to
it, this system won't notice. Is that something I can rectify easily?
Any other comments or suggestions?
Thanks,
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
objects and probably expensive to
calculate the differences that way too. Performance is important so I would
probably just go for an explicit function call to mark an attribute as having
been modified rather than trying to do a diff like that. (It wouldn't work for
rollbacks, but I can a
On Thursday, 7 March 2013 00:07:02 UTC, Steven D'Aprano wrote:
> On Wed, 06 Mar 2013 08:56:09 -0800, Ben Sizer wrote:
>
> > I need to be able to perform complex operations on the object that may
> > modify several properties, and then gather the properties at the end as
t to do
all this, because most of the time it won't be.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
signment operator actually does, (I believe) you can view
Python as pass-by-reference without any semantic problems.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
lymorphism support
is so good that it makes inheritance much less important than it is in
other languages.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
dictionary-like will be derived from
dictionary. Duck-typing means that code told to 'expect' certain types
will break unnecessarily when a different-yet-equivalent type is later
passed to it.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
er available and they
are more distinct. In particular, it would be helpful to have something
simple in the standard library, as currently there's a large barrier to
entry for the Python newbie who wants to get into web programming,
compared to ASP or PHP, or even Java servlets.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
Antoon Pardon wrote:
> Op 2005-12-15, Ben Sizer schreef <[EMAIL PROTECTED]>:
> So? I answered a question. That my answer is not usefull for
> a specific purpose is very well prosible but is AFAIC irrelevant.
The point being made was that your declarations such as these:
int
emed slightly strange at first, coming from a
C/Pascal background, although it did occur to me that I've used Python
for years now and not noticed this lack before.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
ng value, and in this case the same integer value).
Is it possible to make it have the following sort of behaviour? :
>>> ShirtSize.small == AppleSize.small
True
>>> ShirtSize.small is AppleSize.small
False
It works for comparing a boolean (True) vs. an integer (1), so it has
some sort
Antoon Pardon wrote:
> Op 2005-12-16, Ben Sizer schreef <[EMAIL PROTECTED]>:
> > Is it possible to make it have the following sort of behaviour? :
> >
> >>>> ShirtSize.small == AppleSize.small
> > True
> >>>> ShirtSize.small is AppleSize
Mike Meyer wrote:
> "Ben Sizer" <[EMAIL PROTECTED]> writes:
> > Flexibility is good, but personally I think the problem is that instead
> > of useful variety, we have redundant overlap. How many different
> > templating systems, sql<-->object mappings, a
Steven D'Aprano wrote:
> On Fri, 16 Dec 2005 02:43:35 -0800, Ben Sizer wrote:
> > Is it possible to make it have the following sort of behaviour? :
> >
> >>>> ShirtSize.small == AppleSize.small
> > True
>
> Okay, so I was wrong to say that nobody wa
nswer isn't incorporated into the stdlib so people can
> stop having to research it.
I think there's an easy answer in most cases. Who is responsible for
making the decision though?
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
thon with
very loose coupling, I'll just say that this sort of situation is
exactly what the LGPL exists for. I would suggest the author adopts the
LGPL as a good compromise between the community benefits of GPL and the
user benefits of, say, BSD or zlib licenses.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
Paul Rubin wrote:
> "Ben Sizer" <[EMAIL PROTECTED]> writes:
> > Unfortunately, that doesn't really satisfy the GPL's concerns. The work
> > arguably "contains or is derived from" Karrigell,
>
> I don't see that. The web app gets run b
Martin Christensen wrote:
> >>>>> "Ben" == Ben Sizer <[EMAIL PROTECTED]> writes:
> Ben> Unfortunately, that doesn't really satisfy the GPL's concerns.
> Ben> The work arguably "contains or is derived from" Karrigell, which
> Be
n can be represented as an integer, and
you can instead sort a list of lists containing integers.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
signment is a mutating operation', when really the
2 concepts are orthogonal and Python replaces the second with
'assignment is a reference reseating operation'. The only reason I
stress this is because with this in mind, Python is consistent, as
opposed to seeming to have 2 different modes of operation.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
Alex Martelli wrote:
> Ben Sizer <[EMAIL PROTECTED]> wrote:
>...
> > assignment semantics that differ from languages such as C++ and Java,
> > not the calling mechanism. In C++, assignment means copying a value. In
> > Python, assignment means reassigning a
ise way to do things works out more slowly than the
approach that you'd expect to take twice as long. Thankfully there
doesn't seem to be too many of these problems in Python.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
that program. If there's no sshd running on the
target, you can't do anything.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
eparate download'
for many purposes.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
ody would want it. I suppose you can use the msvcrt library directly
and cut out wx from the dependencies, but sadly the Python overhead is
still a slight deterrent.
Not that I see an easy solution to this, of course.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
and operations upon it
should return immediately. And 'ready' in this case could well just
mean it's ready to tell you that it's not connected.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
here people are reluctant to install anything at all, and will
not bother if they see a 6MB download.
I wasn't saying this was a problem with Python - though I do expect
that .dll could be trimmed down a bit - but it is a bit of a shame that
I can't easily distribute somethin
huffle the sequence, so
it runs in O(N).
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
hat to MultipleRegression. How to create and
populate that list will depend on where you're getting the data from.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
ation. Or perhaps http://jackaudio.org/ will be of use.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
nable to, often due to some
library being unavailable, as in your case.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
achieve. Unfortunately, when you come
from a language like C++ or Java where you learned to live without
those benefits, often not even knowing such things existed, all you see
are the negatives (ie. lack of checking).
--
Ben Sizer
The
>
> >
> > > The second case can be
Roman Susi wrote:
> Ben Sizer wrote:
> > The problem is that Python is the 2nd best language for everything. ;)
>
> Is it a bad thing?
I don't know. I suppose that depends on how you define 'bad'! For me,
it is often inconvenient, because I'd prefer to use Pytho
hat, you can't effectively prevent this type of error.
Luckily, I find that they don't actually arise in practice, and I've
spent orders of magnitude more time in C++ having to coerce objects
from one type to another to comply with the static typing than I
probably ever will spend debugging
philosophy and Python's differs from that of (for
example) Java. It may not be suitable for large teams of mediocre
programmers who require the compiler to keep them in line, but might
produce better results than Java in other circumstances.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
gt;
> I want speeds less than 10 milliseconds
The main question is: why do you want to do this? I ask because with
performance requirements like that, you almost certainly need another
approach, one which I may be able to suggest.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
Paul Boddie wrote:
> Ben Sizer wrote:
> >
> > In my case, multimedia and game support is patchy,
>
> There are lots of multimedia and game frameworks for Python. Which ones
> have you tried and why are they insufficient?
PyGame was barely maintained for a year, and is bas
morphic member function on each pointer in an
std::map, while passing a fixed parameter to that function... this sort
of thing is trivial in Python as a side-effect of the fact that the
attributes are looked up at run-time.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
This is something I wasn't incredibly happy about, as I felt it meant
that personal egos were being saved at the expense of improving Python.
And I always thought that WSGI was solving the wrong problem. It
certainly didn't go very far towards meeting the expressed goals of the
Web-SIG. Oh well.
<http://mail.python.org/pipermail/web-sig/2004-August/000650.html>
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
Paul Boddie wrote:
> Ben Sizer wrote:
> >
> > Even C++ comes with OpenGL in the standard library.
>
> Which standard library?
Sorry, it was a long day, and I used entirely the wrong term here. By
that, I meant "typically shipped with each compiler". I've nev
Sybren Stuvel wrote:
> Ben Sizer enlightened us with:
> > PyGame was barely maintained for a year, and is based on SDL which
> > was also barely maintained for a year, and which hasn't kept up with
> > hardware advances at all.
>
> Still, ID Software and Epic both
Terry Reedy wrote:
> "Ben Sizer" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > PyGame was barely maintained for a year, and is based on SDL which was
> > also barely maintained for a year, and which hasn't kept up with
> > hardw
d the same thing for PHP? Or is this handled
> differently there?
Typically you run PHP as a module in your webserver, so there should be
no process startup overhead. mod_python provides the same sort of
functionality for Python, but is not as popular or widely installed as
the PHP Apache module.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
Vincent Delporte wrote:
> On 31 Jul 2006 07:05:27 -0700, "Ben Sizer" <[EMAIL PROTECTED]> wrote:
> >Typically you run PHP as a module in your webserver, so there should be
> >no process startup overhead. mod_python provides the same sort of
> >functionality
nd who played what move etc..? Any suggestions on this.
Use whichever is easiest for you. Why do you need to save the data to
disk anyway? If you definitely need to do that, the shelve module is
often a good choice for basic needs. But it depends on what you need to
do with the information after you
Paul Rubin wrote:
> "Ben Sizer" <[EMAIL PROTECTED]> writes:
> > Another perfectly good reason is that PHP pages are much simpler to
> > deploy than any given Python application server. Just add the code into
> > your HTML pages as required and you're do
s, which is advisable anyway.
> The hosting service formerly known as
> python-hosting has been doing this
> for years.
Would you need one instance per user? Is it practical to run 1000s of
Apache instances on one server?
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 215 matches
Mail list logo