> 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
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
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
[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
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
"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
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
> >
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
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 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 !
>>
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.
--
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
>>
(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
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
>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, 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, 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
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
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 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 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__
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
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
Andy Terrel 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 __call__
> retval = self.fn.__ca
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
> architectures. I filed a bug report. It was closed, without a comment
>
Hi folks,
EasyExtend is a grammar based preprocessor generator and
metaprogramming system for Python written in Python. After reworking
an initial release for 11 months (!) it's time to present now
EasyExtend 2.0-alpha1.
You find EasyExtend on the projects homepage:
http://www.fiber-space.de/Eas
[EMAIL PROTECTED] wrote:
> I will give a simplified example of the problem at hand --
>
> I have a case in which I have two listboxes - listbox1 and listbox2,
> if I click on an item in listbox1 the item gets highlighted as
> expected. Now if I click on an item in listbox2 the selected item in
> l
On Thu, 03 May 2007 19:28:52 -0700, Andy Terrel wrote:
> I just need to keep the state around. I make a call to some function
> that is pretty expensive so I want to save it as a member during the
> __init__ of the decorator.
>
> Yeah I'm afraid it can't be done either, that's why I asked the gro
En Thu, 03 May 2007 10:15:52 -0300, <[EMAIL PROTECTED]> escribió:
> Thanks for the replyHow do i accept the filename is a
> parameter and avoid the error.Can you elaborate.
To get the arguments passed to the script, use sys.argv[]
Most introductory texts should cover it, like the Python t
Laurent Pointal <[EMAIL PROTECTED]> wrote:
...
> > It's an excellent quick-reference card, BTW (though I don't quite
> > understand why even-numbered pages are flipped upside-down).
>
> At work I print it on horizontal A4/USLetter, with recto-back, and with
> binding (reliure in french) on smal
I will give a simplified example of the problem at hand --
I have a case in which I have two listboxes - listbox1 and listbox2,
if I click on an item in listbox1 the item gets highlighted as
expected. Now if I click on an item in listbox2 the selected item in
listbox1 loses its highlight. My quest
En Thu, 03 May 2007 16:52:55 -0300, Mike <[EMAIL PROTECTED]> escribió:
> I was messing around with adding methods to a class instance at
> runtime and saw the usual code one finds online for this. All the
> examples I saw say, of course, to make sure that for your method that
> you have 'self' as
On Thu, 03 May 2007 18:27:12 -0700, noagbodjivictor wrote:
> I have a variable names actions in a module named qt_actions.py
>
> Well this is what I get:
import qt_actions
qt_actions.actions
> Traceback (most recent call last):
> File "", line 1, in
> AttributeError: 'module' object
On May 4, 6:39 am, [EMAIL PROTECTED] wrote:
> On May 3, 9:36 pm, Andy Terrel <[EMAIL PROTECTED]> wrote:
>
> > are you sure your variable isn't in some code block that wouldn't be
> > read on import? Such as:
>
> > if __name__ == "__main___":
> > actions = 1
>
> No Andy, I have not put the var
not quite as elegant but here is a workaround... Thanks Virgil for
taking some time to think about it.
---
class Bugger (object):
def __init__ (self, module):
print "Entering __init__"
self.module = module
self.verb = 0
def instrument (module_name):
def wrapper(f)
Andy Terrel <[EMAIL PROTECTED]> writes:
> I just need to keep the state around. I make a call to some function
> that is pretty expensive so I want to save it as a member during the
> __init__ of the decorator.
>
> Yeah I'm afraid it can't be done either, that's why I asked the group.
Have you lo
I just need to keep the state around. I make a call to some function
that is pretty expensive so I want to save it as a member during the
__init__ of the decorator.
Yeah I'm afraid it can't be done either, that's why I asked the group.
--
http://mail.python.org/mailman/listinfo/python-list
Nameless wrote:
> Why should I keep on learning lisp when there are python and perl?
Lisp compilers are much more advanced, for one thing.
Xah Lee wrote:
> (if there is some demand, i will add a concrept, little programing
> example, that shows, how lisp's symbols and macros concepts, set it
> ap
Roel Schroeven wrote:
>
> I might be wrong of course, but can't you just use atan2? Only problem
> is that it returns negative angles for quadrants 3 and 4, but that is
> easily solved. In Python:
>
> from math import atan2, pi, fmod
> def vectorAngle(x, y):
> return fmod(atan2(y, x) + 2*pi
On May 3, 7:49 pm, John Draper <[EMAIL PROTECTED]> wrote:
> I admit, Joomla is easy to use I admit, but very easy to vector into
> a root exploit.
I had no idea. Thank you for posting that.
One thing I really like about joomla is the 1600+ extensions. But, I
don't need those kinds of security
On May 3, 9: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
On May 3, 11:08 am, Bruno Desthuilliers wrote:
> I'm not sure integrating CakePHP stuff into something like Joomla or
> Drupal will be that easy.
I don't know either. But, there are projects called "jake" and "drake"
which are specifically geared toward intergrating cakephp with joomla
and drupa
walterbyrd wrote:
>If I wanted to build a website with forums, news feeds, galleries,
>event calander, document managment, etc. I do so in Joomla easily.
>
>But, I would perfer to use django/python, if that would be at all
>practical.
>
>I suppose I could put python scripts into django, if those s
On May 3, 9:33 pm, Virgil Dupras <[EMAIL PROTECTED]> wrote:
> On May 3, 9: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 "decorators
On May 3, 9:36 pm, Andy Terrel <[EMAIL PROTECTED]> wrote:
> are you sure your variable isn't in some code block that wouldn't be
> read on import? Such as:
>
> if __name__ == "__main___":
> actions = 1
No Andy, I have not put the variable in any code block
--
http://mail.python.org/mailman
On Thu, 03 May 2007 18:08:31 -0500, quasi <[EMAIL PROTECTED]> wrote:
>On Fri, 04 May 2007 09:37:37 +1200, Gib Bogle
><[EMAIL PROTECTED]> wrote:
>
>>Ah, so the firefighters were in on the conspiracy!
>
>No, but the firefighters are very much aware that there is more to
>9/11 than has been officiall
are you sure your variable isn't in some code block that wouldn't be
read on import? Such as:
if __name__ == "__main___":
actions = 1
--
http://mail.python.org/mailman/listinfo/python-list
On May 3, 9: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
Oh I should mention the decorator needs to have some notion of state
(such as with the above class)
--
http://mail.python.org/mailman/listinfo/python-list
I have a variable names actions in a module named qt_actions.py
Well this is what I get:
>>> import qt_actions
>>> qt_actions.actions
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'module' object has no attribute 'actions'
--
http://mail.python.org/mailman/listinfo/py
On 3 May 2007 08:53:39 -0700, malibu <[EMAIL PROTECTED]> wrote:
>On May 3, 12:18 am, Eric Gisse <[EMAIL PROTECTED]> wrote:
>> On May 2, 10:14 pm, malibu <[EMAIL PROTECTED]> wrote:
>>
>> > On May 2, 9:46 pm, Eric Gisse <[EMAIL PROTECTED]> wrote:
>>
>> > > On May 2, 7:10 pm, Midex <[EMAIL PROTECTED]
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 __call__
retval = self.fn.__call__(*args,**kws)
TypeError: update()
On Thu, 03 May 2007 10:38:31 -0700, J wrote:
> Greetings Group-
>
> I'm trying to put together a pattern matching script that scans a
> directory tree for tif images contained in similar folder names, but
> running into a NewB problem already. Is it the way I'm trying to join
> multiple paths? An
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 !
>
>Graham
>
You're an utter retard
On May 3, 8:24 pm, [EMAIL PROTECTED] wrote:
> On May 3, 8:01 pm, [EMAIL PROTECTED] wrote:
>
> > On May 3, 8:00 pm, [EMAIL PROTECTED] wrote:
>
> > > >>> s = ['a','b']
> > > >>> s
> > > ['a', 'b']
>
> > > This is what I want so that I can put it in a module then import that
> > > module to work with
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've found
good words about it (http://www.linuxjournal.com/article/2986), but
On May 3, 8:01 pm, [EMAIL PROTECTED] wrote:
> On May 3, 8:00 pm, [EMAIL PROTECTED] wrote:
>
> > >>> s = ['a','b']
> > >>> s
> > ['a', 'b']
>
> > This is what I want so that I can put it in a module then import that
> > module to work with my variable.
>
> Sorry for that typo in the title...
I foun
On May 3, 8:00 pm, [EMAIL PROTECTED] wrote:
> >>> s = ['a','b']
> >>> s
> ['a', 'b']
>
> This is what I want so that I can put it in a module then import that
> module to work with my variable.
Sorry for that typo in the title...
--
http://mail.python.org/mailman/listinfo/python-list
>>> s = ['a','b']
>>> s
['a', 'b']
>>>
This is what I want so that I can put it in a module then import that
module to work with my variable.
--
http://mail.python.org/mailman/listinfo/python-list
On Thursday 03 May 2007 01:10, SamG wrote:
> If anyone has a x86_64 machine and is running a 32bit OS on top of
> that could you tell me what output would you get for the following
> program
>
> #==
> import platform
> print platform.processor()
> print platform.architectu
On May 3, 7:50 pm, André <[EMAIL PROTECTED]> wrote:
> On May 3, 8:43 pm, [EMAIL PROTECTED] wrote:
>
> > I'm filling an array with user input, I want an empty string to be
> > returned when nothing is entered; ie return key hit twice... How do I
> > do that?
>
> use raw_input(), not input(). input(
On May 3, 8:43 pm, [EMAIL PROTECTED] wrote:
> I'm filling an array with user input, I want an empty string to be
> returned when nothing is entered; ie return key hit twice... How do I
> do that?
use raw_input(), not input(). input() attempts to evaluate the
result, assuming it is a valid python
I'm filling an array with user input, I want an empty string to be
returned when nothing is entered; ie return key hit twice... How do I
do that?
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] schrieb:
> Hello!
>
> If I do
>
> import uno
> localContext=uno.getComponentContext()
>
> then localContext is of type
> I guess it's a new type provided by PyUNO extension.
> localContext.__class__ is None
> Is there any way to list all methods of that new type, via Python C
On May 4, 12:26 am, Josef Dalcolmo <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have tried this only on Windows XP.
>
> in Python 2.4 os.path.getmtime() used to return an integer representing
> the local time.
The docs say "seconds since the epoch". Noting that the epoch is
usually defined with refer
On May 3, 10:52 pm, Mike <[EMAIL PROTECTED]> wrote:
> I was messing around with adding methods to a class instance at
> runtime and saw the usual code one finds online for this. All the
> examples I saw say, of course, to make sure that for your method that
> you have 'self' as the first parameter.
On Fri, 04 May 2007 09:37:37 +1200, Gib Bogle
<[EMAIL PROTECTED]> wrote:
>Ah, so the firefighters were in on the conspiracy!
No, but the firefighters are very much aware that there is more to
9/11 than has been officially revealed.
This is even more true at Pentagon. The firefighters there broug
On May 4, 3:40 am, [EMAIL PROTECTED] wrote:
> On Thu, May 03, 2007 at 10:28:34AM -0700, [EMAIL PROTECTED] wrote:
> > On May 3, 10:12 am, [EMAIL PROTECTED] wrote:
> > > On Thu, May 03, 2007 at 09:57:38AM -0700, fscked wrote:
> > > > > As Larry said, this most likely means there are null bytes in the
Terry Reedy wrote:
> "John Nagle" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> | Ben Collver wrote:
> || > from the person who closed it. I get the unspoken message: bug
> reports
> | > are not welcome.
>
> | Getting through the process requires a year or so.
>
> Ben got a
>>> "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 some value got cast incorrectly at some point,
breaking subsequent computation
[EMAIL PROTECTED] schrieb:
> I am on a hp 11.11 machine doing a 64 bit python 2.5 build. When I get
> my python executable created and run it, I get the error:
>
> "import site failed"
> OverflowError: signed integer is greater than the maximum.
Are you sure about the error message? That error is
I do see one problem there...
if __name__ == 'main':
t = nBaseTest('nBaseTest')
t.logon()
That should be:
if __name__ == "__main__":
t = nBaseTest('nBaseTest')
t.logon()
It should be like that in both files.
--
http://mail.python.org/mailman/listinfo/python-list
Dave Borne wrote:
Let's suppose
s='12345 4343 454'
How can I replace the last '4' character?
If the last '4' will not always be the last character in the string,
you could do:
'X'.join(s.rsplit('4',1))
from string import rfind
def replaceLast_X_with_Y( s, x, y ):
lastX =
Ah, so the firefighters were in on the conspiracy!
--
http://mail.python.org/mailman/listinfo/python-list
At Amd Turion 64, it gives:
('32bit', 'ELF')
--
http://mail.python.org/mailman/listinfo/python-list
On May 3, 9:44 am, Johny <[EMAIL PROTECTED]> wrote:
> On May 3, 4:37 pm, [EMAIL PROTECTED] wrote:
>
>
>
> > On May 3, 9:27 am, Johny <[EMAIL PROTECTED]> wrote:
>
> > > Let's suppose
> > > s='12345 4343 454'
> > > How can I replace the last '4' character?
> > > I tried
> > > string.replace(s,s[len(s
Hi,
Currently i am developing a python script that will be executed in Gnome.
This script uses the PyGTK library, however i have a question: How can I
make my application to remember the last window size when it was closed?
This behavior is natural for the majority of Gnome applications (i think)
* Paul Boddie (3 May 2007 07:27:11 -0700)
> On 3 Mai, 15:49, Ben Collver <[EMAIL PROTECTED]> wrote:
> > I installed Cygwin on a Windows machine. I try to quit from an
> > interactive Python session. It tells me that on my platform, I must
> > press Control-Z to exit. I press Control-Z and it mak
"Ben Collver" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
|I rewrote my code in Python and I found myself running into many of the
| same hassles that I run into with other languages: inaccurate and
| incomplete documentation, a maze of little platform-specific quirks to
| work ar
"John Nagle" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Ben Collver wrote:
|| > from the person who closed it. I get the unspoken message: bug
reports
| > are not welcome.
|
| That's the problem with bug reporting systems which let developers
| close bugs arbitrarily.
I
On May 3, 5:20 am, hg <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have started to work on a python-based robot, and am interested in your
> feedback:
>
> http://realtimebattle.sourceforge.net/www.snakecard.com/rtb
>
> hg
This is not necessarily a response to your effort, but just a note
(rant) about re
On May 3, 2:03 pm, John Salerno <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > On May 2, 3:49 pm, Basilisk96 <[EMAIL PROTECTED]> wrote:
> >> A simple
>
> >> if s:
> >> print "not empty"
> >> else:
> >> print "empty"
>
> >> will do.
>
> > How do you know that s is a string?
>
> Se
> Let's suppose
> s='12345 4343 454'
> How can I replace the last '4' character?
If the last '4' will not always be the last character in the string,
you could do:
'X'.join(s.rsplit('4',1))
-Dave
--
http://mail.python.org/mailman/listinfo/python-list
hlubenow wrote:
> There's even another approach: ...
On the other hand you may be better off with the "mysql-python"-module.
Anyway, here's a nice overview over the most commonly used MySQL-commands
(The commands should speak for themselves, even if the explanations are in
German):
http://www.l
Mike wrote:
> I was messing around with adding methods to a class instance at
> runtime and saw the usual code one finds online for this. All the
> examples I saw say, of course, to make sure that for your method that
> you have 'self' as the first parameter. I got to thinking and thought
> "I have
In the above example 'addm' should be 'AddMethod'
superdict = AddMethod(dict(), lambda self, d:
myUtils.HasDrive(d),"hasdrive")
--
http://mail.python.org/mailman/listinfo/python-list
HMS Surprise wrote:
> Greetings,
>
> I need to peform some simple queries via MySQL. Searching the list I
> see that folks are accessing it with python. I am very new to python
> and pretty new to MySQL too. Would appreciate it if you could point me
> to some documentation for accessing MySQL via
James Stroud wrote:
> miah_gbg wrote:
>
>> Hi there!
>>
>> Just wanted to let people know in this group that I have recently
>> (April 24th) published an introductory article on wxPython and Mac OS
>> X. It is available here: http://www.macdevcenter.com/
>>
>> Hope someone finds it useful.
>>
>> R
I was messing around with adding methods to a class instance at
runtime and saw the usual code one finds online for this. All the
examples I saw say, of course, to make sure that for your method that
you have 'self' as the first parameter. I got to thinking and thought
"I have a lot of arbitrary me
miah_gbg wrote:
> Hi there!
>
> Just wanted to let people know in this group that I have recently
> (April 24th) published an introductory article on wxPython and Mac OS
> X. It is available here: http://www.macdevcenter.com/
>
> Hope someone finds it useful.
>
> Regards,
>
> Jeremiah
>
N
Xah Lee <[EMAIL PROTECTED]> writes:
> (if there is some demand, i will add a concrept, little programing
No. There ain't.
- M
--
http://mail.python.org/mailman/listinfo/python-list
miah_gbg wrote:
> Hi there!
>
> Just wanted to let people know in this group that I have recently
> (April 24th) published an introductory article on wxPython and Mac OS
> X. It is available here: http://www.macdevcenter.com/
>
> Hope someone finds it useful.
>
> Regards,
>
> Jeremiah
>
F
Hello!
If I do
import uno
localContext=uno.getComponentContext()
then localContext is of type
I guess it's a new type provided by PyUNO extension.
localContext.__class__ is None
Is there any way to list all methods of that new type, via Python C
API or through interpreter (other then dir(localC
Hi,
I have started to work on a python-based robot, and am interested in your
feedback:
http://realtimebattle.sourceforge.net/
www.snakecard.com/rtb
hg
--
http://mail.python.org/mailman/listinfo/python-list
Nameless wrote:
«
Python has readable syntax, a huge library, and bindings for what
seems like every major in linux. Perl has CPAN. It seems with those
languages if you want to do something all you have to do is import
functionality from a library someone had written and use that.
In lisp you'd ha
[EMAIL PROTECTED] wrote:
> On May 2, 3:49 pm, Basilisk96 <[EMAIL PROTECTED]> wrote:
>> A simple
>>
>> if s:
>> print "not empty"
>> else:
>> print "empty"
>>
>> will do.
>
> How do you know that s is a string?
Seems like a fair assumption given the OP's question and example.
--
http://ma
[EMAIL PROTECTED] wrote:
> I'm guessing that your file is in UTF-16, then -- Windows seems to do
> that a lot. It kind of makes it *not* a CSV file, but oh well. Try
>
> print open("test.csv").decode('utf-16').read().replace("\0",
> ">>>NUL<<<")
>
> I'm not terribly unicode-savvy, so I'll
On May 3, 1:29 pm, Dave Lim <[EMAIL PROTECTED]> 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 CO
André wrote:
> Fortunately, Python has incorporated some newbie-unfriendly features,
> like metaclasses and, to a lesser extent, decorators which, at last,
> make use of a special character. There should be more of these, to
> make Python something more challenging to learn.
After reading the en
John Machin wrote:
> On May 3, 8:55 am, Steven D'Aprano
> <[EMAIL PROTECTED]> wrote:
>> On Wed, 02 May 2007 15:03:24 -0700, Tobiah wrote:
>>
>>> >>> elegant_solution([1,2,3,4,5,6,7,8,9,10])
>>> [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]]
>> Wow! That's impressive. What version of Python are you usin
1 - 100 of 223 matches
Mail list logo