Re: Database statements via python but database left intact

2013-10-06 Thread Piet van Oostrum
Νίκος Αλεξόπουλος writes: > i will use con.commit() from now and on because yesterdays i lost 3 > hours trying to identify what was wrong with my MySQL statements in > python and it turned out to be for no good reason. That shows how important it is to study the software that you are using, and

Re: Database statements via python but database left intact

2013-10-06 Thread Νίκος Αλεξόπουλος
Στις 6/10/2013 6:52 μμ, ο/η Adam Tauno Williams έγραψε: Are you sure that you're committing your changes (either by having autocommit set or using an explicit con.commit() call)? http://geert.vanderkelen.org/dont-forget-the-commit-in-mysql/ I dont think that is the issue, because up until now i

Re: Database statements via python but database left intact

2013-10-06 Thread Adam Tauno Williams
>>> Are you sure that you're committing your changes (either by having >>> autocommit set or using an explicit con.commit() call)? >>> http://geert.vanderkelen.org/dont-forget-the-commit-in-mysql/ >> I dont think that is the issue, because up until now i never used >commit and >> all transaction we

Re: Database statements via python but database left intact

2013-10-06 Thread Νίκος Αλεξόπουλος
Στις 6/10/2013 12:45 πμ, ο/η Zero Piraeus έγραψε: : On Sun, Oct 06, 2013 at 12:02:14AM +0300, Νίκος Αλεξόπουλος wrote: I neved had though of than an engine type could make so much mess. MyISAM is the way to go then for my web development? Why InnoDB failed to execute the queries? Because you

Re: Database statements via python but database left intact

2013-10-06 Thread Adam Tauno Williams
>I neved had though of than an engine type could make so much mess. Because your app and how it is written is broken. >MyISAM is the way to go then for my web development? >Why InnoDB failed to execute the queries? No, nothing failed. Your app is broken. You are depending on auto commit - and

Re: Database statements via python but database left intact

2013-10-06 Thread Zero Piraeus
: On Sun, Oct 06, 2013 at 12:02:14AM +0300, Νίκος Αλεξόπουλος wrote: > I neved had though of than an engine type could make so much mess. > MyISAM is the way to go then for my web development? > Why InnoDB failed to execute the queries? Because you didn't commit. MyISAM doesn't support transactio

Re: Database engine bindings for Python (was: Database statements via python but database left intact)

2013-10-06 Thread Roy Smith
In article , Chris Angelico wrote: > I would hope that an absence of libpq could simply result in a > courteous exception when the module's imported, but maybe that'd be > hard to implement. It works fine. I've had this in production for a while: # Psycopg2 is only needed for a single hacky l

Re: Database engine bindings for Python (was: Database statements via python but database left intact)

2013-10-06 Thread Chris Angelico
On Sun, Oct 6, 2013 at 8:10 PM, Chris “Kwpolska” Warrick wrote: > It would require Postgres around people’s (or at least packagers’) > systems, and it often gets messy when we have such requirements. I would hope that an absence of libpq could simply result in a courteous exception when the modul

Re: Database statements via python but database left intact

2013-10-06 Thread Chris “Kwpolska” Warrick
On Sun, Oct 6, 2013 at 1:36 PM, rusi wrote: > On Sunday, October 6, 2013 2:35:24 PM UTC+5:30, Chris “Kwpolska” Warrick > wrote: >> So, instead of this, maybe we should work on getting psycopg2 to the >> top result on Googling “python sql”, or even “python mysql” with an >> anti-MySQL ad? (like vi

Re: Database statements via python but database left intact

2013-10-06 Thread rusi
On Sunday, October 6, 2013 2:35:24 PM UTC+5:30, Chris “Kwpolska” Warrick wrote: > So, instead of this, maybe we should work on getting psycopg2 to the > top result on Googling “python sql”, or even “python mysql” with an > anti-MySQL ad? (like vim was doing some time ago on Googling “emacs”) Do yo

Re: Database engine bindings for Python (was: Database statements via python but database left intact)

2013-10-06 Thread Chris “Kwpolska” Warrick
Reposting what I said in the other thread: On Sun, Oct 6, 2013 at 12:51 AM, Chris Angelico wrote: > On Sun, Oct 6, 2013 at 8:39 AM, Ned Batchelder wrote: >> Now is a good time to go read about transactions, and committing, and the >> difference between MyISAM and InnoDB. Please don't ask more a

Re: Database statements via python but database left intact

2013-10-06 Thread Chris “Kwpolska” Warrick
On Sun, Oct 6, 2013 at 12:51 AM, Chris Angelico wrote: > On Sun, Oct 6, 2013 at 8:39 AM, Ned Batchelder wrote: >> Now is a good time to go read about transactions, and committing, and the >> difference between MyISAM and InnoDB. Please don't ask more about it here. > > It's because of threads li

Re: Database engine bindings for Python (was: Database statements via python but database left intact)

2013-10-05 Thread Dan Sommers
On Sun, 06 Oct 2013 12:19:13 +1100, Chris Angelico wrote: > On Sun, Oct 6, 2013 at 12:05 PM, Ben Finney wrote: [ ... ] >> With a separately-installed, far more complex database engine like >> MySQL or PostgreSQL, the Python bindings will only work if they are >> compiled against the correct clie

Re: Database engine bindings for Python (was: Database statements via python but database left intact)

2013-10-05 Thread Chris Angelico
On Sun, Oct 6, 2013 at 12:05 PM, Ben Finney wrote: > The Python bindings for MySQL or PostgreSQL, or even SQLite, are tied to > extension libraries for the specific database engine. > > With SQLite this is not a problem for Python's release management, > because Python's release includes the entir

Database engine bindings for Python (was: Database statements via python but database left intact)

2013-10-05 Thread Ben Finney
Chris Angelico writes: > It's because of threads like this that I would really like Python to > nudge people towards something stronger than MySQL. Would it kill > Python to incorporate PostgreSQL bindings automatically? I'm not sure what would count as “kill Python”. It would certainly make the

Re: Database statements via python but database left intact

2013-10-05 Thread Chris Angelico
On Sun, Oct 6, 2013 at 8:39 AM, Ned Batchelder wrote: > Now is a good time to go read about transactions, and committing, and the > difference between MyISAM and InnoDB. Please don't ask more about it here. It's because of threads like this that I would really like Python to nudge people towards

Re: Database statements via python but database left intact

2013-10-05 Thread Ned Batchelder
On 10/5/13 5:02 PM, Νίκος Αλεξόπουλος wrote: Στις 5/10/2013 11:31 μμ, ο/η Ian Kelly έγραψε: Well, have you changed anything in your database configuration? Whether MySQL uses transactions or not depends on which storage engine is being used. I suggest running a test insert with and without comm

Re: Database statements via python but database left intact

2013-10-05 Thread Νίκος Αλεξόπουλος
Στις 5/10/2013 11:31 μμ, ο/η Ian Kelly έγραψε: Well, have you changed anything in your database configuration? Whether MySQL uses transactions or not depends on which storage engine is being used. I suggest running a test insert with and without commit to check whether you actually need it or no

Re: Database statements via python but database left intact

2013-10-05 Thread Ian Kelly
in the >>> following code, yes no isertion or update happens into the database: >>> >>> [...] >>> >>> >>> When this code runs i check instantly my database via PHPMyAdmin and >>> i see that it was left intact. >> >> >&g

Re: Database statements via python but database left intact

2013-10-05 Thread Νίκος Αλεξόπουλος
my database via PHPMyAdmin and i see that it was left intact. Are you sure that you're committing your changes (either by having autocommit set or using an explicit con.commit() call)? http://geert.vanderkelen.org/dont-forget-the-commit-in-mysql/ I dont think that is the issue, becau

Re: Database statements via python but database left intact

2013-10-05 Thread Zero Piraeus
yAdmin and > i see that it was left intact. Are you sure that you're committing your changes (either by having autocommit set or using an explicit con.commit() call)? http://geert.vanderkelen.org/dont-forget-the-commit-in-mysql/ -[]z. -- Zero Piraeus: inter caetera http://etio

Re: Database statements via python but database left intact

2013-10-05 Thread Νίκος Αλεξόπουλος
Actually the whole code is this: # = # DATABASE INSERTS - # = if cooki

Database statements via python but database left intact

2013-10-05 Thread Νίκος Αλεξόπουλος
#get the primary key value of the new added record else: #found the page, save primary key and use it to issue hit UPDATE cID = data[0] cur.execute('''UPDATE counters SET hits = hits + 1 WHERE ID = %s''', cID ) When this code

header intact

2010-03-29 Thread vamsi.v
> >confirm bec6a35eaf702fee07b1542f90784d939bbbebff > > -- http://mail.python.org/mailman/listinfo/python-list

header intact. Or visitthis web page

2008-04-05 Thread snake snake
_ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/-- http://mail.python.org/mailman/listinfo/python-list

header intact

2007-09-17 Thread Hariom lakhotia
e have received a request from 61.8.158.123 for subscription of your email address, "[EMAIL PROTECTED]", to the python-list@python.org mailing list. To confirm that you want to be added to this mailing list, simply reply to this message, keeping the Subject: header intact. Or visit this

intact

2007-07-16 Thread Kishore kumar Manikonda
-- http://mail.python.org/mailman/listinfo/python-list

header intact

2007-06-22 Thread datulaida ali
hai.. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to apply text changes to HTML, keeping it intact if inside "a" tags

2006-09-27 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Hello, > > I have HTML input to which I apply some changes. > > Feature 1: > === > I want to tranform all the text, but if the text is inside > an "a href" tag, I want to leave the text as it is. > > The HTML is not necessarily well-formed, so > I would like to do

How to apply text changes to HTML, keeping it intact if inside "a" tags

2006-09-26 Thread vbfoobar
Hello, I have HTML input to which I apply some changes. Feature 1: === I want to tranform all the text, but if the text is inside an "a href" tag, I want to leave the text as it is. The HTML is not necessarily well-formed, so I would like to do that using BeautifulSoup (or maybe another tole

header intact

2006-04-15 Thread Vikram Katju
__ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- http://mail.python.org/mailman/listinfo/python-list

Re: get a copy of a string leaving original intact

2005-10-22 Thread Fredrik Lundh
"Bell, Kevin" wrote: > I ended up slicing my string into a new one, rather than trying to have > a copy of the string to alter in one case, or leave intact in another > case. given that you cannot modify strings in place in Python, that comment probably doesn't match w

RE: get a copy of a string leaving original intact

2005-10-21 Thread Bell, Kevin
I ended up slicing my string into a new one, rather than trying to have a copy of the string to alter in one case, or leave intact in another case. Thanks for the pointer on concatenating paths! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fredrik

Re: get a copy of a string leaving original intact

2005-10-21 Thread Fredrik Lundh
"Bell, Kevin" wrote: > I'm having trouble with something that seems like it should be simple. > > I need to copy a file, say "abc-1.tif" to another directory, but if it's > in there already, I need to transfer it named "abc-2.tif" but I'm going > about it all wrong. > > Here's what doesn't work: (

Re: get a copy of a string leaving original intact

2005-10-20 Thread Christoph Haas
On Thursday 20 October 2005 22:43, Bell, Kevin wrote: > I need to copy a file, say "abc-1.tif" to another directory, but if it's > in there already, I need to transfer it named "abc-2.tif" but I'm going > about it all wrong. What a coincidence... I stepped about this today: http://aspn.activestat

get a copy of a string leaving original intact

2005-10-20 Thread Bell, Kevin
I'm having trouble with something that seems like it should be simple. I need to copy a file, say "abc-1.tif" to another directory, but if it's in there already, I need to transfer it named "abc-2.tif" but I'm going about it all wrong. Here's what doesn't work: (I'll add the copy stuff from shuti