Forum: Python Jun 30th, 2009 |
| Replies: 4 Views: 302 you could try eclipse, with some plug-in if you want a fully featured IDE.
what i do personally, is usually use it notepad++, which provides basic syntax highlighting. in a learning process there... |
Forum: Python Jun 23rd, 2009 |
| Replies: 7 Views: 350 it's ususally the simple "bugs/fixes" that are the hardest to see because they are simply overlooked. good luck with the GUI, unfortunately i haven't dealt with python GUIs before, but i'm sure... |
Forum: Python Jun 23rd, 2009 |
| Replies: 7 Views: 350 just move the entry/start point of your game into a function, and then at the end of that function (even after) you can give the use the option to "play again". |
Forum: Python May 29th, 2009 |
| Replies: 1 Views: 337 i think you need some actuals specs, because simply creating a file called with the extension .html is "creating a web site". |
Forum: Python Mar 1st, 2009 |
| Replies: 2 Views: 1,116 you have the while loop, which us going to act as your loop. the problem however is that you never query the user for x again. if you read the code, you are going to ask the user for y/n, but never... |
Forum: Python Feb 25th, 2009 |
| Replies: 6 Views: 1,304 I assume you are able to copy this using explorer? anyway, look up the api on how to use the copytree method. |
Forum: Python Feb 24th, 2009 |
| Replies: 6 Views: 1,304 what permission error does it give? and only on windows?
from the api, copy should only have a file as its source so you shouldn't be able to copy folders using it. maybe shutil.copytree is what... |
Forum: Python Feb 24th, 2009 |
| Replies: 6 Views: 342 your code execution starts from while True: (and since you had #main, it seems you understand that). read your code from that point onwards, where ever would health change? |
Forum: Python Feb 23rd, 2009 |
| Replies: 6 Views: 342 where do you call your functions? |
Forum: Python Jan 28th, 2009 |
| Replies: 3 Views: 582 what happens when you run the code? it "should" hit the while and continuously print (you have an infinite loop there). if you are not getting into a infinite loop, numrows_user is probably not set... |
Forum: Python Jan 20th, 2009 |
| Replies: 9 Views: 11,048 still has nothing to do with python |
Forum: Python Jan 19th, 2009 |
| Replies: 9 Views: 11,048 why is this in the python forum? |
Forum: Python Jan 16th, 2009 |
| Replies: 13 Views: 764 I highly doubt he wants your code to match his, the chance of code being identical is usually rare and should raise concerns of plagarism. Anyway, have you got any further? |
Forum: Python Jan 16th, 2009 |
| Replies: 13 Views: 764 Is this a programming course or a business course? If it is a programming course, I think "exactly like that" is taking him too literally, as learning looping/control is much better than trying to... |
Forum: Python Jan 15th, 2009 |
| Replies: 13 Views: 764 sum(sequence)
you are not giving it a sequence |
Forum: Python Dec 28th, 2008 |
| Replies: 13 Views: 2,327 it looks like you are missing that particular library on your machine. i think you will probably be able to download a copy of MSVCR90.dll (google) and place it into your libraries folder, which... |
Forum: Python Dec 19th, 2008 |
| Replies: 18 Views: 905 I think you will find a math library for python (I am not 100% on this, but it would make sense). If you look through it, it will also probably have some random function. If it is like most random... |
Forum: Python Dec 19th, 2008 |
| Replies: 18 Views: 905 I've replied and fixed it up for you. There were 2 issues I fixed:
1. def means defining a function, not calling, so "def main:" should only appear once in your code
2. you didn't have any function... |
Forum: Python Dec 19th, 2008 |
| Replies: 18 Views: 905 nope, before main you will see "def". This means that everything within the block (in jython the block will be defined with indenting) belongs to "main". So you need to define your functions... |
Forum: Python Dec 19th, 2008 |
| Replies: 18 Views: 905 Ok, so your program is going to end when it has no code left to execute (which you probably already know). For you to get the behaviour explained above, you will probably need to execute parts of the... |
Forum: Python Dec 19th, 2008 |
| Replies: 18 Views: 905 That looks great, I ran it quickly and it works well.
You shouldn't look to me for directions, they are in your problem definition. If I were solving this problem, I would probably next look at... |
Forum: Python Dec 19th, 2008 |
| Replies: 18 Views: 905 Ok, well you not going to be convincing me to do your assignment for you, but I am happy to help. Once you start producing code, I can help you with more specific issues.
Anyway, basic of basics:... |
Forum: Python Dec 19th, 2008 |
| Replies: 5 Views: 780 you are trying to do [30] - int,
perhaps you want to get the value from the list, not the list itself. |
Forum: Python Dec 19th, 2008 |
| Replies: 18 Views: 905 Leave the graphics till last. First, create a program which is able to read / write to the command-line e.g. ask a question, recieve an answer. If you get that working, adding the random aspect and... |
Forum: Python Dec 15th, 2008 |
| Replies: 4 Views: 463 I don't see any reason this isn't possible, but what does "html parameters" mean? If you pass it html, why not just write html to begin with? |
Forum: Python Dec 15th, 2008 |
| Replies: 4 Views: 463 Sorry, I don't really understand what you mean. Could you explain your problem clearer? |
Forum: Python Dec 15th, 2008 |
| Replies: 11 Views: 835 Take your time and think through what is happening. You have a break, which has no condition, and so will ALWAYS be called. This means the code after the break is not going to be called. |
Forum: Python Dec 14th, 2008 |
| Replies: 5 Views: 374 I have a feeling you are trying to get solutions the easy way, I don't completely understand the program you are creating, and unfortunately I don't really want to. You should give it more of a... |
Forum: Python Dec 14th, 2008 |
| Replies: 11 Views: 835 loop:
x = some calculation
if (x > y):
break
y = x
#endLoop |
Forum: Python Dec 14th, 2008 |
| Replies: 5 Views: 374 doomsday + 3 == march4
I am not even sure this line is valid, but "march4" means nothing here. It has no value, the program isn't able to "guess" what "march4" is supposed to be. |
Forum: Python Dec 14th, 2008 |
| Replies: 11 Views: 835 perhaps you can make your life easier by naming your variables a little more meaningfully, e.g. "current", "previous". In any case, during your iterations, at some stage you want "previous" to store... |
Forum: Python Dec 14th, 2008 |
| Replies: 5 Views: 374 I don't see you defining "march4" at all, it needs to have some value to be comparable. |
Forum: Python Dec 14th, 2008 |
| Replies: 11 Views: 835 simply introduce another variable, e.g. "y". keep track of the current value and also the value of the previous iteration, just make sure you set each of the values at appropriate times. |
Forum: Python Nov 7th, 2008 |
| Replies: 2 Views: 430 myInterpretter.exec("import java.util")
Not too sure what you are trying to do here. You should be able to simply use:
import java.util
Jython is python with access to java packages. |
Forum: Python Nov 6th, 2008 |
| Replies: 5 Views: 427 Surely you have not tried to write your own, in the 5 minutes from my last post. Write some code, try it, if it doesn't work, post it and then we can help you more. |
Forum: Python Nov 6th, 2008 |
| Replies: 5 Views: 427 The os library will include the methods you need to create such a function.
Take a look at http://www.python.org/doc/2.5.2/lib/os-file-dir.html |