Hi Frank,
> From: "frank h." <[EMAIL PROTECTED]>
> Subject: [Tutor] min max confusion
> >>> t = (952L, 945L, 941L, 939L, 949L, 972L, 956L, 965L, 973L, 965L)
> >>> min(t)
> 939L
> >>> max(t)
> exceptions.TypeError Traceback (most
recent
> call last)
> TypeError: '
On 2/8/07, Alan Gauld <[EMAIL PROTECTED]> wrote:
> > I am really just asking about applications here, not libraries or
> > frameworks.
> The same rules apply. A module is a library in Python terms.
I think he meant that he's developing applications only.
--
- Rikard.
___
On Thursday 08 February 2007 01:50 am, Bob Gailer wrote:
> libraries, universities, wholesalers and distributors." IMHO the revision
> should be considered a new edition therefore have a new ISBN.
Right on!
Hopefully this gets to someone with some contact with the
publisher.
thanks
tj
--
T
Tim Johnson wrote:
Nope, I'm not criticizing the writing or the technical info at...
Just the sloppy publishing.
I ordered the Reference Manual for Version 2.5 and got Version 2.3
instead.
Reason, they have the same ISBN. The vendor said that this is
very unusual.
According to http://w
On Wed, 7 Feb 2007, Alan Gauld wrote:
> And if you are interested in Mayan calendars and Python
> it's essential reading.
I think this should be nominated for QOTW.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tut
"Don Taylor" <[EMAIL PROTECTED]> wrote
>I am looking for advice on module size.
There is no absolute answer to this.
> When I first came upon Python my initial thought was to package very
> closely-related things into modules. Modules would be small, and may
> contain a single class or function
On Wednesday 07 February 2007 09:34 pm, Bob Gailer wrote:
> Tim Johnson wrote:
> > Nope, I'm not criticizing the writing or the technical info at...
> > Just the sloppy publishing.
> >
> > I ordered the Reference Manual for Version 2.5 and got Version 2.3
> > instead.
> > Reason, they have the same
:-))
turns out I found the problem: max was a local integer variable in my
namespace. as such it was obviously not callable
On 2/7/07, frank h. <[EMAIL PROTECTED]> wrote:
hello all
here is a disturbing session with min() and max() for which I have
absolutely no explanation
>>> t = (952L, 9
"govind goyal" <[EMAIL PROTECTED]> wrote
> I want to purchase a python book but confused of which authur?
> I need suggestion.
> How is "Teach yoursef python in 24 hours by Ivan van laningham"?
Its aimed at the beginning programmer with no knowlege of
other programming languages. It is based on
hello all
here is a disturbing session with min() and max() for which I have
absolutely no explanation
t = (952L, 945L, 941L, 939L, 949L, 972L, 956L, 965L, 973L, 965L)
min(t)
939L
max(t)
exceptions.TypeError Traceback (most recent
call last)
TypeError: 'int' ob
"anil maran" <[EMAIL PROTECTED]> wrote
> Yesterday I spoke to an employee of yahoo egroups and
> he was explaining that they used coroutines to send mails in egroups
> because each thread was 2mb in size...
>
> Can you point me to resources on how to use co-routines in python
> or if you have code
Thanks. I'm not using wx, but that doesn't matter.
I'll see if there's some way I can get the author to let me pass in the
logging handler to his main.
On 2/7/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
> Kent Johnson wrote:
> > You should be able to make the logging module work with you, it is ve
Tim Johnson wrote:
> Nope, I'm not criticizing the writing or the technical info at...
> Just the sloppy publishing.
>
> I ordered the Reference Manual for Version 2.5 and got Version 2.3
> instead.
> Reason, they have the same ISBN. The vendor said that this is
> very unusual.
>
> This should be
Kent Johnson wrote:
> You should be able to make the logging module work with you, it is very
> flexible. You should hook into the logging module. Write a custom
> handler that pushes log methods into your GUI. Add the handler to the
> root logger.
Here is a simple, working example of this. It
Nope, I'm not criticizing the writing or the technical info at...
Just the sloppy publishing.
I ordered the Reference Manual for Version 2.5 and got Version 2.3
instead.
Reason, they have the same ISBN. The vendor said that this is
very unusual.
This should be corrected, don't you think?
regards
Tony Cappellini schreef:
> However, the problem now is more of an issue with the recent use of
> the logging module in the target app, and not being able to capture
> it's output, even though it is displayed on the screen.
I don't know a lot about the logging module, but doesn't it send its
outpu
I am looking for advice on module size.
When I first came upon Python my initial thought was to package very
closely-related things into modules. Modules would be small, and may
contain a single class or function. An application would consist of
lots of modules.
Now I am wondering if this is the
Tony Cappellini wrote:
>> You should be able to make the logging module work with you, it is very
>> flexible. You should hook into the logging module. Write a custom
>> handler that pushes log methods into your GUI. Add the handler to the
>> root logger.
>
> The cmd line app already uses the logg
> You should be able to make the logging module work with you, it is very
> flexible. You should hook into the logging module. Write a custom
> handler that pushes log methods into your GUI. Add the handler to the
> root logger.
The cmd line app already uses the logging module- this is where the
p
> The application needs to be rewritten if this is true. The author's
> implementation is not logical,
regardless- I won't ask him to do this, it's just the way it is. I
don't know why it was written this way.
> if I'm inferring correctly that he knows there are other apps depending
> on this.
Ye
Tony Cappellini wrote:
>> A better approach is to turn the functional part of the cmdline app -
>> the code that does the real work - into an importable module.
> it already is importable
>
>>> Then your GUI app can import and use this module directly, instead
> of doing hacks
>> with popen() and
Tony Cappellini wrote:
>> If I understand you, you have a python cmdline app that does something
>> useful. You have users who aren't comfortable with the command line, so
>> you are writing a GUI wrapper that calls the cmdline app with popen().
>>
> That is correct
>
>
>> A better approach
Hi everyone!
I have some strings that include special characters, to be displayed in
widget labels ( PyQt4 ).
The output changes in diferent OS's due to diferent sys.stdout encoding
Not only the labels in the GUI change, but the source file strings are
altered when I move from win to linux and
> If I understand you, you have a python cmdline app that does something
> useful. You have users who aren't comfortable with the command line, so
> you are writing a GUI wrapper that calls the cmdline app with popen().
That is correct
> A better approach is to turn the functional part of the cmdl
[... snip slightly complex problem involving different
versions of Python and possibly mismatched module imports ...]
> Now all my programs, including the new one, are working again. I have no
> clue what caused this. I've searched Google but I can't find a hit similar
> to my configuration and si
Tony Cappellini wrote:
>> PS To import a file whose name is in a variable (string), see __import__().
>
> I've started doing the import instead of exec/eval , but the person
> who wrote the module being called, started using the logging module.
> Now I can't capture the output of the module I'm ca
govind goyal wrote:
> hi,
>
> 1) I want to read data not from but from a file which is in
> specified directory.
> 2) I want to redirect my output(which is by default STDOUT) to a file.
>
> Can anybody suggest these queries?
One way to redirect stdin and stdout is just to do it on the comman
Tony Cappellini wrote:
>> PS To import a file whose name is in a variable (string), see __import__().
>
> I've started doing the import instead of exec/eval , but the person
> who wrote the module being called, started using the logging module.
> Now I can't capture the output of the module I'm ca
>
> PS To import a file whose name is in a variable (string), see __import__().
I've started doing the import instead of exec/eval , but the person
who wrote the module being called, started using the logging module.
Now I can't capture the output of the module I'm calling, and display
it in a GUI
govind goyal wrote:
> hi,
>
> In regards to programming language I know C,C++ and little of perl syntax.
"Learning Python" is good for people with some programming background.
"Dive into Python" is popular but IMO it focuses too much on flashy
features and not enough on the basics. "Beginning Py
My apologies if this isn't the correct forum for such a question, however I
was having a problem with Python and couldn't find the cause. I have two
systems running Python. My laptop and a server:
laptop:
WinXP SP2 x86
Python 2.5
pymssql 0.8.0 (for 2.5)
pywin32-210 (for 2.5)
server:
Win2003 no S
govind goyal wrote:
> Hi,
>
> I want to purchase a python book but confused of which authur?I need
> suggestion.
> How is "Teach yoursef python in 24 hours by Ivan van laningham"?
Do you have any programming background or is Python your first
programming language?
Kent
__
Hi,
I want to purchase a python book but confused of which authur?I need
suggestion.
How is "Teach yoursef python in 24 hours by Ivan van laningham"?
Regards,
Govind
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
hi,
1) I want to read data not from but from a file which is in
specified directory.
2) I want to redirect my output(which is by default STDOUT) to a file.
Can anybody suggest these queries?
Thanks
Regards,
Govind
___
Tutor maillist - Tutor@python.
Hello
Yesterday I spoke to an employee of yahoo egroups and he was explaining that
they used coroutines to send mails in egroups
because each thread was 2mb in size...
Can you point me to resources on how to use co-routines in python or if you
have code samples it would be great
thanks
Anil
Kim Branson wrote:
> Hi Chris,
>
> that seems to be exactly what i need.
The resource module is Unix-only, not cross-platform as you originally
requested.
Kent
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Tony Cappellini wrote:
> I saw a snippet of python which is used to execute another python
> script, and I'm trying to understand the mechanism. Simple as it is, I
> don't understand how it works :-)
A few more points missed by Danny and Alan. Not to be taken as an
endorsement of this strategy...
"Kim Branson" <[EMAIL PROTECTED]> wrote
> whats the simplest cross platform way of getting the cpu time used
> by
> a python script?
Does the os.times() function give you enough?
Its not strictly cpu time...
Alan G.
___
Tutor maillist - Tutor@py
"Tony Cappellini" <[EMAIL PROTECTED]> wrote
>I saw a snippet of python which is used to execute another python
> script, and I'm trying to understand the mechanism. Simple as it is,
> I
> don't understand how it works :-)
Danny has explained that it is evil and shouldn't be used
but here goes on
39 matches
Mail list logo