<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 11.00.9600.17496">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>
<DIV><FONT size=2 face=Arial>And, FWIW, if I compile the 2.7 version on the 
other machine where it works, in both code and compiled forms, and then copy 
.exe back to the main machine, same error message pops up, so must be something 
to do with machine's configuration, etc.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Stay well</FONT></DIV>
<DIV><BR>Jacob Kruger<BR>Blind Biker<BR>Skype: BlindZA<BR>"Roger Wilco wants to 
welcome you...to the space janitor's closet..."<BR></DIV>
<BLOCKQUOTE 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; PADDING-RIGHT: 0px; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=jacob@blindza.co.za 
  href="mhtml:{45EE5523-7604-4B64-B3B1-076A923B8C4D}mid://00000066/!x-usc:mailto:jacob@blindza.co.za">Jacob 
  Kruger</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=python-list@python.org 
  href="mhtml:{45EE5523-7604-4B64-B3B1-076A923B8C4D}mid://00000066/!x-usc:mailto:python-list@python.org">python-list@python.org</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, January 15, 2015 10:13 
  AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> MySQL connections</DIV>
  <DIV><BR></DIV>
  <DIV><FONT size=2 face=Arial>Development machine is windows7 64 bit machine, 
  now working with either/both python 2.7 or 3.4 - test purposes, trying to 
  figure out if this was something like a version incompatibility issue, and 
  tried using both XAMPP and WAMP MySQL server version 5.0.11 instances thus 
  far.</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT> </DIV>
  <DIV><FONT size=2 face=Arial>Now, aside from all other issues relating to 
  character encoding, etc., now down to, hopefully, final issue.</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT> </DIV>
  <DIV><FONT size=2 face=Arial>Side note is under python 2.7, I use pyodbc to 
  gather data from .mdb file am using to test, but under python 3.4, I use 
  pypyodbc for same functionality.</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT> </DIV>
  <DIV><FONT size=2 face=Arial>Now, current/actual issue is something can sort 
  of duplicate using both MySQLdb version of mysqlclient, as well as 
  pymysql using both python 2.7 and python 3.4, but, strange thing am trying to 
  figure out is that even if just implement a connection object in interpreter 
  of either version, retrieve an instance of a cursor object, and do various 
  types of statement executions, no issues, and can then close connection, or 
  cursor, or both, and all good/fine/well.</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT> </DIV>
  <DIV><FONT size=2 face=Arial>However, if implement similar code - down to just 
  trying to open a connection, wait a few seconds, and then close it again, 
  inside a function called from a prior function, in the class am implementing 
  in a file called/executed from command line, then, the moment I try to close 
  the connection, whether or not have done anything with it, that's when I get 
  that python.exe has stopped working/responding error message popping up, and 
  python bombs out.</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT> </DIV>
  <DIV><FONT size=2 face=Arial>Have no idea how to try track down actual 
  source/cause of issue, since haven't found anything obvious in system event 
  logs, nothing appearing in MySQL server logs that makes sense/appears 
  relevant, and no matter if I try enclosing the connection open/close code 
  inside try except code blocks, nothing happens there except that python just 
  stops cooperating at all, and stops working.</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT> </DIV>
  <DIV><FONT size=2 face=Arial>Now did try making sure data execution prevention 
  was turned on/off, and that if set to second mode then told it to ignore 
  specific applications - added both python.exe, and the compiled version 
  of my code to it's exemption list, but, no changes there.</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT> </DIV>
  <DIV><FONT size=2 face=Arial>This still operates fine on my other dev machine, 
  but, would like to know why it's not operating on one specific 
  machine.</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT> </DIV>
  <DIV><FONT size=2 face=Arial>Otherwise, will just have to tell guys that, 
  sorry, will only be able to generate SQL script text files, and they'll have 
  to stick to the final step of then executing those via MySQL console 
  interface, or something, but, would really prefer to at the very least, 
  figure/find out what's causing this mis-behaviour.</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT> </DIV>
  <DIV><FONT size=2 face=Arial>Thoughts/suggestions with regards to how to find 
  out what is happening/what I'm doing/handling wrong/incorrectly?</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT> </DIV>
  <DIV><FONT size=2 face=Arial>The two current versions of the code - which work 
  fine under interpreter of both versions of python are basically the 
  following:</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT> </DIV>
  <DIV><FONT size=2 face=Arial>#pymysql version</FONT></DIV>
  <DIV><FONT size=2 face=Arial>import pymysql</FONT></DIV>
  <DIV><FONT size=2 face=Arial>cn = pymysql.connect("localhost", "root", "", 
  "import_test")</FONT></DIV>
  <DIV><FONT size=2 face=Arial>time.sleep(5)</FONT></DIV>
  <DIV><FONT size=2 face=Arial>cn.close()</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT> </DIV>
  <DIV><FONT size=2 face=Arial>#MySQLdb version</FONT></DIV>
  <DIV>
  <DIV><FONT size=2 face=Arial>import MySQLdb</FONT></DIV>
  <DIV><FONT size=2 face=Arial>cn = MySQLdb.connect("localhost", "root", "", 
  "import_test")</FONT></DIV>
  <DIV><FONT size=2 face=Arial>time.sleep(5)</FONT></DIV>
  <DIV><FONT size=2 face=Arial>cn.close()</FONT></DIV>
  <DIV><FONT size=2 face=Arial>#end code</FONT></DIV></DIV>
  <DIV><FONT size=2 face=Arial></FONT> </DIV>
  <DIV><FONT size=2 face=Arial>Stay well (away from this machine ;) 
  )</FONT></DIV>
  <DIV><FONT size=2 face=Arial><BR>Jacob Kruger<BR>Blind Biker<BR>Skype: 
  BlindZA<BR>"Roger Wilco wants to welcome you...to the space janitor's 
  closet..."<BR></FONT></DIV>
  <P>
  <HR>

  <P></P>-- 
<BR>https://mail.python.org/mailman/listinfo/python-list<BR></BLOCKQUOTE></FONT></DIV></BODY></HTML>