ew exception message is written somewhere
> within the standard library. It would not be very sustainable, even more so
> if you consider that CPython development is mostly volunteer-driven efforts.
>
> Regards,
> Kyle Stanley
>
> On Thu, Oct 1, 2020 at 3:18 PM Luis Gustavo Ar
cs.python.org/3/library/exceptions.html) I only
can check the type error.
[]s
Em qui., 1 de out. de 2020 às 15:59, Luis Gustavo Araujo <
luisaraujo.i...@gmail.com> escreveu:
> Hi,
> Is it possible to get the list of all error messages that display in
> Python? I want th
Awesome guys! Thank you very much!
I ended up using "binary_form=True" and using M2Crypto to parse the cert.
Cheers,
g.
On Thu, Aug 16, 2012 at 4:48 AM, Antoine Pitrou wrote:
>
> Hello,
>
> Gustavo Baratto gmail.com> writes:
> >
> > SSL.Socket.g
Hello there,
SSL.Socket.getpeercert() doesn't return essential information present in
the client certificate (issuer, serial number, not before, etc), and it
looks it is by design:
http://docs.python.org/library/ssl.html#ssl.SSLSocket.getpeercert
http://hg.python.org/cpython/file/b878df1d23b1/Mod
On Apr 6, 7:28 pm, Chris Colbert wrote:
> the proof is in the pudding:
>
> In [1]: a = range(1)
>
> In [2]: s = set(a)
>
> In [3]: s2 = set(a)
>
> In [5]: b = range(1)
>
> In [6]: a == b
> Out[6]: True
>
> In [7]: s == s2
> Out[7]: True
>
> In [8]: %timeit a == b
> 1000 loops, best of 3: 2
to compare them as sets. And as a consequence, the more
equivalent elements two collections have, the faster it is to compare
them as lists.
Is this correct?
This is why so many people advocate the use of sets instead of lists/
tuples in similar situations, right?
Cheers,
- Gustavo
Hello,
I'm trying to call WNetGetUniversalNameW via the ctypes module but I'm
only causing the interpreter to crash. Unfortunately I don't have much
experience with the ctypes module and I'm still trying to figure it
out. I've searched for a solution to no avail. My confusion is
centered around th
Hi you can generate the WSDl with soaplib [1], and you can view web.py or django
for this:
for web.py -> http://webpy.org/cookbook/webservice
for django -> http://www.djangosnippets.org/snippets/979/
[1]=> http://trac.optio.webfactional.com/
> Hi all
> Newbie in Python, i am looking for some
Hi, everyone.
OK, I got it now! The value of the hash is not decisive, as __eq__
will still be called when the hashes match. It's like a filter, for
performance reasons.
It's really nice, I just tried it and it worked.
Thank you very, very much!!
Cheers,
- Gustavo
I guess I'll have to use something like the function of my first
post. :(
Thanks,
- Gustavo.
--
http://mail.python.org/mailman/listinfo/python-list
Hello, everyone.
I've noticed that if I have a class with so-called "rich comparison"
methods
(__eq__, __ne__, etc.), when its instances are included in a set,
set.__contains__/__eq__ won't call the .__eq__ method of the elements
and thus
the code below:
"""
obj1 = RichComparisonClass()
obj2 = Ric
Thank you very much, Gabriela and Peter!
I'm going for Pyparsing. :)
-- Gustavo.
--
http://mail.python.org/mailman/listinfo/python-list
Hello, everybody.
I need to evaluate boolean expressions like "foo == 1" or "foo ==1 and
(bar > 2 or bar == 0)" which are defined as strings (in a database or
a plain text file, for example). How would you achieve this?
These expressions will contain placeholders for Python objects (like
"foo" an
On Feb 16, 5:18 pm, Michele Simionato
wrote:
> On Feb 16, 4:59 pm, Gustavo Narea wrote:
>
>
>
> > I've not seen anything special in Pylons or TurboGears 2 decorators,
> > except that they are all functions that use the decorator package --
> > while my decora
On Feb 16, 4:59 pm, Gustavo Narea wrote:
> On Feb 16, 4:40 pm, Michele Simionato
> wrote:
>
>
>
> > > It was broken from the beginning on Pylons.
>
> > > I'm a TurboGears 2 core developer, and TurboGears is powered by Pylons
> > > as of versio
On Feb 16, 4:40 pm, Michele Simionato
wrote:
> > It was broken from the beginning on Pylons.
>
> > I'm a TurboGears 2 core developer, and TurboGears is powered by Pylons
> > as of version 2. The decorator has always worked in TurboGears because
> > of the way TG finds the action arguments, but now
On Feb 16, 4:18 pm, Michele Simionato
wrote:
> Yes, I am saying don't mess with the internal mechanism of Pylons and
> leave it as
> it was. Or was it broken from the beginning? The only reason I see for
> you
> to touch those things is if you are a Pylons core developer.
It was broken from the b
On Feb 16, 3:56 pm, Michele Simionato
wrote:
> On Feb 16, 3:50 pm, Gustavo Narea wrote:
>
> > On Feb 14, 3:27 pm, Michele Simionato
> > wrote:
>
> > > I lack the context to see how this could be fixed in your case, but
> > > this a not a show stopper, y
t how can I do that?
Thanks for all the time you've spent on this, Michele.
- Gustavo.
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 14, 6:38 am, Michele Simionato
wrote:
> On Feb 14, 12:56 am, Gustavo Narea wrote:
>
>
>
> > Hello, everybody.
>
> > I have this signature-changing decorator
> > <http://paste.chrisarndt.de/paste/15aac02a90094a41a13a1b9b85a14dd6>
> > which I
>
this error:
http://paste.chrisarndt.de/paste/33e06be6e6d74e49b05c45534dfcc9fe?wrap=no
What am I doing wrong? I think it looks like this example:
http://pypi.python.org/pypi/decorator#async
Thanks in advance.
- Gustavo.
PS: functols.wrap is not an option because my code has to work with
Pyt
; testMethod = getattr(self, self._testMethodName)
> AttributeError: 'TestDatabaseGrandChildTesting' object has no
> attribute '_testMethodName'
Isn't it possible to use grand-grandchildren of unittest.TestCase?
Please use this file to reproduce it: http://paste.
nsport()
p.set_proxy('9.47.67.150:3128')
server = xmlrpclib.Server('https://ftp3.linux.ibm.com/rpc/index.php',
transport=p)
print server.user.ingroup("username", "group")
---
The Result:
xmlrpclib.ProtocolError:
The method i'm calling is &q
[EMAIL PROTECTED] ha scritto:
> Seeing the 7DRL start up recently, i wanted to see what one was made
> of. Python is the language i'm most familiar with so i searched for
> some code to look at, but i couldn't find any. Can anyone direct me to
> the right place?
>
> I did some searching on what it
On 4/1/07, Gustavo Carneiro <[EMAIL PROTECTED]> wrote:
On 4/1/07, Georg Brandl <[EMAIL PROTECTED]> wrote:
[...]
> Example
> ===
>
> This is the standard ``os.path.normpath`` function, converted to type
> declaration
> syntax::
>
> def normpathƛ(p
hat Python should support type annotations, but they should be
optional and only present at the function interfaces, i.e. specify the type
in the function parameter lists, like in plain old C.
+1 from me for allowing unicode identifiers.
-MAXVOTE for type annotations in identifiers.
--
Gustavo J. A. M. Carneiro
"The universe is always one step beyond logic."
--
http://mail.python.org/mailman/listinfo/python-list
year,
using Western, Orthodox or Julian algorithms;
* More than 450 test cases.
Where to get it?
http://labix.org/python-dateutil
--
Gustavo Niemeyer
http://niemeyer.net
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 2005-09-17 at 23:34 -0500, Gustavo Picon wrote:
> Maybe something like this?
>
> class music(object):
> def __init__(self):
> self.lst = {}
> def __setattr__(self, name, value):
> self.__dict__[name] = value
>
> array = []
> array.
usic())
array.append(music())
# begin quoting your code
array[0].artist = 'genesis'
array[0].album = 'foxtrot'
array[0].songs = ['watcher', 'time table', 'friday']
array[1].artist = 'beatles'
array[1].album = 'abbey road'
array[1]
> ipFile.close()
>
You should be using different variables in that algorithm, because you
are concatenating strings to "mySET" over and over again.
A more efficient approach would be something like:
def findIPs():
ip = 0
while ip < 256**4:
print '.'.jo
> How can I print a word without appending a newline character? Appending
> a "," to the print statement only substitutes the newline for a space,
> which is not what I am looking for.
>
Try with:
print ''.join(str(foo) for foo in range(3))
or sys.stdout.write
world timezone information based on
Olson's database.
* Computing of Easter Sunday dates for any given year,
using Western, Orthodox or Julian algorithms;
* More than 400 test cases.
Where to get it?
https://moin.conectiva.com.br/DateUtil
--
Gustavo Niemeyer
ive backtracking solver
- Minimum conflicts solver
Predefined constraint types currently available:
- FunctionConstraint
- AllDifferentConstraint
- AllEqualConstraint
- ExactSumConstraint
- MaxSumConstraint
- MinSumConstraint
- InSetConstraint
- NotInSetConstraint
- SomeInSetConstraint
- SomeNotInS
pired me to write that module. IIRC, there's
also some kind of constraint code in Python by one of the book
authors (Peter Norvig). For those who are interested, chapter 5,
which talks about CSPs, may be found in the web site.
> Gustavo, maybe we should coordinate and merge our efforts?
Prob
ive backtracking solver
- Minimum conflicts solver
Predefined constraint types currently available:
- FunctionConstraint
- AllDifferentConstraint
- AllEqualConstraint
- ExactSumConstraint
- MaxSumConstraint
- MinSumConstraint
- InSetConstraint
- NotInSetConstraint
- SomeInSetConstraint
- SomeNotInS
> To reply to the last part of the discussion and esspecially to Gustavo
> Niemeyer, I really apriciate the way in which I had been answered. And
> I won't have any questions about the re module that I had before I
> post this threat.
Great! As I said, that's a nic
oup takes an argument, anyway).
That's what I love in that news group. Someone comes with a
stupid and arrogant question, and someone else answers in a
calm and reasonable way.
Thanks Erik.
--
Gustavo Niemeyer
http://niemeyer.net
--
http://mail.python.org/mailman/listinfo/python-list
Swaroop C H wrote:
On Mon, 28 Mar 2005 17:26:14 +0800, Su Wei <[EMAIL PROTECTED]> wrote:
i have a project want to develop with python.
who can tell me that how to apply "mvc" pattern to gui-design in python.
please give me some advices!
ths in advanced.
This may help you:
http://pygtkmvc.sourcefo
- Changed weekday to spell the not-set n value as None
instead of 0.
- Fixed other reported bugs.
[1] http://www.twinsun.com/tz/tz-link.htm
--
Gustavo Niemeyer
http://niemeyer.net
--
http://mail.python.org/mailman/listinfo/python-list
Hi
On redhat you can use a libuser module that provides some highlevel
system tasks.
redhat-tools use this module all the time.. look at some sources
Gustavo
morphex wrote:
Hi there,
does anyone here know of a script that enables adding of users on UNIX
platforms via python?
Thanks,
Morten
amer so if possible detailed
explanations are appreciated :)
Thanks
Gustavo
--
http://mail.python.org/mailman/listinfo/python-list
tion use the "*" character and
> to do a Regular Expression search inside a Python code?
>>> import fnmatch
>>> fnmatch.fnmatch("myfilename", "*yf*nam*")
True
>>> fnmatch.translate("*")
'.*$'
>>> fnmatch.translate("?yf*nam?")
'.yf.*nam.$'
--
Gustavo Niemeyer
http://niemeyer.net
--
http://mail.python.org/mailman/listinfo/python-list
> Is there any news regarding Python on the Palm OS front?
As an interesting side effect of the recently announced PalmOS
on Linux, porting Python for that platform will become a lot
easier, hopefully. If only I could find Tim's time-machine and
bring a unit from the future. ;-)
--
Thomas Heller wrote:
Gerrit <[EMAIL PROTECTED]> writes:
Cameron Laird wrote:
Subject: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 2)
What is the frequency of the weekly Python-URL? (-;
According to the name, about 1.6 µHz.
Thomas
NOW you've done it!!
Made me s
Steve Holden wrote:
Gustavo Córdova Avila wrote:
Actually the op did mention that he wanted to monitor files.
As was pointed out to me when I made the same assertion, he actually
said "file object which is stdin" or something like that, which means
the object could be a socket, a pipe,
indeed talking about a pipe or something that
really can block, and you call fileobject.read(1024),
it will block until it gets 1024 bytes.
Donn Cave, [EMAIL PROTECTED]
Actually the op did mention that he wanted to monitor files.
--
Gustavo Córdova Avila <[EMAIL PROTECTED]>
<mailto:[EMAI
't this still block if the input just happened to end at a
multiple of the read size (1024)?
-- David
No, it'll read up to 1024 bytes or as much as it can, and
then return an apropriatly sized string.
--
Gustavo CÃrdova Avila <[EMAIL PROTECTED]>
<mailto:[EMAIL PROTECTE
Brad Tilley wrote:
Matt Gerrans wrote:
Anyway, what's to worry about?When the time comes just whip out a
little script that converts Python 1.6 (or whatever you like) to
Python3K; it will only take seven lines of P3K code.
How about 'import classic'
from past import python23
th embeded comments ! */
#endif
Rob.
Actually, it's infinitly [sp?] more defficient
(contrary of efficient?) than triple-quoted strings
or line-by-line comments, because those two never
make it to execution stage, because they're dropped
by the compiler. :-)
--
Gustavo Córdova Avi
ines of code: triple-quoted strings.
Strings which are unassigned in a source file are dropped
by the compiler, so they don't make it to the execution
stage; they're nice that way.
--
Gustavo Córdova Avila <[EMAIL PROTECTED]>
<mailto:[EMAIL PROTECTED]>
*Tel:* +52 (81) 8130-1919 ext
nt.
:) This cannot be the whole truth otherwise they wouldn't release
embarrasing binaries.
BWAAHHAHAHA!!!
Damn you!! Coke is so hard to clean off a keyboard!!
Good laugh, thankyou so much :-D
--
Gustavo CÃrdova Avila <[EMAIL PROTECTED]>
<mailto:[EMAIL PROTECTED]>
*Tel:* +52 (81) 813
Does anybody have an Arch archive with the current python source I could
slurp it from?
Thanks in advance :-)
--
Gustavo Córdova Avila <[EMAIL PROTECTED]>
<mailto:[EMAIL PROTECTED]>
*Tel:* +52 (81) 8130-1919 ext. 127
Integraciones del Norte, S.A. de C.V.
Padua #6047, Colonia Satéli
52 matches
Mail list logo