Bravo, Bryan!
Looks very neat! (pity I can't give it a try in my Py 2.3.4
because of reversed() and sorted() functions)
And I've submitted it but got ... TLEs:
http://spoj.sphere.pl/status/SUPPER/
Funnily, the exec.time of the best C solution is only 0.06s!
PS
In my 1st submission I overlooked tha
Hello
I run python script on another computer and want to "survive" that
script after my logout. the script also uses drive mapping to network drive.
Can you help me ? Or better is there some info for unix person how
to survive with python on windows ;-)
thanks,
jan gregor
--
http://mail.p
Ron Adam <[EMAIL PROTECTED]> writes:
> Magnus Lycka wrote:
>> Ron Adam wrote:
[...]
>>> REVERSE ORDER STEPPING
>>> --
>>> When negative steps are used, a slice operation
>>> does the following. (or the equivalent)
>>>
>>>1. reverse the list
>>>2. cut the reversed seque
Hi,
The sys.stdout stream behaves strangely in my
Python2.4 shell:
>>> import sys
>>> sys.stdout.write("")
>>> sys.stdout.write("\n")
>>> sys.stdout.write("\n")
>>> sys.stdout.flush()
[...nothing...]
Have you ever seen sys.stdout behave l
n00m wrote:
> Bravo, Bryan!
> It's incredibly fast!
Not compared to a good implementation for a compiled, low-level
language.
> But your code got WA (wrong answer).
> See my latest submission: http://spoj.sphere.pl/status/SUPPER/
> Maybe you slipped a kind of typo in it? Silly boundary cases
Sébastien Boisgérault a écrit :
> The sys.stdout stream behaves strangely in my
> Python2.4 shell:
>
> >>> import sys
> >>> sys.stdout.write("")
> >>> sys.stdout.write("\n")
>
> >>> sys.stdout.write("\n")
>
> >>> sys.stdout.flush()
> [...not
n00m wrote:
[...]
> Btw, the newest oops in the topic's subject is:
> the code does not work in the case of:
>
> sqls_host, sqls_port = '192.168.0.8', 1433
> proxy_host, proxy_port = '192.168.0.3', 1434
> ## proxy_host, proxy_port = '127.0.0.1', 1434
> ## proxy_host, proxy_port = '', 1434
>
Oops Bryan... I've removed my reply that you refer to...
See my previous - CORRECT - reply. The code just times
out... In some sense it doesn't matter right or wrong is
its output.
Btw, what is the complexity of your algorithm?
Currently I'm at work and it's not easy for me to concentrate
on our su
I am currently writing a python interface to a C++ library. Some of the
functions in this library take unicode strings (UTF-8, mostly) as arguments.
However, when getting these data I run into problem on python 2.2
(RHEL3) - while the data is all nice UCS4 in 2.3, in 2.2 it seems to be
UTF-8 o
Tiissa,
Thanks for your answer. The execution of your example leads to a
'aaa' display during 2 secs, before it is erased by the prompt.
This behavior is standard ? The standard output is not supposed
to *concatenate* the 'aaa' and the '>>>' ?
SB
--
http://mail.python.org/mailman/listinfo/pyt
Robin Becker wrote:
> Paul Rubin wrote:
>
>>
>>This module might be of interest: http://poshmodule.sf.net
>>
>
> It seems it might be a bit out of date. I've emailed the author via sf, but
> no
> reply. Does anyone know if poshmodule works with latest stuff?
haven't been able to contact posh'
> nor even what submission is yours and your latest.
Oops.. my UserName there is ZZZ.
Submissions in the html table are ordered by date DESC.
--
http://mail.python.org/mailman/listinfo/python-list
Gurus, before I am tempted to signal this as a bug, perhaps
you might convince me that it should be so. If I type
l=range(4)
l.extend([1,2])
l gives [0,1,2,3,1,2], what else...
On the other hand, try
p=range(4).extend([1,2])
Then, p HAS NO VALUE (NoneType).
With append the behaviour is simil
Sébastien Boisgérault wrote:
> Tiissa,
>
> Thanks for your answer. The execution of your example leads to a
> 'aaa' display during 2 secs, before it is erased by the prompt.
>
> This behavior is standard ? The standard output is not supposed
> to *concatenate* the 'aaa' and the '>>>' ?
FWIW:
P
Jerzy Karczmarczuk kirjoitti:
> On the other hand, try
>
> p=range(4).extend([1,2])
>
> Then, p HAS NO VALUE (NoneType).
>
> With append the behaviour is similar. I didn't try other methods, but
> I suspect that it won't improve.
>
>
> WHY?
range(4) returns a list and Python's list.extend() retu
Jerzy Karczmarczuk wrote:
> Gurus, before I am tempted to signal this as a bug, perhaps
> you might convince me that it should be so.
it's not a bug, and nobody should have to convince you about any-
thing; despite what you may think from reading certain slicing threads,
this mailing list is not
Jerzy Karczmarczuk wrote:
> Gurus, before I am tempted to signal this as a bug, perhaps
> you might convince me that it should be so. If I type
>
> l=range(4)
> l.extend([1,2])
>
> l gives [0,1,2,3,1,2], what else...
>
> On the other hand, try
>
> p=range(4).extend([1,2])
>
> Then, p HAS NO V
Sébastien Boisgérault wrote:
> Thanks for your answer. The execution of your example leads to a
> 'aaa' display during 2 secs, before it is erased by the prompt.
>
> This behavior is standard ? The standard output is not supposed
> to *concatenate* the 'aaa' and the '>>>' ?
what "python shell" a
On Fri, 09 Sep 2005 11:47:41 +0200, Jerzy Karczmarczuk wrote:
> Gurus, before I am tempted to signal this as a bug, perhaps
> you might convince me that it should be so. If I type
>
> l=range(4)
> l.extend([1,2])
>
> l gives [0,1,2,3,1,2], what else...
That is correct. range() returns a list.
I was wondering if anyone could point me to an example. Currently i
have a c++ program which calls and c++ dll (i created both). The dll
uses SendMessage to pass messages back to the calling .exe, and the
.exe process the messages in it's Windows Procedure function
WindProc().
What i want is to r
Robert Kern wrote:
> Sébastien Boisgérault wrote:
> > Tiissa,
> >
> > Thanks for your answer. The execution of your example leads to a
> > 'aaa' display during 2 secs, before it is erased by the prompt.
> >
> > This behavior is standard ? The standard output is not supposed
> > to *concatenate* t
> what "python shell" are you using, and what platform are you running
> it on? here's what I get on a standard Unix console:
>
import sys
sys.stdout.write("")
> >>> sys.stdout.write("\n")
>
sys.stdout.write("\n")
>
> >>>
btw, what does
>>> sy
Fredrik Lundh wrote:
> Sébastien Boisgérault wrote:
>
> > Thanks for your answer. The execution of your example leads to a
> > 'aaa' display during 2 secs, before it is erased by the prompt.
> >
> > This behavior is standard ? The standard output is not supposed
> > to *concatenate* the 'aaa' and
Fredrik Lundh a écrit :
> > what "python shell" are you using, and what platform are you running
> > it on? here's what I get on a standard Unix console:
> >
> import sys
> sys.stdout.write("")
> > >>> sys.stdout.write("\n")
> >
> sys.stdout.write("\n")
>
On Wed, 07 Sep 2005 15:52:19 -0700, James Stroud wrote:
> Also, I should note that the sha function will, to the limits of anyone's
> ability to analyze it, decouple the information from the hash. So, to be
> careful, you should keep the algorithm to generate the IDs secret.
Security by obscuri
n00m wrote:
> Oops Bryan... I've removed my reply that you refer to...
> See my previous - CORRECT - reply. The code just times
> out... In some sense it doesn't matter right or wrong is
> its output.
If my code times out, then they are using an archaic platform.
With respect to my code, you n
"alexLIGO" <[EMAIL PROTECTED]> writes:
> Hi,
>
> I got this error when trying to execute the following python command
> with in a C module: Py_BuildValue
You get that error immediately on calling that function?
> Do anyone have any idea what this error is about?
You've probably got your refcou
hi, please help to find out where is the problem:
i'm trying to hadle signal.SIGHUP (in unix prompt: kill -HUP )
first of all, i'm trying to do:
signal.signal(signal.SIGHUP, signal.SIG_IGN)
- it works fine (signal ignored)
but if use my handler, than it raises "Interrupted system call":
# al
Hi Jan,
Unfortunately you will have to register it as a service. I am almost
certain there is no other way to do it. However, setting up an
executable as a true Windows Service is extremely tedious. You can try
this utility that I use. You can get it here:
http://www.seritt.org/pub/srvinst13b.exe.
On Wed, 07 Sep 2005 14:31:03 -0700, jlocc wrote:
> Basically I will like to combine a social security number (9 digits)
> and a birth date (8 digits, could be padded to be 9) and obtain a new
> 'student number'. It would be better if the original numbers can't be
> traced back, they will be kept i
Oh!
Seems you misunderstand me!
See how the last block in your code should look:
for tc in range(10):
_ = stdin.readline()
sequence = [int(ch) for ch in stdin.readline().split()]
supers = supernumbers(sequence)
print len(supers)
for i in supers:
print i,
When I submi
In the last week I was working to create script which will read command
from socket, call it, return result, stdout, stderr and kill it after
timeout.
After playing with threads, processes, spawns and popens I found
subprocess module.
To call command I use following construction:
Op 2005-09-09, Steven D'Aprano schreef <[EMAIL PROTECTED]>:
> On Fri, 09 Sep 2005 11:47:41 +0200, Jerzy Karczmarczuk wrote:
>
>> Gurus, before I am tempted to signal this as a bug, perhaps
>> you might convince me that it should be so. If I type
>>
>> l=range(4)
>> l.extend([1,2])
>>
>> l gives
Antoon Pardon a écrit :
>>Because creating a new list is potentially very time-consuming and
>>expensive of memory. Imagine you have a list of 100,000 large objects, and
>>you want to add one more object to it. The way Python works is that append
>>and extend simply add that new object to the end o
Hi all,
I am creating some library, and want use "declarative" style in the
subclasses as much as possible, while the actual use will be more
method-like.
Just to give an impression, the library would be something like this:
class Baseclass(object):
# lot's of code goes here...
class Baseme
Dear all,
i would like to get the return value of all threads
e.g.
def foo(num):
if num>10:
return 1
elif num>50:
return 2
else
return 0
after i invoked
t = thread.start_new_thread(foo,(12,))
how to get the return value of `foo'?
Thanks
--
Best Regards,
L
Hi, I'm in the process of writing a Python linear
algebra module.
The current targeted interface is:
http://oregonstate.edu/~barnesc/temp/linalg/
The interface was originally based on Raymond
Hettinger's
Matfunc [1]. However, it has evolved so that now it
is
nearly identical to JAMA [2], the
Op 2005-09-09, Christophe schreef <[EMAIL PROTECTED]>:
> Antoon Pardon a écrit :
>>>Because creating a new list is potentially very time-consuming and
>>>expensive of memory. Imagine you have a list of 100,000 large objects, and
>>>you want to add one more object to it. The way Python works is that
Peter Hansen schrieb:
>
> Maybe it would be a good idea to tell us something about the nature of
> the image you'll be displaying (though the fact that it needs a
> cross-hair or something is useful information, for a start). For
> example, is it a photographic image? A map? A drawing? Is it
>
2005/9/9, Ksenia Marasanova <[EMAIL PROTECTED]>:
> class BasemethodMeta(type):
> def __new__(cls, class_name, bases, new_attrs):
> cls = type.__new__(cls, class_name, bases, new_attrs)
> new_attrs['__metaclass__'].cls = cls
> return cls
>
> def __call__(self):
>
Jacek Popławski wrote:
> In the last week I was working to create script which will read command
> from socket, call it, return result, stdout, stderr and kill it after
> timeout.
> After playing with threads, processes, spawns and popens I found
> subprocess module.
[snip rest of answer]
While
Ksenia Marasanova wrote:
> class BasemethodMeta(type):
> def __new__(cls, class_name, bases, new_attrs):
> cls = type.__new__(cls, class_name, bases, new_attrs)
> new_attrs['__metaclass__'].cls = cls
> return cls
>
> def __call__(self):
> return self.cls.ge
Michael Sparks schrieb:
> Yes.
>
> Co-incidentally we've been looking at video playback this week as well.
> We've been using Pygame with an Overlay surface, and it works fairly well.
I guess Pygame was more suitable overall for your application? I would
just be interested whether you have consid
Hello,
I am trying to convert a local time into UTC ISO8601, then parse it
back into local time. I tried the following:
--
#!/usr/bin/python
import time
import datetime
import xml.utils.iso8601
year = 2005
month = 7
day= 22
hour = 10 # This is localtime
minute = 30
Guenter wrote:
> It is a video image coming from a camera over a frame grabber board.
> The video from the frame grabber is passed to another board that
> performs some processing and when it comes back from that board it
> needs to be displayed. The joystick allows to specify some regions of
> int
FAN wrote:
> I want to define some function in python script dynamicly and call
> them later, but I get some problem. I have tried the following:
>
> ##
> # code
> ##
> class test:
> def __init__(self):
> exec("def
Jan Gregor wrote:
> I run python script on another computer and want to "survive" that
> script after my logout.
Start at http://www.python.org/windows/win32/#NTServices.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Leo Jay wrote:
> i would like to get the return value of all threads
>
> e.g.
> def foo(num):
>if num>10:
>return 1
>elif num>50:
>return 2
>else
>return 0
>
>
> after i invoked
> t = thread.start_new_thread(foo,(12,))
> how to get the return value of `foo'?
th
C. Barnes wrote:
> Hi, I'm in the process of writing a Python linear
> algebra module.
>
> The current targeted interface is:
> http://oregonstate.edu/~barnesc/temp/linalg/
Is this going to become free software. If yes, what license
will you use?
So my suggestions:
In cases like these ones:
Loking at Rossum's tutorial I've seen that he sometimes uses the
expression "interactive mode" and sometimes "calculator mode". Or these
concepts same?
I've made the following assertion.
"When Python prompts for the next command with the primary prompt ">>>
", the interpreter is said to be in an
Alex wrote:
> Loking at Rossum's tutorial I've seen that he sometimes uses the
> expression "interactive mode" and sometimes "calculator mode". Or these
> concepts same?
Yes.
--
http://mail.python.org/mailman/listinfo/python-list
Hello Python Folk,
pythonutils 0.2.1 is now available.
This is a *major* update since 0.1.0
http://www.voidspace.org.uk/python/modules.shtml#pythonutils
http://www.voidspace.org.uk/cgi-bin/voidspace/downman.py?file=pythonutils-0.2.1.win32.zip
http://www.voidspace.org.uk/cgi-bin/voidspace/downman
2005/9/9, Peter Otten <[EMAIL PROTECTED]>:
> Ksenia Marasanova wrote:
>
> > class BasemethodMeta(type):
> > def__new__(cls,class_name,bases,new_attrs):
> > cls=type.__new__(cls,class_name,bases,new_attrs)
> > new_attrs['__metaclass__'].cls=cls
> > returncls
> >
> >
On Thursday 08 September 2005 06:56 pm, Daniel Britt wrote:
> This will print out 'new method'. If any other instance of mod1.test is
> created calling func1, func1 will always reference the newFunc function.
> This is less than desirable to say the least.
Well, actually it's very desireable, bu
> Daniel Britt wrote:
>
>> I am new to Python so if there is an obvious answer to my question
>> please forgive me. Lets say I have the following code in mod1.py
>>
>> class test:
>>def func1(self):
>> print 'hello'
>>
>>
>> Now lets say I have another file called main.py:
>>
>> import
Fredrik Lundh wrote:
> Jerzy Karczmarczuk wrote:
>
>
>>Gurus, before I am tempted to signal this as a bug, perhaps
>>you might convince me that it should be so.
>
>
> it's not a bug, and nobody should have to convince you about any-
> thing; despite what you may think from reading certain slici
Making a Python program into a service isn't all that "tedious".
Get a copy of Mark Hammonds "Python Programming on Win32" which
contains excellent examples on how to do this. I've written
several and after the first one, it is quite easy to do.
-Larry Bates
Harlin Seritt wrote:
> Hi Jan,
>
> U
Does anyone know of a python module/library for communicating with the
NDMP (ndmp.org) protocol? I'm doing some research and anything would
be a great help, thanks!
-jesse
--
http://mail.python.org/mailman/listinfo/python-list
Leo has new documentation: simpler, clearer, shorter. See:
http://webpages.charter.net/edreamleo/leo_TOC.html
Everything a newbie needs to know about Leo is at:
http://webpages.charter.net/edreamleo/intro.html
Please post any questions, comments or corrections here:
http://sourceforge.net/forum/f
I can't get the value of the variable (out of the class function) if it has
two leading underscores.
-Dave
>>> class encrypt:
def encrypt(self, userValue):
self.initialNumber = userValue
self.__secretSeed = 7
return self.initialNumber * self.__secretSeed
>>> enc = encrypt()
>>> enc.encryp
You can use the Task Scheduler to run a script persistently if you
don't need the capabilities of the service framework.
Roger
"Jan Gregor" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> Hello
>
> I run python script on another computer and want to "survive" that
> script
Dennis, my english is not too good...
About first question this is the implementation of SER class (this is
freeware from the source www.telit.it):
#Telit Extensions
#
#Copyright © 2004, DAI Telecom S.p.A.
#All rights reserved.
#
#Redistribution and use in source and binary forms, with or without
Thanks for your commentary.
The module will be public domain.
I fixed the broken link (epydoc was inserting backslashes in URLs),
changed the default arguments to None as you suggested, and added
a randfunc=None and randargs=() default argument for random_matrix()
and random_vector() (the matrix
Has anyone here upgraded from 2.3 to 2.4 on Tiger?
If so how'd ya do it?
TIA,
Kevin
--
http://mail.python.org/mailman/listinfo/python-list
Python comes in two flavors. In one, sys.maxunicode is 65535 and Py_UNICODE is
a 16-bit type, and in the other, sys.maxunicode is 1114111 and Py_UNICODE is a
32-bit type. This is selected at compile time, and RedHat has chosen in some
versions to compile for sys.maxunicode == 1114111.
By using t
help(instance.property) gives the same information as help(instance) but
help(cls.property) gives information specific to the property.
Is this a bug?
Colin W.
--
http://mail.python.org/mailman/listinfo/python-list
I am trying to make prescript-2.2 (old python based psotscript to plain
text converter).
It gives the following dprecation message
/local/users/ishwar/prescript-2.2/misc.py:23: DeprecationWarning: the
regex module is deprecated; please use the re module
import os, regex, sys, string
if I start
On Friday 09 September 2005 08:29 am, Steve Holden wrote:
> Yes it is :)
That's not an argument! That's just a contradiction.
I'm not payin' for this!
--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks http://www.anansispaceworks.com
--
http://mail.python.org/mailman/list
Since one of the module's targeted applications is for 3D applications,
I think there should be some specific support for applying the
Matrix-vector product operation to a sequence of vectors instead of
only one at a time -- and it should be possible to optimize the
module's code for this common ca
On 8 Sep 2005 08:24:50 -0700, Fuzzyman <[EMAIL PROTECTED]> wrote:
> What is pythonutils ?
> =
> ConfigObj - simple config file handling
> validate - validation and type conversion system
> listquote - string to list conversion
> StandOut - simple logging and output control objec
Hi all. The source below is a simple icmp sniffer made with pcapy.
To decode packets I'm using the EthDecoder() function that returns a
rapresentation of the packet including ICMP type, ICMP code, IP source and
IP destination.
All I need, now, is to get the ip src and ip dst only but I don't know
Hi people,
I'm creating a program that can solve and create Sudoku puzzles. My
creation function needs to make a lot of copies of a puzzle. Until
now, I used copy.deepcopy(), but that's too slow. I want to implement
such a copying function in C and use that instead. My idea about this
is:
- Get t
[alexLIGO]
> I got this error when trying to execute the following python command
> with in a C module: Py_BuildValue
>
> Do anyone have any idea what this error is about?
Just the comment on the failing assert:
assert(gc->gc.gc_refs != 0); /* else refcount was too small */
There are more p
On Thursday 08 September 2005 04:30 am, Paul Rubin wrote:
> Terry Hancock <[EMAIL PROTECTED]> writes:
> > > Not the same at all. It evaluates both the true and false results,
> > > which may have side effects.
> >
> > If you are depending on that kind of nit-picking behavior,
> > you have a serio
Does anyone know how to start Python program(s) from a Linux shell
script? Is it just
$python myscript.py
??
Thanks,
--
http://mail.python.org/mailman/listinfo/python-list
Jan,
Here's what I did to run a Python script (let's call it myscript.py) as
a service:
1. Install Win2K Resource Kit.
2. Run instsrv to install srvany.exe as a service with the name
myscript:
C:\Program Files\Resource Kit\instsrv myscript "C:\Program
Files\Resource Kit\srvany.exe"
3. Go to Co
I noticed in a python distribution there were 5 python files (.py) and
5 other files with the same name, but with the extension .pyc . Is
this some kind of compiled version of the .py files. Thanks,
--
http://mail.python.org/mailman/listinfo/python-list
Pandiani wrote:
> Thanks for repy.
> However, I found SimpleDebugger 0.5 from sourceforge.net as plugin for
> drPython but I'm getting error message because DrPython cannot load
> module drPythonChooser and it seems that the module is removed from
> latest version of drPython. Or maybe I wasn't abl
On 9 Sep 2005 03:40:58 -0700, Sébastien Boisgérault <[EMAIL PROTECTED]> wrote:
>
> Fredrik Lundh wrote:
>> Sébastien Boisgérault wrote:
>>
>> > Thanks for your answer. The execution of your example leads to a
>> > 'aaa' display during 2 secs, before it is erased by the prompt.
>> >
>> > This behav
Ray Schumacher <[EMAIL PROTECTED]> writes:
> First, Thanks again for the update.
>
> At 08:55 AM 9/7/2005, Thomas Heller wrote:
>
>> This part of the code is distributed under the MPL 1.1, so this
>> license is now pulled in by py2exe.
>
> As I read it, it seems that I need to include an
Yes, these are bytecode files.
If you run "python -o", you should also get .pyo files for optimized
bytecode. As long as you do not modify the source code, python directly
reuse the bytecode (that's also a way to distribute script without
source code to avoid your users fiddling in thecode and make
Yes, provided your python interpreter is installed, and in your path
("$ whereis python" should give you something like /usr/bin/python or
/usr/local/bin/python)
--
http://mail.python.org/mailman/listinfo/python-list
Yes, provided your python interpreter is installed, and in your path
("$ whereis python" should give you something like /usr/bin/python or
/usr/local/bin/python)
--
http://mail.python.org/mailman/listinfo/python-list
Guenter wrote:
> Michael Sparks schrieb:
>> Yes.
>>
>> Co-incidentally we've been looking at video playback this week as
>> well. We've been using Pygame with an Overlay surface, and it works
>> fairly well.
>
> I guess Pygame was more suitable overall for your application?
It's not really that,
Xiangyi wrote:
> Hi, there,
>
> I got the following segmentation fault.
>
>> from numarray import *
>> a = zeros((5,100), Float64)
>> b = kroneckerproduct(a, identity(12))
>> segmentation fault
>
>
> If I use a = zeros((5,100)), everything is fine. Kind of weird!
> Can someone help me figure it
Ernesto wrote:
>I noticed in a python distribution there were 5 python files (.py) and
> 5 other files with the same name, but with the extension .pyc . Is
> this some kind of compiled version of the .py files. Thanks,
http://www.python.org/doc/2.4.1/tut/node8.html#SECTION00812
On Fri, 09 Sep 2005 08:36:00 +0200, Thomas Heller <[EMAIL PROTECTED]>
wrote:
>Joakim Persson <[EMAIL PROTECTED]> writes:
>
>> I have a rather bloated C++ client prototype which "works", so I
>> should have all the code needed to invoke the interface, but this
>> client is of course rather bloated
On Wed, 07 Sep 2005 10:56:40 -0700, Joachim Dahl <[EMAIL PROTECTED]> wrote:
> I am trying to make a customized install script for an extension module
> using the distutils.ccompiler class.
>
> I want to embed an existing makefile for the C libraries into the Python
> setup script, but I am not su
Yes...
-
Or...
Add this line in de source:
#!/usr/bin/env python
then
chmod +x myscript.py
./myscript.py
On 9 Sep 2005 08:31:27 -0700, Ernesto <[EMAIL PROTECTED]> wrote:
> Does anyone know how to start Python program(s) from a Linux shell
> script
Stefano Masini schrieb:
> On 8 Sep 2005 08:24:50 -0700, Fuzzyman <[EMAIL PROTECTED]> wrote:
>
>>What is pythonutils ?
>>=
>>ConfigObj - simple config file handling
>>validate - validation and type conversion system
>>listquote - string to list conversion
>>StandOut - simple log
Sybren Stuvel wrote:
> Hi people,
>
> I'm creating a program that can solve and create Sudoku puzzles. My
> creation function needs to make a lot of copies of a puzzle. Until
> now, I used copy.deepcopy(), but that's too slow. I want to implement
> such a copying function in C and use that instead
Stefano Masini wrote:
> I don't know what's the ultimate problem, but I think there are 3 main
> reasons:
> 1) poor communication inside the community (mhm... arguable)
> 2) lack of a rich standard library (I heard this more than once)
> 3) python is such an easy language that the "I'll do it mys
a = range(100)
b = [a] * 3
b[1] = [k + i for k, i in zip(b[1], b[2])]
This is rather slow in python and I thought that kind of things should
be written using numeric or numarray. I tried to read trough manuals
but it didn't help me. So how is this done using numeric or numarray?
--
http://m
It would be helpful to be able to temporarily disable AF_INET socket
connections (I don't care about IPv6 for now).
What I'd like to do is create an environment for a Python script that
appears like the network interface is down, so any remote socket stuff
should fail (like an HTTP GET request to
Stefano Masini wrote:
> I wonder how many people (including myself) have implemented their own
> versions of such modules, at least once in their pythonic life. I
> indeed have my own odict (even same name! :). My own pathutils
> (different name, but same stuff). My own validate... and so forth.
>
Joachim Dahl wrote:
> E.g., say I want to compile a project as:
>
> gcc -Ddef1 -c foo.c -o foo_def1.o
> gcc -Ddef2 -c foo.c -o foo_def2.o
> gcc foo_def1.o foo_def2.o -o myext_module.o
>
> How would I do that using distutils? It doesn't seem to be possible with
> the normal core.setup method, and d
[EMAIL PROTECTED] wrote:
> if I start replacing regex by re I get stuck at replacement of
>regex.symcomp() and regex.pattern()
Groups identified by names are part of the standard regular expression
syntax:
regex.symcomp ('\([a-z][a-z0-9]*\)')
becomes
re.compile ('(?Pid[a-z][a-z0-9]*)')
I get
djw enlightened us with:
> Personally, I would try Psyco first, and consider Pyrex next.
Ok, I'll take a look at those.
> Are you sure your algorithm can't be optimized first, before you
> start trying to write this in C?
I'm sure there will be optimizations, but profiling showed that the
copyin
>>unless you are going many levels deep
(and that's usually a design smell of some kind)
No, its not a bug. its a feature! See the discussion in the recursive
generator thread below:
http://groups.google.com/group/comp.lang.python/browse_frm/thread/4c749ec4fc5447fb/36f2b915eba66eac?q=recursive+ge
On 9/9/05, Michael Amrhein <[EMAIL PROTECTED]> wrote:
> Did you take a look at pyPI (http://www.python.org/pypi) ?
> At least you'd find another odict ...
Oh, yeah. And another filesystem abstraction layer... and another xml
serialization methodology... :)
PyPI is actually pretty cool. If I had to
1 - 100 of 189 matches
Mail list logo