Thank you for a possible solution, but it's not what I'm looking for,
cause something like would look quite similar... for
big elements like robot it would be ok to use comment as a child of
element - but imagine I'd like to comment transformation:
I wouldn't like to make this
element parent of
Python programmer wantedOur fast-growing team of software developers is currently looking for a (junior) Python programmer to assist in the development of our core technology.To extend the core team we're looking for a talented individual with specifically:thorough knowledge of Linux and Pythonexpe
I have a problem in uploading a file.
The input tag looks like and the form tag looks like.
But still after form submission I don’t get the file
data. Debugging shows that the input field is being taken as a MinifieldStorage
instead of FieldStorage.
Thanks in advance for any
Ben Finney wrote:
[snip]
>
> Please don't write C in Python. The 'for' statement allows iteration
> directly over a sequence, no need to maintain an index. Also, the
> modulus operator is called for with your cycling of the pile index.
>
> pile_index = 0
> for card in deck:
>
What is the best way to do data source abtraction? For example have
different classes with the same interface, but different
implementations.
I was thinking of almost having classA as my main class, and have
classA dynamically "absorb" classFood into to based on the extension
of the input file rec
"Gerard Flanagan" <[EMAIL PROTECTED]> writes:
> Ben Finney wrote:
> > pile_index = 0
> > for card in deck:
> > piles[pile_index].append(card)
> > pile_index = (pile_index + 1) % numpiles
> >
>
> no need to maintain an index ;-)
>
> piles = [ list()
Gerard Flanagan wrote:
> Ben Finney wrote:
>> pile_index = 0
>> for card in deck:
>> piles[pile_index].append(card)
>> pile_index = (pile_index + 1) % numpiles
>>
>
> no need to maintain an index ;-)
>
> piles = [ list() for _ in range(n) ]
>
> replace console=[... by windows=[... in your setup.py
Works perfect. Thank you, Rony!
--
http://mail.python.org/mailman/listinfo/python-list
Metalone wrote:
> I would like to call
> windll.user32.SendMessageA(hwnd, win32con.WM_COMMAND, wParam, lParam)
> where
> lParam represents a pointer to an object.
and the others?
>
> And also convert this pointer back to an object reference inside of
> wnd_proc
> def wnd_proc(hwnd, msg, wParam,
Arthur Pemberton enlightened us with:
> What is the best way to do data source abtraction?
That depends on your data source. For files, file-like objects are an
abstraction. For databases there is PEP 249.
> I was thinking of almost having classA as my main class, and have
> classA dynamically "a
If we could go back to emacs again for a second...
I'm still using emacs but have been playing with a few other ide's
(wing, komodo + pydev) are the ones i've given a go recently.
However I still end up coming back to emacs for what I consider to be
emacs mode's piece of 'killer functionality', (
> Can anyone tell me a good python editor/IDE?
> It would be great if you can provide the download link also.
WingIDE is very good.
It gives very nice completions and has a nice thing called "source
assistant" that shows the help of the function you're standing on and
etc.
But I don't think it's o
[placid]
| Just wondering is there a way (not brute force) to check if a usb
| storage device is connected?
Hmmm. How do you identify "a usb storage device" to know that
it is or isn't connected?
You can certainly do something useful with wmi. eg,
import wmi
c = wmi.WMI ()
for usb_disk in c.W
In our field, we don't always get to program in the language we'd like
to program. So... how do you practice Python in this case? Say you're
doing J2EE right now. How do you practice Python to keep your skills
sharp?
I liked Python Challenge, but there were too many PIL there, something
that I dou
OK, maybe I shoot a more general question to the group since there are
so many great programmers here: how do you practice your craft?
I do it in the following way:
1. Set aside 30 minutes to 1 hour a day to read up on the latest
development, be it about the tool I'm using, the language, or the
p
Hi
If a piece of code
exits with an exception before it closes an open file, that file seems to remain
locked, which is real pain in the butt if I develop a file in parallel with
a piece of code. Is there a way to close
such lost files short of starting a new session?
Frederic
--
Ray wrote:
> In our field, we don't always get to program in the language we'd like
> to program. So... how do you practice Python in this case? Say you're
> doing J2EE right now.
Hopefully not !
> How do you practice Python to keep your skills
> sharp?
How *would* I do ? Well, perhaps I'd use J
bruno at modulix wrote:
> > In our field, we don't always get to program in the language we'd like
> > to program. So... how do you practice Python in this case? Say you're
> > doing J2EE right now.
>
> Hopefully not !
I am :-(
> > How do you practice Python to keep your skills
> > sharp?
>
> How
Ray wrote:
> OK, maybe I shoot a more general question to the group since there are
> so many great programmers here: how do you practice your craft?
I'm certainly not one of them, but...
(snip)
> How do you do your practice?
>
1/ programming
2/ programming
3/ lurking here, reading posts and so
bruno at modulix wrote:
> 1/ programming
> 2/ programming
> 3/ lurking here, reading posts and sometimes trying to answer, reading
> source code of the oss apps/frameworks I'm working with, searching
> practical solutions in the cookbook etc
> 4/ programming
Yeah, but that's what most of us are do
Arthur Pemberton wrote:
> What is the best way to do data source abtraction? For example have
> different classes with the same interface, but different
> implementations.
>
> I was thinking of almost having classA as my main class, and have
> classA dynamically "absorb" classFood into to based on
Maric Michaud wrote:
> Le Mercredi 31 Mai 2006 12:03, Manoj Kumar P a écrit :
>> Hi,
>>
>> Can anyone tell me a good python editor/IDE?
>> It would be great if you can provide the download link also.
>
> I didn't see on this list much PyQT users, is there a consensus about it ?
>
> I vote for lin
I am a little bit confused by all possibilities for exceptions handling
in Python (probably because I am not skilled enough??) I did try to
search trough this list and reading Python tutorial about Errors and
Exceptions but didn't find some "general" answer about exception
handling policy (strategy
On Wed, 31 May 2006 23:05:14 +0200, Fredrik Lundh
<[EMAIL PROTECTED]> wrote:
>Roger Miller wrote:
>
>> DSU seems like a lot of trouble to go through in order to use an O(n
>> log n) sorting algorithm to do what can be done in O(N) with a few
>> lines of code. The core code of random.shuffle() sho
I have to admit that I'm testing eclipse with pydev at the moment, and
it looks realy good
Rony
> Hi,
>
> Can anyone tell me a good python editor/IDE?
> It would be great if you can provide the download link also.
>
> Thank You,
> -Manoj-
>
>
> "SASKEN RATED Among THE Top 3 BEST COMPANIES TO WOR
David C. Ullrich wrote:
> Good example, because we know that EMF is not dumb. I've seen
> the same algorithm many times - the best example is ...
Man, an error made _six years ago_ and people are still bringing it up ...
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
Sa
Dennis,
Thank you for that response. Your code was very helpful to me. I
think that actually seeing how it should be done in Python was a lot
more educational than spending hours with trial and error.
One question (and this is a topic that I still have trouble getting my
arms around). Why is
Peter Otten wrote:
> Gerard Flanagan wrote:
>
> > Ben Finney wrote:
>
> >> pile_index = 0
> >> for card in deck:
> >> piles[pile_index].append(card)
> >> pile_index = (pile_index + 1) % numpiles
> >>
> >
> > no need to maintain an index ;-)
> >
> > pi
Petr Jakes wrote:
> I am a little bit confused by all possibilities for exceptions handling
> in Python (probably because I am not skilled enough??) I did try to
> search trough this list and reading Python tutorial about Errors and
> Exceptions but didn't find some "general" answer about exceptio
On 1 Jun 2006 01:14:28 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]
> wrote:If we could go back to emacs again for a second...I'm still using emacs but have been playing with a few other ide's
(wing, komodo + pydev) are the ones i've given a go recently.However I still end up coming back to emacs fo
Grant Edwards <[EMAIL PROTECTED]> writes:
> On 2006-05-31, Sergei Organov <[EMAIL PROTECTED]> wrote:
>
>> It seems that sniff on a real tty device could be implemented using the
>> same technique strace uses to intercept and show syscalls, though I'm
>> not aware of any sniffer application that do
Hi all,
I just stepped on a thing that I can't explain. Here is some code showing
the problem:
-
class C:
f = None
def __init__(self):
if self.f is not None:
self.x = self.f(0)
else:
self.x = 0
class C1(C):
f = int
class C2(C):
f
Le Jeudi 01 Juin 2006 13:12, Eric Brunel a écrit :
> class C1(C):
>f = int
int is not a function but a type, but it's callable so int(0) return 0.
> class C2(C):
>f = lambda x: x != 0
lambda is a function, applied as a class attribute it becomes a method so it's
called with a first para
Le Jeudi 01 Juin 2006 13:29, Maric Michaud a écrit :
> this exactly the same as :
>
> def f(self, val) :
> return x != 0
oops,
def f(self, val) :
return val != 0
--
_
Maric Michaud
_
Aristote - www.aristote.info
3 place des tapis
69004 Lyon
Tel: +3
Eric Brunel wrote:
> My actual question is: why does it work in one case and not in the other?
> As I see it, int is just a function with one parameter, and the lambda is
> just another one. So why does the first work, and not the second? What
> 'black magic' takes place so that int is not mistake
Le Jeudi 01 Juin 2006 13:34, Peter Otten a écrit :
> A python-coded function has a __get__ attribute, a C-function doesn't.
> Therefore C1.f performs just the normal attribute lookup while C2.f also
> triggers the f.__get__(C2(), C2) call via the descriptor protocol which
> happens to return a boun
Ray wrote:
> bruno at modulix wrote:
>
>>>In our field, we don't always get to program in the language we'd like
>>>to program. So... how do you practice Python in this case? Say you're
>>>doing J2EE right now.
>>
>>Hopefully not !
>
>
> I am :-(
>
Can we do something to help you out of this b
John Machin wrote:
>> given the ongoing work on struct (which I thought was a dead
>> module), I was wondering if it would be possible to add an API to
>> register custom parsing codes for struct. Whenever I use it for
>> non-trivial tasks, I always happen to write small wrapper functions
>> to ad
Maric Michaud wrote:
> Le Jeudi 01 Juin 2006 13:34, Peter Otten a écrit :
>> A python-coded function has a __get__ attribute, a C-function doesn't.
>> Therefore C1.f performs just the normal attribute lookup while C2.f also
>> triggers the f.__get__(C2(), C2) call via the descriptor protocol which
Ray wrote:
> bruno at modulix wrote:
>
>>1/ programming
>>2/ programming
>>3/ lurking here, reading posts and sometimes trying to answer, reading
>>source code of the oss apps/frameworks I'm working with, searching
>>practical solutions in the cookbook etc
>>4/ programming
>
>
> Yeah, but that's
On 1/06/2006 9:46 PM, Maric Michaud wrote:
> Le Jeudi 01 Juin 2006 13:34, Peter Otten a écrit :
>> A python-coded function has a __get__ attribute, a C-function doesn't.
>> Therefore C1.f performs just the normal attribute lookup while C2.f also
>> triggers the f.__get__(C2(), C2) call via the desc
i'm trying to convert python (image resizer script using PyQt4) script
to exe but support for jpeg and tiff image formats is located in
Qt4.1\plugins\imageformats (dll files) and when script is converted
exe file doesn't support jpeg and tiff.
i tryed using all file formats in
script:
tmp1 = QImag
"John Salerno" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Since the connect method of mysqldb requires a database name, it
seems
> like you can't use it without having a database already created.
The web hotel I use create *one* database together with the account.
I.O.W:
I ca
Hi
I use a code similar to this to retrieve data from Oracle database:
import cx_Oracle
con = cx_Oracle.connect("me/[EMAIL PROTECTED]")
cur = con.cursor()
outcur = con.cursor()
cur.execute("""
BEGIN
MyPkg.MyProc(:cur);
END;""", cur=outcur)
for row in out_cur:
I use WingIDE too. It is very convenient. Good auto-completion feature.
It is not so heavy as Komodo.
WingIDE was my the second step after Komodo.
Just try it and u'll understand how it is good.
[EMAIL PROTECTED] wrote:
> > Can anyone tell me a good python editor/IDE?
> > It would be great if you
Peter Otten wrote:
> Eric Brunel wrote:
>
>
>>My actual question is: why does it work in one case and not in the other?
>>As I see it, int is just a function with one parameter, and the lambda is
>>just another one. So why does the first work, and not the second? What
>>'black magic' takes place
Hello:
I have a Tkinter GUI Dialog with many buttons and labels and text
widgets.
What I would like to do is, can I:
1) Disable/deactivate/hide a button, text widget that is already drawn (and
of course the opposite enable/activate/show it)?
2) Change the text of a label or button that is
Anyone ever use the PythonDoc ant task? I have the following...
...this is a cut out of the build xml i am using...but it shows the
relevant parts. Anyways I can run my "pyDoc" target and it runs
successful with no errors. a "docs" directory is created but
On Thu, 01 Jun 2006 13:34:53 +0200, Peter Otten <[EMAIL PROTECTED]> wrote:
> Eric Brunel wrote:
>
>> My actual question is: why does it work in one case and not in the
>> other?
>> As I see it, int is just a function with one parameter, and the lambda
>> is
>> just another one. So why does the
Giovanni Bajo wrote:
> You need struct.unpack() to parse these datas, and you need custom
> packer/unpacker to avoid post-processing the output of unpack() just
> because it just knows of basic Python types. In binary structs, there
> happen to be *types* which do not map 1:1 to Python types, nor
On 1/06/2006 9:52 PM, Giovanni Bajo wrote:
> John Machin wrote:
>
>>> given the ongoing work on struct (which I thought was a dead
>>> module), I was wondering if it would be possible to add an API to
>>> register custom parsing codes for struct. Whenever I use it for
>>> non-trivial tasks, I alwa
Le Jeudi 01 Juin 2006 13:12, Eric Brunel a écrit :
> Thanks for your explanations, Peter. I'll have to find another way to do
> what I want...
maybe :
class C:
f = None
def __init__(self):
if self.f is not None:
self.x = self.f(0)
else:
self.x = 0
class C2(
Michael Yanowitz wrote:
> Hello:
>
>
>I have a Tkinter GUI Dialog with many buttons and labels and text
> widgets.
>
So start a *new* thread.
--
http://mail.python.org/mailman/listinfo/python-list
Michele Petrazzo wrote:
> Iain King wrote:
> > Michele Petrazzo wrote:
> >
> > I downloaded and installed 0.9.9.3, and it now works. Thanks!
> >
>
> I advice you to don't use that ctypes version... Better is to use the
> newest one and update freeimagepy!
>
> > Iain
> >
>
> Michele
OK, Ive insta
Petr Jakes:
>What about unexpected exceptions? :(
I asked a similar question some time ago:
http://groups.google.nl/group/comp.lang.python/browse_thread/thread/25963b99da4b2653
--
René Pijlman
--
http://mail.python.org/mailman/listinfo/python-list
Eric Brunel wrote:
> On Thu, 01 Jun 2006 13:34:53 +0200, Peter Otten <[EMAIL PROTECTED]> wrote:
>
>> Eric Brunel wrote:
>>
>>> My actual question is: why does it work in one case and not in the
>>> other?
>>> As I see it, int is just a function with one parameter, and the lambda
>>> is
>>> just a
"A.M" wrote:
> The problem is I don't know how to find out what are the column name and type
> that comes out of
> query (each row in cursor).
>
> Is there any possibility that my Python code can find out the column name and
> type in each row in
> cursor?
>From "cursor objects" in the DB-API
Eric Brunel wrote:
> Hi all,
>
> I just stepped on a thing that I can't explain. Here is some code
> showing the problem:
>
> -
> class C:
Do yourself a favour : use new-style classes.
class C(object)
> f = None
> def __init__(self):
> if self.f is not None:
i found that the problem is because of an import, which is strange.
The imported module looks something like this
[code]
import time
class Foo:
pass
class Bar:
global javax.swing
import javax.swing
[/code]
so it seems that pydoc cant giggity-giggit!
--
http://mail.python.org/m
"Ray" <[EMAIL PROTECTED]> writes:
> bruno at modulix wrote:
> > > In our field, we don't always get to program in the language we'd like
> > > to program. So... how do you practice Python in this case? Say you're
> > > doing J2EE right now.
> >
> > Hopefully not !
>
> I am :-(
>
> > > How do you
Thank you Fredrik for help.
Would you be able to help with the second part of question:
The other problem is accessing data in each row by column name. In Ruby I
can say:
Print row["ColName"]
In Python; however, I must access to row contents by integer index, like
PRINT ROW[0], which reduces my
Eric Brunel a écrit :
> On Thu, 01 Jun 2006 13:34:53 +0200, Peter Otten <[EMAIL PROTECTED]> wrote:
>
>> Eric Brunel wrote:
>>
>>> My actual question is: why does it work in one case and not in the
>>> other?
>>> As I see it, int is just a function with one parameter, and the
>>> lambda is
>>>
"abcd" wrote:
> class Bar:
>global javax.swing
>import javax.swing
> [/code]
>
> so it seems that pydoc cant giggity-giggit!
"global javax.swing" is not valid Python syntax. what is that global/import
combo
supposed to do, and what environment do you run this under ?
--
http:
hi
i have declared a function like this:
def aFunction ( arg1 , arg2 = 0):
print type(arg2)
when i try to print the type of arg2, it gives me 'str' type..why is it
not integer type, since i have
declared it as 0 ??
thanks
--
http://mail.python.org/mailman/listinfo/python-
> i have declared a function like this:
>
> def aFunction ( arg1 , arg2 = 0):
>
> print type(arg2)
>
> when i try to print the type of arg2, it gives me 'str'
> type..why is it not integer type, since i have declared
> it as 0 ??
>>> def a(arg1, arg2=0):
... print
[EMAIL PROTECTED] wrote:
> i have declared a function like this:
>
> def aFunction ( arg1 , arg2 = 0):
>
> print type(arg2)
>
> when i try to print the type of arg2, it gives me 'str' type..why is it
> not integer type, since i have declared it as 0 ??
because you or someone
Le 01-06-2006, [EMAIL PROTECTED] <[EMAIL PROTECTED]> nous disait:
> hi
> i have declared a function like this:
>
> def aFunction ( arg1 , arg2 = 0):
>
> print type(arg2)
>
> when i try to print the type of arg2, it gives me 'str' type..why is it
> not integer type, since i ha
Le Jeudi 01 Juin 2006 15:36, Christophe a écrit :
> self.x = self.__class__.f(0)
nope, this will result in a TypeError "unbound method must be called with
instance as first argument"
--
_
Maric Michaud
_
Aristote - www.aristote.info
3 place des tapis
69004 Lyon
Te
I don't know if it works this way with Oracle, but the python dbpai has
the cursor.description method that can help. For example:
cur.execute( "your query here" )
columns = [i[0] for i in cur.description]
cur.description gives a lot of data about your recordset, and the first
field is the column
Arthur Pemberton wrote:
> What is the best way to do data source abtraction? For example have
> different classes with the same interface, but different
> implementations.
>
> I was thinking of almost having classA as my main class, and have
> classA dynamically "absorb" classFood into to based on
A.M wrote:
> for row in out_cur:
>
> print row
>
[...]
>
> The other problem is accessing data in each row by column name.
One useful technique is
for col1, col2, col3 in out_cur:
sum = sum + col3
Access is still by index, but your code uses ordinary Python variables.
It works bett
Frithiof Andreas Jensen wrote:
> "John Salerno" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Since the connect method of mysqldb requires a database name, it
> seems
>> like you can't use it without having a database already created.
>
> The web hotel I use create *one* databas
1. Why is there no argmax built-in?
(This would return the index of the largest element in a sequence.)
2. Is this a good argmax (as long as I know the iterable is finite)?
def argmax(iterable): return max(izip( iterable, count() ))[1]
3. If this is the only place in a module where I need count a
Peter Otten <[EMAIL PROTECTED]> wrote:
> Gerard Flanagan wrote:
> > Ben Finney wrote:
>
> >> pile_index = 0
> >> for card in deck:
> >> piles[pile_index].append(card)
> >> pile_index = (pile_index + 1) % numpiles
> >
> > no need to maintain an index ;-)
>
Iain King wrote:
> Michele Petrazzo wrote:
>> Iain King wrote:
>>> Michele Petrazzo wrote:
>>>
>>> I downloaded and installed 0.9.9.3, and it now works. Thanks!
>>>
>> I advice you to don't use that ctypes version... Better is to use
>> the newest one and update freeimagepy!
>>
>>> Iain
>>>
>
Hello, I need to write a server program that performs the following
tasks:
1) Listens on TCP port for a connection
2) When client connects, launches application (for example, vi), then
closes connection with client
3) Goes back to listening on TCP port for an incoming connection
The
i'm looking for image lib which supports common image types (maybe
freeimagepy?) and is relatively easy to display image loaded through
that lib in PyQt4.
any ideas?
Aljosa
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I am new to Python, with C#/Java background
Is there any built-in Hash implementation in Python? I am looking for a
container that I can access to it's items by name. Something like this:
Print container["memeberName"]
I am asking this because I learned that DB-API in Python does
As my first Python script, I am trying to make a program that recurses
a directory searching for files whose names match a pattern. I have a
basic idea of what the regexp would look like (and I can get more
information about that), but I am stuck with incorrect understanding of
os.walk. I've tried:
> Is there any built-in Hash implementation in Python? I am looking for a
> container that I can access to it's items by name. Something like this:
>
> Print container["memeberName"]
You obviously haven't read the tutorial, they're called "dictionaries"
in Python
> I am asking this because I lear
The following script puzzles me. It creates two nested lists that
compare identically. After identical element assignments, the lists
are different. In one case, a single element is replaced. In the
other, an entire column is replaced.
---
hi there I have a host who suport python cgi script (www.frihost.com
that's cool) and discovert python (and mysql) I would like to make my
own site on python . But I woulud like to try before on my own machine
(localhost.)
So I would like to know how to create a CGI folder ??? I installed
apache
On 1 Jun 2006 07:34:23 -0700, D <[EMAIL PROTECTED]> wrote:
>Hello, I need to write a server program that performs the following
>tasks:
>
>1) Listens on TCP port for a connection
>2) When client connects, launches application (for example, vi), then
>closes connection with client
>3) Goes b
A.M wrote:
> Is there any built-in Hash implementation in Python? I am looking for a
> container that I can access to it's items by name. Something like this:
>
> Print container["memeberName"]
d = {"memberName" : "some value"}
print d["memberName"]
> I am asking this because I learned that DB-
<[EMAIL PROTECTED]> wrote:
...
> operations. I think what must be going on is that the 'b' list
> contains replicated references instead of copies of [range(1,3)]*2 .
Right.
> IMO, python's == operator should detect this difference in list
> structure since it leads to different behavior unde
Michele Petrazzo wrote:
> Iain King wrote:
> > Michele Petrazzo wrote:
> >> Iain King wrote:
> >>> Michele Petrazzo wrote:
> >>>
> >>> I downloaded and installed 0.9.9.3, and it now works. Thanks!
> >>>
> >> I advice you to don't use that ctypes version... Better is to use
> >> the newest one and
> but I am stuck with incorrect understanding of
> os.walk. I've tried:
>
> root, dirs, files = os.walk(dirname)
os.walk returns an iteratable sequence of those tuples. Thus,
you want to have
for filepath, dirs, files in os.walk(dirname):
#you're looking at the "dirs" and "files" in fi
A.M <[EMAIL PROTECTED]> wrote:
>The other problem is accessing data in each row by column name. In Ruby I
>can say:
>
>Print row["ColName"]
>
>In Python; however, I must access to row contents by integer index, like
>PRINT ROW[0], which reduces my program's readability.
>
>Can I access to row's con
David Isaac wrote:
> 1. Why is there no argmax built-in?
> (This would return the index of the largest element in a sequence.)
Probably there isn't a built-in because it isn't a commonly needed
function.
What is your use-case for argmax? If for example you want to repeatedly
remove the largest
"David Isaac" <[EMAIL PROTECTED]> wrote:
> 1. Why is there no argmax built-in?
> (This would return the index of the largest element in a
> sequence.)
>
> 2. Is this a good argmax (as long as I know the iterable is
> finite)? def argmax(iterable): return max(izip( iterable, count()
> ))[1]
>
A.M wrote:
> I am asking this because I learned that DB-API in Python doesn't offer
> access to cursor columns by name. The only option is access by index. I
> hope that I've got it wrong!
While it's not part of the DB-API as far as I know, the MySQLdb package (and
perhaps other DB access modules
David Isaac wrote:
> 1. Why is there no argmax built-in?
> (This would return the index of the largest element in a sequence.)
I guess because it's not used frequently enough. I've needed
argmax/argmin more than once though, so I would welcome them as
builtins.
> 2. Is this a good argmax (as lon
Le 01-06-2006, David <[EMAIL PROTECTED]> nous disait:
> 1. Why is there no argmax built-in?
> (This would return the index of the largest element in a sequence.)
You'll get argmin and argmax in Numeric and its descendants (numarray
and numpy).
--
Alexandre Fayolle
On Thu, 01 Jun 2006 15:07:26 +0200, bruno at modulix <[EMAIL PROTECTED]>
wrote:
> Do yourself a favour : use new-style classes.
> class C(object)
I would if I could: I'm stuck with Python 2.1 for the moment (I should
have mentionned it; sorry for that).
[snip]
>> Basically, I want an optional
Hi Alex,
With all due respect to your well-deserved standing in the Python
community, I'm not convinced that equality shouldn't imply invariance
under identical operations.
Perhaps the most fundamental notion is mathematics is that the left and
right sides of an equation remain identical after any
aljosa wrote:
> i'm looking for image lib which supports common image types (maybe
> freeimagepy?) and is relatively easy to display image loaded through
> that lib in PyQt4.
> any ideas?
Use PIL & StringIO to create a in-memory representation of the image as e.g.
PNG. Load that using Qt.
Diez
-
David Isaac wrote:
> 2. Is this a good argmax (as long as I know the iterable is finite)?
> def argmax(iterable): return max(izip( iterable, count() ))[1]
There's a subtle difference to the builtin: argmax() gives you the (index of
the) last maximum while max() returns the (value of the) first ma
Hello,
Is there an option or a way to allow the selection of multiple entries
in the Listbox widget? I could not find any, and would like to allow
the end user to select multiple entries.
Thanks
Bernard
--
http://mail.python.org/mailman/listinfo/python-list
oops! last sentence of 2nd paragraph in previous message should read
"If my expectation is NOT met ..."
--
http://mail.python.org/mailman/listinfo/python-list
"A.M" wrote:
> I am new to Python, with C#/Java background
that's not really much of an excuse for not reading *any* Python tutorial before
you jump in...
> I am asking this because I learned that DB-API in Python doesn't offer access
> to cursor columns by
> name. The only option is access by
1 - 100 of 277 matches
Mail list logo