Re: %s place holder does not let me insert ' in an sql query with python.

2008-12-15 Thread Lamonte Harris
sorry about that queryString = insert into venders values('{0}','{1}','{2}').format(field1,field2,field3) On Mon, Dec 15, 2008 at 7:21 AM, Lamonte Harris pyth0nc0...@gmail.comwrote: I had this problem too. If you've upgraded to python 2.6 you need to use the new sytnax format queryString

Re: %s place holder does not let me insert ' in an sql query with python.

2008-12-15 Thread Lamonte Harris
I had this problem too. If you've upgraded to python 2.6 you need to use the new sytnax format queryString = insert into venders values('{0}','{1}','{2}'.format(field1,field2,field3) On Mon, Dec 15, 2008 at 6:46 AM, Krishnakant hackin...@gmail.com wrote: hello all hackers. This is some kind

Having Issues with CMD and the 'python' command

2008-12-15 Thread Lamonte Harris
Every time I start cmd on windows it requires me to set path=%path%;C:\python26 why? I'm getting annoyed... -- http://mail.python.org/mailman/listinfo/python-list

Re: Having Issues with CMD and the 'python' command

2008-12-15 Thread Lamonte Harris
It was python3 messing me up. I forgot I had python 3 on my box uninstalled it, redid it and wallah. On Mon, Dec 15, 2008 at 7:33 AM, rdmur...@bitdance.com wrote: On Mon, 15 Dec 2008 at 07:16, Lamonte Harris wrote: Yeah I tried doing it from the environment variables yet it still fails

HTTPConnection Sending Cookies to server

2008-12-14 Thread Lamonte Harris
Right now I can login to www.phpbb.com's forums import httplib, urllib params = urllib.urlencode({'username':'TheInfernoSin','password':'PASSWORD','login':1,'sid':'','redirect':'index.php','autologin':1}) headers = {Content-type: application/x-www-form-urlencoded,Accept: text/plain} con =

How do you check if a program/process is running using python?

2008-07-19 Thread Lamonte Harris
How do you check if a program or process is running when using python? What I want to do is have an infinite loop to check if a program is running or not and send data to my web server to check yes or no. Is this possible? If so how? -- http://mail.python.org/mailman/listinfo/python-list

win32api not found?

2008-07-19 Thread Lamonte Harris
Where can I get the win32api module? I been searching all day on google and nothing, i installed https://sourceforge.net/project/showfiles.php?group_id=78018 which requires win32api and its not found... -- http://mail.python.org/mailman/listinfo/python-list

Regular Expressions Quick Question

2008-07-09 Thread Lamonte Harris
Alright, basically I have a list of words in a file and I load each word from each line into the array. Then basically the question is how do I check if the input word matches multiple words in the list. Say someone input test, how could I check if that word matches these list of words: test

ProxyHandler doesn't completly hide your identity?

2008-04-09 Thread Lamonte Harris
Is it still possible to detect who you are under a proxy when using urllib2? -- http://mail.python.org/mailman/listinfo/python-list

How would I go about checking if urllib2 timed out?

2008-04-08 Thread Lamonte Harris
Can someone explain to me how I would do error handling to check if the current proxy timed out on when trying to connect to the web page: import urllib2 proxy=urllib2.ProxyHandler({'http':'24.232.167.22:80'}) opener=urllib2.build_opener(proxy) f=opener.open('http://www.whatismyipaddress.com'

Does tkinter provide a way to search for files

2008-01-25 Thread Lamonte Harris
Like on most GUI programs you click file and you can open a file what is that called and how would that work. -- http://mail.python.org/mailman/listinfo/python-list

Okay I got a question regarding Tkinter and Labels

2008-01-19 Thread Lamonte Harris
Okay I've created a script and basically when I loop through a folder it is supposed to change the Label everytime it updates a file then again it doesn't do nothing but shows the last file edited, whats the best way to loop through files and display that file name in a Label's text without

Is it possible to use sockets to login to a website that uses php?

2007-11-19 Thread Lamonte Harris
I need to some how make a script that logs into a website from my desktop and I can do the rest and grab the information on my on hopefully. How would I login to a website using sockets with python? -- http://mail.python.org/mailman/listinfo/python-list

Re: TwistedMatrix missing OpenSSL?

2007-10-05 Thread Lamonte Harris
Where can I get it? Anyone got any idea? On 10/4/07, Lamonte Harris [EMAIL PROTECTED] wrote: Where do I get it? I'm currently running python 2.5 -- http://mail.python.org/mailman/listinfo/python-list

TwistedMatrix missing OpenSSL?

2007-10-04 Thread Lamonte Harris
Where do I get it? I'm currently running python 2.5 -- http://mail.python.org/mailman/listinfo/python-list

Can't seem to find a Python Key detector.

2007-10-02 Thread Lamonte Harris
I'm looking for a module that acts on the input of the keyboard. Something similar to pygame's key events, but something just easier to use not based on pygame stuff. If that makes any since. -- http://mail.python.org/mailman/listinfo/python-list

Is there some sort of portable IDE?

2007-09-24 Thread Lamonte Harris
Like say you don't got python installed, but you want to test code is there a way?(School) -- http://mail.python.org/mailman/listinfo/python-list

Is it possible to grab headers after you login to a site?

2007-09-21 Thread Lamonte Harris
For instance cookie headers? I want to login to a site and make sure the site remembers im logged in using python and cgi. -- http://mail.python.org/mailman/listinfo/python-list

How would I go about checking if a authentication login actually exists.

2007-09-18 Thread Lamonte Harris
Okay, I've written this script to check if a password works right, but how do I know if an authentication actually exists? import urllib2 def passIT(link): f = open(valid2.txt,a) f.write(link) f.close file = open(p2.txt) passes = file.readlines() file.close for x in passes:

Regular Expressions

2007-09-18 Thread Lamonte Harris
I'm trying to get the Javascript output on when I match the given value in a var, I want to output that value that I tried to match: Example JS: x = '';//some INNERHTML in a document if(x.innerHTML.match(/(.*)/i)) { valuefound = RegEx.$1; } I've been reading my python book and tutorials and

Re: Just bought Python in a Nutshell

2007-09-15 Thread Lamonte Harris
Wow I just got it, and its nice doesn't even look used god damn. :D. On 9/14/07, Lamonte Harris [EMAIL PROTECTED] wrote: Lol, you bought it, dude theres not one left imho. When I bought it, it still said 1 More left Lol...mines should be her no less then a hour -.-... Taking SO LONG. On 9

Just bought Python in a Nutshell

2007-09-14 Thread Lamonte Harris
http://www.powells.com/biblio/63-9780596001889-7 Used, has anyone read this book. Any additional information that you like,dislike about this book? [I like having real books and stead of ebooks because its better on the eyes.] Should be her 2morrow Afternoon :), few hours before I get home great

Re: Just bought Python in a Nutshell

2007-09-14 Thread Lamonte Harris
Right, I like reading books it comes handier then reading ebooks, less programs and its right there in your hands. Main reason I'm going to use it for is to find questions without asking them on the python list or tutor list for a quicker referrence. On 9/14/07, [EMAIL PROTECTED] [EMAIL

Is there some sort of Python Error log.

2007-09-14 Thread Lamonte Harris
Command prompt is a pain and it would be pretty nice to have this feature. -- http://mail.python.org/mailman/listinfo/python-list

Quick Modules question

2007-09-13 Thread Lamonte Harris
How do you import modules that aren't in the main python Lib folder? Is it possible to keep it in the same file as the script thats being ran? -- http://mail.python.org/mailman/listinfo/python-list

Does anyone know if Python 3 will change in structure?

2007-09-12 Thread Lamonte Harris
The 2.x stucture is boring, would be cool if there could be some sort of spacing we could do. -- http://mail.python.org/mailman/listinfo/python-list

Re: Soemthing wrong w/ urllib module or something.

2007-09-05 Thread Lamonte Harris
Anyone got an answer for this? On 9/3/07, Lamonte Harris [EMAIL PROTECTED] wrote: Yeah I can browse it like normal. For some reason though my News System that worked like a charm just stopped working also. Is there any alternatives that I could try to use to POST to a PHP script? On 9/3

Soemthing wrong w/ urllib module or something.

2007-09-02 Thread Lamonte Harris
Error Message in cmd: Traceback (most recent call last): File wniamp_lastest5_playlist.py, line 25, in module response = urllib2.urlopen(request) File C:\Python25\lib\urllib2.py, line 121, in urlopen return _opener.open(url, data) File C:\Python25\lib\urllib2.py, line 374, in open

How does super() work?

2007-09-01 Thread Lamonte Harris
I've searched Google, and other search engines to try to find out how super() works. Can someone explain in short detail how super() works? I may and may not need to know this information, but it is good to know. -- http://mail.python.org/mailman/listinfo/python-list

Windows Media Player Playlist

2007-09-01 Thread Lamonte Harris
Is it possible to use python to get the current playlist of the current playing songs from Windows Media Player or Windows Player Classic? -- http://mail.python.org/mailman/listinfo/python-list

So what exactly is a complex number?

2007-08-31 Thread Lamonte Harris
Like in math where you put letters that represent numbers for place holders to try to find the answer type complex numbers? -- http://mail.python.org/mailman/listinfo/python-list

Re: So what exactly is a complex number?

2007-08-31 Thread Lamonte Harris
: On 8/31/07, Carsten Haese [EMAIL PROTECTED] wrote: On Thu, 2007-08-30 at 20:11 -0500, Lamonte Harris wrote: Like in math where you put letters that represent numbers for place holders to try to find the answer type complex numbers? Is English your native language? I'm having

Re: Python Classes

2007-08-28 Thread Lamonte Harris
Ok thanks I'll try remembering it. On 8/28/07, Erik Jones [EMAIL PROTECTED] wrote: On Aug 28, 2007, at 12:04 AM, Lamonte Harris wrote: How come you have to set the initialized created variables to equal the parameters, shouldn't that be default? class testing: def __init__

Re: Asking all python programmers.

2007-08-28 Thread Lamonte Harris
starter, I don't like the word noob because it sounds very unprofessional. -Lamonte On 8/28/07, Shawn Milochik [EMAIL PROTECTED] wrote: On 8/27/07, Lamonte Harris [EMAIL PROTECTED] wrote: Okay, I know you've guys told me millions of times to read the manual I've read a lot of it. What

Okay learning python is somewhat hard.

2007-08-28 Thread Lamonte Harris
Since I can't really focus on PROJECTS[since I don't know much python I can't do any projects because all my projects are BIG], So I decided to work on some problems I've gotten from school from started geometry, So I attempted to make a script to get the midpoint of a line segment using the

Re: Okay learning python is somewhat hard.

2007-08-28 Thread Lamonte Harris
hacking at it. Cheers, Cliff Lamonte Harris wrote: Since I can't really focus on PROJECTS[since I don't know much python I can't do any projects because all my projects are BIG], So I decided to work on some problems I've gotten from school from started geometry, So I attempted to make

New style classes

2007-08-28 Thread Lamonte Harris
Whats the point of object? How do I actually use it. I'm not understanding correctly from the python site located: http://www.python.org/download/releases/2.2.3/descrintro/ class C(object): def __init__(self): self.__x = 0 def getx(self): return self.__x def

Lists

2007-08-27 Thread Lamonte Harris
Ok a = ['spam', 'eggs', 100, 1234] So basically when I do print a[1:-1] that will display all the choices in the array besides 0,3 Slicing was kinda weird, just making sure. -- http://mail.python.org/mailman/listinfo/python-list

Asking all python programmers.

2007-08-27 Thread Lamonte Harris
Okay, I know you've guys told me millions of times to read the manual I've read a lot of it. What do you recommend studying the most? Python is my goal for the next year in the half. :) -- http://mail.python.org/mailman/listinfo/python-list

Python Classes

2007-08-27 Thread Lamonte Harris
How come you have to set the initialized created variables to equal the parameters, shouldn't that be default? class testing: def __init__(self,testing): self.testing = testing x = testing(testing) print x.testing How come self.testing = testing Can someone explain

the del function

2007-08-26 Thread Lamonte Harris
import random constant_array = red = blue = grey = black = 0 r1 = r2 = r3 = r4 = 1 blu1 = blu2 = blu3 = blu4 = 2 g1 = g2 = g3 = g4 = 3 bla1 = bla2 = bla3 = bla4 = 4 single_players = [r1,r2,r3,r4,blu1,blu2,blu3,blu4,bla1,bla2,bla3,bla4,g1,g2,g3,g4] _red = [1,1,1,1] #print random.randint(0,10 #red

I know almost all basics

2007-08-24 Thread Lamonte Harris
Now I'm moving more into the gaming world. What libs/modules would you recommend? -- http://mail.python.org/mailman/listinfo/python-list

Tinker question 1

2007-08-24 Thread Lamonte Harris
What does the pack function do exactly? Just puts everything together? Also I've been reading this manual/tutorial and I'm confused on the Frame, what does it do, I'm pretty confused on that. http://www.pythonware.com/library/tkinter/introduction/hello-again.htm --

I can't get value of entry box, Tinker

2007-08-24 Thread Lamonte Harris
I tried w/ my following code: from Tkinter import * master = Tk() Label(master, text=Username).grid(row=0, sticky=W) Label(master, text=Password).grid(row=1, sticky=W) e1 = Entry(master) e2 = Entry(master,show=*) def login(): global e2,e1 print e2 print e1 e3 =

Fwd: How would I compile a Python file to a exe

2007-08-24 Thread Lamonte Harris
I thought I answered this lol.. -- Forwarded message -- From: vasudevram [EMAIL PROTECTED] Date: Aug 24, 2007 11:56 AM Subject: Re: How would I compile a Python file to a exe To: python-list@python.org On Aug 24, 2:11 am, Charlie [EMAIL PROTECTED] wrote: Quoting Lamonte Harris

Fwd: I can't get value of entry box, Tinker

2007-08-24 Thread Lamonte Harris
yes, I already fixed the problem. -- Forwarded message -- From: 7stud [EMAIL PROTECTED] Date: Aug 24, 2007 1:28 PM Subject: Re: I can't get value of entry box, Tinker To: python-list@python.org Matt McCredie wrote: What/should I, can I do? Fix your code? def login():

Problem w/ Tkinter

2007-08-24 Thread Lamonte Harris
How do I add a command to a button say for instance class MYCLASNAME: def choices(self): choices = Toplevel() v = IntVar() a = Radiobutton(choices, text=Add News, variable=v,value=1).pack(anchor=W) b = Radiobutton(choices, text=Edit News,

Converting my script from MS-DOS to Tkinter ran in a problem.

2007-08-24 Thread Lamonte Harris
Ok my script works decent so far, but say in the add news menu, my window dissapears right? but when i click add news on the main menu a new frame gets added, How can I remove the frames inside of my Toplevel? import sys,os,urllib,urllib2,md5,random,string from Tkinter import * main = Tk()

Putting #'s and variables together in 1 variable

2007-08-23 Thread Lamonte Harris
File Desktop\python\newsystem\init.py, line 51, in random_n random_name = a+b+c+d+e+ 'temp.txt' TypeError: unsupported operand type(s) for +: 'int' and 'str' import random def random_name(): a = random.randint(0,9) b = random.randint(0,9) c = random.randint(0,9) d =

How would I compile a Python file to a exe

2007-08-23 Thread Lamonte Harris
Been a while and I'm wondering how I would go about doing it. -- http://mail.python.org/mailman/listinfo/python-list

Re: How would I go about making a file open. Not the way you might think.

2007-08-23 Thread Lamonte Harris
I've completed this request and I got the answer already. On 8/23/07, Larry Bates [EMAIL PROTECTED] wrote: Hendrik van Rooyen wrote: Lamonte Harris wrote: Basically you can open a file by double clicking, and by default it would open w/ what every program you have it set to. Most

Import question

2007-08-22 Thread Lamonte Harris
can I import more then one modules like this: import module,module2 ? -- http://mail.python.org/mailman/listinfo/python-list

How would I go about making a file open. Not the way you might think.

2007-08-22 Thread Lamonte Harris
Basically you can open a file by double clicking, and by default it would open w/ what every program you have it set to. Most text files would open in notepad. How can I make a txt open so that notepad opens w/ the content in it by using just python. --

How do I get the current path of my python file that is currently running.

2007-08-22 Thread Lamonte Harris
Say I start i click on a python file on my desktop, how could I return the path of the current python file thats running? -- http://mail.python.org/mailman/listinfo/python-list

Regarding Classes

2007-08-21 Thread Lamonte Harris
What is the main reason of self when it involves classes/functions -- http://mail.python.org/mailman/listinfo/python-list