On Thu, Jun 25, 2009 at 07:03:16PM -0700, Bob Chance wrote:
> Currently on Windows XP, using TurtleSVN 1.6. I have Python 2.6.2
> installed.
>
> When I tried to add http://mccormick.cx/dev/PodSixNet/, it errors and
> states:
> "Repository moved permanently to 'http://mccormick.cx/dev/PodSixNet/';
> please relocate"
Ah, sorry, this might not be very clear from the website, but it's actually a
bzr repository, not an svn repository. I have been thinking about pushing it
into Google Code or something like that so that people with SVN only will be
able to check it out. Would that be useful to you, or are you happy with using
the tarball?
> So I downloaded the Tarball from the direct download link, but
> __init__.py is a zero byte empty file, and in the example folder,
> there's also another 0 byte filed named "PodSixNet", which when
> extracting fails to extract and gives and error.
Ah ok. __init__.py is actually a zero byte file on purpose. It's a pretty
standard practice in Python and basically tells Python that this directory is
supposed to be considered as a module, with the files in it each being
submodules. It's basically there so that people can symlink or copy PodSixNet
into their project and then just say 'import PodSixNet'.
Which brings me to the next empty file. It's actually a symlink under unix
based systems which unfortunately defaults to an empty useless file under
Windows. That's ok, we can fix it (and I will try to remember to document this
for Windows users, or change it to something more portable).
The file is there so that the examples in the examples folder will run; the
examples need access to the PodSixNet module itself, even though they are a
subdirectory, so I had a circular symlink thing happening in order that they
could find the library. Probably the way I should be handling this is to make a
setup.py file so that people can just install the module. But anyway, you can
make the examples run by basically copying them to one level above the
PodSixNet folder.
Infact, I have just fixed this so I'll commit the code and you can download the
new tarball soon and it should just work (check again in about half an hour).
> Nonetheless, the rest of the file extracted fine, so I went into the
> example folder and decided to give the chat example a go. Lo and
> behold, when I run the ChatServer.py, it errors with the follow
> traceback:
> Traceback (most recent call last):
> File "C:\Documents and Settings\Administrator\My Documents\Downloads
> \PodSixNet\examples\ChatServer.py", line 4, in <module>
> from PodSixNet.Server import Server
> ImportError: No module named PodSixNet.Server
Yeah, so this is basically the reason for the symlink I mentioned before. The
files in the examples folder can't find the PodSixNet library itself (becuase
it's 1 directory above). I'll commit my fixed version now.
> Admittedly, I'm quite new to Python/PyGame (which I'm planning on
> using PodSixNet with), so if there's an easy fix which I'm not aware
> of, please point me in the right direction :).
I hope this helps and you can get on with making some fun multiplayer games!
Thanks very much for bringing the deficiencies in the documentation and layout
present for Windows users, to my attention. I'll use what you've said and try
to re-arrange stuff so that it works a bit better by default.
Best,
Chris.
-------------------
http://mccormick.cx