Hi,
I have a strange error. When I try import idlelib.PyShell from Python3.3 it
fails
with
Python 3.3.2+ (3.3:68ff68f9a0d5+, Jun 30 2013, 12:59:15)
[GCC 4.7.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import idlelib.PyShell
Traceback (most recent call
On Sun, 30 Jun 2013 13:20:24 +0200, Peter Otten wrote:
Thanks a lot!
Helmut.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I have coded a simple algorithm to solve a Sudoku (probably not the first one).
Unfortunately, it takes 13 seconds for a difficult problem which is more than
75 times slower
than the same algorithm coded in C++.
Is this to be expected or could I have made my Python version faster ***
without
On Fri, 05 Jul 2013 10:38:35 +0100, Fábio Santos wrote:
> [Skipping to bottleneck]
>
>> def find_good_cell() :
>
> In this function you are accessing global variables a lot of times. Since
> accessing globals takes much more time than accessing locals, I advise you
> to assign them to local name
On Fri, 05 Jul 2013 11:13:33 +0100, Oscar Benjamin wrote:
> My one comment is that you're not really making the most out of numpy
> arrays. Numpy's ndarrays are efficient when each line of Python code
> is triggering a large number of numerical computations performed over
> the array. Because of t
On Fri, 05 Jul 2013 14:41:23 +0100, Oscar Benjamin wrote:
> On 5 July 2013 11:53, Helmut Jarausch wrote:
>> I even tried to use dictionaries instead of Numpy arrays. This version is a
>> bit
>> slower then the lists of lists version (7.2 seconds instead of 6 second) but
&g
On Fri, 05 Jul 2013 12:02:21 +, Steven D'Aprano wrote:
> On Fri, 05 Jul 2013 10:53:35 +, Helmut Jarausch wrote:
>
>> Since I don't do any numerical stuff with the arrays, Numpy doesn't seem
>> to be a good choice. I think this is an argument to add real
On Fri, 05 Jul 2013 13:44:57 +0100, Fábio Santos wrote:
May I suggest you avoid range and use enumerate(the_array) instead? It
might be faster.
How does this work?
Given
Grid= [[0 for j in range(9)] for i in range(9)]
for (r,c,val) in (Grid) :
Helmut
--
http://mail.python.org/mailman/lis
On Fri, 05 Jul 2013 15:45:25 +0100, Oscar Benjamin wrote:
> Presumably then you're now down to the innermost loop as a bottle-neck:
>
> Possibilities= 0
> for d in range(1,10) :
> if Row_Digits[r,d] or Col_Digits[c,d] or Sqr_Digits[Sq_No,d] :
> continue
> Possibilitie
On Fri, 05 Jul 2013 16:18:41 +0100, Fábio Santos wrote:
> On 5 Jul 2013 15:59, "Helmut Jarausch" wrote:
>>
>> On Fri, 05 Jul 2013 13:44:57 +0100, Fábio Santos wrote:
>> May I suggest you avoid range and use enumerate(the_array) instead? It
>> migh
On Fri, 05 Jul 2013 16:38:43 +0100, Oscar Benjamin wrote:
> On 5 July 2013 16:17, Helmut Jarausch wrote:
>>
>> I've tried the following version
>>
>> def find_good_cell() :
>> Best= None
>> minPoss= 10
>> for r,c in Grid :
>> i
On Fri, 05 Jul 2013 16:50:41 +, Steven D'Aprano wrote:
> On Fri, 05 Jul 2013 16:07:03 +, Helmut Jarausch wrote:
>
>> The solution above take 0.79 seconds (mean of 100 calls) while the
>> following version take 1.05 seconds (mean of 100 calls):
>
> 1) How ar
On Fri, 05 Jul 2013 17:25:54 +0100, MRAB wrote:
> For comparison, here's my solution:
Your solution is very fast, indeed.
It takes 0.04 seconds (mean of 1000 runs) restoring "grid"
in between.
But that's a different algorithm which is IMHO more difficult to understand.
Many thanks,
Helmut
>
>
On Sat, 06 Jul 2013 03:05:30 +, Steven D'Aprano wrote:
> That doesn't explain how you time it, only that you have a loop executing
> 100 times. Are you using time.time, or time.clock? (I trust you're not
> measuring times by hand with a stop watch.)
>
> I expect you're probably doing someth
ator" for Python.
Should I try to contact him personally?
Many thanks for a hint,
Helmut Jarausch
RWTH Aachen University
Germany
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 07 Aug 2012 13:15:29 +0200, Peter Otten wrote:
> I don't think that will help. From PEP 408:
>
> """
> As part of the same announcement, Guido explicitly accepted Matthew
> Barnett's 'regex' module [4] as a provisional addition to the standard
> library for Python 3.3 (using the 'regex' n
Hi,
for tracing purposes I have added some print outs like
print('+++ before calling foo',file=sys.stderr)
x=foo(..)
print('--- after calling foo',
and within 'foo'
print('>>> entering foo ...',file=sys.stderr)
Now, when executing this, I always get
+++ before calling foo
--- after calling f
On Mon, 13 Aug 2012 15:43:31 +, Grant Edwards wrote:
> On 2012-08-13, Helmut Jarausch wrote:
>> Hi,
>>
>> for tracing purposes I have added some print outs like
>>
>> print('+++ before calling foo',file=sys.stderr)
>> x=foo(..)
>> print(
Hi,
I'm sorry to ask such a FAQ but still I couldn't find an answer - neither in
the docs nor the web.
What's wrong with the following script?
Many thanks for a hint,
Helmut.
#!/usr/bin/python3
#_*_ coding: latin1 _*_
import smtplib
from email.message import Message
import datetime
msg= Mess
On Wed, 15 Aug 2012 14:48:40 +0200, Christian Heimes wrote:
> Am 15.08.2012 14:16, schrieb Helmut Jarausch:
>> Hi,
>>
>> I'm sorry to ask such a FAQ but still I couldn't find an answer -
>> neither in the docs nor the web.
>>
>> What's wro
Hi,
in response to a bug report I got the follow helpful comments from R. David
Murray.
Many thanks to him. (Unfortunately, I don't know his email, so I can write him
directly)
To generate an email (with non-ascii letters)
R. David Murray wrote:
>>> But even better, so will this:
>>> m = Mes
On Thu, 23 Aug 2012 12:36:01 +0100, MRAB wrote:
> From what I've tried, it looks like the date can't be a string:
>
> >>> m['Date'] = datetime.datetime.utcnow()
> >>> m['Date']
> 'Thu, 23 Aug 2012 11:33:20 -'
Many thanks - it's even easier!
Waiting for Python 3.3 to become standard!
Helm
Hi,
I'd like to give the user the ability to enter code which may only rebind
a given set of names but not all ones.
This does NOT work
A=1
B=2
Code=compile('A=7','','exec')
exec(Code,{'A':0})
print("I've got A={}".format(A)) # prints 1
How can 'filter' the gobal namespace such that modifying 'A
On Tue, 30 Oct 2012 08:33:38 -0400, Dave Angel wrote:
> On 10/30/2012 08:00 AM, Helmut Jarausch wrote:
>> Hi,
>>
>> I'd like to give the user the ability to enter code which may only rebind
>> a given set of names but not all ones.
>> This does NOT w
Hi,
probably I'm missing something.
Using str(Arg) works just fine if Arg is a list.
But
str([],encoding='latin-1')
gives the error
TypeError: coercing to str: need bytes, bytearray or buffer-like object,
list found
If this isn't a bug how can I use str(Arg,encoding='latin-1')
On Fri, 09 Nov 2012 10:37:11 +0100, Stefan Behnel wrote:
> Helmut Jarausch, 09.11.2012 10:18:
>> probably I'm missing something.
>>
>> Using str(Arg) works just fine if Arg is a list.
>> But
>> str([],encoding='latin-1')
>>
>&g
On Fri, 09 Nov 2012 23:22:04 +1100, Chris Angelico wrote:
> On Fri, Nov 9, 2012 at 10:08 PM, Helmut Jarausch
> wrote:
>> For me it's not funny, at all.
>
> His description "funny" was in reference to the fact that you
> described this as a bug. This is a hea
Hi,
AFAIK, this should work:
import tkinter as Tk
root= Tk.Tk()
root.tk_setPalette(background = 'AntiqueWhite1', foreground = 'blue')
but python-3.3:0e4574595674+ gives
Traceback (most recent call last):
File "Matr_Select.py", line 174, in
root.tk_setPalette(background = 'AntiqueWhite1',
Hi,
I'm trying to filter an mbox file by removing some messages.
For that I use
Parser= FeedParser(policy=policy.SMTP)
and 'feed' any lines to it.
If the mbox file contains a white line followed by '^From ',
I do
Msg= Parser.close()
(lateron I delete the Parser and create a new one by
Parser= F
On Fri, 28 Dec 2012 20:57:46 -0500, Terry Reedy wrote:
> On 12/28/2012 7:22 AM, Helmut Jarausch wrote:
>> Hi,
>>
>> I'm trying to filter an mbox file by removing some messages.
>> For that I use Parser= FeedParser(policy=policy.SMTP)
>> and 'feed'
Hi,
is there a means to specify that 'ignore-case' should only apply to a part
of a regex?
E.g.
the regex should match Msg-id:, Msg-Id, ... but not msg-id: and so on.
I've tried the pattern
r'^Msg-(?:(?i)id):'
but (?i) makes the whole pattern ignoring case.
In my simple case I could say
r'M
Hi
I have a machine with a non-UTF8 local.
I can't figure out how to make numpy.genfromtxt work
I pipe some ascii data into the following script but get this
bytes to str hell.
Many thanks for a hint,
Helmut.
#!/usr/bin/python3
import numpy as np
import io
import sys
inpstream = io.open(sys.s
Yes, "dBase Python" yields only some code for reading dBase ... and lots of
enquires about such a thing...
I've been using
http://www.fiby.at/dbfpy/
without any problems including writing/modifying dbf files.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen Universi
?:\s+(\d))*' + '$'
> match = re.match(regex, line)
> print "lastindex is: ",match.lastindex
> print "matches: ",match.group(1)
>
>
> Obviously I do not understand how (?:\s+(\d))* works in conjunction with
> ^ and $.
>
I am sure
Hi,
to use a port below 1000 on a Unix system one needs root priviledges.
But it's dangerous to execute all of a script under those priviledges.
Therefore I'd like to drop the root priviledges as soon as possible.
(How) is this possible?
Many thanks for a hint,
Helmut Jarausch
Lehr
Hi,
I'd like to extracted elements from a heapq in a for loop.
I feel my solution below is much too complicated.
How to do it more elegantly?
I know I could use a while loop but I don't like it.
Many thanks for some lessons in Python.
Here is my clumsy solution
from heapq import heappush, heap
On Tue, 03 Dec 2013 04:40:26 -0800, rusi wrote:
> On Tuesday, December 3, 2013 5:48:59 PM UTC+5:30, Helmut Jarausch wrote:
>> Hi,
>>
>> I'd like to extracted elements from a heapq in a for loop.
>> I feel my solution below is much too complicated.
>> How
On Tue, 03 Dec 2013 13:38:58 +0100, Peter Otten wrote:
> Helmut Jarausch wrote:
>
>> Hi,
>>
>> I'd like to extracted elements from a heapq in a for loop.
>> I feel my solution below is much too complicated.
>> How to do it more elegantly?
>> I kn
On Tue, 03 Dec 2013 13:06:05 +, Duncan Booth wrote:
> Helmut Jarausch wrote:
>
>> Hi,
>>
>> I'd like to extracted elements from a heapq in a for loop.
>> I feel my solution below is much too complicated.
>> How to do it more elegantly?
>> I
On Tue, 03 Dec 2013 15:56:11 +0200, Jussi Piitulainen wrote:
> Helmut Jarausch writes:
> ...
>> I know I could use a while loop but I don't like it.
> ...
>> from heapq import heappush, heappop
>> # heappop raises IndexError if heap is empty
> ...
>>
On Wed, 04 Dec 2013 08:13:03 +1100, Cameron Simpson wrote:
> On 03Dec2013 12:18, Helmut Jarausch wrote:
>> I'd like to extracted elements from a heapq in a for loop.
>> I feel my solution below is much too complicated.
>> How to do it more elegantly?
>
> I ca
Hi,
I'd like to read several strings by using 'input'.
These strings are separated by white space but I'd like to allow for
some quoting, e.g.
"Guido van" Rossum
should be split into 2 strings only
Now, a simple split doesn't work since it splits the quoted text as well.
Is there a simple way
On Fri, 13 Dec 2013 11:39:57 +, Chris Angelico and Robert Kern wrote:
> On 2013-12-13 11:28, Helmut Jarausch wrote:
>> Hi,
>>
>> I'd like to read several strings by using 'input'.
>> These strings are separated by white space but I'd like to a
Hi,
my locale is en_US.iso88591
But now I'd like to process a restructuredtext file which is encoded in utf-8.
rst2html has
#!/usr/bin/python3.3
# $Id: rst2html.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: David Goodger
# Copyright: This module has been placed in the public domain.
"""
A
Hi,
I'd like to subclass array.array and implement operators like __iadd__
How can this be accomplished.
I'tried
from array import array
class Vec(array) :
def __new__(cls,Vinit) :
return array.__new__(cls,'d',Vinit)
def __init__(self,*args) :
self.N = len(self)
def __str__(self
Hi,
I've tried but didn't find an answer on the net.
The exec function in Python modifies a copy of locals() only.
How can I transfer changes in that local copy to the locals of my function
** without ** knowing the names of these variables.
E.g. I have a lot of local names.
Doing
_locals= l
On Tue, 12 Feb 2013 08:27:41 -0500, Dave Angel wrote:
> On 02/12/2013 06:46 AM, Helmut Jarausch wrote:
>> Hi,
>>
>> I've tried but didn't find an answer on the net.
>>
>> The exec function in Python modifies a copy of locals() only.
>> How can I
Hi,
I'd like to print a string with the string format method which uses
{0}, ...
Unfortunately, the string contains TeX commands which use lots of
braces. Therefore I would have to double all these braces just for the
format method which makes the string hardly readable.
Is there anything like a
On Fri, 01 Mar 2013 01:22:48 +1100, Chris Angelico wrote:
> On Fri, Mar 1, 2013 at 1:11 AM, Helmut Jarausch
> wrote:
>> Hi,
>>
>> I'd like to print a string with the string format method which uses
>> {0}, ...
>>
>> Unfortunately, the string co
Hi,
I'm trying to port a class to Python3.3 which contains
class Foo :
def to_binary(self, *varargs, **keys):
self.to_binary = new.instancemethod(to_binary, self, self.__class__)
# Finally call it manually
return apply(self.to_binary, varargs, key
On Sun, 07 Apr 2013 11:41:46 +0100, Arnaud Delobelle wrote:
> On 7 April 2013 10:50, Helmut Jarausch wrote:
>> Hi,
>>
>> I'm trying to port a class to Python3.3 which contains
>>
>> class Foo :
>>
On Sun, 07 Apr 2013 11:07:07 +, Steven D'Aprano wrote:
> On Sun, 07 Apr 2013 10:54:46 +, Helmut Jarausch wrote:
>
>> class Foo :
>>
>> def to_binary(self, *varargs, **keys):
>>
>>code= ...
>>
On Sun, 07 Apr 2013 10:52:11 +, Steven D'Aprano wrote:
> On Sun, 07 Apr 2013 09:50:35 +, Helmut Jarausch wrote:
>
>> Hi,
>>
>> I'm trying to port a class to Python3.3 which contains
>>
>> class Foo :
>>
t;/usr/local/lib/python2.4/nntplib.py", line 219, in getresp
raise NNTPTemporaryError(resp)
NNTPTemporaryError: 420 No such article
I would have expected to get an empty 'Response' or the value None
for 'Articles'.
What am I missing?
(This is Python 2.4.3)
Many thanks for
se no articles are present.
Thanks,
though the name of the exception 'nntplib.NNTPTemporaryError'
sound 'temporary'
Helmut.
> Op 7-aug-2006, om 12:50 heeft Helmut Jarausch het volgende geschreven:
>
>> Hi
>>
>> I try to regularly extract recent
John Machin wrote:
> Bayazee wrote:
>> hi
>> can we hide a python code ?
>> if i want to write a commercial software can i hide my source code from
> [1]
>> users access ?
>> we can conver it to pyc but this file can decompiled ... so ...!!
>> do
Hi,
is there a new edition of "Python in a Nutshell"
covering Python 2.5 coming soon?
Many thanks,
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
same is true for an exception.
And setting a 'flag' and testing
at several place for 'fall through'
is ugly and error-prone.
So what is a good choice?
Many thanks for a hint,
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
Fredrik Lundh wrote:
> Helmut Jarausch wrote:
>
>> Using sys.exit(0) produces an error
>> message which looks dangerous to an
>> uninitiated user.
>
> sys.exit(0) doesn't print anything at all.
Yes, sorry, I was trying in in 'idle'
There you g
hint,
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
Sibylle Koczian wrote:
> Helmut Jarausch schrieb:
>> Hi,
>>
>> what has to be done for upgrading from Python 2.4 to 2.5?
>>
>> - How can I find out which packages (in addition to the core packages)
>> have been
>> installed up to now
>> - Can I
x27;)
> ... try:
> ... x=int(x)
> ... print x, "is a number between 1 & 20 "
> ... except:
> ... print x, "is not a number"
> ...
>>>> numtest() # enter 1
> 1 is a number between 1 & 20
>>>> numtes
[EMAIL PROTECTED] wrote:
> Way to go.
> Try doing this.
> x = MutableNumeric(42)
^^
where is this defined?
> y = x
> x += 42
> print y
>
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
h
Hi,
I'd like to install a package ('rekall') which uses
frame->f_nlocals
which is no longer contained in frameobject.h
What's the recommended way to upgrade such an application?
Many thanks for a hint,
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aa
> I suspect PySequence_Length(frame->f_locals) will do the trick.
Yes, thanks, that fixed it,
Happy New Year to you.
A personal question: Have you converted from Perl to Python, as well?
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germa
's one of the great strength of Python.
Just some pointers
http://gnosis.cx/TPiP/
http://www.egenix.com/products/python/mxBase/mxTextTools/
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I did try to find something on the net but I couldn't find anything useful.
Is there a way to write documents with the reST tools using the Latin1
encoding?
Many thanks for a hint,
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Ge
Marc 'BlackJack' Rintsch wrote:
> On Tue, 03 Jul 2007 12:12:04 +0200, Helmut Jarausch wrote:
>
>> Is there a way to write documents with the reST tools using the Latin1
>> encoding?
>
> Yes of course there is. Just write the documents in Latin-1 encoding.
&g
How can I find out where this did come from. Running it under pdb
isn't helpful either.
Many thanks for a hint,
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
does anybody know if ReSTedit (originally for Mac OS X) has been ported to
Linux?
Many thanks for a hint,
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
nd of structure can we use in python? in web?
>
What about using a simple dictionary in Python. You can use the module
pickle (or cpickle) to dump it to disk and load it next time.
Furthermore you can easily write the whole web server in Python,
e.g. I like http://karrigell.sourceforge.net/
P=re.compile(r'(\w+(?:[-.]\d+)+)-RHEL3-Linux\.RPM')
S="hpsmh-1.1.1.2-0-RHEL3-Linux.RPM"
PO= P.match(S)
if PO :
print PO.group(1)
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
ion - perhaps without using a lexer
and something else. With regular expressions alone it seems
clumsy.
Many thanks for a hint,
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
Many thanks to all of you!
It's amazing how many elegant solutions there are in Python.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
are decorators more than just syntactic sugar in python 2.x and what
about python 3k ?
How can I find out the predefined decorators?
Many thanks for your help,
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org
IL?
>
What about Gnuplot.py
http://gnuplot-py.sourceforge.net/
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
this.
Is there an alternative solution, e.g. where
smtplib.SMTP.sendmail calls a generator.
Many thanks for a hint,
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
Laszlo Nagy wrote:
> Helmut Jarausch wrote:
>> Hi,
>>
>> to send a possibly long email I have seen a solution
>> which does os.popen to an external sendmail program and
>> then writes the message into that pipe.
>>
>> I wonder if it possible to u
red. While this function is running I need access to
the variables of the server.
Can this be done in a simple way?
Many thanks for a hint,
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> Helmut Jarausch wrote:
>
>> I'm using a web server (Karrigell) which is based on the asyncore module.
>> I'd like to be able to checkpoint some data (e.g. pickled
>> dictionaries) to disk
>> from time to time.
>> For that I wo
thanks for a hint,
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
Most probably there are much more elegant solutions.
Unfortunately, the index-list-method doesn't take an
additional function argument for the comparisons.
Many thanks for your hints,
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
Thanks to you all for your help.
The solution to regenerate the list skipping
the one to be deleted is fine for me since my
lists are of moderate size and the operation
is infrequent.
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen
Neil Cerutti wrote:
> On Jan 15, 2008 5:33 AM, Helmut Jarausch <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I'm looking for an elegant solution of the following tiny but common problem.
>>
>> I have a list of tuples (Unique_ID,Date) both of which are str
Again, many thanks to all who provide their solution.
I have timed these (though on my old P3(0.9GHz)) - see below
Helmut.
Helmut Jarausch wrote:
> Hi,
>
> I'm looking for an elegant solution of the following tiny but common
> problem.
>
> I have a list of tuples (
Paul Rubin wrote:
> Helmut Jarausch <[EMAIL PROTECTED]> writes:
>> def del_by_key(L,key) :
>>for pos, (k,d) in enumerate(L):
>> if k == key :
>>del L[pos]
>>break
>
> This looks very dangerous, mutating L while iterating ove
Michele Simionato wrote:
> I really need to publish this one day or another, since these
> questions
> about super keeps coming out:
>
> http://www.phyast.pitt.edu/~micheles/python/super.html
Unfortunately the links [2], [3] and [4] are not given,
Helmut.
--
Helmut Jarausch
Hi,
how can I specify the paths to be searched for a dynamic library
to be loaded by ctypes' CDLL class on a Linux system.
Do I have to set os.environment['LD_LIBRARY_PATH'] ?
Many thanks for a hint,
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aach
Thomas Heller wrote:
> Helmut Jarausch schrieb:
>> Hi,
>>
>> how can I specify the paths to be searched for a dynamic library
>> to be loaded by ctypes' CDLL class on a Linux system.
>>
>> Do I have to set os.environment['LD_LIBRARY_PATH'] ?
;,N.key,"->"
N= N.NNd
if N != None:
print "next: ",N.key,"->"
else:
print "no next:"
for N in MyQ:
print "loop->",N
print N.key,N.data
MyQ.dequeue(MyQ.Tail)
print "--- after dequeue"
print "Head: &
as they fulfill a unique function. Also, I think it's
> more convenient, and I am, after all, my own employer when it comes to
> programming.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
her words I need to know at which character position the last
character was entered.
Currently I can only see the brute force method: keeping track of
all cursor positioning means like , , the '<-' and '->' keys
and mouse clicks.
Is there an easier method?
Many thank
ted directory are different, especial for user 'root'.
Check if can execute some executable in that NFS path.
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
(C'*C) * D= C'*Y
where S'*C is the scalar product of the vectors S and C and similarly.
Now, for Python, to handle vectors and scalar products efficiently, have a look
at numpy.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
Mikael Olofsson wrote:
> Helmut Jarausch wrote:
>> Your model is A*sin(omega*t+alpha) where A and alpha are sought.
>> Let T=(t_1,...,t_N)' and Y=(y_1,..,y_N)' your measurements (t_i,y_i)
>> ( ' denotes transposition )
>>
>> First, A*sin(omega*t
ss
without (the overhead of) passing a 'self' or a 'cls' parameter?
Probably I'm hurt by my C++ history.
Many thanks for your help,
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
ter_list)
if ll > 0 :
outer_list= outer_list[:ll-1]
mylist=[1,2,3]
MyClass2().shorten_list(mylist)
print mylist
# this prints [1, 2, 3]
The shortened list outer_list[:ll-1] has been assigned (bound in Python terms)
to the LOCAL reference (to a list) 'outer_li
hole application (root window and its
children)
Many thanks for a hint,
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
", line 6, in Proc_Enter
Event.widget.tk_focusNext()
File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 479, in tk_focusNext
return self._nametowidget(name)
File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 1064, in nametowidget
if name[0] == '.'
zaley wrote:
> In my C++ program ,python is embeded . I import One module(py file)
> and execute some functions .Then I modify py files in order to modify
> func parameters when process is still running .I import the module and
> execute functions again.But I find the result is same as before
'im
1 - 100 of 166 matches
Mail list logo