User:Poppy Linden/PyOGP \ libdev Initial Setup Experience

From Second Life Wiki
Revision as of 18:09, 6 July 2009 by Poppy Linden (Talk | contribs)

Jump to: navigation, search

sequential, oldest first.


  • omg tons of docs
  • omg repeats internally / externally... lemme fix that...
  • code?
  • ok, what deps are required? wait.. how does python pathing work? oh, i can just put it in my python_path, cool
  • wait, this says i need to install a friggin million things.
  • I Hate Everything Python Right Now.
  • I bootstrapped a wicked python env in my homedir.
mkdir -p ~/local/lib/python2.4/site-packages
vi ~/.bashrc 
>> export PYTHONPATH=$PYTHONPATH:~/local/lib/python2.4/site-packages
>> export PATH=$PATH:/usr/local/bin:~/bin:~/local/bin
. ~/.bashrc 

curl -L '' > setuptools-0.6c9-py2.4.egg
sh setuptools-0.6c9-py2.4.egg --prefix=~/local
easy_install --prefix=~/local pip
easy_install --prefix=~/local virtualenv
  • ok, now what again? Oh yeah, virtualenv for pyogp... the point of this...
    • virtualenv . --no-site-packages
    • bin/python
    • bin/buildout -v
    • oh, so virtualenv is preventing the very borknorking i am trying to prevent to my system. Fair game.

bootstrap / sanity verification

  • bin/client_unittest
    • pip -E . greenlet
    • bin/client_unittest
    • now a bunch of crazy shit instead of tracebacks, that's... good?
    • 114 tests and 0 failures! that's good!

initial investigations

  • vi src/pyogp.lib.base/pyogp/lib/base/tests/
    • everything starts with login, even with base. What about the delicious primitives i crave?
    • ls -l is your friend. There are subfolders in src/pyogp.lib.base/pyogp/lib/base/, namely one named network, and one named message.
  • reading tests is like looking at a tautology; they have no docs. "Yes, i bet that does in fact work that way." What do I see to bootstrap an app?
  • i say: "(i want to know what code to see to understand) how to init main, send a message, quit" enus: "well, uses UDPDispatcher. i've not tried using it w/o the entire context" "maybe is a useful reference. it instantiates UDPDispatcher, against a mock host, and sends a message"
  • enus: "the Message usage is changing soon. look at the Message() class." " transforms representations of packet data into Message instqances, but is going away soon"
  • there *really* needs to be a step-by-step to get bootstrapped, I hope this helps write that! I'm still not writing "Hello World" with pyogp yet!
  • test app, try 1
  • should work to just copy a unit test into my src/ dir, copying as it sounds like a good start
  • pip install -E . greenlet
  • bin/python src/ ... aaaaaand... no output. Is that a good thing for a test?
  • need some of this:

<python> if __name__ == "__main__":



  • tests pass. Rad! Let's send some garbage.

learn to send messages

  • pyogp.lib.base/pyogp/lib/base/message/ - the Host class looks a little thin; doesn't take a FQDN, just an IP addy?
  • resetting the host in test_find_circuit in my modified copy of doesn't seem to be hitting the desired host / port