"bob smith" wrote
So, here's another simple example where all of the radio buttons
start out incorrectly selected:
v = StringVar()
Radiobutton(root, text = "Test RadioButton 1", variable=v,
value="1").grid(row = 0, column = 0, sticky = W)
Radiobutton(root, text = "Test RadioButton 2
Thanks for the reply. Unfortunately, even when I include a
variable, all of the buttons start out selected. I noticed that this is the
case when I create a StringVar (rather than an IntVar, where the buttons start
out correctly unselected). So, here's another simple example wh
On Sat, Oct 10, 2009 at 5:31 AM, Didar Hossain wrote:
> Hi,
>
> This is a little off-topic, but, I though I might put this question in.
>
> Since I am learning Python, I was wondering if there are any good
> references on secure
> coding practices. Books, guides or even any howtos would suffice.
"Wayne" wrote
Data validation is also a good thing:
I agree with this bit but...
def mysum(n1, n2):
try:
n1 = int(n1)
n2 = int(n2)
except ValueError:
print "Error! Cannot convert values to int!"
return n1+n2
Or do something similar.
In a dynamic language
On Sat, Oct 10, 2009 at 4:31 AM, Didar Hossain wrote:
> Since I am learning Python, I was wondering if there are any good
> references on secure
> coding practices. Books, guides or even any howtos would suffice.
>
I'm not sure of any references, but I know of a few things. First, for
versions <
On Sun, Oct 11, 2009 at 4:07 AM, Rich Lovely wrote:
> for i, v in enumerate(x[:-1]): #omitting last value in list to avoid
> IndexError
> print v, x[i+1]
Thanks for the tip on enumerate, escaped me. Much like Kent's simply
using a temporary var escaped me despite having done similar things
of
Kent Johnson wrote:
2009/10/10 Xbox Muncher :
What does flush do technically?
"Flush the internal buffer, like stdio‘s fflush(). This may be a no-op on some
file-like objects."
The reason I thought that closing the file after I've written about 500MB file
data to it, was smart -> was becau
2009/10/9 Oxymoron :
> On Fri, Oct 9, 2009 at 11:02 PM, Kent Johnson wrote:
>> On Fri, Oct 9, 2009 at 3:54 AM, Stefan Lesicnik wrote:
>>
>> You can easily keep track of the previous item by assigning it to a
>> variable. For example this shows just the increasing elements of a
>> sequence:
>>
>>
2009/10/10 Xbox Muncher :
> What does flush do technically?
> "Flush the internal buffer, like stdio‘s fflush(). This may be a no-op on
> some file-like objects."
>
> The reason I thought that closing the file after I've written about 500MB
> file data to it, was smart -> was because I thought th
Oh yea, it's python 2.6.
On Sat, Oct 10, 2009 at 10:32 AM, Xbox Muncher wrote:
> What does flush do technically?
> "Flush the internal buffer, like stdio‘s fflush(). This may be a no-op on
> some file-like objects."
>
> The reason I thought that closing the file after I've written about 500MB
> f
What does flush do technically?
"Flush the internal buffer, like stdio‘s fflush(). This may be a no-op on
some file-like objects."
The reason I thought that closing the file after I've written about 500MB
file data to it, was smart -> was because I thought that python stores that
data in memory or
xbmuncher wrote:
Which piece of code will conserve more memory?
I think that code #2 will because I close the file more often, thus freeing
more memory by closing it.
Am I right in this thinking... or does it not save me any more bytes in
memory by closing the file often?
Sure I realize that in
Hi,
This is a little off-topic, but, I though I might put this question in.
Since I am learning Python, I was wondering if there are any good
references on secure
coding practices. Books, guides or even any howtos would suffice.
Security seems to be almost always an after-thought rather than bei
13 matches
Mail list logo