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
that go into turning a fresh, clean spot on your hard drive
> into an application, what you've done is reinvent TurboGears rather than
> develop your application.
However, at least whatever you come up with would be better documented
than TurboGears. ;)
(I reserve the right to amend t
e polled (eg. to handle
input, AI, graphics, etc). Previous threads there will give you some
hints on all these matters.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
nclude most retail software for the
home or small office, and most entertainment software. Developers of
such software often have understandable reasons for making it
inconvenient to examine the algorithms at a high level.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
Paul Boddie wrote:
> Ben Sizer wrote:
> >
> > It's worth remembering that there is a massive amount of software that
> > has nothing to do with 'infrastructure', that won't need to be
> > maintained, or upgraded. Examples include most retail soft
Paul Boddie wrote:
> Ben Sizer wrote:
> >
> > Imagine if you were the single-person developer of a small application
> > that did something quite innovative, and charged a small fee for your
> > product. Now imagine you were practically forced to make your algorith
Steven D'Aprano wrote:
> On Fri, 11 Aug 2006 09:18:12 -0700, Ben Sizer wrote:
>
> > Imagine if you were the single-person developer of a small application
> > that did something quite innovative,
>
> And imagine that you found a money-tree in your back yard...
>
&g
t such laws there would be little incentive to create any such
works that were non-trivial. No-one is going to pay you up front for
it, so you need a way of protecting future potential income. Since that
future income is typically strongly linked to the quality of your work,
it's arguable that this is in fact a fairer business model than being
paid a normal salary.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
erved to be the 'next' anything anyway. It was
sold on hype and has never lived up to it. I can see your point from a
business perspective but I like to think Python is sold on its merits
and not on being the new panacea for middle managers to deploy.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
p it in a batch file, but encounter a problem, where
that batch file is able to execute the Python file if I double-click
the batch file, but if I drag a file onto it it says it can no longer
find the Python script.
Are there any simple and workable solutions for this sort of thing?
--
Ben Sizer
-
e."
defines.py is in the same directory as the batch file, but cannot be
executed like this. Double-clicking on it works, as expected.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
Gabriel Genellina wrote:
> At Friday 20/10/2006 12:20, Ben Sizer wrote:
>
> >I'd like to be able to drag a file onto a Python script in Windows
> >Explorer, or send that file to the script via the Send To context-menu
> >option, so I can then process that file via sys.
for NumPy
v23 when the latest download on SourceForge is 0.9.8.
Numeric libraries in Python are a nomenclatural nightmare. It's well
past time that something made it into the standard library, I feel.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
r the first incarnation, but that the new
incarnation of NumPy is the most recent, and is probably the one you
want.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
ried waiting 30 seconds or so? The connection may just take a
while to time out.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
ent problem with the
toolkit or just an oversight on the part of those who only develop
under the newer themes.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
get an ack,
and eventually the TCP connection should drop, and Python should raise
an exception. Right? I'm very used to connections dropping after much
less than a minute because the host became unreachable or took too long
to send a response.
(Sorry for the large quote but all the context seemed relevant.)
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
al a little weaker however, if you
can't necessarily know how many of your sends have succeeded or not.
Doubtless I am missing something here, too. Time to dig out my old
networking notes, perhaps.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
the type. Unfortunately
the print statement probably interprets the start of the doctype's type
field as the end of the print statement. Add a backslash before each
double quote within your doctype and see how that goes. Alternatively
you could possibly use single quotes in it instead.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
end to
capture all the OS's input.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
pression that XPCOM was a Mozilla-only technology; if
so, maybe that won't fit your requirements either.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
ule, try to keep all your PyGame functions in the main
thread and push your other processing into background threads, if you
really need them.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Ben Sizer wrote:
> > [EMAIL PROTECTED] wrote:
> >
> > > When I put the content of the run and input functions in the main
> > > thread, it's working, why not in the thread?
> >
> > Because event handling needs to be done
t of those
> reallocations take place while the vector is still proportionally
> quite small.
Math.log(4, 2) is not a small number when talking about a
relatively expensive operation such as memory allocation and
deallocation. And the superfluous copying amounts to probably an extra
2^1
d? It might be as simple as this:
# sample data
table = [
("item1", 10, 100),
("item 2", 15, 300)
]
out = file("my.csv", "w+")
for row in table:
out.write(",".join(str(item) for item in row) + "\n")
And my.csv will look like:
item1,10,100
item 2,15,300
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
ainly not in just 12 or 13 months. The PEP does suggest that it
isn't likely to be around any time before 2008 at the earliest.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
app.
<http://www.microsoft.com/technet/scriptcenter/resources/qanda/nov04/hey1103.mspx>
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
I think you still
need to get it into .wav format first, though this can apparently be in
memory rather than on disk.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
oogle search.
I think you're very mistaken... it's a little over-complex, but
everything you need is up there, on the installation and download
pages, and the only other .dlls you need are the OpenGL ones which the
original poster will already have.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
which you can
make connections at the OS level; this will show up as event 4226 in
the Event Viewer if it affects you.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
her applications, you have a separate download. With
sqlite, you don't, on Windows at least. Surely all the 'included
batteries' should have local documentation, especially with the type
conversions.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
sn't
appearing for some reason. I've had that myself sometimes.
There is an unofficial OS-level patch for this behaviour at this
address: http://www.lvllord.de/?lang=en&url=downloads
No idea if it works or if it's safe, but many people use it.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
nnections.
It may also be that it implements part of its own TCP/IP stack, and
accessing the ethernet card directly, but I don't know how practical
that is for you. Ethereal and nmap appear to do this; you might want to
browse their open source code, and/or ask on their mailing lists or
foru
ke much to say that the module
implements a subset of SQL but stores ignores data types.
> What are the chances that anything I send in as a bug report
> will simply be ignored? Kind of like the Emporer's New Clothes, eh?
> It would be an admission of ignorance and stupidity on the pa
ily on inheritance like Java does.
Instead, it is used in just a few places, more like the C++ standard
library than the Java library.
I agree that the Python docs aren't quite as effective as reference
material due to the lack of simple function and method lists though. I
don't kno
Michele Simionato wrote:
> Ben Sizer wrote:
> > I agree that the Python docs aren't quite as effective as reference
> > material due to the lack of simple function and method lists though.
>
> http://docs.python.org/lib/modindex.html, pydoc and ipython are more
> tha
Bryan Olson wrote:
> Ben Sizer wrote:
> > It's not a crackpot theory. It's a completely reasonable theory. SQL is
> > based on relational algebra, which provides a mathematical set of
> > operators for grouping data that is stored in separate sets. That data
> >
the Python community, I'm happy to
> announce the FINAL release of Python 2.5.
Any chance the docs links could be fixed?
The link on the front page still goes to 2.4.3 on docs.python.org, and
the link from /download/releases/2.5/ goes to 2.6a0.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
o it doesn't
aid the understanding too much.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
Steve Holden wrote:
> Ben Sizer wrote:
> > A simple question - can anybody give a short example of how these work
> > and what they are good for? I've read PEP 342 and the associated bit in
> > the What's New section and it's still all Greek to me. The latte
y implies failure of a previous explicit
condition, yet in this case, it's executed by default, when the
previous clause was successfully executed. It would seem more natural
if the else clause was triggered by 'bar' being empty, or even if the
loop was explicitly broken out of, thoug
[EMAIL PROTECTED] wrote:
> I'm a compiler newbie and was curious if Python's language/grammar
> can be handled by a recursive descent parser.
I believe a recursive descent parser can handle any grammar; it just
depends on how pure you want it to be.
--
Ben Sizer
--
http:/
[EMAIL PROTECTED] wrote:
> Ben Sizer wrote:
> > [EMAIL PROTECTED] wrote:
> > > I'm a compiler newbie and was curious if Python's language/grammar
> > > can be handled by a recursive descent parser.
> >
> > I believe a recursive descent parser can ha
years now.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
ut having to use the full path - not on Windows.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
Ross Ridge wrote:
> Ben Sizer wrote:
> > I've installed several different versions of Python across several
> > different versions of MS Windows, and not a single time was the Python
> > directory or the Scripts subdirectory added to the PATH environment
> >
Martin v. Löwis wrote:
> Ben Sizer schrieb:
> > I've installed several different versions of Python across several
> > different versions of MS Windows, and not a single time was the Python
> > directory or the Scripts subdirectory added to the PATH environment
> >
robert wrote:
> Ben Sizer wrote:
> > My opinion is that this is not as big a problem as some may feel that
> > it is. Unlike Unix systems, the PATH variable is rarely used.
>
> It is a big problem.
>
> It is not less than the majority of Python users (at least those who
lem with Windows users being forced to jump through unnecessary
hoops that Unix and MacOS users don't have to endure. And I think the
default should be to edit the PATH and allow you to explicitly disallow
this: changing from the current behaviour is the right thing to do
because the curren
Gabriel Genellina wrote:
> At Saturday 30/12/2006 21:55, Ben Sizer wrote:
>
> >python setup.py install
> >
> >On Unix, you'd run this command from a shell prompt; on Windows, you
> >have to open a command prompt window (``DOS box'') and do it there;
Chris Lambacher wrote:
> On Sat, Dec 30, 2006 at 04:55:09PM -0800, Ben Sizer wrote:
> > Yet many scripts and applications require parameters, or to be executed
> > from a certain directory. For example, setup.py. Or the various
> > turbogears scripts. Or easy_install.
>
Chris Lambacher wrote:
> On Tue, Jan 02, 2007 at 09:08:41AM -0800, Ben Sizer wrote:
> > Chris Lambacher wrote:
> > > The python part of the 'python setup.py install' idiom needs to be
> > > omitted on
> > > Windows, but that does not mean that
Martin v. Löwis wrote:
> Ben Sizer schrieb:
> > Firstly, that solution only works for actual Python scripts; it doesn't
> > solve the utility scripts that are often installed to the /scripts
> > directory.
>
> Those packages should install .bat files into /scrip
hon class for this (as in
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/54352)?
I'm not interested in wrapping whole C++ objects at this stage, and
libraries like Boost::Python aren't currently an option. I just need a
few pointers on doing it the low-level way for now.
--
Ben Sizer
--
http:/
the method.
(Google doesn't find any instance of "PyCFunction_Call" on
docs.python.org. This might explain the Cookbook's comment that "one
hardly ever sees Python class objects built in C extensions"!)
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
gt; Server do:
> recevoir(conn)
> recevoir(conn)
> size1, passed1 = envoyer(conn, 50)
> size2, passed2 = envoyer(conn, int(size1/passed1))
You defined envoyer earlier to "return passed, size" but you're
treating it as if it's "return size, passed". Maybe fixing tha
ctions, just a different operator to treat a function as if it was a
method.
When I started out in Python I figured that I could just assign
functions to objects and treat them then as if they were methods, as I
would in Lua, but quickly learned that it wasn't that simple.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
ut I am
requesting a little more understanding towards those who expected one.
The list interface is full of redundant convenience methods, so one
more would hardly be a surprise or an unreasonable thing for people to
expect. Again we unfortunately have a bit of an attitude problem
towards anyone posting here that doesn't know whatever the experts
think is obvious.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
ore their statements in a tokenised form -
arguably bytecode with a large instruction set, if you look at it a
certain way. This isn't necessarily so far from what Python does, yet
few people would argue that those old forms of BASIC weren't
interpreted.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
e
lastTokens = currentTokens
lastGeno = currentGeno
I'd be tempted to try a bigger file buffer too, personally.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
e only bottleneck in my code.
If you're sure this is the problem, you might try calling setSockOpt on
the socket to set the nodelay flag, something like this:
mySocket.setsockopt(IPPROTO_TCP, TCP_NODELAY, 1)
I don't know enough about the option to be sure it'll work, but it
c
On 30 May, 16:20, Ben Sizer <[EMAIL PROTECTED]> wrote:
> On 30 May, 15:42, Frank Millman <[EMAIL PROTECTED]> wrote:
>
> > On May 30, 4:15 pm,BenSizer<[EMAIL PROTECTED]> wrote:
>
> > > I've been looking for a Windows version of a library to interf
ooking for?
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
On 20 Jun, 11:40, Justin Ezequiel <[EMAIL PROTECTED]>
wrote:
> On Jun 20, 5:30 pm, Ben Sizer <[EMAIL PROTECTED]> wrote:
>
> > I need to copy directories from one place to another, but it needs to
> > overwrite individual files and directories rather than just exi
or them and
delete them? It seems like there are several different copy functions
in the module and it's not clear what each of them do. What's the
difference between copy, copyfile, and copy2? Why do the docs imply
that they overwrite existing files when copytree skips existing
files?
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
I've been looking for a Windows version of a library to interface to
PostgreSQL, but can only find ones compiled under Python version 2.4.
Is there a 2.5 build out there?
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
On 30 May, 15:42, Frank Millman <[EMAIL PROTECTED]> wrote:
> On May 30, 4:15 pm, Ben Sizer <[EMAIL PROTECTED]> wrote:
>
> > I've been looking for a Windows version of a library to interface to
> > PostgreSQL, but can only find ones compiled under Python versio
be a large degree of waiting for the other processes to respond,
and you have to develop the protocols to communicate. Apart from
convenient serialisation, Python doesn't exactly make IPC easy, unlike
Java's RMI for example.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 10, 5:13 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
> On 8/10/07, Ben Sizer <[EMAIL PROTECTED]> wrote:
>
> > On 10 Aug, 15:38, Ben Finney <[EMAIL PROTECTED]>
> > wrote:
> > > Last I checked, multiple processes can run concurrently
going for
now. Are there any glaring errors I've made (apart from perhaps
assuming sizeof(pointer) <= sizeof(long), that is)? And is there
anywhere else more appropriate that I should be asking this question,
given the lack of responses to this and my other embedding topic so
far?
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
's my output, with Python 2.5 built in debug mode on WinXP, no
modifications:
[7438 refs]
[7499 refs]
[7550 refs]
[7601 refs]
[7652 refs]
Is this normal? It doesn't look very promising to me.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
ding problem with Python really,
requiring extensions to always be recompiled for newer versions. I
usually have to wait about 6 months to a year after any new release
before I can actually install it, due to the extension lag.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
Python has taken note that there's a
new use of that object - your C code. It means it won't delete that
object, even if no more Python code refers to it, because it knows your
C code holds a reference to it. Therefore, when your C code no longer
needs to access the object, you call Py_DECREF.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
nd out precisely what form the API takes.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
iciencies
in certain areas when compared with other languages.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
binary API between extensions and Python changes every
couple of years or so. That's why I run 2.4 anywhere that needs
extensions.
It would be great if someone could invest some time in trying to fix
this problem. I don't think I know of any other languages that require
recompila
On Feb 6, 3:35 pm, [EMAIL PROTECTED] (Aahz) wrote:
> Ben Sizer <[EMAIL PROTECTED]> wrote:
>
> >It would be great if someone could invest some time in trying to fix
> >this problem. I don't think I know of any other languages that require
> >recompilation o
On Feb 9, 1:48 pm, "siggi" <[EMAIL PROTECTED]> wrote:
> @Ben Sizer
Lucky I spotted this...
> As a Python (and programming ) newbie allow me a - certainly naive -
> question:
>
> What is this time consuming part of recompiling an extension, such as
> Pygame, fr
across the DLL boundary.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
ructure of complex types across
the boundary. The same may well go for the multitude of macros that
make assumptions about the structure of a PyObject.
It's not really much to do with the maturity, since functions don't
seem to be getting regularly removed from the API. It's m
On Feb 10, 6:31 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> On Feb 9, 11:39?am, "Ben Sizer" <[EMAIL PROTECTED]> wrote:
>
> > Hopefully in the future, some of those convoluted steps will be fixed,
> > but that requires someone putting in
On Feb 10, 8:42 am, Steve Holden <[EMAIL PROTECTED]> wrote:
> Hendrik van Rooyen wrote:
> > <[EMAIL PROTECTED]> wrote:
> > "Ben Sizer" <[EMAIL PROTECTED]> wrote:
>
> >> Ben> Python extensions written in C require recompilation f
byte-code ?
Yes, until there's a native code equivalent of "import dis" that
telepathically contacts the original programmer to obtain variable
names that aren't in the executable.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
on't have web access.
Perhaps the inclusion of ctypes will make it more practical to migrate
any sensitive code into native code libraries.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
Alex Martelli wrote:
> Ben Sizer <[EMAIL PROTECTED]> wrote:
>
> > I don't know. In terms of copy protection, popular off-the-shelf
> > software is going to get cracked whether it's written in Python or x86
> > ASM, that much is true. But in terms of perh
ven
correct!) but it should show that half of the Strategy pattern
boilerplate is unnecessary in Python. You can even use certain Python
tricks to automatically delegate calls on Duck to the behavior classes
without typing those out individually, for example.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
thematics should have gone in too in order to
enable that. PyGame could possibly have gone in too (not sure about the
license however).
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
onnecting if necessary. After all, you
could be disconnected for other reasons too.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> the data comming in is alway in 158 bytes though.
And one day it may not. :) Consider yourself warned! (In a friendly
manner.)
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
u a full solution because that would defeat the
object.
--
Ben Sizer
--
http://mail.python.org/mailman/listinfo/python-list
a have standard event or
messaging systems? I thought there were only such systems as part of
the GUI libraries. Perhaps you're referring to the Observer interface?
Sometimes a solution that is necessary in Java would be an
overcomplication in Python, and full-blown Observers is probably one
such exam
101 - 200 of 225 matches
Mail list logo