Kent Johnson wrote:
[...]
This is an XML document containing a single tag, , whose content
is text containing entity-escaped XML.
This is *not* an XML document containing tags , ,
, etc.
All the behaviour you are seeing is a consequence of this. You need to
unescape the contents of the tag to
Martin v. Löwis wrote:
Irmen de Jong wrote:
The unescaping is usually done for you by the xml parser that you use.
Usually, but not in this case. If you have a text that looks like
XML, and you want to put it into an XML element, the XML file uses
< and >. The XML parser unescapes that as
Istvan Albert wrote:
XML with elementtree is what makes me never have think about XML again.
+1 QOTW
-Irmen
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, Jan 22, 2005 at 01:54:17AM +0100, Uwe Mayer wrote:
> Any suggestions how I handle uninstallation? This was provided by automake
> rather mechanically. I didn't find a section on that in the distutils
> documentation... :(
I've been using distutils for a couple of projects I've written for
e:
http://snakelets.sourceforge.net/frog/
It's 60Kb if you already have Snakelets, otherwise 122Kb.
Frog 1.3 uses the same storage format as 1.2 so no conversion
is required. If you encounter bugs or problems, or want to give
some feedback, please let me know.
Enjoy,
--Irmen de Jong.
PS I'm running
"/usr/sbin/psrinfo -p" will print the number of physical processors on the
system, though it does not indocate if they are on- or off-line. You could also
write an extension which gets processor information using the sys/processor
library. Example code is available in the "p_online" man page.
Chr
On Sun, Jan 30, 2005 at 03:12:06PM -0800, mike wrote:
> I am new with python. Is it possible to have an MFC application and
> develop some module using python? what are the steps in doing this? can
> anybody give me a url or some documentation for this.. thanks..
It is possible to embed python in
I am trying to use ScriptControl under Excel (Windows XP) with the
code:
Global sc As New MSScriptControl.ScriptControl
Public Function os_getcwd()
sc.Language = "python"
sc.ExecuteStatement ("import os")
os_getcwd = sc.Eval("os.getcwd()")
End Function
When setting the language to py
On Mon, Jan 31, 2005 at 02:42:11PM -0800, mike wrote:
> I was also advised to build the python core (pythoncore.vcproj) with my
> C++ program. By that way I would not have to load the python core
> anymore during runtime. Is this a good approach?
> I am currently using VC++ 7 and python 2.4.
I'm n
aurora wrote:
But the numbers look skeptical. Hotspot claim 71.166 CPU seconds but
the actual elapsed time is only 54s. When measuring elapsed time
instead of CPU time the performance gain is only 13% with the profiler
running and down to 10% when not using the profiler.
Is there something I
Ville Vainio wrote:
"Thomas" == Thomas Heller <[EMAIL PROTECTED]> writes:
>> (Yeah, ctypes will probably be a problem because of the way Symbian
>> handles DLLs)
Thomas> How *does* symbian handle DLLs?
By ordinal, so the dll does not include the symbol name (in order to
keep the size s
What would be the best way, if any, to obtain
the bytecode for a given loaded module?
I can get the source:
import inspect
import os
src = inspect.getsource(os)
but there is no ispect.getbytecode() ;-)
--Irmen
--
http://mail.python.org/mailman/listinfo/python-list
Mark Nenadov wrote:
On Wed, 02 Feb 2005 23:03:17 +0100, Irmen de Jong wrote:
What would be the best way, if any, to obtain
the bytecode for a given loaded module?
I can get the source:
import inspect
import os
src = inspect.getsource(os)
but there is no ispect.getbytecode() ;-)
--Irmen
The
Steve Holden wrote:
Having said which, if the module was loaded from a .pyc file then the
bytecode is available from that - take everything but the first eight
bytes and use marshal.loads() to turn it back into a code object:
Yup. As I explained in the other message, this is basically
what I'm do
Steve Holden wrote:
I'm not sure why you think the module's code would be needed once it's
been executed. That assigns all necessary code blocks to the functions
defined therein, so the code, once the import has been executed, is
garbage (from the interpreter's rather process-centric view of thi
Steve Holden wrote:
But I also want the bytecode of modules that don't have a .pyc file,
possibly because they have already been 'dynamically' loaded from
another bytecode string ;-)
Aah, right, I suspect in these cases (which *are* pretty far from the
ordinary run of things) you'd sometimes be up
Jorey Bump wrote:
Does anyone know how to use SimpleHTTPServer to:
1. Support virtual hosts?
2. Support SSL?
I'd like to use SimpleHTTPServer to create some simple reporting utilities,
but can't get past these two points. Is there a NotSoSimpleHTTPServer?
Give Snakelets a try (snakelets.sf.net).
I
Jorey Bump wrote:
Irmen de Jong <[EMAIL PROTECTED]> wrote in news:41fcf53b
[EMAIL PROTECTED]:
I've just uploaded the Frog 1.3 release.
Frog is a blog (web log) system written in 100% Python.
It is a web application written for Snakelets.
It outputs XHTML, is fully unicode compatible,
David Bear wrote:
> Let's say I have a list called, alist. If I pass alist to a function,
> how can I get the name of it?
>
> alist = range(10)
>
> def afunction(list):
> listName = list.__name__ (fails for a list object)
>
You don't, see the other reply.
You didn't say why you think you n
On Thu, 23 Jun 2005 00:02:55 -0400, Gregory Piñero
<[EMAIL PROTECTED]> wrote:
>Hi guys,
>
>I'm trying to run this statement:
>
>os.system(r'"C:\Program Files\Mozilla Firefox\firefox.exe"' + '
>"www.blendedtechnologies.com"')
>
>The goal is to have firefox open to that website.
>
>When I type r'"C:
Grant Edwards wrote:
> Under Linux, you need to be root to send a broadcase packet.
I don't think this is true.
--Irmen
--
http://mail.python.org/mailman/listinfo/python-list
Christopher Subich wrote:
> Steve Horsley wrote:
>
>> There is a higher level socket framework called twisted that everyone
>> seems to like. It may be worth looking at that too - haven't got round
>> to it myself yet.
>
>
> I wouldn't say 'like,' exactly. I've cursed it an awful lot (mostly
George Sakkis wrote:
> "[EMAIL PROTECTED]" wrote:
>
>
>>I am a java programmer and I want to learn Python Please help me.
>
>
> Google Is Your Friend:
>
> http://www.razorvine.net/python/PythonForJavaProgrammers
> http://www.ferg.org/projects/python_java_side-by-side.html
>
> George
>
The f
ll I figure out what's really happening.
Could someone save my precious and already sparse sleeping time, by
pointing me to what I'm missing here?
WinXP SP1
Python 2.4.1
MinGW GCC 3.4.2
TIA,
Francois De Serres
--
http://mail.python.org/mailman/listinfo/python-list
Christopher Subich wrote:
>Francois De Serres wrote:
>
>
>>- so, on callback, I create a new thread, after checking that the
>>previous one has returned already (WaitOnSingleObject(mythread)) so we
>>only have one thread involved.
>>
>>
>
>
Hello,
I'm chasing a GPF in the interpreter when running my extension module.
It's not very elaborated, but uses a system (threaded) callback, and
therefore the GIL.
Help would be mucho appreciated. Here's the rough picture:
win32_spam.c
/* code here is unit-tested OK */
typedef st
Hiho,
Having a string: "dothat"
and a tuple: (x, y)
1. What's the best way to build a function call like: dothat(x,y)?
Assuming dothat is def'd in the same module,
2. is: eval("dothat(x,y)", None, (('x', 100), ('y', 200)))
the right way to have it executed?
If dothat is def'd in another module:
All your **kwargs are belong to us.
*args is documented in the Tutorial. I reckon **kwargs represents a
dictionary of arguments. But I don't quite get the semantics of **x.
Undefined length tuple of undefined length tuples? Are there other
practical use cases for ** (common enough please, I wis
Roland Heiber wrote:
>Francois De Serres wrote:
>
>
>>Hiho,
>>
>>Having a string: "dothat"
>>and a tuple: (x, y)
>>1. What's the best way to build a function call like: dothat(x,y)?
>>
>>
>
>Not the best (not at
Peter Hansen wrote:
>Roland Heiber wrote:
>
>
>>Not the best (not at all) but one way:
>>
>>def dothat(x,y):
>> print "Called with:", x, y
>>
>>c = (1,2)
>>
>>locals().get("dothat")(*c)
>>
>>
>
>As you say, not the best, but in fact not really advisable under any
>circumstances. locals()
Michael Hoffman wrote:
>Peter Hansen wrote:
>
>
>>Francois De Serres wrote:
>>
>>
>>
>
>
>
>>>*args is documented in the Tutorial. I reckon **kwargs represents a
>>>dictionary of arguments. But I don't quite get the semant
Francois De Serres wrote:
>Hiho,
>
>Having a string: "dothat"
>and a tuple: (x, y)
>1. What's the best way to build a function call like: dothat(x,y)?
>
>Assuming dothat is def'd in the same module,
>2. is: eval("dothat(x,y)", None, ((
Steven D'Aprano wrote:
>On Wed, 13 Jul 2005 06:16:54 -0700, Robert Kern wrote:
>
>
>
>>Duncan Booth wrote:
>>
>>
>>>Francois De Serres wrote:
>>>
>>>
>>>
>>>>Having a string: "dothat"
Duncan Booth wrote:
>Francois De Serres wrote:
>
>
>
>>Sorry, I was unclear about the fact that the args are formals. I'm
>>trying to do something like:
>>
>>func = "dothat"
>>args = ('x','y')
>>localcontext =
Scott David Daniels wrote:
>Francois De Serres wrote:
>
>
>>Francois De Serres wrote:
>>
>>
>>>Having a string: "dothat"
>>>and a tuple: (x, y)
>>>1. What's the best way to build a function call like: dothat(x,y)?
>>
Hiho,
I can't seem to find a proper way to document my extension module.
Following the C API doc:
static PyMethodDef ioMethods[] = {
{"o_count", o_count, METH_VARARGS, "Return the count of available
MIDI outputs."},
}
lacks:
a) module level documentation
b) function parameters
Also,
Robert Kern wrote:
>Francois De Serres wrote:
>
>
>>Hiho,
>>
>>I can't seem to find a proper way to document my extension module.
>>Following the C API doc:
>>
>>static PyMethodDef ioMethods[] = {
>>{"o_count", o_c
Simon Dahlbacka wrote:
>Re: assigning a PyStr object to __doc__, take a look at Py_InitModule3,
>which does that for you.
>
>
>
got it, thx.
>Then you have the PyDoc_STRVAR macro in python.h that you might want to
>use (see definition below). But as Robert already told you, you'll need
>to prov
Hiho,
When there's an unhandled exception in my
extension-module's-callback-into-Python-function-object, I get a GPF and
Python exits.
When the exception is being handled within the callback (hence in
Python), I get a very significant hiccup (1 to 5 seconds freeze).
Question: is there a specif
hiho,
what's the clean way to translate the tuple (0x73, 0x70, 0x61, 0x6D) to
the string 'spam'?
TIA,
Francois
--
http://mail.python.org/mailman/listinfo/python-list
Francois De Serres wrote:
>hiho,
>
>what's the clean way to translate the tuple (0x73, 0x70, 0x61, 0x6D) to
>the string 'spam'?
>
>TIA,
>Francois
>
>
thanks to all!
I'll pick ('%c' * len(t)) % t, for it's readability and the
Robert Kern wrote:
>Francois De Serres wrote:
>
>
>
>>I'll pick ('%c' * len(t)) % t, for it's readability and the fact that
>>join() is on the deprec'd list.
>>
>>
>
>''.join() is certainly not deprecated. What m
Robert Wierschke wrote:
> John schrieb:
>
>> I have a simple script that runs a server where one client can connect.
>> I would like to make it so that many clients can connect to one server
>> on the same port. Where can I find how to do this?
>>
>> Thanks,
>> --j
>>
>
> use sockets.
Or, if you
John Walton wrote:
> Hello, everyone. I just began school, and they
> already assigned us science fair. Since I'm in 8th
> grade, I get to do demonstrations for our projects.
> I'm probably going to demonstrate Python's networking
> capabilities by writing a simple instant messenger
> program.
Michael Hoffman wrote:
> Lonnie Princehouse wrote:
>
>> C:\>python -u
>> Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)]
>> on win32
>> Type "help", "copyright", "credits" or "license" for more information.
>>
> print 'hello'
>>
>>
>> File "", line 1
>> print 'hello
JerryB wrote:
> Hi,
> I have a dictionary for counting ocurrences of strings in a document.
> The dictionary looks like this:
>
> 'hello':135
> 'goodbye':30
> 'lucy':4
> 'sky':55
> 'diamonds':239843
> 'yesterday':4
>
> I want to print the dictionary so I see most common words first:
>
> 'diamond
Mohammed Smadi wrote:
> hi;
> I am trying to do some very basic socket programming and i get the
> following error. Any help will be appreciated:
>
> Code:
> import socket
> x = socket.gethostbyaddr("www.google.ca")
>
> return an error: socket.herror: (1, 'Unknown host')
You're using the wrong
future version.
For now, you'll just have to login twice or hack your own centralized
logon thing ;-)
Have fun,
--Irmen de Jong
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, Feb 06, 2005 at 01:42:22PM -0800, Bobby Owens wrote:
> I've muddled through the python code and figured out parts of it. I've
> now installed Sun Solaris 10 on a VM ware installation successfully
> and can muddle thorough the basics of the o/s. I cant figure out how
> to install python. Fro
On Mon, Feb 07, 2005 at 03:43:15PM -0500, Dan Perl wrote:
>
> "Xah Lee" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > is it possible to write python code without any indentation?
>
> I read just today in a tutorial that "Python on the other hand, does not
> even allow change
Hi,
I need to parse a subset of C (a header file), and generate some unit
tests for the functions listed in it. I thus need to parse the code,
then rewrite function calls with wrong parameters. What I call "shaking
the broken tree" :)
I chose to make my UT-generator in Python 2.4. However, I am no
GCC-XML looks like a very interesting alternative, as Python includes
tools to parse XML.
The mini-C compiler looks like a step in the right direction for me.
I'm going to look into that.
I'm not comfortable with C++ yet, and am not sure how I'd use Pyste.
Thanks for the information guys, you've b
That looks cool Roman, however, I'm behind a Corporate Firewall, is
there any chance you could send me a cvs snapshot?
John
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Feb 07, 2005 at 11:57:02AM -0800, Keith Veleba wrote:
> Background:
> I'm working on a project where I have to do some serious
> multithreading. I've worked up a decorator in Python 2.3.4 to implement
> the lock semantics required for specific functions I want to
> synchronize:
I found Chr
m wrote:
Fredrik Lundh wrote:
if you use Python mostly to write empty loops, your programming license
should be revoked. the benchmark author seems to have realized that, as
can be seen from the "it's dead" paragraph at the top of the page, which
makes me wonder why you posted this link...
i wa
Pickle and marshal are not safe. They can do harmful
things if fed maliciously constructed data.
That is a pity, because marshal is fast.
I need a fast and safe (secure) marshaler.
Is xdrlib the only option?
I would expect that it is fast and safe because
it (the xdr spec) has been around for so lo
Pierre Barbier de Reuille wrote:
Irmen de Jong a écrit :
Pickle and marshal are not safe. They can do harmful
things if fed maliciously constructed data.
That is a pity, because marshal is fast.
I need a fast and safe (secure) marshaler.
Is xdrlib the only option?
I would expect that it is fast
Hello Guido
[EMAIL PROTECTED] wrote:
Irmen de Jong wrote:
Pickle and marshal are not safe. They can do harmful
things if fed maliciously constructed data.
That is a pity, because marshal is fast.
I think marshal could be fixed; the only unsafety I'm aware of is that
it doesn't
PA wrote:
On Feb 10, 2005, at 15:01, Irmen de Jong wrote:
Is xdrlib the only option?
I would expect that it is fast and safe because
it (the xdr spec) has been around for so long.
XDR? Like Sun's "XDR: External Data Representation standard"?
http://www.faqs.org/rfcs/rf
Alan Kennedy wrote:
[Irmen de Jong]
Pickle and marshal are not safe. They can do harmful
things if fed maliciously constructed data.
That is a pity, because marshal is fast.
I need a fast and safe (secure) marshaler.
Hi Irmen,
I'm not necessarily proposing a solution to your problem, b
PA wrote:
Sorry if this is off-topic, I didn't follow the thread from the very
beginning, but wouldn't something like YAML work for you perhaps?
http://yaml.org/
Perhaps, but the spec makes my skin crawl.
Also, it seems ill-fit for efficient machine-to-machine
communication (yaml seems to be des
Hi Alan
Alan Kennedy wrote:
Well, the python JSON codec provided appears to use eval, which might
make it *seem* unsecure.
http://www.json-rpc.org/pyjsonrpc/index.xhtml
But a more detailed examination of the code indicates, to this reader at
least, that it can be made completely secure very easi
cmkl wrote:
but can't effbot's fast cElementree be used for PYROs XML_PICKLE
and would it be safe and fast enough?
ElementTree's not a marshaler.
Or has it object (de)serialization included?
--Irmen
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
import os
os.path.getsize("BL.xml")
1302
from xml.dom import minidom
x = minidom.parse("BL.xml")
(have patience. have lots of patience.)
Hehe, the XML killer file "BillionLaughs"... correct?
--Irmen
--
http://mail.python.org/mailman/listinfo/python-list
Alan Kennedy wrote:
I should learn to keep my mouth zipped :-L
:-D
OK, I really don't have time for a detailed examination of either the
JSON spec or the python impl of same. And I *definitely* don't have time
for a detailed security audit, much though I'd love to.
No problem. The patch you wrote
Fredrik Lundh wrote:
the problem is that the following may or may not reach the "done!" statement,
somewhat depending on python version, memory allocator, and what data you
pass to dumps.
import marshal
data = marshal.dumps((1, 2, 3, "hello", 4, 5, 6))
for i in range(len(data), -1, -1):
try:
Luc wrote:
So I am looking for another solution with a web interface that should work
with linux and windows XP.
I had a look to zope but was afraid with the complexity and debug
difficulties.
Are there some other solutions?
Yes. A lot: http://www.python.org/moin/WebProgramming
I know someone who s
Alan Kennedy wrote:
[Irmen de Jong]
Interestingly enough, I just ran across "Flatten":
http://sourceforge.net/project/showfiles.php?group_id=82591&package_id=91311
"...which aids in serializing/unserializing networked data securely,
without having to fear execution of code o
Simon John wrote:
Maybe I'll fork out the 100usd for Visual Studio .NET 2003 after all
$100? Where? Last time I looked it was closer to $800.
--Irmen
--
http://mail.python.org/mailman/listinfo/python-list
Paul Rubin wrote:
John Lenton <[EMAIL PROTECTED]> writes:
and buying more, cheap computers gives you more processing power than
buying less, multi-processor computers.
The day is coming when even cheap computers have multiple cpu's.
See hyperthreading and the coming multi-core P4's, and the final
[EMAIL PROTECTED] wrote:
Hiya,
The title says it all really, but im a newbie to python sort of. I can
read in files and write files no probs.
But what I want to do is read in a couple of files and output them to
one single file, but then be able to take this one single file and
recreate the files I
On Sat, Feb 12, 2005 at 07:16:02PM +, ted wrote:
> How does the speed of the Scons build tool compare with Ant?
I would recommend asking this question on [EMAIL PROTECTED] , but my
impressions is that most of the time is probably spent in the compiler. If you
are working on a java project you
log in the manual:
http://pyro.sourceforge.net/pyro-manual/12-changes.html#latest
Because it is a beta release, there may still be bugs.
Please test this version and let me know of any issues.
Have fun, and thanks for your interest, support, and feedback!
--Irmen de Jong
---> What is Pyro?
Pyro
On Sun, Feb 13, 2005 at 01:25:02PM -0600, Efrat Regev wrote:
> I would like to recurse through a directory and make files (which match
> a specific criteria) read only. From searching the Internet, I found
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303343
> which shows how to
Paul Rubin wrote:
There's another issue with marshal that makes it unsuitable for Pyro,
which is that its data format is (for legitimate reasons) not
guaranteed to be the same across different Python releases. That
means that if the two ends of the Pyro application aren't using the
same Python ver
Paul Rubin wrote:
Yes, however, you can at least set the protocol level. Marshal doesn't
give you that option.
That's right. So good for Pyro then :)
It works most of the time, even across different Python versions,
unless using mobile code.
What do you do about the security issue if you're using
Well, ok, if you trust then other end then I think it's enough to just
authenticate all the pickles (say using hmac.py) without needing
something as heavyweight as SSL.
An interesting idea that hadn't crossed my mind yet.
Pyro *does* already have connection authentication that uses md5
(and hmac s
Leif K-Brooks wrote:
Irmen de Jong wrote:
the GIL must die.
I couldn't resist:
http://www.razorvine.net/img/GIL.jpg
Neither could I:
http://ecritters.biz/diegil.png
(In case it's not entirely obvious, the stick figure just slices the GIL
into two pieces with his sword, causing it
Paul Rubin wrote:
Yes, that's what I meant, using hmac to authenticate using a shared secret,
sending the rest in the clear. Note you should also put sequence numbers
in the messages, to stop the attacker from fooling you by selectively
deleting or replaying messages.
Thanks for the tip. I'll thin
Fredrik Lundh wrote:
the bug had nothing to do with the XML-RPC protocol itself;
True, sorry for the confusion. I should have written it more precisely.
it was a
weakness in the SimpleXMLRPCServer framework which used reflection
to automatically publish instance methods (if you use getattr repeated
Paul Rubin wrote:
Hmm, you also want a random blob in each packet (including the session
start) included in the authentication of the next packet, so the
attacker can't cut and paste messages from old sessions into the
current ones. You know, by the time you're through designing this you
may be be
Sean wrote:
Then I would have a script that uses the
print_this function defined in the module
without using the module name in the call.
from module_name import print_this
or, even:
from module_name import print_this as other_nice_name
--Irmen
--
http://mail.python.org/mailman/listinfo/python-lis
Tim Churches wrote:
Also, the new findings only apply to hash collisions, not to the invertibility of SHA1
hashes - thus, as Schneier points out, uses of keyed hashes (such as HMAC) are not
compromised by this.
What about HMAC-MD5?
--Irmen
--
http://mail.python.org/mailman/listinfo/python-list
John Abel wrote:
I'm hoping this is something simple, and someone can point me in the
right direction here. I have a class based on SocketServer
(ThreadingTCPServer), and I've used makefile on the socket so I use the
"for in " routine. My client sends it a small amount of data. However,
both
aurora wrote:
You could not. Unicode is an abstract data type. It must be encoded
into octets in order to send via socket. And the other end must decode
the octets to retrieve the unicode string. Needless to say the encoding
scheme must be consistent and understood by both ends.
So use pickle
Irmen de Jong wrote:
aurora wrote:
You could not. Unicode is an abstract data type. It must be encoded
into octets in order to send via socket. And the other end must
decode the octets to retrieve the unicode string. Needless to say the
encoding scheme must be consistent and understood by
On Thu, Feb 24, 2005 at 11:11:07AM -0600, Efrat Regev wrote:
> I was wondering whether there are any Python modules for various
> Internet protocols, ...
Twisted (http://twistedmatrix.com/products/twisted) is an event driven
framework for writing network applications. It includes many internet
On Wed, Feb 23, 2005 at 10:54:50PM -0500, Douglas Alan wrote:
> Is there a canonical way of iterating over the lines of a file that
> are null-separated rather than newline-separated?
I'm not sure if there is a canonical method, but I would recommending using a
generator to get something like this
On Thu, Feb 24, 2005 at 02:03:52PM -0500, Douglas Alan wrote:
> Thanks for the generator. It returns an extra blank line at the end
> when used with "find -print0", which is probably not ideal, and is
> also not how the normal file line iterator behaves. But don't worry
> -- I can fix it.
Sorry.
On Fri, Feb 25, 2005 at 07:56:49AM +1100, John Machin wrote:
> Try this:
> !def readweird(f, line_end='\0', bufsiz=8192):
> !retain = ''
> !while True:
> !instr = f.read(bufsiz)
> !if not instr:
> !# End of file
> !break
> !splitstr = ins
On Mon, Feb 28, 2005 at 08:30:59AM -0800, [EMAIL PROTECTED] wrote:
> WHen I use the code below and printing all the results i get this:
> --
> 0 1 10
> 11 2 3
> 4 5 6
> 7 8 9
> --
> But I want
> --
> 0 1 2
> 3 4 5
> 6 7 8
> 9 10 11
> --
If you want your key, value pairs in a certai
On Wed, Mar 02, 2005 at 01:31:04PM +0300, Denis S. Otkidach wrote:
> You are not right, records in BTree (btopen) are certainly sorted. For
> positive integers you can pack keys with struct.pack('>I', value).
You're right... I missed the btopen (rather a key thing to miss I know, but
when you hav
config file (see docs) and
then run the serv.py script, or the monitor.py script
if you want to start it as a daemon (on Unix).
Enjoy,
--Irmen de Jong.
P.S. if you want to see it in action, visit http://www.razorvine.net/snake/
--
http://mail.python.org/mailman/listinfo/python-list
Paul Rubin wrote:
Basically I wish there was a way to have persistent in-memory objects
in a Python app, maybe a multi-process one. So you could have a
persistent dictionary d, and if you say
d[x] = Frob(foo=9, bar=23)
that creates a Frob instance and stores it in d[x]. Then if you
exit the a
I use fetchmail in daemon mode and have procmail set up to filter my
email through bogofilter (http://bogofilter.sourceforge.net/). As for
outgoing mail postfix, exim, and sendmail are popular. From my laptop I
do use a python script to cache mail my mail when I'm not connected. I
then use a script
Roy Smith already touched on regular expressions, but as far as
features go, I would say that the real difference between python and
perl is not in the features, but in the philosophy. It seems to me that
any program you can write in python could also be written in perl. What
it comes down to for m
It is possible to store 70,000 items in a list (try "l =
range(7)"), but the best way to check if you can store all the
items you need to store is to try it. After all if they are all very
large you might potentially run out of memory.
Chris
--
http://mail.python.org/mailman/listinfo/python-
Jp Calderone wrote:
On 21 Dec 2004 05:04:36 -0800, Mike M?ller <[EMAIL PROTECTED]> wrote:
Can someone recommend a parallelization approach? Are there examples or
documentation? Has someone got experience with stability and efficiency?
I am successfully using pyro http://pyro.sourceforge.net for my
Gurpreet Sachdeva wrote:
I have shifted my python script on a 4 node open ssi cluster. Please
guide me what changes do I have to do in my python scripts to fully
utilize the cluster. How do we introduce parralel processing in
python???
There was a very recent thread about this subject: http://tinyu
[EMAIL PROTECTED] wrote:
> This question may be ased before, but I couldn't find the answer
> searching the archive.
>
> Basically, I just want to send a hex number from one machine to the
> next:
>
> for example
>
> msg = "Length is "
> n = '\x81'
> msg += n
> sock.send(msg)
>
> The problem is
301 - 400 of 1181 matches
Mail list logo