Hypnotic Python: Puppy's missing Python libraries?

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

Hypnotic Python: Puppy's missing Python libraries?

#1 Post by Lobster »

My only chance to learn to program
is to hypnotise myself . . .

So I wrote this in Python:

Code: Select all

# relax program, lobster July 2006
import random
import time

command = ['NOW . . . ', 'Sense that . . . ', 'Be aware that ']
prefix = ['you are . . . ', 'you feel . . . ', 'you can be . . . ', 'you deeply are']
verb = ['relaxed ', 'calmed ', 'positive ', 'healed ']
end = ['your python programming improves .. .', 'keep improving . . . ', 'keep that in mind . . . ', 'absorb that knowledge deeply . . . ', 'sense that in the body . . .']

while random.choice != 't':
    time.sleep(4)
    print random.choice(command)
    time.sleep(3)
    print random.choice(prefix)
    time.sleep(2)
    print random.choice(verb)
    time.sleep(1)
    print random.choice(end)
    print
. . . well now it works OK in Windows but the random library seems missing from the Puppy Python
Nathan or any of you snake charmers - how do I ensure I am runing a Python with all the libraries?

Many thanks :)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#2 Post by MU »

on the python website, there can be downloaded modules (use the search, or sometimes google).

If you use Python-MU, then extract the module to a temporary folder, and run
python setup.py
or compile it as usual, that depends on the module (see INSTALL or README).

This usually requires usr_devx.sfs, as many module-setups automatically compile a .so -file on your Puppy then.

Python-MU includes the required module, to compile other modules.

Mark

Post Reply