e.g. EQ_OUT
so that I can loop over the lines of it like
for line in EQ_OUT :
...
I could use StringIO.StringIO applied to EQ_output
but this reads all of the command's output into a big
string first.
On Unix/Linux a pipe is a file-like object after all,
so how to get hold of it.
Ma
Chris Rebert wrote:
On Wed, Feb 4, 2009 at 1:22 AM, Helmut Jarausch wrote:
Hi,
using e.g.
import subprocess
Package='app-arch/lzma-utils'
EQ=subprocess.Popen(['/usr/bin/equery','depends',Package],stdout=subprocess.PIPE)
EQ_output= EQ.communicate()[0]
EQ_output i
Clovis Fabricio wrote:
2009/2/4 Helmut Jarausch :
using e.g.
import subprocess
Package='app-arch/lzma-utils'
EQ=subprocess.Popen(['/usr/bin/equery','depends',Package],stdout=subprocess.PIPE)
EQ_output= EQ.communicate()[0]
EQ_output is a string containing multiple
Clovis Fabricio wrote:
2009/2/4 Helmut Jarausch :
EQ.stdout is the filelike object you're looking for.
communicate() grabs entire output at once so don't use it.
Thanks a lot, I haven't found that in the official documentation.
Helmut.
That would be a documentation bug.
Fortun
st be executed only once, initializes
another OS-thread (java in my case))
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
Peter Otten wrote:
Helmut Jarausch wrote:
I have a module which gets imported at several different places
not all of which are under my control.
How can I achieve that all/some statements within that module
get executed only at the very first import?
What you describe is Python's de
Peter Otten wrote:
Helmut Jarausch wrote:
Peter Otten wrote:
Helmut Jarausch wrote:
Then it's a problem with a problem with a webserver written in Python
(Karrigell-3.0) and probably related to multi-threading (the statements in
my module get definitely executed more than once).
parms) :
for N in VList :
if N in parms :
vars()[N]= parms[N]
else :
vars()[N]= None
Does this work, is it typical Python?
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
Chris Rebert wrote:
On Mon, Dec 1, 2008 at 1:01 PM, Helmut Jarausch <[EMAIL PROTECTED]> wrote:
Hi,
I am looking for an elegant way to solve the following problem:
Within a function
def Foo(**parms)
I have a list of names, say VList=['A','B','C1']
an
Duncan Booth wrote:
Helmut Jarausch <[EMAIL PROTECTED]> wrote:
Chris Rebert wrote:
On Mon, Dec 1, 2008 at 1:01 PM, Helmut Jarausch <[EMAIL PROTECTED]>
wrote:
Hi,
I am looking for an elegant way to solve the following problem:
Within a function
def Foo(**parms)
I have a l
ame war!
I know computers get faster, we human beings don't (me, at least)
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
ython")
Thanks for any enlightening on that subject,
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
Ben Finney wrote:
Helmut Jarausch <[EMAIL PROTECTED]> writes:
I have to set an internal property (with leading underscore)
for each output file I'm using - right?
If you're referring to the source encoding declaration: No,
underscores have no effect. The specific
Paul Boddie wrote:
On 15 Okt, 12:08, Helmut Jarausch <[EMAIL PROTECTED]>
wrote:
What defines me as latin1-user?
What does sys.stdout.encoding say? In Python 2.x, at least, that
It says ansi_x3.4-1968
Where can I change this?
attribute should reflect the capabilities of your envir
odecs.ascii_encode(input, self.errors)[0]
UnicodeEncodeError: 'ascii' codec can't encode characters in position 1-2:
ordinal not in range(128)
So my system seems to be an ASCII system?
Thanks,
Helmut
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D
Brian Quinlan wrote:
Hey Helmut,
Did you try just:
print("Hallo, Süßes Python")
Yes, but that doesn't work here.
Please see my reply to Martin's reply.
Thanks,
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aac
very beginning of a script.
Why isn't that possible?
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
ither
the 'locale' or to switch settings for each output file (by settting
the _encoding property.
I wished I could override the locale settings within a Python script.
Thanks,
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen,
Paul Boddie wrote:
On 16 Okt, 11:28, Helmut Jarausch <[EMAIL PROTECTED]>
wrote:
I meant setting the default encoding which is used by print (e.g.) when
outputting the internal unicode string to a file.
As far as I understood, currently I am fixed to setting either
the 'locale
Ross Ridge wrote:
Helmut Jarausch <[EMAIL PROTECTED]> wrote:
# but this ugly one (to be done for each output file)
sys.stdout._encoding='latin1'
Is this writable "_encoding" attribute, with a leading underscore (_),
documented anywhere? Does it actually wo
s there some shorthand for this?
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
ES.new(PWD, AES.MODE_ECB)
txt = 'ea523a664dabaa4476d31226a1e3bab0'
c = crypt.encrypt(txt)
txt_plain=crypt.decrypt(c)
print txt_plain
Unfortunately, txt_plain differs from txt - why?
(Using MODE_ECB does work however)
What am I missing?
Many thanks for a hint,
Helmut Jarausch
Lehrstuhl fuer Numerisc
Helmut Jarausch wrote:
Hi,
I've just tried to write a simple example using PyCrypto's
AES (CBC mode)
#!/usr/bin/python
from Crypto.Cipher import AES
PWD='abcdefghijklmnop'
Initial16bytes='0123456789ABCDEF'
crypt = AES.new(PWD, AES.MODE_CBC,Initial16bytes)
# cry
Peter Otten wrote:
Helmut Jarausch wrote:
my emails received from our mailing system contain a field like
X-Spam-Score: -2.2
Given the full email message in 'msg'
I've tried
mailmsg = email.message_from_string(msg)
SPAM_CORE = mailmsg['X-Spam-Score']
but it do
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
urns None.
So I have replaced this by
tar_inp.close()
tar_exit_code= TAR.wait()
if tar_exit_code != 0 :
print "some error messages"
Perhaps a few lines telling about this would be helpful.
Thanks,
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
DMM code around but am not sure where to look.
I'd ask in comp.compression where the specialists are listening and who are
very helpful.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
Jason R. Coombs wrote:
I'm pleased to announce svg-chart 1.1, the first public release of a
library for generating Scalable Vector Graphic (SVG) charts.
http://sourceforge.net/projects/py-svg
This repository seems to be still empty?
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numer
Hi,
just to let you know ...
Today I've got an email from Amazon recommending me
Harry Potter and the Deathly Hallows
and they told me why they recommended this book,
because I've bought
Core PYTHON Programming
Didn't know, Harry Potter is a Python fan.
--
Helmut Jarausch
downloading the source doesn't work.
Under requirements (to compile the source) there is
mxbase version >= 3.0.1 which I couldn't find on your
web server.
Many thanks,
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.pytho
import Plotting2 #The name of my file...
Plotting2.plot( [(2,3), (3,4)], [(4,5), (5,6)], [(1,3), (4,8)] )
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
trying to build Python-3.0b1 on my Gentoo Linux box fails with
Failed to find the necessary bits to build these modules:
_gestalt
Looking at setup.py it seems that module '_gestalt'
is only needed on Darwin but my build on Linux fails
nevertheless.
Thanks for any hints,
Helmu
/bin/python -O
Is this a bug or a feature?
Thanks for hint,
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
ValueError: Attempted relative import in non-package
thanks for looking into it,
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
is any Python guru that can help I would be most interested in
your thoughts.
Please have a look at
http://effbot.org/zone/call-by-object.htm
and
http://rg03.wordpress.com/2007/04/21/semantics-of-python-variable-names-from-a-c-perspective/
--
Helmut Jarausch
Lehrstuhl fuer Numerische Ma
Hi,
I must be blind but I don't see what's going wrong
with
G=[[]]*2
G[0].append('A')
G[1].append('B')
print G[0]
gives
['A', 'B']
as well as
print G[1]
I was expecting
['A']
and
['B']
respectively.
Many thanks for en
n.activestate.com/ASPN/Cookbook/Python/Recipe/414771
http://mail.python.org/pipermail/python-list/2002-August/157510.html
http://pyinotify.sourceforge.net/
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
r > math operations
I asked a similar question some time ago. The summary was - don't do it!
Instead, a Tcl interpreter could be loaded and given the job to do.
I think that's similar to what Tkinter does.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D
in, and scan for more genes. This would
hypothetically yield different genes, since the frame would be
shifted.
As an alternative - if you do need speed - have a look at
http://www.egenix.com/products/python/mxBase/mxTextTools/
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
know such a thing?
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
,_sre.SRE_Pattern)
and
if isinstance(RX,re._sre.SRE_Pattern)
both fail.
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
n Python 3.2a0)
since hashlib.md5(key).digest() returns a byte string
which has no .encode method.
Just my 5 cents,
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
group(*choices) + '?'
with: TypeError: group() argument after ** must be a mapping, not tuple
I'm afraid I don't understand this error message.
BTW I'm using python-2.6.3 on the machine where I try to install
3.2a
Many thanks for a hint,
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer
Benjamin Peterson wrote:
Helmut Jarausch skynet.be> writes:
Hi,
I'm trying to build the recent Python-3.2a (SVN).
It fails in
Lib/tokenize.py (line 87)
How are you invoking it?
As I said, it's 'make' in Python's source directory
(SVN revision 75309 Last Chan
Benjamin Peterson wrote:
Helmut Jarausch skynet.be> writes:
As I said, it's 'make' in Python's source directory
(SVN revision 75309 Last Changed Date: 2009-10-10)
I can't reproduce your failure. What are the exact commands you are using?
CFLAGS='-O3 -mt
group(*choices) + '?'
with: TypeError: group() argument after ** must be a mapping, not tuple
Meanwhile I could narrow this down to the --with-tsc configure option.
Without it, it builds just fine.
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D
perhaps you need to install it.
You can get a copy from:
http://icon-theme.freedesktop.org/releases
On my Gentoo system lots of packages have placed icons under
/usr/share/icons/hicolor
So, what am I missing.
Many thanks for a hint,
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerisch
tive lookahead and
warning is in the string.
'.*' eats all of line. Now, when at end of line, there is no 'warning' anymore,
so it matches.
What are you trying to achieve?
If you just want to single out lines with 'ok' or warning in it, why not just
if re.search(&
On 11/22/09 16:05, Helmut Jarausch wrote:
On 11/22/09 14:58, Jelle Smet wrote:
Hi List,
I'm trying to match lines in python using the re module.
The end goal is to have a regex which enables me to skip lines which
have ok and warning in it.
But for some reason I can't get negative
gt;> p1=Popen(['/usr/sunvts/bin/64/vtsk','-d'],stdout=PIPE)
>>>> while 1:
> ... a=p1.stdout.readline()
> ... print a
> ...
I've tried
#!/usr/bin/python
import subprocess
p1= subprocess.Popen(['/bin/ls','/LOCAL/'],stdout=subprocess.PIPE)
for line in p1.stdout :
print ">>>",line
which works just fine.
Are you sure, your /usr/sunvts/bin/64/vtsk writes a newline character (readline
is waiting for that)?
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
2d contact forces in a rigid body
> simulation.
Sorry, I can't help you except pointing you to
the Complementarity Problem Net
http://www.cs.wisc.edu/cpnet/
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
Hi, I'm completely puzzled and I hope someone
can shed some light on it.
After cloning a running system, booting the new machine from a rescue CD,
chroot to the new root partition, I get the following strange error
from python upon startup
python -v
> import site failed
st= os.stat(path)
sta
Hi,
I've searched the net but didn't find the information I need.
Using Python-2.7.1, I know, I can't modify defaultencoding at run time.
Python even ignores
export PYTHONIOENCODING=ISO8859-1
locale.getdefaultlocale()[1]
returns
'ISO8859-1'
still sys.stdout is using the ascii codec.
How can I r
On Thu, 20 Jan 2011 14:31:09 +, Helmut Jarausch wrote:
> Hi,
> I've searched the net but didn't find the information I need. Using
> Python-2.7.1, I know, I can't modify defaultencoding at run time. Python
> even ignores
> export PYTHONIOENCODING=ISO8859-1
&g
Hi,
I don't understand Python's behaviour when printing a list.
The following example uses 2 German non-ascii characters.
#!/usr/bin/python
# _*_ coding: latin1 _*_
L=["abc","süß","def"]
print L[1],L
The output of L[1] is correct, while the output of L shows up as
['abc', 's\xfc\xdf', 'def']
H
On Thu, 20 Jan 2011 10:46:37 -0600, Robert Kern wrote:
> On 1/20/11 8:31 AM, Helmut Jarausch wrote:
>> Hi,
>> I've searched the net but didn't find the information I need. Using
>> Python-2.7.1, I know, I can't modify defaultencoding at run time.
>
> You
rse matrix.
Note, in nearly all cases the inverse of a sparse matrix is a full matrix.
Instead of inverting a matrix solve a linear system with that matrix.
What do you need the inverse for?
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aach
s yet.
>>
>> I will be really appreciated if somebody can help me about how to
>> debug the python crashes.
>>
For me, it sounds like a hardware problem. Have run memory tests like
memtest86+ and/or memtester?
You could try a more recent version of Python like 2.6.5 and see if
you get the same sort of errors.
Try to run your application on a different machine if possible, to
exclude hardware errors.
Have you rebuild all Python packages you're using and which use an
extension in C / C++ ? after upgrading?
I hope this helps a bit,
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
I think one could apply an external hashing technique which would require only
very few disk accesses per lookup.
Unfortunately, I'm now aware of an implementation in Python.
Does anybody know about a Python implementation of external hashing?
Thanks,
Helmut.
--
Helmut Jarausch
Lehrstuhl
application. This
> is just for a proof-of-concept, so it doesn't need to be
> shipping-quality.
>
You might have a look at
http://www.karrigell.fr/doc/
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
f nearly each statement in Perl,
that it is hard to understand and debug unless you're using
it several hours a day (each day).
What convinced me is clearly written in
http://www.linuxjournal.com/article/3882
Please have a look at it,
Helmut.
(I'm teaching programming for more than 15
On 05/06/10 16:52, james_027 wrote:
> hi,
>
> I was working with regex on a very large text, really large but I have
> time constrained. Does python has any other regex library or string
> manipulation library that works really fast?
Have a look at
http://www.egenix.com/products/python/mxBase/mx
s 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
Hi,
I haven't found anything with Google's group search, so let me
ask it (again?).
How can I search this newsgroup from within a Python script.
(Perhaps by searching Google Groups or Gmane by some Python code.)
Many thanks for a hint,
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer
Hi,
as often before, I've cloned a working system (GenToo) onto another
machine. There, from a livecd and chroot to the cloned root partition
python -v
import site
fails with the following error
Python 2.6.6 (r266:84292, Oct 13 2010, 09:06:24)
[GCC 4.4.4] on linux2
Type "help", "copyright", "cr
On Fri, 12 Nov 2010 19:42:46 +0100, Stefan Sonnenberg-Carstens wrote:
> Am 12.11.2010 19:32, schrieb Helmut Jarausch:
>> Hi,
>>
>> as often before, I've cloned a working system (GenToo) onto another
>> machine. There, from a livecd and chroot to the cloned root par
101 - 166 of 166 matches
Mail list logo