Is generator function similar to multi threading?
-
Don't be flakey. Get Yahoo! Mail for Mobile and
always stay connected to friends.___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tuto
I answered my own question digging around and testing stuff. Here is my
solution for a windows environment:
if not os.access(pagename,os.W_OK):
print 'Sorry, that file is read only,'
print 'Please consult your system administrator'
print 'if this file must be modified.'
how do I check file permission in windows environments in python? I am
modifying an existing editor program in my wiki to refuse to TRY to edit
a file if it is set to read only. Until very recently, all my system
stuff was in a un*x environment (well, FreeBSD) which is just not the same.
--
Sa
I see. Thanks for clarifying that for me.
-Isaac
On 3/15/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
Isaac wrote:
> In 5.9 of the Language Reference it says:
>
> "Comparisons can be chained arbitrarily, e.g., |x < y <= z| is
> equivalent to |x < y and y <= z"
>
> |So this would mean that
>
> i
Thanks, this is not too much information at all. I am always happy with depth.
-c
On 3/15/07, Dave Kuhlman <[EMAIL PROTECTED]> wrote:
> On Thu, Mar 15, 2007 at 03:35:27PM +0100, Rikard Bosnjakovic wrote:
> > On 3/15/07, Clay Wiedemann <[EMAIL PROTECTED]> wrote:
> > > If doing a loop, how can one
On Thu, Mar 15, 2007 at 03:35:27PM +0100, Rikard Bosnjakovic wrote:
> On 3/15/07, Clay Wiedemann <[EMAIL PROTECTED]> wrote:
> > If doing a loop, how can one skip forward a specific amount randomly
> > determined within the loop?
>
> y = 0
> while y < HEIGHT:
> linewidth = random(3, 9)
> # dra
Rikard Bosnjakovic wrote:
> On 3/15/07, Clay Wiedemann <[EMAIL PROTECTED]> wrote:
>> If doing a loop, how can one skip forward a specific amount randomly
>> determined within the loop?
>
> y = 0
> while y < HEIGHT:
> linewidth = random(3, 9)
> # drawlines etc
> y += linewidth
>
> The reaso
On 3/15/07, Clay Wiedemann <[EMAIL PROTECTED]> wrote:
> If doing a loop, how can one skip forward a specific amount randomly
> determined within the loop?
y = 0
while y < HEIGHT:
linewidth = random(3, 9)
# drawlines etc
y += linewidth
The reason why you cannot alter the for-variable beats
Maybe use a while loop?
y = 0
while y < HEIGHT:
linewidth = random(3,9)
y += linewidth
Regards,
- Jorgen
On 3/15/07, Clay Wiedemann <[EMAIL PROTECTED]> wrote:
> If doing a loop, how can one skip forward a specific amount randomly
> determined within the loop?
> Below is a boiled down ve
If doing a loop, how can one skip forward a specific amount randomly
determined within the loop?
Below is a boiled down version of what I am trying (HEIGHT and random
come from NodeBox). I imagine a simple solution is out there, my
searches failed me
for y in range(HEIGHT):
linewidth = r
Hello Edward!
On Thursday 15 March 2007 03:53, Edward A Robinson wrote:
> I guess what Im looking for is a python command that dose what the
> file command in the shell would do
I don't think there is anything like this in Python's standard
library. Probably Gnome has a library for identifying t
Isaac wrote:
> In 5.9 of the Language Reference it says:
>
> "Comparisons can be chained arbitrarily, e.g., |x < y <= z| is
> equivalent to |x < y and y <= z"
>
> |So this would mean that
>
> item == item in word2
>
> means:
>
> item == item and item in word2
>
> not
>
> (item == item) and
Edward A Robinson wrote:
> I guess what Im looking for is a python command that dose what the
> file command in the shell would do
>
> On 3/14/07, Edward A Robinson <[EMAIL PROTECTED]> wrote:
>> This is my first time posting to the python tutor so be nice, I have
>> read the mailing list and cant
13 matches
Mail list logo