Forum: Python Dec 14th, 2008 |
| Replies: 0 Views: 334 Hi there!
I have been working on an AI program for a while now, and in creating knowledge bases (what does x mean, etc) this small snippet of code has done very well. (just repaste and change... |
Forum: Python Sep 1st, 2008 |
| Replies: 12 Views: 1,763 Actually, is there a way to just go to "Line 1" of the Python script, thus resetting it? :P That would probably work. |
Forum: Python Aug 31st, 2008 |
| Replies: 5 Views: 659 raw_input() is for strings. Try input()... |
Forum: Python Aug 31st, 2008 |
| Replies: 12 Views: 1,763 Okay, after playing with it a while, I found something: It works in IDLE, but not when the file is loaded by itself... I think the program might be thinking I'm being stupid for trying to open what's... |
Forum: Python Aug 30th, 2008 |
| Replies: 12 Views: 1,763 subprocess.Popen("C:\Python25\python.exe C:\Python25\Projects\SUSIE\Susie.py") # 2nd para is name of current file
sys.exit()
When this is run, the script doesn't crash, but sys.exit() never... |
Forum: Python Aug 29th, 2008 |
| Replies: 12 Views: 1,763 I want to reload the entire script, not just a module... I'll look in to spawn, though. Thanks!
Also, if this helps, this is the error I get when I try to open the same file, before exiting:
... |
Forum: Python Aug 28th, 2008 |
| Replies: 12 Views: 1,763 Hi there!
First off, let me say I HAVE Googled the subject, but all provided functions... didn't work. Simply put, I want a function that closes my Python script, and then reopens it. I tried... |
Forum: Python Aug 27th, 2008 |
| Replies: 3 Views: 541 Is it possible to run command line functions... not through the command line? |
Forum: Python Aug 26th, 2008 |
| Replies: 3 Views: 541 Hi there!
I'm having a very annoying problem... simply put, I have a .pyw file, and it works great! However, whenever the script runs the os.system() function, I get a brief CMD Prompt window,... |
Forum: Python Aug 26th, 2008 |
| Replies: 4 Views: 2,611 Okay, thanks guys-- however, I found out how to make a Python file invisible, which ended up being good enough... thanks!
For the sake of others, simply rename the .py file to ".pyw". :) |
Forum: Python Aug 25th, 2008 |
| Replies: 4 Views: 2,611 I have no code yet-- that's why I'm asking.
Pygame is for game engines, right? I don't want that.. I just want a transparent command line, without transparent text, basically. |
Forum: Python Aug 23rd, 2008 |
| Replies: 4 Views: 2,611 Hi there!
My application is going very well... however, I have a couple questions... mainly, graphical stuff.
How do I make it so the application runs in full screen? (I know I can do it... |
Forum: Python Aug 23rd, 2008 |
| Replies: 8 Views: 678 Hmm... it's not letting me edit my post-- I got this working, though. Thanks, guys! |
Forum: Python Aug 23rd, 2008 |
| Replies: 8 Views: 678 Thanks for your quick response-- unfortunately, in my case, that will not work, as I need the array's VALUES to have the whitespace... it's hard to explain, but that's what I need. :P Thanks! |
Forum: Python Aug 23rd, 2008 |
| Replies: 8 Views: 678 def func(array)
#stuff
arr = ['valueA','valueB']
if ' valueA ' in func(arr):
#true
does this make sense? |
Forum: Python Aug 23rd, 2008 |
| Replies: 8 Views: 678 I don't want to change the variable, per se, I just want to be able to check it as if the variable WAS like that through an if statement... does that make sense? I don't want to change the variable,... |
Forum: Python Aug 22nd, 2008 |
| Replies: 8 Views: 678 Hi there!
Let me start by saying this-- I have no experience with regular expressions. Simply put, I want a function that turns an array [eg: func(array)] into... an array, but add ONE space on... |
Forum: HTML and CSS Aug 18th, 2008 |
| Replies: 5 Views: 1,012 Try adding 'position:relative' to the <li> tags. |
Forum: PHP Aug 18th, 2008 |
| Replies: 19 Views: 1,935 Odds are, if you are certain that SQL and XSS injections aren't going to happen, you should be fine. There is the chance your server isn't secure, too, but if you aren't hosting yourself, that... |
Forum: Python Aug 18th, 2008 |
| Replies: 9 Views: 668 If I merge array values into one array.. value.. what is the point of my function? |
Forum: Python Aug 18th, 2008 |
| Replies: 9 Views: 668 What changes should I make to my function? You aren't very clear as to where..
def checkIt(arr,inp):
inp = input.split(' ')
bool = 0
for i in arr:
if i in inp:
bool = 1
break |
Forum: Python Aug 17th, 2008 |
| Replies: 9 Views: 668 That works, but what if a value in the array is more than one word?
['hey there'] |
Forum: Python Aug 17th, 2008 |
| Replies: 9 Views: 668 Thanks for your response--- I'll try it later.
What does list() do? |
Forum: Python Aug 17th, 2008 |
| Replies: 9 Views: 668 def checkIt(arr,inp):
bool = 0
for i in arr:
if i in inp:
bool = 1
break
return bool
array = ['hi','hey','hello']
string = "Hi there!" |
Forum: Python Aug 16th, 2008 |
| Replies: 14 Views: 1,557 Hmm... is it possible to type, as well as speak, using the speech.input function? Meaning, if I want to type, that's fine, but have it also allow speech? Thanks. :) |
Forum: Python Aug 16th, 2008 |
| Replies: 14 Views: 1,557 Nevermind, I think I got it working... I had to reinstall the SAPI 5.1... thanks a lot! This should be exactly what I was looking for.
No need to give me credit-- actually making use of my... |
Forum: Python Aug 14th, 2008 |
| Replies: 14 Views: 1,557 The install worked, but I'm still getting errors. =D
import speech
# Prints a prompt and returns whatever text it heard you say
#answer = speech.input("How do you like your eggs?")
#print... |
Forum: Python Aug 12th, 2008 |
| Replies: 14 Views: 1,557 Thanks for your speedy response! I fully appreciate it!
However... It's still trying to install 0.4.11. :(
http://img355.imageshack.us/my.php?image=pynoworkyvk2.png |
Forum: Python Aug 11th, 2008 |
| Replies: 14 Views: 1,557 Okay... I managed to install it. However, I have a problem.
import speech
import time
def do_stuff(phrase, listener):
speech.say("You said: %s" % phrase)
speech.listenforanything(do_stuff) |
Forum: Python Aug 9th, 2008 |
| Replies: 14 Views: 1,557 I don't quite understand how to install it. What do you mean to type that in the directory? Is there a specific python script I have to type it in? You just gave me a folder name. O_o |
Forum: Python Jul 13th, 2008 |
| Replies: 14 Views: 1,557 Do you know what Python module versions that script requires? |
Forum: Python Jul 9th, 2008 |
| Replies: 14 Views: 1,557 Thanks for your response:
Unfortunately, in my searches, I can't find what I'm looking for. I guess I could just use predefined words, if there is no way to access the Microsoft Dictionary, but... |
Forum: Python Jul 8th, 2008 |
| Replies: 14 Views: 1,557 Hi there! For starters, let me say I am something of a Python newbie at the moment, but I'm learning more every day! Unfortunately, my script is at a standstill, and I can't figure out how to... |