[Tutor] about print()

2011-06-05 Thread Ryan Wu
Hi all, I am a newbie of python, and reading 'python essential reference'. Now I want to print this results 'a is %d' % a -> a is 42 > with the code a = 42 > test = "'a is %d' % a" > print( '%20s ->' % test, test) > but what I get is > 'a is %d' % a -> 'a is %d' % a > What is the

Re: [Tutor] No module named player_data

2011-06-05 Thread Michael bridges
simple file was named __ init __.py not __init__.py restored from recycle bin showed the error thanks for your help --- On Sun, 6/5/11, Alexandre Conrad wrote: > From: Alexandre Conrad > Subject: Re: [Tutor] No module named player_data > To: "Michael bridges" > Cc: Tutor@python.org > Date: S

Re: [Tutor] No module named player_data

2011-06-05 Thread Michael bridges
Traceback (most recent call last): File "C:\Users\MySelf\Program\game_stuff\Game_28_02_11\Servers\server_client_begining\server.py", line 3, in from player_data import PlayerArmy ImportError: No module named player_data --- On Sun, 6/5/11, Alexandre Conrad wrote: > From: Alexandre Conr

Re: [Tutor] No module named player_data

2011-06-05 Thread Michael bridges
more specific general info [do not want to copy/paste the whole files]: [\server_client_begining\server.py] from player_data import PlayerArmy [\server_client_begining\player_data\PlayerArmy] #PlayerArmy playerName = "john" militia_amount = 100 military_amount = 10 [with more variables] [no clas

Re: [Tutor] No module named player_data

2011-06-05 Thread Alexandre Conrad
2011/6/5 Michael bridges : > one of the things i deleted was __init__.py & __init__.pyc [thought it was > not used, then read import again and put it back. still not working] You always need an __init__.py file in a folder that you want to import in Python. That tells Python to consider the folde

Re: [Tutor] No module named player_data

2011-06-05 Thread Michael bridges
one of the things i deleted was __init__.py & __init__.pyc [thought it was not used, then read import again and put it back. still not working] player_data [folder] __init__.py [several .py & .pyc files] --- On Sun, 6/5/11, Alexandre Conrad wrote: > From: Alexandre Conrad > Subject: Re

Re: [Tutor] No module named player_data

2011-06-05 Thread Alexandre Conrad
2011/6/5 Michael bridges : > why does this happen? > > server [folder] >       player_data [folder] >       server.py > > Traceback (most recent call last): >  File > "C:\Users\MySelf\Program\game_stuff\Game_28_02_11\Servers\server_client_begining\server.py", > line 3, in >    from player_data i

[Tutor] No module named player_data

2011-06-05 Thread Michael bridges
why does this happen? server [folder] player_data [folder] server.py Traceback (most recent call last): File "C:\Users\MySelf\Program\game_stuff\Game_28_02_11\Servers\server_client_begining\server.py", line 3, in from player_data import PlayerArmy ImportError: No module nam

Re: [Tutor] python "glue"

2011-06-05 Thread Alexandre Conrad
I think by "glue language", it meant that it's also a "lightweight" programming language in a sense that it can be used for scripting. Just slap pieces of code and external programs together and make it all work in harmony. When I hear "gluing", I think you did not write everything from scratch but

Re: [Tutor] python "glue"

2011-06-05 Thread Corey Richardson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/05/2011 06:25 AM, Benjamin Gregg wrote: > Hi I recently bought a book (python programing for the absolute beginner) > and it said python was a "glue" language (could work with other languages) > I've been trying to make apps for android and webOS

[Tutor] python "glue"

2011-06-05 Thread Benjamin Gregg
Hi I recently bought a book (python programing for the absolute beginner) and it said python was a "glue" language (could work with other languages) I've been trying to make apps for android and webOS and I was wondering if I could use python for doing this through "glueing" to program games on a