New submission from Stefan Sonnenberg-Carstens
:
>>> import re
>>> p = re.compile(r'(P?("[^"]*"))')
>>> p.match('"Hallo"')
>>> p = re.compile(r'("[^"]*")')
>>> p.match('"
Stefan Sonnenberg-Carstens <[EMAIL PROTECTED]> added the comment:
I changed the script a bit, so that the txt file is not getting
recreated every time.
It gives:
[EMAIL PROTECTED] ~]$ python ziptest.py
Start 10:15:05
ZIP stored mtime: (2008, 6, 29, 10, 15, 4)
Original mtime: (2008, 6,
Stefan Sonnenberg-Carstens <[EMAIL PROTECTED]> added the comment:
[EMAIL PROTECTED] ~]$ python -V
Python 2.5.1
[EMAIL PROTECTED] ~]$ uname -a
Linux localhost.localdomain 2.6.25.6-55.fc9.i686 #1 SMP Tue Jun 10
16:27:49 EDT 2008 i686 i686 i386 GNU
New submission from Stefan Sonnenberg-Carstens <[EMAIL PROTECTED]>:
Given the attached source, I can produce these results:
[EMAIL PROTECTED] ~]$ python ziptest.py
Start 10:05:54
ZIP stored mtime: (2008, 6, 29, 10, 5, 54)
Original mtime: (2008, 6, 29, 10, 5, 54)
Duration 0.0029170513153
New submission from Stefan Sonnenberg-Carstens:
>>> a = {}
>>> a['a'] = [1,2,3,4,5]
>>> a['b'] = [1,2,3,4,5]
>>> a['c'] = [1,2,3,4,5]
>>> for k in a.keys():
... print a[k]
... for t in a[k]:
... del
Stefan Sonnenberg-Carstens added the comment:
No, I can't.
As many Front Arena Developers on the 1.6/2.0/2.1/2.2 can't.
Python 2.4 will be in Front Arena 4.0.
Lightyears away from here.
Same behaviour seen under Solaris 10 / Python 2.5.1
--
versions: +
Stefan Sonnenberg-Carstens added the comment:
You are using an old protocol version
pickle.dumps(partial_f,2)
does the trick:
>>> pickle.dumps(partial_f,2)
'\x80\x02cfunctools\npartial\nq\x00)\x81q\x01}q\x02b.'
--
nosy: +pythonmeister
___
Stefan Sonnenberg-Carstens added the comment:
the popen call does not redirect stderr.
If you do something like 2>null (windows) or 2>/dev/null (*nix) it will
_never_ get printed.
If you want to have stderr & stdout getting in via popen and thus stdout,
under *nix and windows you wou
New submission from Stefan Sonnenberg-Carstens:
when running this script:
aList = []
for i in xrange(5E5):
aList += [[]]
for j in xrange(10):
aList[-1].append([])
del aList
It does not give back the memory
even a
import gc
gc.collect()
afterwards does not do it.
In Python
New submission from Stefan Sonnenberg-Carstens:
When doing such
os.system("a command wich writes a outfile")
f = open("the file the command before wrote")
the file is empty.
If I do this:
os.popen("a command wich writes a outfile")
f = open("the file the co
Stefan Sonnenberg-Carstens added the comment:
I'd like to see perl/ruby behaviour:
an dict (os.environ), nothing more (perl %ENV,ruby $ENV).
Get rid of setenv/putenv at all.
3.0a1 has even more:
There is os.environ (a dict), os.[put|get]env() and os.environ.p
Stefan Sonnenberg-Carstens added the comment:
> As per the document and my simple test (on Linux), os.putenv() does
> not update os.environ. I think, it should update it.
What would be the benefit ?
--
nosy: +pythonmeister
__
Tracker <[EMAIL
Stefan Sonnenberg-Carstens added the comment:
I can confirm that under Linux (Linux nx6310 2.6.22-1-mepis-smp #1 SMP
PREEMPT Wed Sep 5 22:23:08 EDT 2007 i686 GNU/Linux, SimplyMepis 7.0b3)
1. using Python 3.0a1 is _very_ slow
2. it eats all your cpu (see my post)
I did not take the time to wait
Changes by Stefan Sonnenberg-Carstens:
--
components: +Interpreter Core
title: code sample showing errors reading large files with py 2.5 -> code
sample showing errors reading large files with py 2.5/3.0
versions: +Python 3.0
__
Tracker <
Stefan Sonnenberg-Carstens added the comment:
Error confirmed for this python:
Python 3.0a1 (py3k, Sep 10 2007, 22:45:51)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
See this:
[EMAIL PROTECTED]:~$ python2.4 large_io.py
(2, 4, 4, 'final', 0)
2007-09-10 21:41:5
Stefan Sonnenberg-Carstens added the comment:
Sorry, this way:
import sys
print(sys.version_info)
import time
print (time.strftime('%Y-%m-%d %H:%M:%S'))
fichin=open(r'D:\pythons\16s\total_gb_161_16S.gb')
start = time.time()
for i,li in enumerate(fichin):
if
Stefan Sonnenberg-Carstens added the comment:
Perhaps this is an issue of line separation ?
Could you provide the output of wc -l on a *NIX box ?
And, could you try with this code:
import sys
print(sys.version_info)
import time
print (time.localtime())
fichin=open(r'D:\python
Stefan Sonnenberg-Carstens added the comment:
Same under Linux with Python 3.0a1.
Eats all cpu + memory
--
nosy: +pythonmeister
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/
Stefan Sonnenberg-Carstens added the comment:
IMHO I also aggree that strings and bytes (list of bytes) should have
the same interface.
It is common sense that talking about strings most programmers think
of a list of bytes composing it (char *).
So the abbreviation should also hold true with
Stefan Sonnenberg-Carstens added the comment:
You are free to do what you want.
Reasons for not implementing fileno and isatty are:
- fileno should be an integer pointing to a real file,
so that low-level functions in libc can handle that. Can you provide
such ? (see http://netbsd.gw.com/cgi-bin
Stefan Sonnenberg-Carstens added the comment:
Patch attached:
--- setup.py2007-09-07 16:08:05.0 -0400
+++ ../Python-3.0a1_SSC/setup.py2007-09-07 16:07:31.0 -0400
@@ -613,7 +613,7 @@
else:
missing.append('_hashlib')
-if (o
New submission from Stefan Sonnenberg-Carstens:
In line 618 the comparison must be this:
if (openssl_ver >= 0x00908000):
otherwise there are complaints about not being able to build
the _sha256 and _sha512 modules, even if OpenSSL >= 0.9.8 is installed,
as in my case.
--
comp
22 matches
Mail list logo