I_pity_the_fool
Warlord
I'll start right away.
Well, before you do, Python presumably has some kind of module to access the XML files, yes? Ought we not to learn about that, if you could spare time to put something together?
I'll start right away.
Python certainly does have modules to access XML (known as parsers). The problem is that there are two different types! There's the event based one (E.g. do this when this is found), and then there's the heirachial one (like the folders on your computers). Without knowing which approach is taken, to write a lesson for one method could prove a waste of time if the other method is used.I_pity_the_fool said:Well, before you do, Python presumably has some kind of module to access the XML files, yes? Ought we not to learn about that, if you could spare time to put something together?
Python said:I'm just looking for a little clarification in this "for" loop(from lesson 7):
for entry in list:
Okay so "for" and "in" always have to be part of every "for" loop you write, right?
So really I'm just wondering what exactly "entry" and "list" do?
If someone could clarify this for me that would be great thanks.
#create a list of some sort:
year = ["jan","feb","mar","april","may","june","july","aug","sept","oct","nov","dec"]
#then put in in a for loop:
for month in year:
print "month now equals",month
Grey Fox said:You write it:
countries = ["Canada", "USA", "Mexico"]
for entry in countries:
....nation = countries[entry]
....print nation
and it will print:
Canada
USA
Mexico
countries = ["Canada", "USA", "Mexico"]
for entry in countries:
[I][B]nation = entry[/B][/I]
print nation
actually, more concisely:grumbler said:Small nitpick, but to avoid confusion, I think it's better to mention: Grey Fox's example should read:
Code:countries = ["Canada", "USA", "Mexico"] for entry in countries: [I][B]nation = entry[/B][/I] print nation
for nation in countries:
print nation
<card id="1">
<Spanish>Hola</Spanish>
<English>Hi</English>
</card>
<card id="4">
<a>perezoso</a>
<b>lazy</b>
</card>
#Below is the function
def hello():
print hello
return 1234
#And here is the function being used
print hello()
So what happened?
1) When the line 'print hello' was run, the function 'hello' was executed.
sekong said:Do we have a clue about which part of the game we could mod?
Does python gives us a power of changing the game behaviour, or
just changing some parameters... or I may ask how is a python
toll enable us to change the game more than a EDITOR do?( I assume so,
otherwise, why not just give us an editor?)
chriseay said:My programming knowledge is in C++ (two years in high school, over 5 years since I used it), basic (elementary school!!), a little dabbling in html and something else in elementary called logo, though I remember none of it and am not even sure if that was the real, or commonly used name.
Weasel Op said:High school? ELEMENTARY????? I had to wait til college!
Welcome to CFC!!!![]()