DF's a doddle.
Thanks for the link Kent :)
Nick .
___
Tutor maillist - [EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/tutor
From: tutor-bounces+nblack3=student.gsu@python.org
[tutor-bounces+nblack3=student.gsu@python.org] on behalf of
tutor-requ...@python.org [tutor-requ...@python.org]
Sent: Saturday, August 21, 2010 1:25 PM
To: tutor@python.org
Subject: Tutor Digest,
"Perhaps you should try something a little bit less ambitious. Write a
program to test whether a number is divisible by 3. Then write a
program to test whether a number is divisible by 3 or 5. Then write a
third program to test whether a number is divisible by 3, 5 or 7.
Then generalise that third
"We're still doing too much work. Why go all the way up to n? We know
that (say) 93 can't possibly divide into 99, or 57 into 59. The largest
number we need to check is the square root of n. The reason is a little
subtle, so think about it, don't just take my word.
Hint: write down the factors of,
"1 * 120 = 120
2 * 60 = 120
3 * 40 = 120
4 * 30 = 120
5 * 24 = 120
6 * 20 = 120
8 * 15 = 120
10 * 12 = 120
10.9545 * 10.9545 = 120
12 * 10 = 120 <=== already seen this one!
> Also I can write a program that
> tests whether the number is a factor of 2, 3, 5, 7, but I think
> you're trying to poin
The prime factors of 13195 are 5, 7, 13 and 29.
What is the largest prime factor of the number 600851475143 ?
#don't forget 2,3,5,7. this function doesn't deliver those as output.
def is_prime(b): #checks a number greater than 7 to see if it is prime and
returns if is.
if b % 2 != 0 and b
"Did you test the program? That is one way to tell whether it works perfectly.
What you showed above will do one visible thing - it will print "Don't forget
to consider primes 2, 3, 5, and 7\n". The rest is a somewhat confusing
collection of function definitions and comments. You never call the
http://www.georgiarobotics.com/roboteducation/robot-kit.html
you can check the robot out at this link. is this a good buy you guys think,
or is there a better python compatible robot out there? I just want something
to keep me interested in programming and that gives me ideas of programs to
I'm not sure I'm using pydoc correctly. I only seem to get abbreviated
help rather than full documentation. It happens often enough that I think
I'm doing something wrong.
For example, I want to upgrade my scripts to use .format() from using %.
$ pydoc format
Help on built-in function f
As well as the other replies, consider that you are doing "unit" testing:
http://en.wikipedia.org/wiki/Unit_test
One method is black-box testing, which is where the thing (class,
function, module) you are testing is treated as a black box, something
that takes input and returns output, and how i
Quoting "Gopinath V, ASDC Chennai" <[EMAIL PROTECTED]>:
> Hi
> Can any1 please tell me how do i open an editor in python running in
> linux os
>
Hi Gopinath,
try os.system, ie
import os
os.system('/usr/bin/xterm &')
Regards
Nick .
___
ngs in Python
which aren't first class objects, since they reflect lookup entries in
some namespace or container, such as the mapping from names to pointers
in a class or module __dict__ or a function's locals, or the items
stored in a list or set.
Cheers,
Nick.
--
Nick Coghlan
k it might be a good
choice for a new python programmer, exactly for the above reasons.
I think it might be worth the hurdles and pay off in the end.
Nick
On 07/06/2010 09:48 PM, Alan Gauld wrote:
There are many toolkits but these have as many similarities as
differences.
But none of them w
u so much for the answers, you're such a helpful bunch.
Nick
On 07/07/2010 10:16 AM, Alan Gauld wrote:
"Nick Raptis" wrote
Really good news is that on this very list on another thread, someone
suggested Dabo http://dabodev.com/
It's a python library on top of wxPython and it&
a StringIO instance, copy your file to
it, close the file,
do whatever you want in memory,
open your file again for writing, copy the StringIO to it, close both.
I'd consider that overkill for most projects
Is there something in particular you want to do?
Nick
On 07/08/2010 01:52 AM, Eduard
is that after trying wxPython with a book a
bit I decided that GUI programming was not my thing at all, and started
writing games with pygame. Many similar concepts, twice the fun. Now I'm
doing web work.
Give it time, trust your gut and don't panic, you'll end up right where
you wa
www.amazon.com/Definitive-Guide-Django-Development-Second/dp/143021936X/
The printed one is a bit more updated (1.1) and pays off it's money
because of it's great reference section :)
Nick
On 07/08/2010 03:48 PM, Dipo Elegbede wrote:
Hi all,
I have done a little basic on python a
rward: use the
shortcut
output = subprocess.check_output("your command here")
Always check latest documentation for your python version too
http://docs.python.org/library/subprocess.html
Nick
On 07/08/2010 04:04 PM, Paul VanGundy wrote:
Hi All,
I'm trying to get data from sub
ver
And this returns
x: 3 carryover: 1
x: 2 carryover: 3
x: 1 carryover: 6
6
Done!
What you should learn from this is that, when doing recursion, figuring
out what your function should do on the way up is as crucial as what you
want it to do on the way down.
Nick
__
On 07/11/2010 06:28 PM, Nick Raptis wrote:
def recursfac(x,carryover=1):
print 'x:',x,'carryover:', carryover
if x > 1:
carryover *= x
carryover = recursfac(x-1, carryover)
return carryover
And this returns
x: 3 carryover: 1
x: 2 carryover
On 07/11/2010 06:50 PM, Luke Paireepinart wrote:
I think the new version is harder to understand.
Sent from my iPhone
On Jul 11, 2010, at 10:43 AM, Nick Raptis wrote:
Aww! A critic! You humble me (really, I'm not being sarcastic here, I
welcome it gladly)
I won't argue about
g/reference/introduction.html?highlight=brackets#notation
Nick
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
ses too)
For example,
print "\n".join(first_run)
will get you started.
I think the end code you're looking for is something like
output = ["\n".join(run) for run in sorted_list]
print "\n".join(output)
but I'm not sure if you've got the ha
ript is very basic and it doesn't tend to a lot of
things you'd might want, like eliminating double values or sorting, but
it should start you on your path.
Nick
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
that /getch()
gets and debug from there
Nick
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
nk
Thank you very much in advance!
Take a look in the itertools module
http://docs.python.org/library/itertools.html
Check the section "*Combinatoric generators:" (website doesn't have an
anchor link for that, search around a bit)
Nick
*
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
but it isn't not for me. Advice, please.
Thanks,
Dick Moores
Split the input before the if.
Fork based on the length of the resulting list.
:)
Nick
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
ere, it just get's represented as two.
In fact, you should have escaped \. your self writing the line as such:
uri.replace('.', '\\.')
but since \. is not a special character, python is smart enough to not mind
Nick
___
Tu
chine with as editor SPE.
Roelof
You are using Python 2.x, so you should use raw_input() instead of input().
Note that in Python 3.x, raw_input() has been renamed to just input(),
with the old 2.x input() gone.
Nick
___
Tutor maillist - Tutor@pytho
ion as an
exercise, there is a build in method of string that accomplishes the
same effect.
Try x=fruit.count(letter)
- Give a bit of thought about what would happen if someone enters a
whole string instead of a character for letter. How should your program
accommodate that?
Nick
As I
understand you never get the prompts, right?
Nick
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
;
Ranjith, get ready for some configuration file parsing.
But if you just want to open a url with the default browser, you can
just execute "xdg-open your-url" as a subprocess.
Hope I shifted you to the right direction.
Nick
PS-trivia: I got to guess these just
On 09/01/2010 11:46 AM, Nick Raptis wrote:
Alan, let me make a wild guess here.
Ubuntu does have little "Preferred applications" config tool. I don't
know how or where it stores this data, but my guess is it's the same
place xdg (as in xdg-open) gets it's configu
How do I make this code print lines NOT containing the string 'Domains'?
import re
for line in log:
if re.search (r'Domains:', line):
print line
This does not work...
if re.search != (r'Domains:', line):
___
Tutor maillist - Tutor@pytho
the files into one big one before the parse
would work but I would need help with that too.
the tutelage is much appreciated
-nick
On Sun, May 3, 2009 at 6:21 PM, Alan Gauld wrote:
>
> "Alan Gauld" wrote
>
>>> How do I make this code print lines NOT containing
Compiling the regular expression works great, I cant find the tutorial
Mr. Gauld is referring to!! I searched python.org and alan-g.me.uk.
Does anyone have a link?
On Mon, May 4, 2009 at 1:46 PM, Martin Walsh wrote:
> Nick Burgess wrote:
>> So far the script works fine, it avoids pri
for root, dirs, files in os.walk('./'):
for f in files:
if f.endswith('.txt'):
allfiles.append(os.path.join(root, f))
This returns a list of the *.txt files. Of course now I am stuck on
how to apply the delimiter and search function to the items in the
list..? Any clues/ex
forgot to add this at the top,
allfiles = []
On Tue, May 5, 2009 at 6:15 PM, Nick Burgess wrote:
> for root, dirs, files in os.walk('./'):
> for f in files:
> if f.endswith('.txt'):
> allfiles.append(os.path.join(root, f))
>
> This
Hi list,
I am trying to make this code work. I don't have any experience with
defining things and this is my second program. The error returmed is
"SyntaxError: invalid syntax"
code:
#!/usr/bin/python
import cvs
def convertXLS2CSV(aFile):
'''converts a MS Excel file to csv w/ the same n
9 it returns all of the rows, so I now its reading OK..
Thanks for your time,
-nick
On Sun, May 31, 2009 at 3:57 AM, Alan Gauld wrote:
>
> "Nick Burgess" wrote
>>
>> I am trying to make this code work. I don't have any experience with
>> defining things
Got it.
the row is not a string or buffer but the cell is..
for row in spamReader:
for cell in row:
if pattern.search(cell):
print ', '.join(row)
On Sun, May 31, 2009 at 5:09 AM, Nick Burgess wrote:
> Thank you for your response and my apologies for t
TypeError: coercing to Unicode: need string or buffer, list found
On Sun, May 31, 2009 at 12:45 PM, Richard
Lovely wrote:
> 2009/5/31 Nick Burgess :
>> Got it.
>>
>> the row is not a string or buffer but the cell is..
>>
>> for row in spamReader:
>> for ce
or cell in row:
if pattern.search(cell):
print ', '.join(row)
XLS.xls.org1.csv
XLS.xls.org2.csv
XLS.xls.org3.csv
On Sat, Jun 6, 2009 at 3:33 PM, Emile van Sebille wrote:
> On 6/6/2009 12:19 PM Nick Burgess said...
>>
>> Thank you. The data is
Thanks everyone, the following code works great. It returns the name
of the file and the row that matched the reqex. Is it posible to take
the regex compile from user input? To make it take an argument, like
> csvSearch.py 10.192.55
af = re.compile(sys.argv[1])
pattern = re.compile(af)
Good evening List,
I am trying to have this script search for an IP or nearest subnet
match in a dir of csv's. It works with an absolute match, It will be
receiving a whole IP address, so if there is no absolute match no data
is returned, however if it is listed somewhere in a subnet I want to
kn
join(row)
On Wed, Jul 29, 2009 at 8:13 AM, Wayne wrote:
> On Tue, Jul 28, 2009 at 9:36 PM, Nick Burgess
> wrote:
>>
>> Good evening List,
>>
>> I am trying to have this script search for an IP or nearest subnet
>> match in a dir of csv's. It works
m("clear")
I resently made a 'game of life' clone and used the first method to
clear the screen. It's good enough for many things!
Nick
Monte Milanuk wrote:
Okay, simple question: is there anything similar to to 'clear' or
'cls' to clean up a
tell. (Also put
your usual #!/usr/bin/env python in there to work for you)
Nick
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
nstallation specific rather than python/script specific.
That turns the question it to a whole new direction for me.
Nick
Nick Raptis wrote:
pedro wrote:
#!/usr/bin/env python
# encoding: utf-8
import sys
theFilePath = sys.argv[1]
print theFilePath
But when I try to drop something on
ript you can then code different fonts or
sizes according to any logic you want.
Won't go into explaining HTML though (hint: use the class HTML attribute)
If it sounds more complex than you'd like, it's ok. It's more powerful
and more rewarding too.
Once you get the basic structu
Dave Angel wrote:
As I said, you'd probably get in trouble if any of the lines had '&'
or '<' characters in them. The following function from the standard
library can be used to escape the line directly, or of course you
could use the function Nick supplied.
ng sorted messing
things up. Thanks for the insight.
Nick
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
What is the best version of python to start out with? I see some
discussions on the net about not going to 3.1 but staying with the 2.x
releases. But then i see that 3.1 is better if your just starting.
Thanks for any insight on which version to go with.
-Nick
Thanks all! I think i will install the newly released 2.6.3 and go
from there. Its a little intimidating but i guess i gotta jump right
in and get my feet wet.
Thanks again!
-Nick
On Mon, Oct 5, 2009 at 5:59 PM, wesley chun wrote:
> On Mon, Oct 5, 2009 at 2:24 PM, Nick Hird wrote:
>>
store the path in the zip file? When i decompress
the files, i would like them to not be associated with a particular
folder or path, just the files. I looked through the docs but didn't
see anything to disable the path.
Thanks,
-Nick
___
Tutor mai
That was it. Thanks so much! I was looking at the docs and didn't
think that applied to the path that was stored.
Thanks Again!
-Nick
On Wed, Oct 14, 2009 at 12:16 PM, Kent Johnson wrote:
> On Wed, Oct 14, 2009 at 11:38 AM, Nick Hird wrote:
>> I was reading another thread and deci
.
Thanks!
-Nick
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
es though. So what O.S. are you
> on?
>
> On Wed, Oct 28, 2009 at 4:15 PM, Nick Hird wrote:
>>
>> Is there a way in python to tell if the power source for a laptop is
>> ac or battery? I am trying to write a small script to print out my
>> system stats and would
> I will read lines from file, with the 'for loop', and then I will check them
> for
> 'foo' matches with a 'while loop', if matches I (somehow) re-initialise the
> list, and if there is no matches for foo, I will append line to the list.
> When I
> get to a blank line (end of block), write myLis
me a pointer in the right direction I would be very
grateful.
Many thanks
Nick .
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
hankyou Ryan and Jacob, I obviously did not read the docs for os.walk
correctly, many thanks.
>>Alan G.
>>personally I'd use find and sed in Linux, right tool
>>for the job etc..
Yes I could use *nix tools for the job, but I want to do it in python to see
if I can :)
Thanks ag
Hello,
I sent this reply a few days ago, but it doesn't seem to have appeared on
the list, so Im resending it.
Many thanks
Nick .
-Original Message-
From: Nick Lunt [mailto:[EMAIL PROTECTED]
Sent: 08 January 2005 19:44
To: 'python tutor'
Subject: RE: [Tutor] walk
Nr 3. If your using python sockets try socket.settimeout(x)
Nick .
On Sat, 2005-02-26 at 15:12 +0200, Mark Kels wrote:
> Hi list.
>
> Here are the questions (-:
> 1. How do I make a progress bar in Tkinter ?
> 2. I got a while loop which does the port scan itself. How can I end
Richard,
if you try to print sys.argv[1:] when sys.argv only contain sys.argv[0]
then you are bound to get an empty list returned, [] .
Im not sure I understand the problem you think you've got but here's
what happens with sys.argv for me, and it's correct.
[argl.py]
$ cat argl.py
#!/usr/bin/py
pipe in the correct
way ? The way Im doing it works (so far) but should I be doing it
another way ?
Many thanks
Nick .
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
nce.
> For stdin this make sense, you have no idea how much data will be
> piped in.
Thanks Sean, I agree with you on both accounts there.
Cheers
Nick .
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
s soon as the first line is available. You should be
> reading sys.stdin as an iterator (same thing you'd do for a file):
>
> import sys
> for line in sys.stdin:
> # do stuff with that line of input
Aha, that makes sense. Thanks very much.
Nick .
___
xreadlines() these days just does 'return self', I believe. File objects are
> their own iterators; you can just do:
>
> for line in sys.stdin:
> # do stuff
>
Same as Max Noel said, must be a good idea ;)
Thankyou
Nick .
___
Thanks to everyone who helped me with this.
It's certainly given me something to think about :)
Cheers
Nick .
On Tue, 2005-03-01 at 23:13 -0600, David Rock wrote:
> * Nick Lunt <[EMAIL PROTECTED]> [2005-03-01 22:23]:
> > On Tue, 2005-03-01 at 14:14 -08
Hi Hugo,
many thanks for pointing that out. It all helps :)
Thanks again,
Nick .
On Tue, 2005-03-01 at 17:35 -0600, Hugo GonzÃlez Monteverde wrote:
> Everypne else has answered pretty muh about this. I just want to add
> that if you want to read noncanonically (less thana line ending
I've gotten into the habit of just using the os.?_OK stuff.
eg
>>> import os
>>> os.access('/', os.W_OK)
False
>>> os.access('/tmp', os.W_OK)
True
Thats gotta be simple if I understand it lol :)
Nick .
Alan Gauld wrote:
The simplest, IMHO, is :
t
v file open in Excel or some other
app ? Or is is password protected maybe ?
Sorry not much help.
Nick .
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
"
>print "Just right"
>___
>Tutor maillist - Tutor@python.org
>http://mail.python.org/mailman/listinfo/tutor
>
>
>
Hi Feziwe,
you might want to look at the random module to generate 'guess'
ramdon.randrange(
Hi John,
you can use 'pass' . This works the same as with exceptions, eg
try:
open('somefile')
except IOError:
pass
so we can have
class doNothing:
def __init__(self):
pass
def boring(self, other):
pass
Hop
Alan,
Please let us know when you have a draft of your tutorial on Beautiful
Soup and such. I'd be eager to have a look!
Thanks,
Nick
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
ave any suggestions for a way to go about this
pythonically?
Many thanks,
Nick
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
my scripts or at the command line.
Thanks,
Nick
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
here is my code so far
from Tkinter import*
root = Tk()
root.title("main screen")
root.maxsize(width=350,height=200)
root.minsize(width=350,height=200)
root.resizable(width=YES,height=YES)
def child1():
c1 = Toplevel(root)
c1.guess_ent = Entry(c1, width = 35,)
c1.guess_ent.grid(row = 1
i am tying to buil a program using child screens
the program is going the make a random number and the user has to guess it .
so far i have made the gui but how do i progame it to make the random number
This message is intended for the addressee named and may contain privileged
information or
sy")
c1.geometry("200x200")
Button(c1,text="clear", command = NIck).grid(row=1,column=0)
Button(c1,text="new game",).grid(row=1,column=1)
def NIck():
child1.box_txt.delete(0.0, END)
def child2():
c2 = Toplevel(root)
box_
how do you import sounds
This message is intended for the addressee named and may contain privileged
information or confidential information or both. If you are not the intended
recipient please delete it and notify the sender.
___
Tutor maillist -
Hi Alan,
Your excitement for the PyCrust IDE made me want to check it out, but
after downloading wxPython and the "Docs and Demos" at
http://www.wxpython.org/download.php#prerequisites
I've not been able to find an IDE to launch. Can you explain what I need
to do
y and CreateMacScripts.py, which creates the
MS-DOS batch files from the extension-less files), so how should I run pycrust?
Thanks in advance for any further help you can provide.
Nick
-Original Message-
From: Hiếu Hoàng [mailto:[EMAIL PROTECTED]
Sent: Friday, June 01, 2007 3:42
Hi Alan,
Thanks for the path. I find a .py, .pyc, and an icon file name PyCrust,
but no .pyw.
Any ideas?
Thanks,
Nick
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
of python installed, so maybe there is
some confusion there? If so, I'd be grateful for help understanding what
I need to do to resolve it.
Thanks,
Nick
From: Grant Hagstrom [mailto:[EMAIL PROTECTED]
Sent: Friday, June 01, 2007 4:33 PM
To: Switanek,
im not sure why this progrm isnt running properly one of the button wont
open and it teel me a computer_guess is not defined here is my code
#NiCk TrEloaR PrOgRaMiNg Co.
#scissors paper rock
#10/6/07
from Tkinter import*
from random import choice
class Application(Frame):
def __init__
hey i was just wondering if any one could tell me if they know if you can make
multi player games through lan with python heres the code i want to lan.
just hash out the sound files
#NiCk TrEloaR PrOgRaMiNg Co.
#scissors paper rock
#10/6/07
from Tkinter import*
import pygame
from random
ould cause performance problems relating to the OS.
So I'm thinking I will need to learn python threads (no bad thing)
instead, but Im hoping that someone could tell me if that seems the best
way to go ?
I will be getting to grips with python threads a
at's one way I was thinking of doing it. I'll run it like that on about 10
active files and see how it stacks up.
> twisted.protocols.basic.FileSender and
> twisted.internet.stdio.StandardIO look like they may be starting points.
Thanks for the twisted
ill only work if your current mysql install is an RPM.
Cheers
Nick .
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
list.
I would recommend that you go here
http://pythoncard.sourceforge.net/index.html to get PythonCard and then go
here http://pythoncard.sourceforge.net/walkthrough1.html to read the docs.
It will take all of 10 minutes to be able to create a decent GUI.
Hth,
Nick .
___
t is this type of list:
> ['DSC1', 'DSC2', 'DSC3']
> i.e. the names w/o the file extension.
>
> what's the easiest way of doing this?
>
> marc
You need the split() method.
ie
>> l = ['DSC1.JPG', 'DSC000
dir/python'.
What I must stress is that you do not overwrite your default python
installation, leave it as it is, otherwise many of mandrakes GUI tools will
no work.
I hope that helps, feel free to ask more questions about this as I have had
to overcome the same issue on RHEL serveral t
Hi Andy,
Andy Dani wrote:
>Thanks Nick,
>
>Any idea about the second question? When I python from
>/usr/loca/Python-2.4.1/bin, it does launch the interpreter but with an
>traceback error saying there is some conflict with "import readline" line on
>pythonrc.py fi
Sorry for potential double post, error with first send
--
Hello all,
I had a new question about python. I am pretty much
in tutorial learning stages, but attempting to create sample programs not in my
book to learn how to cons
<
100: flip -= 1
random.randrange(2) if flip <
100: break
print "\nThe amount of times
tails came up was" , tails , "The amount of times heads came up was" ,
heads
raw_input()
From: bob
[mailto:[EMAIL PROTECTED]Sent: Tue 10/25/2005 10:58
PMTo: Nick Eberle;
Ahh makes much more sense, thanks for all the help!
I'll go back and rework it, keeping in mind trying to solve each piece
separately.
Thanks again all.
-Original Message-
From: Alan Gauld [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 26, 2005 1:53 AM
To: Nick Eberle; bob;
I get the same error even after declaring x to
be global.
No doubt the answer is staring me in the face ... but I still can't see it.
Cheers
Nick .
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
info.
>
> Meanwhile lets simplify by removing the class bit
>
>
> def h():
> global x
> x += 1
> print x
>
> h() # prints 43
Many thanks to Alan, Andrei, Hugo and Welsey for helping me to
understand where I was going wrong.
I though
at Alan. I always seem to get myself into difficulty with the
os.walk routine, but you explained it brilliantly there.
Have to admit, I couldn't be bothered to read the "So What is the Operating
System" bit tho cos as you say on the page, we don't
1 - 100 of 140 matches
Mail list logo