roach?
- Dimensionality is between 20x20 and 100x100
- The spectrum doesn't need to be exactly pink/brown, an approximation
is fine.
- Implementation in either matlab or scientific python (LAPACK anyway)
Thanks a lot for hints, literature, algorithms!
Mathias
--
http://mail.python.org/mailman/listi
roach?
- Dimensionality is between 20x20 and 100x100
- The spectrum doesn't need to be exactly pink/brown, an approximation
is fine.
- Implementation in either matlab or scientific python (LAPACK anyway)
Thanks a lot for hints, literature, algorithms!
Mathias
--
http://mail.python.org/mailman/listi
oach? Are there examples or
documentation? Has someone got experience with stability and efficiency?
Thanks a lot,
Mathias
--
http://mail.python.org/mailman/listinfo/python-list
Dear NG,
can somebody tell me how the work packages are scheduled to the workers?
From the code it seems to me like a a static distribution, ie each
worker gets the same amount of work, not taking into account if a faster
worker already finished all work packages.
Thanks,
Mathias
PS: Is
lot,
Mathias
--
http://mail.python.org/mailman/listinfo/python-list
ords the function call structure?
Does someone have experience with threading in python - are there
non-threadsafe functions I should know about?
Thanks,
Mathias
--
http://mail.python.org/mailman/listinfo/python-list
I'm using os.popen2() to pipe into an ssh session via stdin/stdout.
That's probably not the elegant way...
Other modules: scipy 0.3.2 (with Numeric 24.2) and python 2.4
Does pickle/cPickle count as part of the marshal module?
Mathias
--
http://mail.python.org/mailman/listinfo/python-list
PS: setting sys.setcheckinterval(1) reduces the probablilty of a failure
as well, but definetely at a performance cost.
--
http://mail.python.org/mailman/listinfo/python-list
>
> What module are you using for SSH?
>
> What's in your program that isn't pure Python?
> The problem is probably in some non-Python component; you shouldn't
> be able to force a memory protection error from within Python code.
>
It looks like the error could be in scipy/Numeric, when
uot;
An hint me to this mailinglist if I encounter problems.
Well, here I am.
Thus my Question are:
Does I try to uninstall the wrong way (New to Windows)?
Does the Package got some pitfalls stiking back?
What can I do to get rid of the "wrong" package?
Thank You for Your Answer in a
I have created a Python program that is running on my desktop.
How can I make it listen for a certain keypress (say, Windows-key +
space) in a controlled fashion even when it is not the program having
focus?
I need to do this running GNOME under Mandrake GN/Linux 10.
/Mathias
--
http
I have created a small Python program that is running on my desktop.
How can I make it listen for a certain keypress (say, Windows-key +
space) in a controlled fashion even when it is not the program having
focus?
I need to do this running under GNOME in Mandrake GN/Linux 10.
/Mathias
--
http
Peter Hansen <[EMAIL PROTECTED]> writes:
>> How can I make it listen for a certain keypress (say, Windows-key +
>> space) in a controlled fashion even when it is not the program having
>> focus?
>>
>> I need to do this running under GNOME in Mandrake GN/Linux 10.
>
> Search Google for "python key
Mathias Dahl <[EMAIL PROTECTED]> writes:
> Peter Hansen <[EMAIL PROTECTED]> writes:
>
>>> How can I make it listen for a certain keypress (say, Windows-key +
>>> space) in a controlled fashion even when it is not the program having
>>> focus?
>
able to connect. If you start it on a different machine, you
are not able to connect without giving a hostname? Whats wrong with
offering the the name (or IP-address) of your MacOS-box instead of
'localhost' to the script?
Mathias
--
http://mail.python.org/mailman/listinfo/python-list
#x27;re running the classic server you can simply follow Grig's advice and
connect "directly" to the db files.
Mathias
--
http://mail.python.org/mailman/listinfo/python-list
s not
directly accessible by URL and so on. All that nice stuff used to make a
web site more professional;)
But now the question: how can this be solved by using Python?
Mathias
--
http://mail.python.org/mailman/listinfo/python-list
Michele Simionato wrote:
> Use twill:http://www.idyll.org/~t/www-tools/twill.html
I'll do so. Twill is great, anyway thanks for all other responses too.
Mathias
--
http://mail.python.org/mailman/listinfo/python-list
and understand that it probably involves
a lot of "low-level" stuff in X which feels a bit "scary" :). Any
clues of doing this "easily" in Python + some module?
/Mathias
--
http://mail.python.org/mailman/listinfo/python-list
evdev.py", line 91, in __init__
self.fd = os.open(filename, os.O_RDWR | os.O_NONBLOCK)
OSError: [Errno 13] Permission denied: '/dev/input/event0'
Loggin in (su:ing) as root solves that problem but I'm not sure I want
to require the user being root to be able to run my progr
t didn't. I was able to
create only 2 GB of python objects. The application occupied
approximately 2.2 GB of memory. After that, python failed with a
memory error.
Is there any internal restriction on the size of the heap?
Mathias
--
http://mail.python.org/mailman/listinfo/python-list
Ivan Voras wrote:
> Mathias Waack wrote:
>> amounts of data. I figured out that a 32 bit application on HP-UX
>> cannot address more than 1 GB of memory. In fact (I think due to
>> the overhead of memory management done by python) a python
>> application cannot use muc
Mike C. Fletcher wrote:
> Mathias Waack wrote:
> ...
>
>>My python script allocates a bunch of strings each of 1024
>>characters and writes it in a cStringIO. And it fails after writing
>>512K of strings. Don't know how python restricts the heap size -
>>but
g
> in there.)
I'm not sure if I understand the problem right, but there is a rule
of thumb:
Prefer delegation to inheritance. If you can use delegation, avoid
inheritance. Esp. on python, where (from the point of view of usage)
there is no distinction between delegation or inheritance
ef __setup1(self, arg1):
print "setup1"
def __setup2(self, arg1, arg2):
print "setup2"
Or for different parameter lists which may have the same length my
suggestion would be:
def __init__(self, **kw):
self.__dict__.update(kw)
Mathias
PS: anyone wo
f1 = getattr(self.__wrapped, attr)
s,r = f1(args)
if s != 'OK': raise NotOk((s,r))
return r
return f
# raise some exception here
imap = Wrapper(imaplib.IMAP4_SSL)
If you wrap all methods you can ignore the if-test. Instead of the
class object you can pa
t; def foo(): pass
> os.spawn(foo)
Just starting is easy:
def spawn(f):
if os.fork() == 0:
f()
sys.exit(0)
But I'd expect you would like to get some return values from f...
Mathias
--
http://mail.python.org/mailman/listinfo/python-list
em for some criteria, and while I'm
given tools to do it, I try to make my own tools to get the job done. That is
to say, if there's something in your day that you use in some way, and it's
fairly simple, or its essential functionality can be copied, then that's
someth
quot;Catch errors
rather than avoiding them to avoid cluttering your code with special
cases"
-Mathias
--
http://mail.python.org/mailman/listinfo/python-list
Hi
I have a script which calls getLogger to set up a logging service.
The standard logger description used both the consoleHandler and the
syslogHandler.
It seems that if syslogd is shut down, getLogger fails, and the script
won't be able to log at all.
is there a way to make it immune against t
is there a built-in encoding (for encode/decode methods) that
as colon-separated hex (01:02:03:04...)?
'hex' seems to encode as '01020304' and while one can postprocess that
to insert the colons, if a single operation exists, I'd rather use that.
--
http://mail.python.org/mailman/listinfo/python-
ata (list of tables, list of columns,
list of indexes aso...) in system tables which can be queried in the same
manner as common tables or view. Just read your database handbook...
HTH
Mathias
--
http://mail.python.org/mailman/listinfo/python-list
ocument in a sax-like manner and expands only selected
sub-trees.
> Any suggestions on what that something else is? Is it hard to convert
> the code from DOM to SAX?
Assuming a good design of course not. Esp. if you only need some selected
parts of the document SAX should be your choice.
piler error
(http://mail.python.org/pipermail/python-dev/2003-May/035386.html). But I'm
not able to verify this error with gcc 4.1.2.
Google finds some postings describing the same error - but it looks like
nobody ever got an answer:( Would be nice to have more success...
Regards
Mathias
--
http://mail.python.org/mailman/listinfo/python-list
Continuing my monologe;)
Mathias Waack wrote:
> I've embedded python into a legacy application. It works - most of the
> time. In some special situations the app crashes executing the "import
> random". There are two different situations:
>
> 1. the sources comp
Richard Brodie wrote:
> "Mathias Waack" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>> BTW, does anybody know why the c-lib offers both log and log1p?
>
> So you can get a sensible answer computing log(1 + 10 ^ -30).
Ok, that make
I wrote a few functions which IMHO are missing in python(s itertools).
You can download them here:
http://sourceforge.net/project/showfiles.php?group_id=165721&package_id=212104
A short description to all the functions:
icmp(iterable1, iterable2) -> integer
Return negative if iterable1 <
Hi.
I wrote a small hashlib for C. Because I'm new to hashes I looked at pythons
implementation and
reused *some* of the code... or more the mathematical "hash-function", not
really the code.
In particular I looked at pythons hash and lookup functions, so I came up with
this (see the code
un
Paul Rubin wrote:
> Mathias Panzenboeck <[EMAIL PROTECTED]> writes:
>> So, can this code be considered as derived and do I have to put my
>> code under the GPL? I'd like to publish it under something less
>> restrictive, like a BSD style license. But if GPL is
Fredrik Lundh wrote:
> Mathias Panzenboeck wrote:
>
>> But the question is: *IS* this derived work? I mean, it's not copied
>> code.
>> It's the same hashing-logic, which I learned by watching pythons code.
>
> given that it's only a few lines of
Robert Kern wrote:
> Timothy Wu wrote:
>> Hi,
>>
>> Using generator recursively is not doing what I expect:
>>
>> def test_gen(x):
>> yield x
>> x = x - 1
>> if x != 0:
>> test_gen(x)
>
> The only thing that the last line does is *create* a new generator object. You
> need to a
Chris Mellon wrote:
> On 11/29/06, Tom Plunket <[EMAIL PROTECTED]> wrote:
>> I'd like to figure out if a given parameter is a function or not.
>>
>> E.g.
>>
>> >>> type(1)
>>
>> >>> type(1) == int
>> True
>>
>> implies:
>>
>> >>> def foo():
>> ... pass
>> ...
>> >>> type(foo)
>>
>> >>> type(foo
Mark Tarver wrote:
> How do you compare Python to Lisp? What specific advantages do you
> think that one has over the other?
>
> Note I'm not a Python person and I have no axes to grind here. This is
> just a question for my general education.
>
> Mark
>
I do not know much about Lisp. What I
Rob Thorpe wrote:
> Mathias Panzenboeck wrote:
>> Mark Tarver wrote:
>>> How do you compare Python to Lisp? What specific advantages do you
>>> think that one has over the other?
>>>
>>> Note I'm not a Python person and I have no axes to grind
Anthony Baxter wrote:
> On 12/13/06, Holger Joukl <[EMAIL PROTECTED]> wrote:
>> I did read this but didn't think it applied to my situation. I'm quite
>> sure that the refcount of the local variable is 1 before the local scope
>> is left.
>> So let me rephrase the question: Even if I can make sure
Bruno Desthuilliers wrote:
> Mathias Panzenboeck a écrit :
>> Rob Thorpe wrote:
>>
>>> Mathias Panzenboeck wrote:
>>>
>>>> Mark Tarver wrote:
>>>>
>>>>> How do you compare Python to Lisp? What specific advantages do you
&g
Neil Toronto wrote:
>
> 2) Is there any way to restrict Python modules from accessing files
> outside of a sandbox?
>
As far as I heard, there is no really working way. But maybe that has changed
in python 2.5? Or it
will in 3.0? I dunno.
--
http://mail.python.org/mailman/listinfo/python-list
A other great thing: With rpy you have R bindings for python.
So you have the power of R and the easy syntax and big standard lib of python!
:)
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh schrieb:
> Danny Colligan wrote:
>
>> Carsten mentioned that generators are more memory-efficient to use when
>> dealing with large numbers of objects. Is this the main advantage of
>> using generators? Also, in what other novel ways are generators used
>> that are clearly superior
Steve Howell schrieb:
> --- "[EMAIL PROTECTED]"
> <[EMAIL PROTECTED]> wrote:
>
>> Is there a resource somewhere on the net that can be
>> used to quickly
>> and effectively show Python's strengths to
>> non-Python programmers?
>> Small examples that will make them go "Wow, that
>> _is_ neat"?
>>
>
pythonDebug On
[/code]
But when i type "http://localhost/python/python.py"; it won't execute!
My browser just shows me the source code. :-(
Please, can anyone tell me what i have to do?
Thanks in advance!
~ Mathias
--
http://mail.python.org/mailman/listinfo/python-list
tmp ./a.out
4
32
Ok, thats fine. So why is python complaining? Or even more interesting, what
do I have to do to compile the code?
Mathias
--
http://mail.python.org/mailman/listinfo/python-list
Andrew MacIntyre wrote:
> Mathias Waack wrote:
>> After switching my development environment to 64 bit I've got a
>> problem with a python extension for a 32 bit application.
>
> {...}
>
>> Ok, thats fine. So why is python complaining? Or even more
>
from the
commandline with a parameter list containing options prefixed by '-'
or '--' signs. Thats not a major problem, but it prevents us from using th
optparse module. Is there a way to change to prefix, so one could use a '+'
(for instance) to mark command line optio
ork on a passed argument
> list. No need to alter sys.argv.
Sounds nice, I'll do so. Thanks!
Mathias
--
http://mail.python.org/mailman/listinfo/python-list
Hi.
I have a problem with weak refs and bound methods. The best explanation for the
problem is a short bit of code. I have the three classes Wrapper, Foo and Bar:
import weakref
class Wrapper(object):
def __init__(self,x):
self.x = weakref.ref(x)
def __call__(sel
When I change the class Wrapper to following, the class Foo works:
class Wrapper(object):
def __init__(self,x):
self.func_name = x.func_name
self.x = weakref.ref(x.im_self)
def __call__(self,*args,**kwargs):
x = self.x()
Marc 'BlackJack' Rintsch wrote:
> On Sun, 07 Oct 2007 16:51:33 +0200, Mathias Panzenboeck wrote:
>
>> import weakref
>>
>> class Wrapper(object):
>> def __init__(self,x):
>> self.x = weakref.ref(x)
>>
>> def
Marc 'BlackJack' Rintsch wrote:
> ``del b`` just deletes the name `b`. It does not delete the object.
> There's still the name `_` bound to it in the interactive interpreter.
> `_` stays bound to the last non-`None` result in the interpreter.
>
Actually I have the opposite problem. The referen
Alex Martelli wrote:
> Mathias Panzenboeck <[EMAIL PROTECTED]> wrote:
>
>> Marc 'BlackJack' Rintsch wrote:
>>> ``del b`` just deletes the name `b`. It does not delete the object.
>>> There's still the name `_` bound to it in the interactive int
Bruno Desthuilliers wrote:
> Mathias Panzenboeck a écrit :
>
> About the lost weakref problem: in Python, methods are just tiny
> wrappers around the object, class and function created at lookup time
> (yes, on *each* lookup) (and WWAI, they are by the function object
> itself
Hello,
take a look here [1]. I think its a got place to start.
br
Mathias
[1] http://sebsauvage.net/python/gui/#import
2007/11/29, whatazor <[EMAIL PROTECTED]>:
>
> Hi all,
> I migrate some code from tkinter to wxpython. I need the equivalent
> Tkinter method Tkinter.Tk.a
Which OS Windows or Linux?
br
Mathias
2007/12/3, Navid Parvini <[EMAIL PROTECTED]>:
>
> Dear All,
>
> Would you please help me to find a way to get the list of all processes id
> on the machine along with their parent processes.
>
) (Debian 4.0.2-10)] on linux2
Everything out of the box from Debian unstable. Anybody with any idea about
this?
Mathias
--
http://mail.python.org/mailman/listinfo/python-list
r.setdefault('B',0) + 1
And this works with lists/arrays as well. When there's no list yet
setdefault will create an empty list and append the first value.
Otherwise it will just append.
Greetings from Vienna,
mathias
--
http://mail.python.org/mailman/listinfo/python-list
g box or so).
I've looked for some help into the mailing list history and found
nothing useful (until now).
Do someone has any suggestion?
Mathias
--
http://mail.python.org/mailman/listinfo/python-list
nd
server is simple done by exchanging json strings (its ajax based of course,
but this stuff works silently in the background). On the server side there
are many python toolkits, I prefer cherrypy, others are django and web.py.
Hope this helps you.
Mathias
--
http://mail.python.org/mailman/listinfo/python-list
yLongObject.
Has anyone already done something like that? Is there some trick to
work around that issue, or is it simply not possible to inherit from
PyLongObject?
Thank you,
Mathias
--
https://mail.python.org/mailman/listinfo/python-list
68 matches
Mail list logo