Re: The syntax of replacement fields in format strings

2017-10-31 Thread John Smith
If we keep the current implementation as is, perhaps the documentation
should at least be altered ?
-- 
https://mail.python.org/mailman/listinfo/python-list


MySQLdb Problem

2013-08-31 Thread John Smith
Hi;
Since there is no list for MySQLdb, I'm hoping you can help me. I have 
installed, de-installed and reinstalled this s/w and MySQL itself on my Win8 
box. However, when I go to use it from a script, I get the following error:

"C:\Python27\lib\site-packages\MySQLdb\__init.py__", line 27 in 
import _mysql

ImportError: DLL load failed: %1 is not valid Win32 application. 

Well, I'm running Win8 which is 64-bit, but I'm pretty sure it runs 32 as well, 
right? Python 27, MySQL 5.5.
TIA,
John
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: MySQLdb Problem

2013-08-31 Thread John Smith


On Sat, 31/8/13, Chris Angelico  wrote:

 Subject: Re: MySQLdb Problem
 To: [email protected]
 Date: Saturday, 31 August, 2013, 4:18 PM
 
> Do your Python and your MySQLdb match? I haven't confirmed,
> but I'm
> pretty sure you'll have problems if you have a 32-bit Python
> with a
> 64-bit mysqldb DLL, or vice versa.

Yeah, that turned out to be the problem. What's strange is that it worked 
before.
Thanks,
John

-- 
http://mail.python.org/mailman/listinfo/python-list


What kind of program is this

2006-10-03 Thread John Smith
what kind of program is this?
I would like to know.

import win32api
from win32api import *
import win32con
from win32con import *; from string   \
import split

aJAPy = 'C:/Program Files/Python/Lib/ \
JAPy.py'
if split(aJAPy,'.')[-1] in ('py','pyw'\
):
aJAPy = "%s %s %s" % ('J' 'A' 'Py'\
,'','')

aStyle = win32con.MB_ICONEXCLAMATION
aLanguage = win32api.MAKELANGID   \
(LANG_NEUTRAL,SUBLANG_DEFAULT)

win32api.MessageBox(0,'Just Another ' \
+ 'Pythoneer',aJAPy,aStyle,aLanguage)

-- 
http://mail.python.org/mailman/listinfo/python-list


test message

2006-11-26 Thread john . smith
This is a test message, please ignore.
-- 
http://mail.python.org/mailman/listinfo/python-list


BitKeeper for Python?

2005-05-01 Thread John Smith
I am going to be working with some people on a project that is going to be
done over the internet. I am looking for a good method of keeping everyone's
code up to date and have everyone be able to access all the code including
all the changes and be able to determine what parts of the code were
changed.

If it were opensource that would be even better.


-- 
http://mail.python.org/mailman/listinfo/python-list


Whats the best Python Book for me

2005-05-01 Thread John Smith
I already know C/C++ programming and now wish to learn Python to do
scripting for some games that are coming out. What book would you recommend.

I am thinking Teach Your Self Python in 24 Hours is probably the best place
to start...


-- 
http://mail.python.org/mailman/listinfo/python-list


comp post

2007-02-26 Thread john smith
comp post
-- 
http://mail.python.org/mailman/listinfo/python-list


Auto Logon to site and get page

2009-02-01 Thread John Smith
I'm trying to automatically log into a site and store the resulting html using 
python. The site uses a form and encrypts the password with some kind of md5 
hash.

This is the important parts of the form:














This is the function called in md5.js:
function doStudentLogin(form)
{
var pw = form.pw.value;
var pw2 = pw; // Save a copy of the password preserving case
pw = pw.toLowerCase();
form.pw.value = hex_hmac_md5(pskey, pw);
if (form.ldappassword!=null) {
// LDAP is enabled, so send the clear-text password
// Customers should have SSL enabled if they are using LDAP
form.ldappassword.value = pw2; // Send the unmangled password
}
return true;
}
 
I am not sure what the ldappassword is or does. Can some one explain that?
 
Here's my code :
 
from urllib import urlopen, urlencode
import re
import hmac
 
account = 'account'
psw = 'my password''
url = "http://ps.pvcsd.org/guardian/home.html";
 
homepagetxt = urlopen("http://ps.pvcsd.org";).read()
 
# get key and pstoken from login page
m = re.search('--
http://mail.python.org/mailman/listinfo/python-list


replacing characters within a string

2008-11-08 Thread John Smith

Hi,

I coded a python script that lets me parse a csv file into html code 
with a certain format, but I would like to replace every "<" and ">" 
character that appears within each column entry of the csv file (they 
are parsed as strings) with the html equivalents of "<" and ">".


example csv file row:
"FIXED","All","Enable  entry"

and I want to replace  with