Forum: Python Feb 13th, 2008 |
| Replies: 7 Views: 1,248 A better approach might be to create a package installer (such as a .deb or .rpm) which lists python as a dependency.
If you plan to support more linux variants than just RedHat and Debian and... |
Forum: Python Feb 8th, 2008 |
| Replies: 7 Views: 1,248 The answer is no.
Not even Tcl is installed by default on all flavors of linux. About the only thing you can guarantee is that either /usr/bin/sh or /bin/sh is available. (And on most linuxes it... |
Forum: Python Feb 8th, 2008 |
| Replies: 8 Views: 1,529 The only GUI toolkit built-in to Python is Tk. (And Tcl/Tk most definitely does work on the iPod!)
I know next to nothing about the iPod. Is it an embedded OS?
In any case, it is certainly... |
Forum: Python Feb 5th, 2008 |
| Replies: 2 Views: 1,290 Or, if you happen to be running Windows, you'll need to google the RunOnce registry value or stick either your program or a link to it in the Startup folder of the start menu.
What you are trying... |
Forum: Python Feb 5th, 2008 |
| Replies: 2 Views: 1,107 I think what you are looking for is the overrideredirect flag. This tells the wm to buzz-off.
It is generally used for pop-up windows (like balloon pop-ups, menus, etc.).
It is generally a Bad... |
Forum: Python Jan 23rd, 2008 |
| Replies: 6 Views: 3,021 Sorry again... :$
Nice catch on the type of input. |
Forum: Python Jan 23rd, 2008 |
| Replies: 6 Views: 3,021 Vegaseat, you really ought to try to give people an idea instead of just writing code for them. People learn better when they can solve the problem themselves. A little direction --a nudge this way... |
Forum: Python Jan 17th, 2008 |
| Replies: 5 Views: 2,083 I feel like a total geek. I always use python straight from the command-line. |
Forum: Python Jan 15th, 2008 |
| Replies: 5 Views: 2,083 I don't have Vista, so I can't exactly identify what part of the OS is giving you the problem.
IDLE uses a feedback loop socket. This is a weird thing to do, so antivirus and internet access... |
Forum: Python Jan 12th, 2008 |
| Replies: 5 Views: 2,635 There is no button in graphics.py. How exactly are you trying to create one? |
Forum: Python Jan 12th, 2008 |
| Replies: 3 Views: 723 See here (http://effbot.org/zone/python-compile.htm) for links.
Hope this helps. |
Forum: Python Jan 11th, 2008 |
| Replies: 10 Views: 2,614 Yes. And so do you.
Remember, get out the crayons and construction paper and draw what you are trying to do at each step. |
Forum: Python Jan 11th, 2008 |
| Replies: 10 Views: 2,614 Ah, yes, my mistake. You are using graphics.py. The type of thing matters. A point is an object, not a tuple.
So, you need to create a point using the appropriate constructor:
p8 = Point(... |
Forum: Python Jan 11th, 2008 |
| Replies: 3 Views: 1,758 What you want isn't technically "security related issues" but "copy protection (http://en.wikipedia.org/wiki/Copy_protection)" issues. The link lists various copy restriction schemes.
You can... |
Forum: Python Jan 10th, 2008 |
| Replies: 10 Views: 2,614 You're doing well; you've just made a simple mistake.
p8 is the upper-left corner of the door
p7 should be the lower-right corner of the door
the mistake is when you say
p7=(p8,
p8 is a... |
Forum: Python Jan 9th, 2008 |
| Replies: 2 Views: 1,208 Yes, it can be done, but I've never done it...
The toplevel window needs to have the -container flag and -use for the window ID of the SDL window.
However, PyGame wasn't really designed to... |
Forum: Python Jan 8th, 2008 |
| Replies: 9 Views: 2,217 That's actually a tough question. Most of the window managers I am familiar with (which isn't many) will properly execute a text file beginning with the magic words:
#! /usr/bin/python
or
#!... |
Forum: Python Jan 8th, 2008 |
| Replies: 9 Views: 2,217 Gnome shouldn't have any trouble executing py files by double-click.
1. Make sure you have the proper header in the file (as per my last post).
2. Failing that, make sure that python is... |
Forum: Python Jan 7th, 2008 |
| Replies: 9 Views: 2,217 I am presuming you are on Linux.
Try
#! /usr/bin/env python
print "Success!"
Hope this helps. |
Forum: Python Jan 6th, 2008 |
| Replies: 8 Views: 1,027 If you have two points:
(10, -7)
(3, 12)
then how do you find the distances between them?
The distances are:
- distance between the x values (what you are looking for)
- distance between the... |
Forum: Python Jan 6th, 2008 |
| Replies: 8 Views: 1,115 I always tend to stick the main program one directory above all the other modules. My directory tree will look something like this:
Gork/
gork.py
README
...
images/
title.tga
... |
Forum: Python Jan 6th, 2008 |
| Replies: 3 Views: 1,981 Unfortunately, the "Julian Day Number" is one of those terms I mentioned (or rather, it is often abused to mean "the day of the year").
Fortunately it looks like that link uses the JDN correctly!... |
Forum: Python Jan 4th, 2008 |
| Replies: 3 Views: 1,981 Python deals only with the Gregorian calendar. Certain terms (like "Julian") can be properly applied to specific things withing the Gregorian system, but the Julian calendar it is not.
Usually the... |
Forum: Python Jan 4th, 2008 |
| Replies: 1 Views: 2,315 You can't do that without very carefully doing some really bad things first.
Even in the same program, each loop is a separate entity. There is no reason why a loop in one program file should... |
Forum: Python Jan 4th, 2008 |
| Replies: 5 Views: 3,030 Alas, it looks like I was mistaken about python... None of the python interfaces to CreateProcess report back changes to the enviornment dictionary...
It looks like printing to stdout and using... |
Forum: Python Jan 4th, 2008 |
| Replies: 5 Views: 3,030 I haven't used python to do this, but in Windows it is possible to specify the environment table the child is to use. Thus, if the child modifies its environment, it is modifying something that the... |
Forum: Python Jan 3rd, 2008 |
| Replies: 10 Views: 2,614 The problem is you aren't thinking it through: you are trying to use things before they exist.
To best help, you need to work on how to convert abstract stuff like "draw a door of a specific... |
Forum: Python Nov 6th, 2007 |
| Replies: 4 Views: 2,490 Er, you misunderstand. We think it is the GIF that is faulty, not your code. |
Forum: Python Nov 4th, 2007 |
| Replies: 1 Views: 1,789 Float types are just the hardware's floating point data type. Usually this is an IEEE single (4-bytes), double (8-bytes), or extended (10-bytes).
The problem with these is that they approximate... |
Forum: Python Nov 3rd, 2007 |
| Replies: 7 Views: 3,072 No, you had that correct. The return tuple is (child's output, child's input).
I don't know what's wrong...
[EDIT]
I just had a thought. Is your C program compiling correctly or is it... |
Forum: Python Nov 3rd, 2007 |
| Replies: 7 Views: 3,072 |
Forum: Python Nov 3rd, 2007 |
| Replies: 7 Views: 3,072 It sounds to me like your child process is misbehaving. May I ask which command you are executing? |
Forum: Python Nov 3rd, 2007 |
| Replies: 1 Views: 2,701 I think I see what you are doing.
Your angle is too small (and in the wrong units).
Consider, if you want a 5-pointed star: 360 /5 = 72, so each point is 72 degrees apart.
BUT you want to draw a... |
Forum: Python Oct 27th, 2007 |
| Replies: 4 Views: 1,498 Ah, well, I would suggest googling "XRC editor" and checking out SourceForge. There are a number of open source XRC editors available.
You should be aware, though, that XML isn't a picture file... |
Forum: Python Oct 27th, 2007 |
| Replies: 3 Views: 2,632 No, he is using a package called graphics.py. It is designed for beginners, so it is fairly convenient and simple to use. The getMouse() function waits for you to click and returns the coordinates.... |
Forum: Python Oct 24th, 2007 |
| Replies: 2 Views: 1,042 Use the ord function.
print ord('A')
Prints the number 65 to the console.
Hope this helps. |
Forum: Python Oct 24th, 2007 |
| Replies: 3 Views: 2,632 I know this sounds funny, but you need to get out a piece of construction paper and some crayons and draw yourself a house.
Then, using your finger, 'click' on the picture where the instructions... |
Forum: Python Oct 24th, 2007 |
| Replies: 4 Views: 1,498 I'm not sure what exactly it is that you want.
XRC is a file format used by wxWidgets programs to store the layout and arrangement of buttons and other widgets on a form. A program that uses... |