Hi,
Now that Python 3 final has been released I thought it would be a good
time to mention that there's a new book to go with it:
Programming in Python 3:
A Complete Introduction to the Python Language
ISBN 0137129297
http://www.qtrac.eu/py3book.html
I've been working on this for more than a
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hot on the heals of Python 3.0 comes the Python 2.6.1 bug-fix
release. This is the latest production-ready version in the Python
2.6 family. Dozens of issues have fixed since Python 2.6 final was
released in October. Please see the NEWS file
[EMAIL PROTECTED] a écrit :
Bruno Most of the time, you want to serialize the instance's __dict__.
Does it recreate an instance at the other end or just a dict?
If you serialize a dict, you'll obviously get a dict back. Note that the
point of json is *not* to replace pickle. json is a
[EMAIL PROTECTED] wrote:
I just came across http://www.perl.com/pub/a/2002/05/29/closure.html
and wanted to try the canonical example of closures in Python. I
came up with the following, but it fails:
###
#!/usr/bin/env python
def make_counter(start_num):
start
[EMAIL PROTECTED] wrote:
from_ten = make_counter(10)
from_three = make_counter(3)
print from_ten() # 10
print from_ten() # 11
print from_three() # 3
print from_ten() # 12
print from_three() # 4
The error message is: UnboundLocalError: local
Lawrence D'Oliveiro [EMAIL PROTECTED] wrote:
for \
Entry \
in \
sorted \
(
f for f in os.listdir(PatchesDir) if
PatchDatePat.search(f) != None
) \
:
Patch = (open,
On Thu, Dec 4, 2008 at 1:19 PM, Hendrik van Rooyen [EMAIL PROTECTED]wrote:
Cameron Laird [EMAIL PROTECTED] wrote:
There's a realm within Pythonia that favors lambdalessness.
And who, may I ask, Is the King of this realm?
- Hendrik
--
Hi comp.lang.python
I am this novice Python programmer, who is not educated as a computer
scientist (I am a physicist), and who (regrettably) has never read the
GOF on design patterns.
I find myself spending a lot of time in Python making some designs, to
solve some task, which is the end turn
Thanks for your questions. Here come some answer below.
On Dec 2, 2:50 pm, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Tue, 02 Dec 2008 03:41:29 -0800,bkamraniwrote:
Hi Python gurus!
I'm going to read in an Ascii file containing float numbers in rows and
columns (say 10
On Dec 4, 10:09 am, Slaunger [EMAIL PROTECTED] wrote:
Hi comp.lang.python
I am this novice Python programmer, who is not educated as a computer
scientist (I am a physicist), and who (regrettably) has never read the
GOF on design patterns.
I find myself spending a lot of time in Python
Hello Everbody
I have imported a class from vb.net dll in Python. I am able to import all
the functions, but its showing such error when trying to access it.
g() is a simple function in dll which takes no argument but returns a
string.
print Class1.g()
Traceback (most recent call last):
File
On Dec 4, 12:34 am, Lawrence D'Oliveiro [EMAIL PROTECTED]
central.gen.new_zealand wrote:
In message [EMAIL PROTECTED], Philip
Semanchuk wrote:
In my experience, the environment in which a cron job runs is
different from the environment in which some command line scripts run...
Which is
I don't know how you infer any of those from what I said, nor
from the process of introducing features in Python. None of
what you say there rings at all true with anything I've
experienced in Python's core or the attitudes surrounding
development if the language; indeed, quite the
Matt, really thanks for your comments!
Even thogh it was not a direct answer to my questions,
I like your coding style very much and I think you have a good point.
About the number of line in the file, because I get that info from
another
in advance. Therefore I thought it could be hard coded.
On Thu, Dec 4, 2008 at 1:52 AM, Michael_D_G [EMAIL PROTECTED] wrote:
I am a faculty member of a cs department. We currently teach C++ in
our intro to programming course. I am teaching this class and it seems
to me that we would be much better served teaching python in the intro
course, C++
Lawrence D'Oliveiro wrote:
for \
Entry \
in \
sorted \
(
f for f in os.listdir(PatchesDir) if PatchDatePat.search(f) !=
None
) \
:
Patch = (open,
gzip.GzipFile)[Entry.endswith(.gz)](os.path.join(PatchesDir, Entry), r)
...
alex23 wrote:
On Dec 4, 3:42 pm, Warren DeLano [EMAIL PROTECTED] wrote:
So you prefer broken code to broken rules, eh? Your customers must love
that! This is exactly the kind of ivory-tower thinking I feared might
be behind the decision (form over function, damn the users to hell,
etc.)
Slaunger wrote:
Hi comp.lang.python
I was therefore wondering if you could recommend a book or a resource
concerning design patterns with special focus on the possibilities in
Python?
In that manner I may be able to both learn programming more pythonic
AND learn the design patterns.
--
On Wed, 03 Dec 2008 20:38:44 -0500 Lew [EMAIL PROTECTED] wrote:
Xah Lee wrote:
enough babble ...
Good point. Plonk. Guun dun!
I vaguely remember you plonking the guy before. Did you unplonk him in
the meantime? Or was that just a figure of speech?
teasingly yours,
/W
--
My real
About the piece of code you posted, there is something I don't
understand.
for i, line in data:
where data is a file object. Is it legal to write that?
I believe it results in too many values to unpack or do I miss
something?
/Ben
On Dec 4, 10:26 am, [EMAIL PROTECTED] wrote:
Matt,
On 2008-12-04 06:42, Warren DeLano wrote:
Why can't the parser distinguish between a standalone as keyword
and .as used as an object/attribute reference?
Because that would require special-casing some names as being
forbidden in syntax where other names are allowed. Special cases in
On Dec 4, 11:00 am, James Stroud [EMAIL PROTECTED] wrote:
The cookbook has a lot of complex examples and may not provide you with
the insight you are looking for. Only a small fraction of the recipes do
this.
Whereas I agree that the online cookbook has too many complex recipes,
as far I can
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I just came across http://www.perl.com/pub/a/2002/05/29/closure.html
and wanted to try the canonical example of closures in Python. I
came up with the following, but it fails:
def make_counter(start_num):
start = start_num
def
Hi all,
I have a javascript.I want to send some data from this javascript to a
python program that is on zope on my local system...
What can be the python program
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 3, 1:25 pm, Jason Scheirer [EMAIL PROTECTED] wrote:
On Dec 2, 6:13 pm, Aaron Brady [EMAIL PROTECTED] wrote:
class A:
... def methA( self ):
... print 'methA'
... self.meth= self.methB
... meth= methA
... def methB( self ):
...
One of the things I'd like to point out here is
what we've been learning in new job during
Induction Training...
That is, it's part of the coding standard and
design standards to name variables sensibly.
For instance, naming a variable db when it's
really a database object is a no no. Instead
On Dec 4, 4:43 am, Dennis Lee Bieber [EMAIL PROTECTED] wrote:
On Thu, 4 Dec 2008 01:28:56 -0800, Warren DeLano [EMAIL PROTECTED]
declaimed the following in comp.lang.python:
In addition, note that my choice of a concise method identifier affects
only my users. Python's introduction of a
On Dec 4, 3:28 am, Warren DeLano [EMAIL PROTECTED] wrote:
Have you
even looked at multiprocessing?
Multiprocessing solves some problems, but it is unsuitable for
high-frequency handoffs of large (in memory) objects between many
independent threads/processes -- the HPC object/data flow
On Thu, Dec 4, 2008 at 9:04 PM, Aaron Brady [EMAIL PROTECTED] wrote:
[... snip ...]
Does the OP hold the following should be legal?
if if or or:
and( for )
if not:
while( def )
I most certainly hope not! :)
--JamesMills
--
--
-- Problems are solved by method
--
On Dec 4, 10:39 am, Cong Ma [EMAIL PROTECTED] wrote:
Lawrence D'Oliveiro wrote:
for \
Entry \
in \
sorted \
(
f for f in os.listdir(PatchesDir) if PatchDatePat.search(f) !=
None
) \
:
Patch = (open,
On Thu, Dec 4, 2008 at 7:44 AM, James Stroud [EMAIL PROTECTED] wrote:
alex23 wrote:
On Dec 4, 3:42 pm, Warren DeLano [EMAIL PROTECTED] wrote:
So you prefer broken code to broken rules, eh? Your customers must love
that! This is exactly the kind of ivory-tower thinking I feared might
be
www.digitalarena.tk
--
http://mail.python.org/mailman/listinfo/python-list
Microsoft MVP Donald Belcham to Speak on Visual Studio, C# vNext,
Aspect Oriented Programming, Live Mesh
Bangalore, December 1, 2008: When writing Microsoft technology-related
applications to have strong separations of concerns you inevitably run
across some items that, while appearing as
Bruno If you serialize a dict, you'll obviously get a dict back. Note
Bruno that the point of json is *not* to replace pickle. json is a
Bruno *data* serialization format meant to represent basic types
Bruno (dicts, lists, strings and numbers) in human readable and
Bruno
On Dec 4, 7:28 pm, Warren DeLano [EMAIL PROTECTED] wrote:
But who's leaving who exactly? Surely a language as beautiful as Python
will easily transcend the limitations of its flagship implementation (if
or to the extent that such an implementation cannot keep pace with the
times). That's all
On Dec 4, 8:12 pm, [EMAIL PROTECTED] wrote:
About the piece of code you posted, there is something I don't
understand.
for i, line in data:
where data is a file object. Is it legal to write that?
I believe it results in too many values to unpack or do I miss
something?
From the
Duncan Booth [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
I just came across http://www.perl.com/pub/a/2002/05/29/closure.html
and wanted to try the canonical example of closures in Python. I
came up with the following, but it fails:
def make_counter(start_num):
start =
On Dec 4, 1:51 am, Barry Warsaw [EMAIL PROTECTED] wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On behalf of the Python development team and the Python community, I
am happy to announce the release of Python 3.0 final.
Python 3.0 (a.k.a. Python 3000 or Py3k) represents a major
On Dec 4, 1:28 pm, alex23 [EMAIL PROTECTED] wrote:
On Dec 4, 8:12 pm, [EMAIL PROTECTED] wrote:
About the piece of code you posted, there is something I don't
understand.
for i, line in data:
where data is a file object. Is it legal to write that?
I believe it results in too
Slaunger wrote:
Hi comp.lang.python
I am this novice Python programmer, who is not educated as a computer
scientist (I am a physicist), and who (regrettably) has never read the
GOF on design patterns. [...]
I guess I could boost my productivity by learning these well-proven
and
I have written a generator that puzzles me:
The generator is supposed to create ordered selections of a set of
objects. repetition of objects is allowed and the selections should be
of a size determined by a pramter to the generator.
Now, if I try to accummulate the generated selections into
Iain King wrote:
[...] Props. I just looked through the What's New and the change log, but I
couldn't find the answer to something: has any change been made to
how tabs and spaces are used as indentation? Can they still be
(inadvisably) mixed in one file? Or, more extremely, has one or the
[EMAIL PROTECTED] a écrit :
Bruno If you serialize a dict, you'll obviously get a dict back. Note
Bruno that the point of json is *not* to replace pickle. json is a
Bruno *data* serialization format meant to represent basic types
Bruno (dicts, lists, strings and numbers) in human
Hello,
On Thu, Dec 4, 2008 at 1:51 AM, Barry Warsaw [EMAIL PROTECTED] wrote:
-BEGIN PGP SIGNED MESSAGE-
We will continue to
support and develop both Python 3 and Python 2 for the foreseeable future,
and you can safely choose either version (or both) to use in your projects.
Which
gaurav kashyap a écrit :
Hi all,
I have a javascript.I want to send some data from this javascript to a
python program that is on zope on my local system...
google for Ajax.
What can be the python program
Anything on your zope instance that can handle an HTTP request. From the
server side
Hi!
The unittest module will invoke sys.exit() after running the tests in order
to signal success or failure. However, I sometimes don't want to exit the
interpreter but instead e.g. inspect some state or just keep the window
open. Normally, using '-i' as commandline argument works, but not in
Glenn Linderman wrote:
The equivalent of those commands is available via Windows Explorer,
Tools / Folder Options, File Types, scroll-scroll-scroll your way to
.py, Click Advanced, fiddle, copy paste apply, and other twaddle.
Yes, but what's needed is a further level of indirection.
On Dec 5, 3:05 am, Hendrik van Rooyen [EMAIL PROTECTED] wrote:
Davy [EMAIL PROTECTED] wrote:
I have used Tkinter after() to do loop update GUI in my previous post.
And I tried to change after() to time.sleep(), but it seems doesn't
work at all, the Queue send and receive data properly, but
Congratulations on a fantastic work!
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
This is great, however, the link to the What's New page appears to be
broken.
http://docs.python.org/dev/3.0/whatsnew/3.1.html
RHH
On Thu, Dec 4, 2008 at 8:37 AM, Istvan Albert [EMAIL PROTECTED]wrote:
Congratulations on a fantastic work!
--
Hi
On Thu, Dec 4, 2008 at 1:54 PM, Roy H. Han
[EMAIL PROTECTED] wrote:
Hi,
This is great, however, the link to the What's New page appears to be
broken.
http://docs.python.org/dev/3.0/whatsnew/3.1.html
replace 3.1 with 3.0 :), so it has to be:
An operational amplifier, often called an op-amp , is a DC-coupled
high-gain electronic voltage amplifier with differential inputs and,
usually, a single output. Typically the output of the op-amp is
controlled either by negative feedback, which largely determines the
magnitude of its output
On Wed, 03 Dec 2008 17:15:21 -0800, Matimus wrote:
Couldn't we have continued along just fine using a smarter parser
without elevating as to reserved status (and thus potentially
breaking a 10+ years of existing code)?
Nothing broke your code. It works just fine under the version it was
Michael_D_G wrote:
how do I refute
the notion that Python
is a marginal language because according to TOBIE it only less than
a 6% market share.
According to the same TIOBE, C++ has less than 11%. So it must be niche
then as well :)
--
Never underestimate the power of human stupidity -- L.
Andreas Waldenburger wrote:
On Wed, 03 Dec 2008 20:38:44 -0500 Lew [EMAIL PROTECTED] wrote:
Xah Lee wrote:
enough babble ...
Good point. Plonk. Guun dun!
I vaguely remember you plonking the guy before. Did you unplonk him in
the meantime? Or was that just a figure of speech?
I have
Hi,
Is there a way to hook a function call in python? I know __getattr__
is doing for variables, it is giving us a chance before a field is
initialized. Do we have same functionality for methods?
Example:
class Foo(object):
def __call_method__(self, ...) # just pseudo
print 'A
Is python of two minds about what is white space. I notice that split, strip
seem to regard u'\xa0' (NO-BREAK SPACE) as white, but that code is not matched
by the \s pattern. If this difference is intended can we rely on it continuing?
u'a b'.split()
[u'a', u'b']
u'a\xa0b'.split()
[u'a',
On Thu, 04 Dec 2008 14:27:49 +, Robin Becker [EMAIL PROTECTED] wrote:
Is python of two minds about what is white space. I notice that split, strip
seem to regard u'\xa0' (NO-BREAK SPACE) as white, but that code is not
matched by the \s pattern. If this difference is intended can we rely on
On Thu, 04 Dec 2008 20:53:38 +1000, James Mills wrote:
Readability of your code becomes very important especially if you're
working with many developers over time.
1. Use sensible meaningful names.
2. Don't use abbreviations.
This is excellent advice, but remember, what is a sensible
On Dec 4, 8:00 am, Edvin Fuglebakk [EMAIL PROTECTED] wrote:
I have written a generator that puzzles me:
The generator is supposed to create ordered selections of a set of
objects. repetition of objects is allowed and the selections should be
of a size determined by a pramter to the generator.
On Dec 3, 7:51 pm, Barry Warsaw [EMAIL PROTECTED] wrote:
On behalf of the Python development team and the Python community, I
am happy to announce the release of Python 3.0 final.
Way to go and congratulations!
--greg
--
http://mail.python.org/mailman/listinfo/python-list
k3xji a écrit :
Hi,
Is there a way to hook a function call in python? I know __getattr__
is doing for variables, it is giving us a chance before a field is
initialized.
Note that since the introduction of the new-style object model - that
is, in Python 2.2 -, computed attributes are better
This is what i have done and its giving me error.
#!/usr/bin/env python
import csv, sys, os
filename = (sys.argv[1])
reader = csv.reader(open(filename, rb), delimiter=',',
quoting=csv.QUOTE_NONE)
try:
#for row in reader:
for fmodes,fname in reader:
os.chmod(fname,fmodes)
except
I have looked at several interesting academic papers, on doing just
this approach. I have also looked through the
python web page to get examples of industry players using python in a
non-trivial way. Yes, I know, Google, Microsoft, Sun, CIA website
running on Plone, NOAA, NASA. If
started using m2crypto recently, it works pretty well by now, i just
have one question:
ctx = SSL.Context('sslv3')
ctx.load_cert_chain('client.pem')
anyone knows a way of loading cert file from memory buffer and not
from a file?
i just do not want to have my cert file in the directory of my app
k3xji wrote:
Hi,
Is there a way to hook a function call in python? I know __getattr__
is doing for variables, it is giving us a chance before a field is
initialized. Do we have same functionality for methods?
Example:
class Foo(object):
def __call_method__(self, ...) # just
On Thu, 04 Dec 2008 01:09:08 -0800, Slaunger wrote:
I find myself spending a lot of time in Python making some designs, to
solve some task, which is the end turn out to be closely related to well
established design patterns / programming idioms, which other users in
this forum has been kind
Now that Python 3 final has been released I thought it would be a good time
to mention that there's a new book to go with it:
Programming in Python 3:
A Complete Introduction to the Python Language
ISBN 0137129297
http://www.qtrac.eu/py3book.html
I've been working on this for more than a year,
On Dec 4, 7:00 am, Edvin Fuglebakk [EMAIL PROTECTED] wrote:
...
def orderedCombinations(pool, k):
Generator yielding ordered selections of size k with repetition from
pool.
if k == 1:
for m in pool:
yield [m]
if k 1:
for m in pool:
Jay Jesus Amorin wrote:
This is what i have done and its giving me error.
#!/usr/bin/env python
import csv, sys, os
filename = (sys.argv[1])
reader = csv.reader(open(filename, rb), delimiter=',',
quoting=csv.QUOTE_NONE)
try:
#for row in reader:
for fmodes,fname in reader:
fmodes
Barry Warsaw [EMAIL PROTECTED] writes:
On behalf of the Python development team and the Python community, I
am happy to announce the release of Python 3.0 final.
Yay!
Thanks for all the great work.
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 4, 10:02 am, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Thu, 04 Dec 2008 01:09:08 -0800, Slaunger wrote:
I find myself spending a lot of time in Python making some designs, to
solve some task, which is the end turn out to be closely related to well
established
George Sakkis wrote:
This is all very good, but don't drink the design pattern Kool-Aid and
start pushing design patterns everywhere. (Not everything needs to be a
singleton. No, really.)
Obligatory reading: http://www.mortendahl.dk/thoughts/blog/view.aspx?id=122
By the way, it's a fact
I'm having a problem trying to use the codecs package to aid me in
converting some bytes from EBCDIC into ASCII.
I have some 8bit text that is in mixed format. I extract the bytes
that are coded for EBCDIC and would like to display them correctly.
The bytes that are EBCDIC could values 0-255, I'm
On Thu, 04 Dec 2008 06:23:28 -0800, k3xji wrote:
Hi,
Is there a way to hook a function call in python? I know __getattr__ is
doing for variables,
What do you mean variables? Do you mean attributes?
it is giving us a chance before a field is
initialized.
What field? Is a field the
I have lines in a config file which can end with a comment (delimited
by # as in Python), but which may also contain string literals
(delimited by double quotes). A comment delimiter within a string
literal doesn't count. Is there any easy way to strip off such a
comment, or do I need to
Hendrik, I think your PC's clock is wrong. You seem to be posting from
the future.
--
http://mail.python.org/mailman/listinfo/python-list
2008/12/4 Michael_D_G [EMAIL PROTECTED]:
I am a faculty member of a cs department. We currently teach C++ in
our intro to programming course. I am teaching this class and it seems
to me that we would be much better served teaching python in the intro
course, C++ for Data structures, as we do
Hi Everyone,
I am using Python 2.4 and I am converting an excel spreadsheet to a
pipe delimited text file and some of the cells contain utf-8
characters. I solved this problem in a very unintuitive way and I
wanted to ask why. If I do,
csvfile.write(cell.encode(utf-8))
I get a
On 04 Dec 2008 15:53:21 GMT Steven D'Aprano
[EMAIL PROTECTED] wrote:
Hendrik, I think your PC's clock is wrong. You seem to be posting
from the future.
So? Maybe he is. What's your problem?
/W
--
My real email address is constructed by swapping the domain with the
recipient (local part).
On Dec 4, 8:00 am, Edvin Fuglebakk [EMAIL PROTECTED] wrote:
I have written a generator that puzzles me:
The generator is supposed to create ordered selections of a set of
objects. repetition of objects is allowed and the selections should be
of a size determined by a pramter to the generator.
[EMAIL PROTECTED] wrote:
Hi Everyone,
I am using Python 2.4 and I am converting an excel spreadsheet to a
pipe delimited text file and some of the cells contain utf-8
characters. I solved this problem in a very unintuitive way and I
wanted to ask why. If I do,
Good day.
I have installed Python 3 and i have a problem with the builtin read()
function.
[code]
huge = open ( 'C:/HUGE_FILE.pcl', 'rb', 0 )
import io
vContent = io.StringIO()
vContent = huge.read() # This line takes hours to process !!!
vSplitContent = vContent.split
(
On Dec 4, 4:50 pm, Joe Strout [EMAIL PROTECTED] wrote:
I have lines in a config file which can end with a comment (delimited
by # as in Python), but which may also contain string literals
(delimited by double quotes). A comment delimiter within a string
literal doesn't count. Is there
On Dec 4, 8:00 am, Edvin Fuglebakk [EMAIL PROTECTED] wrote:
I have written a generator that puzzles me:
The generator is supposed to create ordered selections of a set of
objects. repetition of objects is allowed and the selections should be
of a size determined by a pramter to the generator.
Gerhard Häring:
As you have probably guessed: nothing changed here.
Also see:http://www.python.org/dev/peps/pep-0666/
What? Do you mean it's possible to mix tabs and spaces still? Why?
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Davy [EMAIL PROTECTED] wrote:
Although I don't understand your explanation very well(I guess
maybe .after() re-schedule is better than .sleep unresponsive in GUI
application?)I will take it as a golden rule.
I did not in fact try to explain it - I was trying to get you to
think a bit wider, as
On Wed, Dec 3, 2008 at 11:42 PM, Warren DeLano [EMAIL PROTECTED] wrote:
Why was it necessary to make as a reserved keyword?
I can't answer for the Python developers as to why they *did* make it
a reserved word.
But I can offer what I believe is a good reason why it *should* be a
reserved
Steven D'Aprano stev..urce.com.au wrote:
Hendrik, I think your PC's clock is wrong. You seem to be posting from
the future.
I always knew I was more advanced than other people...
:-)
Well spotted!
Thanks
- Hendrik
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Dec 4, 2008 at 8:45 AM, Steven D'Aprano
[EMAIL PROTECTED] wrote:
On Thu, 04 Dec 2008 20:53:38 +1000, James Mills wrote:
Readability of your code becomes very important especially if you're
working with many developers over time.
1. Use sensible meaningful names.
2. Don't use
On Dec 4, 6:08 am, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Wed, 03 Dec 2008 17:15:21 -0800, Matimus wrote:
Couldn't we have continued along just fine using a smarter parser
without elevating as to reserved status (and thus potentially
breaking a 10+ years of existing
Tim Rowe [EMAIL PROTECTED] wrote:
Try asking Are we teaching computer science, so that the students
will be able to cope with whatever they meet once they graduate, or
are we teaching computer programming, in a couple of specific
languages, so that the students will be completely unprepared
Cro wrote:
Good day.
I have installed Python 3 and i have a problem with the builtin read()
function.
[code]
huge = open ( 'C:/HUGE_FILE.pcl', 'rb', 0 )
import io
vContent = io.StringIO()
vContent = huge.read() # This line takes hours to process !!!
vSplitContent = vContent.split
(
Andreas Waldenburger [EMAIL PROTECTED]
On 04 Dec 2008 15:53:21 GMT Steven D'Aprano
[EMAIL PROTECTED] wrote:
Hendrik, I think your PC's clock is wrong. You seem to be posting
from the future.
So? Maybe he is. What's your problem?
It was probably playing hob with his threading
[EMAIL PROTECTED] wrote:
I'm having a problem trying to use the codecs package to aid me in
converting some bytes from EBCDIC into ASCII.
Which EBCDIC variant?
sEBCDIC = unicode(sSource, 'cp500', 'ignore')
Are you sure CP500 is the EBCDIC variant for the language you want?
Do you really mean io.StringIO? I guess you want io.BytesIO() ..
Christian
Mmm... i don't know.
I also tried :
[code]
IDLE 3.0
import io
vContent = io.BytesIO()
huge = io.open(C:\HUGE_FILE.pcl,'r+b',0)
vContent = huge.read()
[/code]
It still waits a lot... i don't have the patience to
Edvin Fuglebakk [EMAIL PROTECTED] writes:
I have written a generator that puzzles me:
The generator is supposed to create ordered selections of a set of
objects. repetition of objects is allowed and the selections should be
of a size determined by a pramter to the generator.
Now, if I try
Warren DeLano wrote:
Why was it necessary to make as a reserved keyword?
Embrace the pain.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
I've tried starting with something like this, but I assume it is
expecting the source to be in unicode already?
e.g. (pretend the second half are EBCDIC characters)
sAll = This bit is ASCII, this bit ebcdic
Why pretend? You can use this:
abcde\x81\x82\x83\x84
On Thu, Dec 4, 2008 at 11:48 AM, Christian Heimes [EMAIL PROTECTED] wrote:
Cro wrote:
vContent = io.StringIO()
vContent = huge.read() # This line takes hours to process !!!
Do you really mean io.StringIO? I guess you want io.BytesIO() ..
I don't think it matters. Here's a quick comparison
1 - 100 of 359 matches
Mail list logo