On Sat, Aug 16, 2008 at 1:22 AM, Joseph Bae [EMAIL PROTECTED] wrote:
convertTo == C and convertToCelsius(temp) or
convertToFahrenheit(temp)
This idiom has a pitfall. Consider
A and B or C
If B can evaluate to a false value, such as None or 0, the expression
will not do what you
On Sat, 2008-08-16 at 07:40 +0200, [EMAIL PROTECTED] wrote:
Message: 1
Date: Fri, 15 Aug 2008 22:22:00 -0700
From: Joseph Bae [EMAIL PROTECTED]
Subject: Re: [Tutor] Beginner problem: name 'convertToFahrenheit' is
not defined
To: Alan Gauld [EMAIL PROTECTED]
Cc: tutor@python.org
Umesh Singhal wrote:
Hi im still relatively new to python and i am designing a
multiplication table that enables a user to input the size of the
times table unfortunately ive stumbled on the nested loops this is
what i have right now:
a=raw_input('please enter a number')
b=int(a)
n=b+1
for
I too am a Beginner at python, and i have been playing around with it for
about a week. While playing around, i decided to make a calculator program
(A Very simple one) to calculate area and also to convert farenheit to
celcius and vice versa. So, here is the code:
def options():
print
Message: 6
Date: Fri, 15 Aug 2008 21:31:51 +0100
From: Alan Gauld [EMAIL PROTECTED]
Subject: Re: [Tutor] What has Editor X got that PyWin32 hasn't?
To: tutor@python.org
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; format=flowed; charset=iso-8859-1;
reply-type=original
On Sat, Aug 16, 2008 at 11:07 AM, Lie Ryan [EMAIL PROTECTED] wrote:
I agree it is very powerful, at its time, when computers are
keyboard-only and terminal-only. But now, most of its power is largely
redundant and is pale compared to modern text-editor that do acknowledge
mouse as a primary
On Sat, Aug 16, 2008 at 12:07 PM, Matti/Tritlo [EMAIL PROTECTED] wrote:
Some quick notes:
print options()
No need for the 'print' here, options() already prints. The extra
print will print the return value of options(), which is None.
def triangle_area(width, height):
return width *
This is getting pretty far off topic. Let's not have an editor
flamewar please. If you like vim, great! Use it! If you don't like
vim, great! Use something else. If everyone liked the same editor
features there wouldn't be so many to choose from.
Thanks,
Kent
On Sat, 2008-08-16 at 16:07 +, Matti/Tritlo wrote:
I too am a Beginner at python, and i have been playing around with it
for about a week. While playing around, i decided to make a calculator
program (A Very simple one) to calculate area and also to convert
farenheit to celcius and vice
On Sat, 2008-08-16 at 11:20 -0500, W W wrote:
On Sat, Aug 16, 2008 at 11:07 AM, Lie Ryan [EMAIL PROTECTED] wrote:
I agree it is very powerful, at its time, when computers are
keyboard-only and terminal-only. But now, most of its power is
largely
On Sat, Aug 16, 2008 at 06:33:42AM +0100, Umesh Singhal wrote:
Hi im still relatively new to python and i am designing a multiplication
table that enables a user to input the size of the times table unfortunately
ive stumbled on the nested loops this is what i have right now:
Is this a
On Sat, 2008-08-16 at 18:07 +0200, [EMAIL PROTECTED] wrote:
Message: 1
Date: Sat, 16 Aug 2008 06:33:42 +0100
From: Umesh Singhal [EMAIL PROTECTED]
Subject: [Tutor] For Loops and nested loops
To: tutor@python.org
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=windows-1252
Hello Tutors,
I'm trying to write a small scrip to find collocations using chi squared,
depending on a fairly big corpus.
The program below does a good job, but it's too slow, and I need to process
something like 50 million words.
How can I make it run fast?
Your help is appreciated.
Emad nawfal
On Sat, Aug 16, 2008 at 01:55:36PM -0400, Emad Nawfal ( ) wrote:
Hello Tutors,
I'm trying to write a small scrip to find collocations using chi squared,
Minor nit, but the word you're looking for here is script. Scrip
is also an English word but means something completely different.
This may sound silly, but I've been searching for a reliable method
for installing the python-ldap module for Python 2.4 in a Windows XP
environment. Actually, I'm looking for a method that would work
cross-platform with Linux and OS X as well, or at least methods that
were close enough in nature
Dear Steve,
Thank you so much for your help.
Actually this is not homework. It's gonna be used in building a collocation
dictionary as part of my dissertation. Please remeber that I'm not a
programmer, so many of the terminologies may not be accessible to me.
Thank you also for attracting my
On Sat, Aug 16, 2008 at 1:15 PM, John DeStefano
[EMAIL PROTECTED]wrote:
Ultimately, I'd like to automate an installation method as part of a
buildout environment script that could work on multiple platforms, but
I'm not sure that's going to be possible: Windows doesn't use apt-get,
OS X
Lie Ryan [EMAIL PROTECTED] wrote
No offense (to you and to other vi(m) fans),
No offense taken, as I said right at the beginning of this
thread, editors are a religious battleground for
programmers and elicit very personal reactions.
Personally I use over a dozen editors on a regular basis
As a meta-comment on this discussion (hopefully to avoid fueling the
editor holy war further), there's a reason sophisticated editors such as
vi[m] and EMACS (and a dozen others I could name) exist and remain
popular so long after they were introduced (which may well have been
longer ago than
Steve Willoughby wrote:
Likewise, there's a reason the IDE environments like Visual Studio or
Eclipse, and pointy-clicky-WYSIWYG editing tools exist. They're much
easier for beginners to learn, not as intimidating, but in the end they
For example, I use pyWin or IDLE all the time if I want
Thank you so much Steve,
I followed your advice about calculating o the fly and it really rang a
bell. Now I have this script. It's faster and does not give me the nasty
memory error message the first one sometimes did:
# Chi-squared collocation discovery
# Important definitions first. Let's
On 8/16/08, Lie Ryan [EMAIL PROTECTED] wrote:
never use input(), use raw_input() instead. input() parses the string it
receives first, and may (read: WILL in the hands of certain persons)
allow user to input certain strings that get parsed into dangerous
codes. Use int(raw_input()) instead to
New to python and programming. This works but I don't like the way it is
set up. I would like to have a simple menu like;
[code]
def options():
print \
Options:
'p' Print Options
'l' Login
'c' Create account
'q' Quit
options()
def choice():
choice = p
Emad Nawfal (عماد نوفل) wrote:
Thank you so much Steve,
I followed your advice about calculating o the fly and it really rang
a bell. Now I have this script. It's faster and does not give me the
nasty memory error message the first one sometimes did:
# Chi-squared collocation discovery
#
PLEASE REPLY TO THE GROUP NOT JUST ME. Did you miss my request for that
(reply-all)?
Umesh Singhal wrote:
Hi Bob,
unfortunately when i pasted in the code it seems to have gone wrong
this is how it is at the moment with the correct indentation for the
nested loop:
code:
David wrote:
New to python and programming. This works but I don't like the way it
is set up. I would like to have a simple menu like;
[code]
def options():
print \
Options:
'p' Print Options
'l' Login
'c' Create account
'q' Quit
options()
def choice():
I talked about earlier how the main problem for me wanting to use curly
braces is because of the visual ease of seeing the end of the code blocks..
well you can change the indention guidelines on most code editors to a
bright color and this might be the next best thing. Also a good feature to
Trying to create a program to download RTSP streams. I know that RTSP
streams are live, so its hard to know if the stream will ever end, but the
streams I'm concerned about are fixed length. *I wonder if its possible to
know if the streaming content is fixed length or not *
*Anyways*, I'm
28 matches
Mail list logo