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 University
D 52056 Aachen, Germany
: ,match.group(1)
Obviously I do not understand how (?:\s+(\d))* works in conjunction with
^ and $.
I am sure what you like to do.
What about
regex= re.compile('\s+\d')
print regex.findall(line)
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen
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
Lehrstuhl fuer
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_list'
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org
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
return self._nametowidget(name)
File /usr/lib/python2.5/lib-tk/Tkinter.py, line 1064, in nametowidget
if name[0] == '.':
TypeError: '_tkinter.Tcl_Obj' object is unsubscriptable
---
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH
'import' is cached. If do want Python to re-import a module just call
reload(module.)
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
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 enlightening me,
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische
/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
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 52056 Aachen, Germany
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
RWTH - Aachen University
D 52056 Aachen
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
= '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 Numerische Mathematik
RWTH - Aachen University
D
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)
# crypt = AES.new(PWD, AES.MODE_ECB
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 specification is at
URL:http
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 environment
]
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 52056 Aachen, Germany
--
http://mail.python.org/mailman
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 Aachen, Germany
--
http
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
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, Germany
--
http
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' or to switch
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 work? Would it happen to be
supported
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
.
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 Numerische
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
Lehrstuhl fuer
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.python.org/mailman
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,
Helmut Jarausch
/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
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
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 Mathematik
RWTH - Aachen University
D 52056
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, Germany
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.
Take a look at the charset command line
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
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/
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056
+(?:[-.]\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
.
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
://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 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 would need to setup a timer which calls a Python
object
for a hint,
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
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 strings.
I want to delete the tuple (element) with a given
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 (Unique_ID,Date) both of which
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 over it.
No, as Bruno Desthuilliers has pointed out, because one
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
Lehrstuhl fuer
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 - Aachen University
D
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'] ?
ctypes passes the argument given to CDLL(path) straight
N.key,N.data
MyQ.dequeue(MyQ.Tail)
print after second dequeue
print Head: ,MyQ.Head, Tail: ,MyQ.Tail
for N in MyQ:
print loop3-,N
print N.key,N.data
ENJOY,
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http
of a singleton class called gameVars that would get
passed everywhere. It's unlikely that they'll get mixed in with
anyhting else, 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
can only see the brute force method: keeping track of
all cursor positioning means like Backspace, Del, the '-' and '-' keys
and mouse clicks.
Is there an easier method?
Many thanks for a hint or even a pointer to an example,
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH
.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list
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+alpha) =
A*cos(alpha)*sin(omega*t) + A*sin(alpha)*cos
++ 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
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
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 use smtplib.SMTP.sendmail
but this requires building the complete
,_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
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,
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
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
--
http://mail.python.org/mailman/listinfo
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 get
Traceback (most recent call last):
File pyshell#1, line
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 a hint,
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org
.
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 news from some newsgroups.
If News is an NNTP object I try
(Response,Articles
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 you have any
for a 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 just copy /usr/local/lib/python2.4/site-packages
...
numtest() # enter 1
1 is a number between 1 20
numtest() # enter f
f is not a number
its not a final solution though, think input = -2, 5.5 or 21
One step further
try:
eval(x+'0')
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056
[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
--
http://mail.python.org/mailman
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 - Aachen University
D 52056 Aachen
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, Germany
--
http://mail.python.org/mailman/listinfo/python-list
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 default
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).
Maybe
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']
and I like to generate abbreviation
_A
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 list of names, say
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
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.
Many thanks for a hint,
Helmut.
--
Helmut
Chris Rebert wrote:
On Wed, Feb 4, 2009 at 1:22 AM, Helmut Jarausch jarau...@skynet.be 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 is a string
Clovis Fabricio wrote:
2009/2/4 Helmut Jarausch jarau...@skynet.be:
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 lines.
I'd
Clovis Fabricio wrote:
2009/2/4 Helmut Jarausch jarau...@skynet.be:
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
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 Numerische Mathematik
RWTH - Aachen University
D 52056
, 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('(ok|warning)') : call_skip
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen
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 lookaheads
() 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
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
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
() 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 Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
Benjamin Peterson wrote:
Helmut Jarausch jarausch at 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 Changed Date: 2009-10
Benjamin Peterson wrote:
Helmut Jarausch jarausch at 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 -mtune=native -msse2 -pipe
() 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 52056 Aachen, Germany
--
http://mail.python.org/mailman
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
1 - 100 of 179 matches
Mail list logo