the following function retrieves pages from the web and saves them in
a specified dir. i want to extract the respective filenames from the
urls e.g the page code.google.com shud be saved as code-google.htm or
something similar. can u suggest me a way to do it
def retrieve_url(self,url):
""
On Sunday 26 July 2009 00:42:26 Marcus Wanner wrote:
> On 7/25/2009 10:08 AM, Piet van Oostrum wrote:
> >> Steven D'Aprano (SD) wrote:
> >>
> >> SD> Ambiguity essentially boils down to being unable to reasonably
> >> predict SD> the expectation of the coder. I say "reasonably", because if
> >>
On Saturday 25 July 2009 20:30:54 Michal Kwiatkowski wrote:
> Hi,
>
> Is there a way to tell if a generator has been exhausted using pure
> Python code? I've looked at CPython sources and it seems that
> something like "active"/"exhausted" attribute on genobject is missing
> from the API. For the t
On Friday 24 July 2009 17:14:06 you wrote:
> Hrvoje Niksic writes:
> > The term "variable" is used in the Python language reference and
> > elsewhere
>
> Yes. It should also be abundantly clear from the constant stream of
> confused newbies on this point that its usage of that term is different
>
> When would I use PyObject_SetAttrString/tp_dictoffset instead of tp_members?
When I have a variable list of attributes, and cannot statically know
what those attributes might be.
> I have a predefined set of members, some of which are optional.
Having optional fields is also a good reason.
>
En Sun, 26 Jul 2009 02:52:36 -0300, is un
escribió:
Trying the multiprocessing module for the first time, I spent quite a
bit on making this code run:
[...]
The result was not what I expected, it seems like the process restarts
all the time, and the message 'Process started' keeps getting
pri
Hello,
I am trying to compile Python 2.6.2 on my Mac which has os/x 10.5.7
I downloaded python 2.6.2 from here:
- http://www.python.org/ftp/python/2.6.2/Python-2.6.2.tar.bz2
I unpacked it.
I ran these shell commands:
- ./configure --prefix=/pt/p
- make
Near the end of the make output I se
On Sun, 26 Jul 2009 08:30:30 +1000, Lie Ryan wrote:
> since on my system socket.gethostname() returns 'lieryan', and since
> socket.gethostbyname('lieryan') does not resolve to anything; the test
> becomes an error.
>
> My system is Gentoo, but I think this also happened on Ubuntu (still on
> thi
On Sun, Jul 26, 2009 at 1:12 AM, Jessica R
Smith wrote:
> Hello,
> I am trying to compile Python 2.6.2 on my Mac which has os/x 10.5.7
>
> I downloaded python 2.6.2 from here:
> - http://www.python.org/ftp/python/2.6.2/Python-2.6.2.tar.bz2
>
> I unpacked it.
>
> I ran these shell commands:
> - ./
On Jul 26, 1:10 am, Ben Finney wrote:
> Michal Kwiatkowski writes:
> > I may be missing something obvious here. Is there a better way to tell
> > if a given generator object is still active or not?
>
> foo = the_generator_object
> try:
> do_interesting_thing_that_needs(foo.next())
Chris thanks!!
other members:
I read this:
- http://chrismiles.livejournal.com/25648.html
I did this:
- install mac ports
- port install readline
- vi setup.py
def detect_modules(self):
# Ensure that /usr/local is always used
add_dir_to_list(self.compiler.library_di
Aahz wrote:
> In article ,
> Peter Otten <[email protected]> wrote:
>>
>>I have a hunch that you are triggering a reload() somewhere. Example:
>>
>>Python 2.6.2 (release26-maint, Apr 19 2009, 01:58:18)
>>[GCC 4.3.3] on linux2
>>Type "help", "copyright", "credits" or "license" for more information.
En Sun, 26 Jul 2009 03:33:27 -0300, golu
escribió:
i want to save pages in a directory and i m using the urls to get
filenames. The program gets stuck in the saving step.can u suggest me
a way to save a page e.g google.com as a file google.html
You may use str.translate to replace/remove al
On Sat, 25 Jul 2009 16:21:39 -0700, Erik Max Francis wrote:
> Steven D'Aprano wrote:
>> But it's not "practically every function". It's hardly any function at
>> all -- in my code, I don't think I've ever wanted this behavior. I
>> would consider it an error for function(42) and function([42]) to
"Martin v. Löwis" wrote:
>> I have a predefined set of members, some of which are optional.
>
> Having optional fields is also a good reason.
What is the use of T_OBJECT_EX vs T_OBJECT in PyMemberDef then? I would
have though that the former describes an optional field, because the
behaviour of
On Jul 26, 8:52 am, is un wrote:
> Hi,
>
> Trying the multiprocessing module for the first time, I spent quite a
> bit on making this code run:
>
> from multiprocessing import Process
> import time
>
> def my_process():
> i = 0
> while 1:
> print i
> i += 1
> time.s
Tom wrote:
> s = sauce.replace("\n", "")
>
> Sauce is a string, read from a file, that I need to remove newlines
> from. This code works fine in Linux, but not in Windows. rstrip("\n")
> won't work for me, so anybody know how to get this working on Windows?
I'm pretty sure this works regardless o
Steven D'Aprano wrote:
I'm curious what those applications are, because regular multiplication
behaves differently depending on whether you have a 1x1 matrix or a
scalar:
[[2]]*[[1, 2, 3], [2, 3, 4]] is not defined
2*[[1, 2, 3], [2, 3, 4]] = [[2, 4, 6], [2, 6, 8]]
I'm curious as to what thes
On 24-07-2009, Christian Tismer wrote:
> On 7/24/09 1:04 AM, William Dode wrote:
>> On 23-07-2009, Christian Tismer wrote:
> ...
>
>>> Wasn't the project plan saying the opposite, borrowing
>>> some ideas from psyco? :-)
>>> http://code.google.com/p/unladen-swallow/wiki/ProjectPlan
>>
>> How do you
Jessica Smith schrieb:
Chris thanks!!
other members:
I read this:
- http://chrismiles.livejournal.com/25648.html
I did this:
- install mac ports
- port install readline
- vi setup.py
def detect_modules(self):
# Ensure that /usr/local is always used
add_dir_to_list
Neil Hodgson wrote:
casebash:
I have searched this list and found out that Python doesn't have a
mutable string class (it had an inefficient one, but this was removed
in 3.0). Are there any libraries outside the core that offer this?
I wrote a gap buffer implementation for Python 2.5 allow
> MRAB (M) wrote:
>M> [email protected] wrote:
>>> I decided to go with one big log file, which will be shared by all
>>> threads (child and parent). A log message Queue is used to store all
>>> log entries, and a customized logger thread will get log entries from
>>> the Queue.
>>>
>
On Jul 24, 5:03 am, Robert Kern wrote:
> On 2009-07-23 03:55, Helvin wrote:
>
> > I believe I now have vtkpython.exe. However, my 'import vtk' statement
> > in my python code is not working. The error says something like "no
> > module named vtk".
> > Where do I find modules for vtk inpyqt? Do the
In article ,
Raffael Cavallaro wrote:
>On 2009-07-25 00:55:26 -0400, Carl Banks said:
>>
>> But please don't put it on the same level as PHP. Their situations
>> have almost nothing in common.
>
>Their situations have much in common; Python attracted programmers away
>from (for example) C++, b
On 2009-07-26 09:16:39 -0400, [email protected] (Aahz) said:
There are plenty of expert C++
programmers who switched to Python;
"plenty" is an absolute term, not a relative term. I sincerely doubt
that the majority of python users were formerly *expert* C++
programmers.
your thesis onl
I'm trying to get one of the examples from Foundation of Python
Network Programming to work. Specifically this is the UDP example
from Ch 3. First there is the server:
#!/usr/bin/env python
# UDP Echo Server - Chapter 3 - udpechoserver.py
import socket, traceback, time
host = '127.0.0.1'
Paul Barry wrote:
I'm trying to get one of the examples from Foundation of Python
Network Programming to work. Specifically this is the UDP example
from Ch 3. First there is the server:
#!/usr/bin/env python
# UDP Echo Server - Chapter 3 - udpechoserver.py
import socket, traceback, time
host
Is there any way for me to save some sort of global preference for
python that I can read/write at runtime that doesn't involve me
explicitly creating a file? It may create a file underneath, but I
don't want some path hard coded to my routine.
In Windows, the Registry serves this purpose. Is th
gert schrieb:
On Jul 25, 2:33 am, "Diez B. Roggisch" wrote:
gert schrieb:
On Jul 24, 7:32 pm, "Diez B. Roggisch" wrote:
gert schrieb:
this is a non standard way to store multi part post data on disk
def application(environ, response):
with open('/usr/httpd/var/wsgiTemp','w') as f:
On Jul 26, 2009, at 5:09 PM, Robert Avery wrote:
In Windows, the Registry serves this purpose. Is there something
similar for Mac?
http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSUserDefaults_Class/Reference/Reference.html
http://developer.apple.com/documentati
In article ,
Gabriel Genellina wrote:
>En Thu, 23 Jul 2009 21:27:35 -0300, Aahz escribió:
>> In article ,
>> Gabriel Genellina wrote:
>>>
>>> NLMPI
>>
>> What?
>
>IHNFI
What? Abbreviations are fine, but if someone asks you about one, it
would be nice to just expand it instead of replying with
Oops. My bad. I did in fact have this line of code before calls to form:
form = cgi.FieldStorage()
I changed the except command from "pass" to "print sys.exc_info()" as per
your suggestion. Still, however, the form just renews itself without
offering any information whatsoever. You can see this h
On Jul 23, 11:53 am, Paul McGuire wrote:
> On Jul 22, 5:43 pm, Filip wrote:
>
> # Needs re.IGNORECASE, and can have tag attributes, such as CLEAR="ALL">
> line_break_re = re.compile('', re.UNICODE)
Just in case somebody actually uses valid XHTML :-) it might be a good
idea to allow for
> # w
In article <056f629b-aa63-458a-ae16-ac40a759e...@h11g2000yqb.googlegroups.com>,
Shai wrote:
>
>class DocInherit(object):
>"""
>Docstring inheriting method descriptor
>
>The class itself is also used as a decorator
>"""
Nice! Maybe stick this on the Cookbook?
--
Aahz (a...@pytho
> ryles (r) wrote:
>r> On Jul 25, 8:57 am, Piet van Oostrum wrote:
>>> > ryles (r) wrote:
>>> >r> According tohttp://www.python.org/doc/essays/packages.html:
>>> >r> "The import statement first tests whether the item is defined in the
>>> >r> package; if not, it assumes it is a module a
hello
i thought that python automatically compiled pyc files after a module is
successfully imported. what could prevent this happening?
Python 2.6.1 (r261:67515, Apr 12 2009, 03:51:25)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
On Jul 26, 5:22 pm, Baz Walter wrote:
> hello
>
> i thought that python automatically compiled pyc files after a module is
> successfully imported. what could prevent this happening?
>
> Python 2.6.1 (r261:67515, Apr 12 2009, 03:51:25)
> [GCC 4.3.2] on linux2
> Type "help", "copyright", "credits"
In article
<[email protected]>,
Paul Barry wrote:
> host = '127.0.0.1' # Bind to all interfaces
This threw me off the track for a little while. The comment is wrong!
You're not binding to all interfaces, you're binding specifically to
Baz Walter wrote:
> i thought that python automatically compiled pyc files after a module is
> successfully imported. what could prevent this happening?
>
>
> Python 2.6.1 (r261:67515, Apr 12 2009, 03:51:25)
> [GCC 4.3.2] on linux2
> Type "help", "copyright", "credits" or "license" for more info
Sorry for not providing enough information - and Rhodri, for sending
my second message I used the GMX webmail client rather than my usual
Linux client as I was testing it on windows. That must have screwed it
up, I need to download Thunderbird on Mozzila.
The thing that was messing it up was that
On Jul 25, 8:31 am, "Gabriel Genellina"
wrote:
> En Fri, 24 Jul 2009 17:52:47 -0300, Qauzzix escribió:
>
> > Since I have been usingdiato make my UML diagrams. I also found an
> > util named dia2code that generates python code fromdiadiagram. Now
> > that I have that option I really want to find
On Jul 26, 1:13 pm, Tom wrote:
> The thing that was messing it up was that the endlines are handled
> differently on each each OS, so I changed the code to strip the
> endlines to be:
>
> if os.name == "nt":
> s = sauce.rstrip("\r\n")
> else:
> s = sauce.replace("\n", "")
In article ,
Tom wrote:
>
>I have an annoying problem. While I mainly use Linux when I distribute
>this program to friends and on the internet, it'll get used on Windows.
>So, I tested my python program on my Windows Vista dual boot, running
>the same version of python (2.6) as my Linux, and got
>>> I have a predefined set of members, some of which are optional.
>> Having optional fields is also a good reason.
>
> What is the use of T_OBJECT_EX vs T_OBJECT in PyMemberDef then?
Right - this works for optional objects. However, it can't possibly
work for any of the other fields.
> I woul
Hi all, One of my cousin suggested me to do a IText
PDF converter for python. Actually I heard that there is
no separate IText converter either we have to go for jython or GCJ with
wrapper. Instead of wrapping, my plan is to create a separate module with
Python and I am thinking of doing
On Jul 23, 11:29 pm, Nick Craig-Wood wrote:
> > The syntax would be something like:
>
> > def work():
>
> > showstatus("building")
> > r = yield runshell("make")
> > showstatus("installing")
> > r = yield runshell("make install")
> > showstatus("Success")
>
> > mygui.startwork(w
Beni Cherniavsky wrote:
On Jul 22, 9:36 am, Hendrik van Rooyen
wrote:
On Tuesday 21 July 2009 15:49:59 Inky 788 wrote:
My guess is that it was probably for optimization reasons long ago.
I've never heard a *good* reason why Python needs both.
The good reason is the immutability, which lets y
Apologies for the long subject line, here it is again:
"Pep 342 (val = yield MyGenerator(foo)), synchronous os.system() that
doesn't block gui event loops"
On Jul 21, 7:48 pm, John Nagle wrote:
> > The idea:
>
> > To run functions that execute a series of system commands without
> > blocking th
> This doesn't mean they're on the same level - in fact, if you read carefully
> you'll see my original post said as much: python attracted average
> programmers; php attracted mediocre programmers and even some
> non-programmers, which means that php is clearly a lesser language than
> python.
I'
Peter Otten wrote:
You did not set the PYTHONDONTWRITEBYTECODE environment variable in a former
life, or did you?
thanks peter
no i didn't, but i've just discovered a script in /etc/profile.d that
did. now i'll have to try to find out how that script got in there :-|
--
http://mail.python.o
Referring to this article:
http://math-blog.com/2009/07/20/complex-algorithm-research-and-development-harder-than-many-think/
The author, who is specifically looking for math-related functions, writes:
"""
The dream algorithm R&D tool would be similar to Matlab or Mathematica
but could be compiled
"Martin v. Löwis" wrote:
I have a predefined set of members, some of which are optional.
>>> Having optional fields is also a good reason.
>>
>> What is the use of T_OBJECT_EX vs T_OBJECT in PyMemberDef then?
>
> Right - this works for optional objects. However, it can't possibly
> work for
On Jul 26, 12:53 pm, Roy Smith wrote:
> In article
> <[email protected]>,
> Paul Barry wrote:
>
> > host = '127.0.0.1' # Bind to all interfaces
>
> This threw me off the track for a little while. The comment is wrong!
> You're not bindi
On Jul 26, 11:07 am, MRAB wrote:
> Paul Barry wrote:
> > I'm trying to get one of the examples from Foundation of Python
> > Network Programming to work. Specifically this is the UDP example
> > from Ch 3. First there is the server:
>
> > #!/usr/bin/env python
> > # UDP Echo Server - Chapter 3 -
Does anyknow know how to do this? The reason I'm asking is because I'm
trying to make a mini-programming language for fun, and need to work
with variables.
The user types 'set NAME "DATA" ' or whatever else the variable is
going to be called/contain.
I have:
def variablework(varname, varset):
In article
<2f578124-1ae3-45a5-a0c9-b8b05c0b5...@p23g2000vbl.googlegroups.com>,
Paul Barry wrote:
> In this case, I think he's trying to illustrate how the UDP example
> compares to the TCP example from the previous section, which is why he
> choose to keep the methods the same.
I suppose,
David Robinow wrote:
This doesn't mean they're on the same level - in fact, if you read carefully
you'll see my original post said as much: python attracted average
programmers; php attracted mediocre programmers and even some
non-programmers, which means that php is clearly a lesser language tha
> (Even if it so happens sauce
> will only ever have LFs at the end, it's still better to use the
> method that is closest to your intended meaning.)
Oh, you're right. I'll change that now. I suppose removing all
endlines will be better, incase, somehow, endlines in the middle of
the line arrises.
In article ,
Raffael Cavallaro
wrote:
> php is clearly a lesser language than python.
I'm as much of a Python bigot as anybody. Likewise, I put down php for all
the sorts of theoretical reasons people have been putting it down. Not to
mention that it looks like Perl, which is enough to ma
En Sun, 26 Jul 2009 12:44:02 -0300, Aahz escribió:
In article ,
Gabriel Genellina wrote:
En Thu, 23 Jul 2009 21:27:35 -0300, Aahz
escribió:
In article ,
Gabriel Genellina wrote:
NLMPI
What?
IHNFI
What? Abbreviations are fine, but if someone asks you about one, it
would be nice to
> I have a predefined set of members, some of which are optional.
Having optional fields is also a good reason.
>>> What is the use of T_OBJECT_EX vs T_OBJECT in PyMemberDef then?
>> Right - this works for optional objects. However, it can't possibly
>> work for any of the other fields.
>
On 2009-07-26 17:04:23 -0400, Roy Smith said:
One
needs to have a very highly developed sense of theoretical purity to look
down their noses at the language that drives one of the highest volume web
sites on the planet.
It's nothing to do with theoretical purity and everything to do with
pra
Hello, I'm new to Python (using it for two months) and I wonder how can I
comment the const. values with the doc-strings. I.e. if I have code:
>FRACTION_MIN = 1
>FRACTION_MAX = 10
>
>class Fraction(collections.MutableSequence):
>'''Model a fraction with denominators.
>
>It contains one or
On Sun, Jul 26, 2009 at 2:49 PM, Erwin Mueller wrote:
> Hello, I'm new to Python (using it for two months) and I wonder how can I
> comment the const. values with the doc-strings. I.e. if I have code:
>
>>FRACTION_MIN = 1
>>FRACTION_MAX = 10
>>
>>class Fraction(collections.MutableSequence):
>> '
Ah, thanks for that Dennis. I have a system already figured out where
the user manually pre-enters all the variables into a .py file, which
obviously isn't very efficient. The language isn't going to be used
much except by me, so I suppose I'll just work with that until I look
more into dictionarie
I am trying to compile Python 2.6.2 on Mac OS X 10.5.7. I have Xcode
3.1.3 installed.
The error I got is below.
$ ./configure --prefix=/Users/me/python
checking for --with-universal-archs... 32-bit
checking MACHDEP... darwin
checking EXTRAPLATDIR... $(PLATMACDIRS)
checking machine type as report
On Sun, 26 Jul 2009 14:31:06 +0100, Raffael Cavallaro
wrote:
On 2009-07-26 09:16:39 -0400, [email protected] (Aahz) said:
There are plenty of expert C++
programmers who switched to Python;
"plenty" is an absolute term, not a relative term. I sincerely doubt
that the majority of pytho
Chris Rebert:
> Only modules, classes, and functions/methods can have docstrings
> associated with them.
> For anything else, you have to use comments; or you can mention them
> in the docstrings of related things.
What about adding docstrings to other Python things, especially to
variables?
Bye,
Kevin schrieb:
I am trying to compile Python 2.6.2 on Mac OS X 10.5.7. I have Xcode
3.1.3 installed.
The error I got is below.
$ ./configure --prefix=/Users/me/python
Use a framework-build.
checking for --with-universal-archs... 32-bit
checking MACHDEP... darwin
checking EXTRAPLATDIR... $(
Chris Rebert schrieb:
On Sun, Jul 26, 2009 at 2:49 PM, Erwin Mueller wrote:
Hello, I'm new to Python (using it for two months) and I wonder how can I
comment the const. values with the doc-strings. I.e. if I have code:
FRACTION_MIN = 1
FRACTION_MAX = 10
class Fraction(collections.MutableSeque
On Sun, 26 Jul 2009 15:07:08 -0700, Tom wrote:
> Ah, thanks for that Dennis. I have a system already figured out where
> the user manually pre-enters all the variables into a .py file, which
> obviously isn't very efficient. The language isn't going to be used much
> except by me, so I suppose I'l
On Sun, 26 Jul 2009 12:40:39 -0700, Paul Barry wrote:
> On Jul 26, 12:53 pm, Roy Smith wrote:
>> In article
>> <[email protected]>,
>> Paul Barry wrote:
>>
>> > host = '127.0.0.1' # Bind to all interfaces
>>
>> This threw me off the track
On Sun, 26 Jul 2009 11:24:48 -0700, John Nagle wrote:
> An interesting issue is Python objects, which are always mutable.
> A "dict" of Python objects is allowed, but doesn't consider the contents
> of the objects, just their identity (address). Only built-in types are
> immutable; one cannot
On Sun, 26 Jul 2009 15:42:22 -0700, Bearophile wrote:
> Chris Rebert:
>> Only modules, classes, and functions/methods can have docstrings
>> associated with them.
>> For anything else, you have to use comments; or you can mention them in
>> the docstrings of related things.
>
> What about adding
On Mon, 27 Jul 2009 00:47:08 +0200, Diez B. Roggisch wrote:
>> Only modules, classes, and functions/methods can have docstrings
>> associated with them.
>> For anything else, you have to use comments; or you can mention them in
>> the docstrings of related things.
>
> While this is technically tr
On Sun, 26 Jul 2009 09:31:06 -0400, Raffael Cavallaro wrote:
> On 2009-07-26 09:16:39 -0400, [email protected] (Aahz) said:
>
>> There are plenty of expert C++
>> programmers who switched to Python;
>
> "plenty" is an absolute term, not a relative term. I sincerely doubt
> that the majority o
On Jul 23, 3:53 am, Paul McGuire wrote:
> # You should use raw string literals throughout, as in:
> # blah_re = re.compile(r'sljdflsflds')
> # (note the leading r before the string literal). raw string
> literals
> # really help keep your re expressions clean, so that you don't ever
> # have to d
In article <2a408da6-af57-45d0-a75f-4cbe384bb...@s15g2000yqs.googlegroups.com>,
Michal Kwiatkowski wrote:
>On Jul 25, 10:00=A0pm, Jason Tackaberry wrote:
>> On Sat, 2009-07-25 at 11:30 -0700, Michal Kwiatkowski wrote:
>>>
>>> Is there a way to tell if a generator has been exhausted using pure
>>
Michal Kwiatkowski wrote:
The thing is I don't need the next item. I need to know if the
generator has stopped without invoking it.
Write a one-ahead iterator class, which I have posted before, that sets
.exhausted to True when next fails.
tjr
--
http://mail.python.org/mailman/listinfo/pyt
Mark Lawrence:
> If my sleuthing is correct the problem is with these lines
>
> ilow *= self->itemSize;
> ihigh *= self->itemSize;
>
> in GapBuffer_slice being computed before ilow and ihigh are compared to
> anything.
This particular bug was because ihigh is the maximum 32 bit integer
21474
On Mon, Jul 20, 2009 at 5:57 AM, casebash wrote:
> Hi,
>
> I have searched this list and found out that Python doesn't have a
> mutable string class (it had an inefficient one, but this was removed
> in 3.0). Are there any libraries outside the core that offer this?
It depends on how mutable you w
Mark Dickinson wrote:
>> Since the 'and' and 'or' already return objects (and objects
>> evaluate to true or false), then 'xor' should behave likewise, IMO.
>> I expect that would be the case if it were ever added to the
>> language.
>
> I'm not so sure. Did you ever wonder why the any() and al
William Dode':
> I updated the script (python, c and java) with your unrolled version
> + somes litle thinks.
[...]
> c 1.85s
> gcj 2.15s
> java 2.8s
> python2.5 + psyco 3.1s
> unladen-2009Q2 145s (2m45)
> python2.5 254s (4m14s)
> python3.1 300s (5m)
> ironpython1.1.1 680s (11m20)
Sorry for being
Terry Reedy wrote:
In Math and Python, a
Although Python extends the chaining principle to
!=, this is somewhat questionable, because
a < b and b < c implies a < c, but a != b and
b != c does not imply a != c.
I'm not sure I've ever seen a mathematician
write a != b != c, but if I did, I would
Michal Kwiatkowski wrote:
The first generator isn't finished, it yielded 1 and None. Second one
is exhausted after yielding a single value (1). The problem is that,
under Python 2.4 or 2.3 both invocations will generate the same trace
output.
This seems to be a deficiency in the trace mechanis
On Sun, 26 Jul 2009 20:10:00 -0400, Terry Reedy wrote:
> Michal Kwiatkowski wrote:
>
>> The thing is I don't need the next item. I need to know if the
>> generator has stopped without invoking it.
>
> Write a one-ahead iterator class, which I have posted before, that sets
> .exhausted to True wh
On 2009-07-26 07:04, Helvin wrote:
C:\Qt\VTKbin7\Wrapping\Python>python setup.py install
Traceback (most recent call last):
File "setup.py", line 138, in
raise "ERROR: Must specify BUILD_TYPE= on command
line."
TypeError: exceptions must be classes or instances, not str
Is it just a sm
On 2009-07-26 18:23, Steven D'Aprano wrote:
On Mon, 27 Jul 2009 00:47:08 +0200, Diez B. Roggisch wrote:
Only modules, classes, and functions/methods can have docstrings
associated with them.
For anything else, you have to use comments; or you can mention them in
the docstrings of related things
To the best of my recollection, the len() function only applies to
container objects; i. e. tuples, lists, strings, etc. an integer
object is not a container, thus one receives an error when sending an
int as an argument for len().
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
On Sun, 26 Jul 2009 20:10:00 -0400, Terry Reedy wrote:
Michal Kwiatkowski wrote:
The thing is I don't need the next item. I need to know if the
generator has stopped without invoking it.
Write a one-ahead iterator class, which I have posted before, that sets
.exhausted
greg wrote:
Terry Reedy wrote:
In Math and Python, a
Although Python extends the chaining principle to
!=, this is somewhat questionable, because
a < b and b < c implies a < c, but a != b and
b != c does not imply a != c.
I'm not sure I've ever seen a mathematician
write a != b != c, but if I
On Mon, 27 Jul 2009 02:02:19 -0400, Terry Reedy wrote:
> Steven D'Aprano wrote:
>> On Sun, 26 Jul 2009 20:10:00 -0400, Terry Reedy wrote:
>>
>>> Michal Kwiatkowski wrote:
>>>
The thing is I don't need the next item. I need to know if the
generator has stopped without invoking it.
>>> Wr
On Jul 23, 5:48 pm, Piet van Oostrum wrote:
> > jayshree (j) wrote:
> >j> On Jul 21, 8:59 pm, Piet van Oostrum wrote:
> >>> The recipient_public_key.pem file is the public key of the recipient
> >>> which means the person that is going to receive the encrypted message.
> >>> You should get i
93 matches
Mail list logo