Okay, so I'm proficient in Python, but not quite perfect (and know nothing about PyGame- gonna get to that after I finish Classes, which should be soon. Yay!). As such, there are some things that I don't understand. I use Python 3, by the way.
1. Why use objects to indirectly access methods instead of just directly accessing static methods?
Resolved
2. How is PyGame for 3D?
Resolved.
3. Can Python work with internet?
Resolved.
4. How does Python/PyGame make .exe files instead of .py files (imagine something like WoW or CoD where you can just right-click on the program and choose 'edit in IDLE' to hack the entire game).
Resolved.
5. How do you make a project using multiple programming languages in the same project (I heard about a few things that did like Ruby and Perl or something like that some years back)?
Resolved.
6. Can I control the color of the text printed without resorting to PyGame?
Resolved.
7. Is Python capable of handling time (as in 'wait so-and-so seconds')?
Resolved.
8. Exactly how would you make a 3D world in PyGame?
9. What's inside the object class (as in 'class ThisClass:' versus 'class ThisClass(object):')?
10. How do I make a module that can be accessed from anywhere on my computer, like random, sys, etc?
11. Does Jython allow Java scripts or does it just run on the Java VM?
Wow, longer list than I expected. 5 doesn't really matter. All the otheres do. If PyGame doesn't do 3D well, I can use Ogre3D. And while a cool idea, it's probably a real pain to debug 2 programming languages at once.
Edit: As for those of you who are wondering why some of these are important, keep up with my posts (I don't post threads often, so it should be easy). It has to do with the following:
the road goes ever on and on
from the door where it began.
now far ahead the road has gone
and i must follow if i can,
pursuing it with weary feet
until it joins some larger way
where many paths and errands meet;
and whither then? i cannot say.
(The Lord of the Rings)
***
alive without breath;
cold as death;
never thirsting, ever drinking;
clad in mail, never clinking.
drowns on dry land;
thinks an island is a mountain;
thinks a fountain is a puff of air
so sleek! so fair!
we only wish to catch a fish,
so juicy-sweet!
(The Lord of the Rings)
***
Orome by which the teleri resided
was left behind to memory.
So that as the elves built their boats,
the shore was left behind.
(Me)
***
all that is gold does not glitter,
all who wander are not lost.
the old that is strong does not whither;
deep roots are not touched by frost.
from the ashes a fire shall be woken,
a light from the shadows shall spring.
renewed shall be the blade that was broken;
the crownless again shall be king.
(The Lord of the Rings)
***
On short grass my feet continue,
and long will they go on-
beyond the horizon, and back.
So shrugging off their weariness,
my feet lead me on and on.
(Me)
***
three rings for the elven-kings
under the sky;
seven for the dwarf-lords
in their halls of stone;
nine for mortal men,
doomed to die.
one ring for the dark lord, on his dark throne.
in the land of mordor where the shadows lie.
one ring to rule them all, one ring to find them;
one ring to bring them all, and in the darkness bind them
in the land of mordor where the shdows lie.
(The Lord of the Rings)
***
Points for whoever figures that one out. Look for similarities in the poems. It works if it's start on log-in. And yes, ALL of the questions have to do with it.
If you can guess, then you know that it is a unique idea. And yeah, I suck at poery. The only good ones come from The Lord of the Rings. And yeah, I make references to the Silmarillion. Heavy references. Read them anyway, though, please.... They're important.
Last edited by maxskywalker (2011-10-02 21:01:25)
Offline
maxskywalker wrote:
7. Is Python capable of handling time (as in 'wait so-and-so seconds')?
You can use
sleep 5000
That's for 5 secs.
I'm just learning python.
Offline
Oh, and grade my poetry? Every other poem is mine.
Offline
Python can handle time, I believe it uses a "tick" which is .001 seconds.
Python can work the internet, part of YouTube's programming is in Python, so there is someway to get it to work online.
Pygame can handle 3d pretty well as far as I've seen, but it does take a lot of math and such.
Offline
AtomicBawm3 wrote:
Python can handle time, I believe it uses a "tick" which is .001 seconds.
Python can work the internet, part of YouTube's programming is in Python, so there is someway to get it to work online.
Pygame can handle 3d pretty well as far as I've seen, but it does take a lot of math and such.
Thank. So it's tick(1000) for a 1 sec pause. That really helps. Oh, and how's my riddle?
Offline
AtomicBawm3 wrote:
Python can handle time, I believe it uses a "tick" which is .001 seconds.
Not working...
Offline
maxskywalker wrote:
AtomicBawm3 wrote:
Python can handle time, I believe it uses a "tick" which is .001 seconds.
Not working...
I don't think you use the word tick...I think you have to define a variable in a certain way...hold on, I know the video that explained it...
Offline
http://stackoverflow.com/questions/1563 … -in-python
Here's a way to do it.
EDIT: http://stackoverflow.com/questions/1333 … rom-python
and another.
Last edited by AtomicBawm3 (2011-09-14 19:45:09)
Offline
Found the video.
Also, this is in the middle of good series to look at for Pygame, but it cuts off randomly like all his python tutrorials, so you're not going to learn too much from it.
Offline
AtomicBawm3 wrote:
Found the video.
Also, this is in the middle of good series to look at for Pygame, but it cuts off randomly like all his python tutrorials, so you're not going to learn too much from it.
Oh. Got it. So it's a PyGame thing. How about the other questions? Or the riddle?
Offline
6 depends on what you're printing it in...if you're printing it in the python.exe or IDLE, nope, but if you use wxpython or pygame or something else I can't remember the name of, you can.
Offline
My guess is that it's a Lotr Rpg seeing as you inquired about time and that you posted that long LOTR thing
Offline
Is there a way you can "go to" a line?
Offline
nickbrickmaster wrote:
Is there a way you can "go to" a line?
Short answer: no. There is no "goto" statement as in BASIC and other similar languages.
It's better to just organize your code using subroutines and proper structuring, rather than having goto statements leading all over the place anyway.
Offline
bananaman114 wrote:
My guess is that it's a Lotr Rpg seeing as you inquired about time and that you posted that long LOTR thing
Nope. I'm just obssessed with LOTR poetry.
Last edited by maxskywalker (2011-09-15 10:33:39)
Offline
bananaman114 wrote:
My guess is that it's a Lotr Rpg seeing as you inquired about time and that you posted that long LOTR thing
Hint: only mine matter.
Offline
i dunno about python .. seriously lol .. never thought of learning it -_- .. but yeah this forum is making me go give a try and learn my 14th language!! woot woot!
Offline
fanofcena wrote:
i dunno about python .. seriously lol .. never thought of learning it -_- .. but yeah this forum is making me go give a try and learn my 14th language!! woot woot!
O... kay.... It's a bit like what I've seen of BASIC, or Eifell, though I don't use them.
Offline
maxskywalker wrote:
fanofcena wrote:
i dunno about python .. seriously lol .. never thought of learning it -_- .. but yeah this forum is making me go give a try and learn my 14th language!! woot woot!
O... kay.... It's a bit like what I've seen of BASIC, or Eifell, though I don't use them.
Or maybe Lua? But with colons.
Offline
Um, right. Now, aside from that offtopic bit...
can we get back on subject now?
Offline
Hey max, I was wondering if you knew anything about the "Pickle" way of saving files in python. In my program, it's supposed to save a list, but when it does the pickle.dump(), I get an error saying
Error wrote:
Traceback (most recent call last):
File "Z:\python_programs\Textgame1", line 124, in <module>
pickle.dump(savelist, Name + "textventure.txt")
File "C:\Python26\lib\pickle.py", line 1362, in dump
Pickler(file, protocol).dump(obj)
File "C:\Python26\lib\pickle.py", line 203, in __init__
self.write = file.write
AttributeError: 'str' object has no attribute 'write'
Can you help? Much thanky.
Offline
I am working on making a web browser in Python, and ran a little test with this code:
import http.client
load = http.client.HTTPConnection('example.com')
load.request("GET", "/")
r1 = load.getresponse()
print(r1.read)
sleep 5000but it says that "sleep 5000" is invalid syntax. Can anyone help?
(I am using Python 3.2)
EDIT: Nevermind, I found out i need to import the "time" module and use "time.sleep(#).
Last edited by fire219 (2011-09-16 17:46:42)
Offline
don't you need to import the time plugin?
Offline