Skip to content

Instantly share code, notes, and snippets.

View d33tah's full-sized avatar

Jacek Wielemborek d33tah

View GitHub Profile
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Biblioteka dla NK pod Pythona.
BY d33tah, LICENSED UNDER WTFPL.
"""
"""
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Biblioteka dla NK pod Pythona.
BY d33tah, LICENSED UNDER WTFPL.
"""
"""
#!/usr/bin/python
# -*- coding: utf-8 -*-
from pynk import *
from config import * #might be removed - defines only "login" and "password"
from time import sleep
import math
from PIL import Image
import os
def drawProfiles(self,task):
r=14
i = 0
n = len(self.my_friends)
for i in range(n):
x=math.sin(i*(360/n))*r
y=math.cos(i*(360/n))*r
profile_obj = loadObject(pos=Point2(x,y))
profile_obj.node().setIntoCollideMask(BitMask32.bit(1))
profile_obj.node().setTag('number', str(i))
def drawObjectsTask(self,param,task):
n = len(param)
for i in range(n):
x=math.sin(i*(360/n))*self.r
y=math.cos(i*(360/n))*self.r
self.objects[i]=self.drawObject(x,y,i,param[i])
yield task.cont
def drawObjects(self,param):
self.task = taskMgr.doMethodLater(0.1, self.drawObjectsTask, 'drawObjectsTask', extraArgs=[param], appendTask=True)
#!/usr/bin/python
# -*- coding: utf-8 -*-
from pynk import *
from config import * #might as well be removed - defines only "login" and "password"
#set_debug(True)
from time import sleep
import math
from PIL import Image
#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
"""
Biblioteka dla NK pod Pythona.
BY d33tah, LICENSED UNDER WTFPL.
"""
def drawObjectsTask(self,param,task):
n = len(param)
for i in range(n):
deg=i*(6.2832/n)
x=math.sin(deg)*self.r
y=math.cos(deg)*self.r
object_ = self.drawObject(x,y,i,param[i])
> packp3d -o app.p3d -d .
Traceback (most recent call last):
File "/root/pandaworker/panda3d-1.7.0/built_cmu/direct/showbase/Messenger.py", line 352, in __taskChainDispatch
File "/root/pandaworker/panda3d-1.7.0/built_cmu/direct/showbase/Messenger.py", line 410, in __dispatch
File "/root/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/AppRunner.py", line 493, in __startIfReady
File "VFSImporter", line 153, in load_module
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/packp3d.py", line 219, in <module>
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/packp3d.py", line 209, in makePackedApp
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/Packager.py", line 2352, in endPackage
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/Packager.py", line 403, in close
> packp3d -o app.p3d -d .
Traceback (most recent call last):
File "/root/pandaworker/panda3d-1.7.0/built_cmu/direct/showbase/Messenger.py", line 352, in __taskChainDispatch
File "/root/pandaworker/panda3d-1.7.0/built_cmu/direct/showbase/Messenger.py", line 410, in __dispatch
File "/root/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/AppRunner.py", line 493, in __startIfReady
File "VFSImporter", line 153, in load_module
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/packp3d.py", line 219, in <module>
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/packp3d.py", line 209, in makePackedApp
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/Packager.py", line 2352, in endPackage
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/Packager.py", line 403, in close