- Upvotes Received
- 3
- Posts with Upvotes
- 2
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
i'm 20 years old and i'm studying computer science in college.
- Interests
- poetry, python, c++, games, gaming
- PC Specs
- BTO gaming grade laptop
38 Posted Topics
Re: Just make sure they are both in the same directory (probably c:/python or something like that). Then you can just import the other file and use it like it is a module. [code="python"] import test.py #just imports the file from test.py import * #brings every class and function from the … | |
Re: Imagine your screen being a cube. The x and the y values give you the position at the very front of the screen/cube. y determines how high a point is, and x determines how far a point is from the edges. The z axis then adds a depth to this. … | |
![]() | Re: Depending on your amount of ram this can make a big difference. I had a similar experience with a windows laptop which had >4 GB ram. Everything above this amount could not be used by the 32bit version of the operating system. This meant changing over to the 64bit version … ![]() |
Re: You should give us some code, and some information about what you are doing. It's hard to say anything about just the error without any context. If the code is too much to post, then consider posting a part of it, or at least explain what you are trying to … | |
Re: The dot operator is used to acces methodes and variables that are part of a class. It's saying from class abc i'm using the upper function. This function still takes it's parameters in between the brackets. You are just saying that you want to use the upper function from the … | |
Re: just have a loop that handles a turn for each play in order. Something like : while(playing) player1.doTurn() player2.doTurn() if(end) playing = false | |
Re: Your array is made of Person objects. To select the ith object you would use `person[i]`. Then you would like to get to the name of this person which would be `.name`. Combing those you adress your ith name as `person[i].name`. The same goes for your days. The reason for … | |
Re: Or just calling the support, and asking a password :P | |
Re: To skip the header lines, just read them in but don't do anything with them. Or look into fseek() to move the file pointer past them. To read in the columns you seem to be on the right track, if they are seperated by tabs you should probably use \t … | |
Hello, For a hobby project i'm working on i'd like to be able to generate some text based on some random inputs. Now i'd like this text to seem like it was writting by a human. I realise this is pretty hard but i was wondering if anyone could point … | |
Re: What is the difference between line 19 and 21 ? Why `**file**` one time and just `file` the other time ? You should also take a look at your code for the binary_tree. Normally when you use a class you would make the members private and use functions to acces … | |
Re: do you want to swap the array around or simply print it backwards ? | |
Re: It's hard for us to know what your teacher put emphasis on. I would say that in general it is always very important to know the connections between the different parts of your theory. Don't just study it by heart, know how it relates to itself. Speaking for my experience, … | |
Re: There is no question here. Please start working on it yourself and when you run into a problem, then ask a question. | |
Re: You should probably tell us what you are doing for us to give any tips. For example posting the code you use to draw each frame. Maybe this code could be optimalised, you could be redrawing too many things per frame which would make it impossible for your cpu to … | |
Re: Well, how do you propose to read the whole file and process every letter without using a for loop ? I think using a for loop here is indeed the right way to go, and if you want to make a function for the whole text, just put a for … | |
![]() | Re: on line 115 and line 132. I presume you are trying to create a function but you don't define it correctly. If the function takes no arguments you should put ( void ) behind it, and not just a ; (or like you did in output() on line 149 ). |
Hi, i'm running a server in my basement. ubuntu running xampp. And i was wondering if anyone can point me to some good uses of python to use on my server. i'm a bit low on inspiration. I know there's Django and also mod_python. But it doesn't have to be … | |
Hey I've got an old server in my basement and i want to host a forum on it. I know there are also online free forum hosting but i want to learn what i'm doing. I want to use this thread to ask for advice. Right now my plan is … | |
Re: python 2.3 is not that different from 2.6. But there are a lot of diferences with the newest version 3.1. | |
the cursus i'm taking on python (free on internet). said i know enough and that i should try creating some simple games like oxo. the problem is that i don't know how the create a framework for such a game any help is welcome. mathijs p.s. my english may not … | |
Re: You should start by learning some programming languages. [url]http://www.freenetpages.co.uk/hp/alan.gauld/[/url] this is a programming tutorial wich learns you the basics of programming using python. It is a totally free tutorial wich i followed myself. | |
![]() | Re: Take a look at the great wxpython tutorial on this site. It helped me to create some graphical programs with python. You should probably just bind some functions to a button wich is not too hard. I'm not sure how to link to the tutorial but you can find it … |
Re: Maybe you could create some kind of while loop who keeps checking if a user enters something and that breaks after 10 seconds and displays an error. [code="python"] while current_time < error_time #error_time being your first time plus 10 seconds. if user_input : do_something else: current_time = time.ctime(time.time()) #update current … | |
Re: I'm not that familiar with webservers in python but isn't it normal that the server just keeps running in the shell? You should probably use something else to see the servers output? Like a web browser or something? | |
Re: i'm from Belguim too. crazy coincidence ? Toeval bestaat niet (there's no such thing as luck). | |
Re: Just wanted to add that in python 3.0 every class wil be an newstyle class so you better use those to make sure you can easy porte your code to that version of the language | |
Re: If you make the new code as a function (def ...), you can just add it anywhere near the other def statements (before you start the game). If not you have to look at your main game loop again and see where to insert the code. I think it is … | |
Re: For the GUI take a look at the wxpython tutorial a this forum. It helped me create a gui for my latest program and you could use something like wxglade to help design it if nescesary | |
Re: This seems like a great idea to me too. I would like to participate. About the rules : i would like to be able to use python. You probabled shouldent make the time limit to short (but also not to long :D) I just hope this will come trough and … | |
Re: The problem with the link is that it highlits the words class and average and for some reason that doesn't work but if you just remove that part you do get to the right page. [url]http://www.daniweb.com/forums/thread66974.html[/url] | |
Re: When i started learning python i was working under windows en i just used idle. But now i've switched to linux and i use eclipse with te pydev-bindings | |
hey i'm currently working on a simple rpg in python. First i was gonna make it text-based but now i've read the wxpython tutorial and i want to try an create a GUI for it. My sister is gonna make some artwork for me (i'm not good at that kind … | |
Re: i suggest you start with properly intending your code. that wil allow it to work and make it easier to read | |
Re: just wanted to point something out. the difference between idle and just executing a program is that idle doesn't shut off at the end. i don't know if your program takes input but if it only prints things it wil look like it doenst work when you just exec it … | |
hey everyone. i'm Mathijs Creemers i'm 16 and i live in Belguim. i'm starting to learn myself python and i'm gonna get my own computer with linux. i was wondering if there are any other people here who speak dutch. hope my english is not to bad :) | |
i have created an oxo game. wich is a game where you try to get 3 in a row in a 9-square field. i got it running but i have one question. for the computer's moves i predicted what the user would do (2in a row) and then made the … | |
I'm having a problem trying to create a game. the point of the game is to guess a random number. i'm learning python and i tought it would be a good exercise. everything went fine (if you dont count syntax errors :)) until i tried to save the program. i … |
The End.