And presumably cleans up the leftover object with the value of 42 when it
changes to point at the 43 object?
Or does it leave all changes in memory until the program exits?
Bodsda.
Sorry for top posting, my phone won't let me change it
Sent from my BlackBerry® wireless device
-Ori
boxes as I have no idea how
many entries there will be (column length will be fixed) so I can't create the
entry widgets beforehand
Anyone have any suggestions?
Thanks,
Bodsda
Sent from my BlackBerry® wireless device
___
Tutor maillist - Tuto
data from them
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: Walter Prins
Date: Tue, 26 Apr 2011 16:55:36
To:
Cc:
Subject: Re: [Tutor] Gtk - relational data display and edit
On 26 April 2011 16:34, wrote:
> Hi,
>
> I am reading in data from a csv fi
Hi,
I would suggest appending the dice[roll] to a new list just after the print
statement, then in the quit block order the list and then loop over it and
print each entry.
Hope this helps,
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: Johnson Tran
Sender
I'm also slightly confused. Why does file one start at 1, but file 2 starts at
3. Why not just duplicate file2?
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: lina
Sender: tutor-bounces+bodsda=googlemail@python.org
Date: Wed, 7 Sep 2011 12:46:3
Hi,
In a normal if,elif,elif,...,else statement, are the conditions checked in a
linear fashion?
I am wondering if I should be making an effort to put the most likely true
condition at the beginning of the block
Thanks,
Bodsda
Sent from my BlackBerry® wireless device
Thanks for the explanation - very clear.
Cheers,
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: Steven D'Aprano
Sender: tutor-bounces+bodsda=googlemail@python.org
Date: Fri, 16 Sep 2011 20:43:45
To: Tutor - python List
Subject: Re: [Tutor] If stat
Is there any additional overhead of using the locals() or format(locals())
instead of a tuple? - the format option is a double function call so I would
expect that to be considerably slower
Thanks,
Bodsda
-- my phone won't let me bottom post, sorry
Sent from my BlackBerry® wireless d
that there are other place holders such as %i and %d that expect a
certain data type. With %s, if it is not a string that is given to it, it will
attempt to be converted to a string first.
Hope this helps,
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From:
written by
beginners.
The code will not be enterprise standard, but it should be a good insight into
how others write python programs
Hope this helps,
Bodsda,
Ubuntu beginners team
P.S: sorry for the top post, smartphone limitation
Sent from my BlackBerry® wireless device
-Original Message
f you don't want to do that, look into the 'break' statement.
while someOtherCondition:
Do stuff
if guesses == 0:
break
Hope this helps,
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: ADRIAN KELLY
Sender: tutor-bounc
If I enter 35 at the prompt in your program, does python see
this: 35
Or
this: “35“
?
Hope this helps,
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: ADRIAN KELLY
Sender: tutor-bounces+bodsda=googlemail@python.org
Date: Fri, 30 Sep 2011 19:18:15
To:
Cc
You could also use something like pygame to wait and test for keypresses
Bodsda
(Top post is phone limitation, sorry)
Sent from my BlackBerry® wireless device
-Original Message-
From: Mark Lybrand
Sender: tutor-bounces+bodsda=googlemail@python.org
Date: Fri, 30 Sep 2011 13:27:27
he beginning of each line - that way I can
track execution order and follow error/info messages all in one file.
That's just how I prefer to do it.
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: Nikunj Badjatya
Sender: tutor-bounces+bodsda=googlemail@
Have you thought about writing your own? Others have posted some useful links,
but in all honesty you could hack something together to achieve that in next to
no time
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: harish bansal
Sender: tutor-bounces+bodsda
Sure,
mydict = {'a':1, 'b',2}
for key in mydict:
print key
Hope this helps,
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: ADRIAN KELLY
Sender: tutor-bounces+bodsda=googlemail@python.org
Date: Tue, 25 Oct 2011 13:45:50
To:
Subje
Look into the 'continue' and 'break' statements - both very handy when working
with loops
Or just increment/decrement the conditional until it evaluates to False
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: lina
Sender: tutor-bounc
Just a guess but take a look at the spelling.
centerx
Or
centrex
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: Chloe Beck
Sender: tutor-bounces+bodsda=googlemail@python.org
Date: Sun, 20 Nov 2011 11:58:25
To:
Subject: [Tutor] Help with error in ski game
This is just my opinion but I would have several (say 10) powershell scripts
individually called by python, python will sit still until the powershell
exits, then update the progress bar by 10% before calling the next script etc
etc.
Bodsda
Sent from my BlackBerry® wireless device
You won't get it exactly on because the time it takes to call the function will
affect your trigger time.
I would use something like an infinite loop with a 1 second sleep after the
function call
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: "Mi
by line.
Experiment with both, see what data types they both return and decide which is
most suitable. Bear in mind you need to easily differentiate each line and
access them individually.
If your still struggling to write this function, show us how far you get and we
can go from there.
Hop
I'm not sure, I also don't have access to the python docs atm, but the simplest
method would be to read the whole file into a list, edit the correct item
(remembering to count from 0 not 1) and then writing the whole list back to the
file.
Bodsda
--Original Message--
From: M
You could use any of them, but a dict would be the most logical assuming no
duplicate items
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: ADRIAN KELLY
Sender: tutor-bounces+bodsda=googlemail@python.org
Date: Tue, 29 Nov 2011 20:31:56
To:
Subject
to the screen. This saved an estimated 55
man hours of work.
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: wesley chun
Sender: tutor-bounces+bodsda=googlemail@python.org
Date: Sun, 4 Dec 2011 00:51:59
To: Mark Lybrand
Cc:
Subject: Re: [Tutor] Python
directory to 'python\Lib\Site-packages' is doing what
you think it should do.
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: surya k
Sender: tutor-bounces+bodsda=googlemail@python.org
Date: Wed, 7 Dec 2011 00:27:30
To: Python Tutor
Subject: [Tu
If you invoke the system 'cp' command though, it may not be possible to have a
progress bar because the command will only talk back when it exits.
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: Alan Gauld
Sender: tutor-bounces+bodsda=googlemail@
>>>mylist = [1,2,3,4,1]
>>>mylist.index(1)
0
But note that this only shows the index for the first occurrence of the item.
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: surya k
Sender: tutor-bounces+bodsda=googlemail@python.org
Date:
That won't work because l1[0] is ['a', 1]
What happens if you don't change the code?
l1.index('c')
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: Robert Berman
Sender: tutor-bounces+bodsda=googlemail@python.org
Date: Thu, 0
that shows one usage of return values
Hth,
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: "Pete O'Connell"
Sender: tutor-bounces+bodsda=googlemail@python.org
Date: Mon, 12 Dec 2011 01:08:47
To:
Subject: [Tutor] return, w
plete' traceback, so we can
see what caused the error. I'm gonna take a wild guess at it being the
pyplot.plot call though, due to the data types that its moaning about.
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: stm atoc
Sender: tutor-bounces+bo
, you need to replace the dll that was removed by the
uninstallation of python2.5 - to do this, reinstall python2.5
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: Wayne Watson
Sender: tutor-bounces+bodsda=googlemail@python.org
Date: Wed, 21 Dec 2011 07:15:3
You could use read directly on the popen call to negate having to write to a
file
output = os.popen(“sdptool -i hci0 search OPUSH“).read()
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: Ganesh Kumar
Sender: tutor-bounces+bodsda=googlemail@python.org
Date
If I say that sys.argv is a list, does that help you?
Also, run things from a command prompt for this kind of thing, at least then
you can guarantee what args get passed
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: Jason Loeve
Sender: tutor-bounces
33 matches
Mail list logo