On May 4, 3:21 am, Stargaming <[EMAIL PROTECTED]> wrote:
> What's wrong about `dir()`?
> x = MyClass()
> x.f()
I want to cashe pointers to Python functions in a non-Python app.
'dir()' requires an argument, and I want to get function pointers
before I have any variable of given type or class.
That
On Wed, 2007-05-02 at 13:45 -0800, Joshua J. Kugler wrote:
> On Wednesday 02 May 2007 12:05, Tobiah wrote:
>
> >
> >> In addition to the above good advice, in case you are submitting a query
> >> to a DB-API compliant SQL database, you should use query parameters
> >> instead of building the quer
En Thu, 03 May 2007 12:41:00 -0300, Brian Blais <[EMAIL PROTECTED]>
escribió:
> I am trying to organize some of my code, and am having a little trouble
> with the import logic. I find I often have something like:
>
> MyPackage/
> Part1/ # wants to use functions in Common/
> __init__
En Thu, 03 May 2007 21:23:42 -0300, Joshua J. Kugler
<[EMAIL PROTECTED]> escribió:
> I found http://dustman.net/andy/python/HyperText, but it's not listed in
> Cheeseshop, and its latest release is over seven years ago. Granted, I
> know HTML doesn't change (much) but it's at least nice to know
En Thu, 03 May 2007 09:41:57 -0300, vml <[EMAIL PROTECTED]> escribió:
> On 3 mai, 14:20, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
>> En Thu, 03 May 2007 04:54:43 -0300, vml <[EMAIL PROTECTED]>
>> escribió:
>>
>> > I have a python com object which contains a method to inverse an array
>> > i
En Fri, 04 May 2007 01:34:20 -0300, <[EMAIL PROTECTED]> escribió:
> I'm not against 'dir(MyClass)'; the question is, what should I 'dir()'
> to get methods of 'pyuno' type instance?
Usually instances don't have its own methods, they get them from the
class. So you actually need dir(MyClass).
No
On May 3, 2:54 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> >>> "import site failed"
> >>> OverflowError: signed integer is greater than the maximum.
> >> - what is the value of ival?
> > ival: 4294967295
>
> I see. This is 0x, which would be -1 if it were of type
> int. So perhaps so
On May 3, 9:27 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Thu, 03 May 2007 10:49:26 -0300, Ben Collver <[EMAIL PROTECTED]>
> escribió:
>
> > I tried to write portable Python code. The zlib CRC function returned
> > different results on architectures between 32 bit and 64 bit
> >
>On May 3, 1:29 pm, Dave Lim
wrote:
>> Hello, this is my first time in the mailing list so
>> bear with me.
>>
>> Basically what I did was I followed this
site:http://surguy.net/articles/speechrecognition.xml
>>
>> So I installed microsoft speech SDK 5.1 and then
used
>> pythonwin COM MakePy utili
On May 3, 7:21 pm, Andy Terrel <[EMAIL PROTECTED]> wrote:
> Okay does anyone know how to decorate class member functions?
>
> The following code gives me an error:
>
> Traceback (most recent call last):
> File "decorators2.py", line 33, in
> s.update()
> File "decorators2.py", line 13, in
(I apologize if some similar version of this message has already
appeared; I've tried several time to post it, seemingly without
success.)
> If that is satisfactory, well and good. However, there
> is a possibility that you may lose some settings that you would
> prefer to keep. The termin
Elliot Peele <[EMAIL PROTECTED]> wrote:
>On Tue, 2007-05-01 at 19:27 -0700, 7stud wrote:
>> On May 1, 7:36 pm, Elliot Peele <[EMAIL PROTECTED]> wrote:
>> > Why does os.path.join('/foo', '/bar') return '/bar' rather than
>> > '/foo/bar'? That just seems rather counter intuitive.
>> >
>> > Elliot
>>
tmp123 <[EMAIL PROTECTED]> wrote:
>
>After review the "struct" documentation, it seems there are no option
>to pack/unpack zero terminated strings.
Right. Just as there is no way to describe such a thing as a C struct.
You'll have to unpack the fields by hand, which is that case won't be hard.
--
The Great Attractor wrote:
> On Thu, 03 May 2007 13:53:39 +0100, Eeyore
> <[EMAIL PROTECTED]> wrote:
>
>>
>> Peter Webb wrote:
>>
Ask yourself WHY havn't I seen this footage before?
>>> OK, why haven't you seen this footage before?
>> Nice response !
>>
It is not possible to index set objects. That is OK.
But, what if I want to find some element from the Set.
from sets import Set
s = Set( range(12 )
if I do pop, that particular element gets removed.
I do not want to remove the element, but get some element
from the Set.
s.some_element() # Is n
The code in urllib.quote fails on Unicode input, when
called by robotparser.
That bit of code needs some attention.
- It still assumes ASCII goes up to 255, which hasn't been true in Python
for a while now.
- The initialization may not be thread-safe; a table is being initial
On May 3, 10:08 am, "Alan Isaac" <[EMAIL PROTECTED]> wrote:
> "Alex Martelli" <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
>
> > Very simply, PEP 328 explains:
> > """
> > Relative Imports and __name__
>
> > Relative imports use a module's __name__ attribute to determine that
> >
"Joshua J. Kugler" <[EMAIL PROTECTED]> wrote:
>
>I realize that in today's MVC-everything world, the mere mention of
>generating HTML in the script is near heresy, but for now, it's what I ened
>to do. :)
>
>That said, can someone recommend a good replacement for HTMLGen?
I used to be a huge fan o
How we do if find that python that we are using is compiled with the --
enable-shared option. There is can actually be done using
distutils.sysconfig module but this modules is ported only with python-
devel but not with standard python install.
Is there another way apart from checking the
[EMAIL PROTECTED] wrote:
> It is not possible to index set objects. That is OK.
> But, what if I want to find some element from the Set.
>
> from sets import Set
> s = Set( range(12 )
>
> if I do pop, that particular element gets removed.
> I do not want to remove the element, but get some eleme
On May 2, 6:08 am, Carsten Haese <[EMAIL PROTECTED]> wrote:
> On Tue, 2007-05-01 at 22:21 -0700, Michael wrote:
> > Is there a reason for using the closure here? Using function defaults
> > seems to give better performance:[...]
>
> It does? Not as far as I can measure it to any significant degree
On Thu, 03 May 2007 23:08:33 -0700, [EMAIL PROTECTED] wrote:
> It is not possible to index set objects. That is OK.
> But, what if I want to find some element from the Set.
>
> from sets import Set
> s = Set( range(12 )
>
> if I do pop, that particular element gets removed.
> I do not want to re
> I do not want to remove the element, but get some element
> from the Set.
. . .
> Is there a way to do this. I am doing it like this:
>
> for x in s: break
>
> Now x is /some_element/ from s.
That is one way to do it. Another is to write:
x = iter(s).next()
One more approach:
x = s.po
201 - 223 of 223 matches
Mail list logo