On 27/01/2012 06:44, Andre' Walker-Loud wrote:
Hi Steven,
(5) When assembling strings from substrings, never use repeated concatenation
using + as that can be EXTREMELY slow. Use str.join to build the string in one
assignment, instead of multiple assignments.
Your code shown above is *very*
On 27/01/12 06:44, Andre' Walker-Loud wrote:
... I have only had one programming class, and that was 15 years ago or so,
> ...so these are not issues I am aware of.
I often find myself joining strings (and have mostly used + to do it).
String addition is OK in some languages, or at least bet
> I had a question regarding installing packages that I posted a couple of days
> ago. But I'm re-sending the question again.. this time with output so that it
> is clearer.
>
> I am unable to install libraries using 'python setup.py install'
>
> Say that I'm installing a package "kando". I ext
Hi,
I want to calculate compile time for my puzzles. Although I read about
timeit(), I didn't really understand how it should be applied it.So, can anyone
write a function for me please!!
I am looking for a function which should solve my puzzle and also show compile
time. (Later, I should be ab
On 27/01/2012 15:46, Surya K wrote:
Hi,
I want to calculate compile time for my puzzles. Although I read about
timeit(), I didn't really understand how it should be applied it.
So, can anyone write a function for me please!!
I am looking for a function which should solve my puzzle and also show
On 27/01/12 15:46, Surya K wrote:
I want to calculate compile time for my puzzles.
I'm pretty sure from what follows you don't!
But just to be clear, compile time is the time Python spends converting
your modules into .pyc files the first time they are imported after a
change. Why you would
On 1/26/2012 4:22 PM, Navneet wrote:
Hi,
I am trying to create a chat program.(Programs are attached)
Please find the code below, where I am having the problem.
def run( self ):
while 1:
print "Hello There "
print self.descriptors
# Await an event on a readab
Surya K wrote:
can anyone write a program for me? please...
Certainly. My rate is AUD$80 per hour. Please write to me privately to discuss
financial arrangements.
--
Steven
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscr
Navneet wrote:
One more thing I want to add here is, I am trying to create the GUI
based chat server.(Attached the programs.)
Please do not send large chunks of code like this, unless asked. Instead, you
should try to produce a minimal example that demonstrates the problem. It
should be:
Hi Guys
I am wondering if there is a keyword to ignore certain lines ( for eg
lines starting with # ) when I am reading them through stl module csv.
Example code:
input_file = sys.argv[1]
csv.register_dialect('multiplex_info',delimiter=' ')
with open(input_file, 'rb') as fh:
reader= csv.rea
On Fri, Jan 27, 2012 at 5:13 PM, Abhishek Pratap wrote:
> Hi Guys
>
> I am wondering if there is a keyword to ignore certain lines ( for eg
> lines starting with # ) when I am reading them through stl module csv.
>
> Example code:
>
> input_file = sys.argv[1]
> csv.register_dialect('multiplex_info
Hi Joel
Here is a sample
['1', 'AAA', '4344', '0.001505'] : want to keep this one
['#', 'AAA', '4344', '0.001505'] : and throw this one
You are right I am checking after parsing. I dint find an option in
csv.reader to ignore lines.
-Abhi
On Fri, Jan 27, 2012 at 2:42 PM, Joel Gold
On Fri, Jan 27, 2012 at 5:48 PM, Abhishek Pratap wrote:
> Hi Joel
>
> Here is a sample
>
> ['1', 'AAA', '4344', '0.001505'] : want to keep this one
>
> ['#', 'AAA', '4344', '0.001505'] : and throw this one
Ok, so you are getting single quotes around your data. So do
row[0].startswith("#"
Thansk Joel. Thats exactly what I am doing.
-A
On Fri, Jan 27, 2012 at 3:04 PM, Joel Goldstick
wrote:
> On Fri, Jan 27, 2012 at 5:48 PM, Abhishek Pratap
> wrote:
>> Hi Joel
>>
>> Here is a sample
>>
>> ['1', 'AAA', '4344', '0.001505'] : want to keep this one
>>
>> ['#', 'AAA', '4344',
On Fri, Jan 27, 2012 at 7:46 AM, Surya K wrote:
> Hi,
>
> I want to calculate compile time for my puzzles.
>
Since nobody else has mentioned it yet...
http://xkcd.com/303/
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription o
I am trying to round a float to two decimals, but I am getting the
following error:
Traceback (most recent call last):
File "", line 1, in
PaintingProject()
File "C:/Python27/Homework/Labs/Lab 03_5.py", line 42, in PaintingProject
print 'That will cost you $%f.' %(round(5.6523),2)
Typ
Update
I am trying to round a float to two decimals.
>
> Basically, I am writing a program to ask a user how many square feet they
> need to paint. I then calculate how many cans of paint they need and will
> also show the total purchase price. I've tried this two ways, and both ways
> I am semi-s
Michael Lewis wrote:
I am trying to round a float to two decimals, but I am getting the
following error:
Traceback (most recent call last):
File "", line 1, in
PaintingProject()
File "C:/Python27/Homework/Labs/Lab 03_5.py", line 42, in PaintingProject
print 'That will cost you $%f.'
On Sat, Jan 28, 2012 at 1:20 AM, Steven D'Aprano wrote:
> And finally, we come all the way back to the beginning again and say That's
> not the right way to do it! Don't round the number *outside* of the string
> formatting, get the string formatting to do it for you:
Reason being because repr(ro
19 matches
Mail list logo