Στις 6/11/2013 5:25 μμ, ο/η Νίκος Γκρ33κ έγραψε:
Okey let the hacker try again to mess with my database!!!
He is done it twice, lets see if he will make it again!
I'am waiting!
No luck yet mighty one? :)
--
https://mail.python.org/mailman/listinfo/python-list
Okey let the hacker try again to mess with my database!!!
He is done it twice, lets see if he will make it again!
I'am waiting!
--
https://mail.python.org/mailman/listinfo/python-list
Στις 4/7/2013 6:10 μμ, ο/η MRAB έγραψε:
What do you mean "I don't know how to catch the exception with
OSError"? You've tried "except socket.gaierror" and "except
socket.herror", well just write "except OSError" instead!
try:
host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0]
Αρχικό μήνυμα
Θέμα: Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in
position 0: invalid start byte
Ημερομηνία: Thu, 04 Jul 2013 14:34:42 +0100
Από: MRAB
Απάντηση: python-list@python.org
Προς: python-list@python.org
Ομάδες συζήτησης: comp.lang.python
Αναφορές
Στις 4/7/2013 4:34 μμ, ο/η MRAB έγραψε:
On 04/07/2013 13:47, Νίκος wrote:
Στις 4/7/2013 3:07 μμ, ο/η MRAB έγραψε:
On 04/07/2013 12:36, Νίκος wrote:
Στις 4/7/2013 2:06 μμ, ο/η MRAB έγραψε:
On 04/07/2013 11:38, Νίκος wrote:
Στις 4/7/2013 12:50 μμ, ο/η Ulrich Eckhardt έγραψε:
Am 04.07.2013 10:
Στις 4/7/2013 4:33 μμ, ο/η Steve Simmons έγραψε:
"Νίκος" wrote:
Στις 4/7/2013 11:34 πμ, ο/η Dave Angel έγραψε:
On 07/04/2013 03:59 AM, Νίκος wrote:
Στις 4/7/2013 10:32 πμ, ο/η cutems93 έγραψε:
I am researching on editors for my own reference. I
Στις 4/7/2013 4:07 μμ, ο/η Ulrich Eckhardt έγραψε:
Am 04.07.2013 12:38, schrieb Νίκος:
Στις 4/7/2013 12:50 μμ, ο/η Ulrich Eckhardt έγραψε:
Am 04.07.2013 10:37, schrieb Νίκος:
Why cant it decode the starting byte? what starting byte is that?
It's the 0xb6 but it's expecting the starting byte
Τη Πέμπτη, 30 Μαΐου 2013 4:36:11 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε:
> Lemme guess, he's next going to ask on the PostgreSQL mailing list. I
> mean, that's unrelated to Python, right?
Well Chris, i'am not that stupid :)
I intend to ask questions unrelated to Python to a list unrelated t
Τη Πέμπτη, 30 Μαΐου 2013 4:05:00 μ.μ. UTC+3, ο χρήστης Mark Lawrence έγραψε:
> Please ask questions unrelated to Python on a list that is unrelated to
> Python.
Okey, i will.
--
http://mail.python.org/mailman/listinfo/python-list
Τη Πέμπτη, 30 Μαΐου 2013 3:59:21 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε:
> On Thu, May 30, 2013 at 10:31 PM, Νίκος Γκρ33κ wrote:
>
> > This is my last question, everythign else is taken care of.
>
> >
>
> > i cant test thjis coe online because i receive thi
Τη Πέμπτη, 30 Μαΐου 2013 3:34:09 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε:
> On Thu, May 30, 2013 at 10:25 PM, Νίκος Γκρ33κ wrote:
>
> > #!/usr/bin/python3
>
> > # coding=utf-8
>
> > (chomp a whole lot of code without any indication of what it ought to do)
>
This is my last question, everythign else is taken care of.
i cant test thjis coe online because i receive this
[Thu May 30 15:29:33 2013] [error] [client 46.12.46.11] suexec failure: could
not open log file
[Thu May 30 15:29:33 2013] [error] [client 46.12.46.11] fopen: Permission denied
[Thu Ma
#!/usr/bin/python3
# coding=utf-8
import cgitb; cgitb.enable()
import cgi, os, sys
from http import cookies
# initialize cookie
cookie = cookies.SimpleCookie( os.environ.get('HTTP_COOKIE') )
cookie.load( cookie )
nikos = cookie.get('nikos')
# if visitor cookie does exist
if nikos:
msg =
Τη Πέμπτη, 30 Μαΐου 2013 2:33:56 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε:
> On Thu, May 30, 2013 at 8:53 PM, wrote:
>
> > Good morning Michael,
>
> >
>
> > I'am afraid as much as you dont want to admin it that the moment i append
> > the charset directive into the connections tring i rece
con = pymysql.connect( db = 'pelatologio', host = 'localhost', user = 'blabla',
passwd = 'blabla', init_command='SET NAMES UTF8', charset = 'utf-8' )
produces this "God knows what" error traceback
/home/nikos/public_html/cgi-bin/metrites.py in ()
217 template = htmldata
I do not know here to find connections.py Michael.
But i do not understand since iam suing the following 2 statements, why a
unicode error remains.
#needed line, script does *not* work without it
sys.stdout = os.fdopen(1, 'w', encoding='utf-8')
# connect to database
con = pymysql.connect( db =
Τη Κυριακή, 26 Μαΐου 2013 7:45:42 μ.μ. UTC+3, ο χρήστης Mark Lawrence έγραψε:
> What has this got to do with Python?
What do your questions have to do with a proper reply?
--
http://mail.python.org/mailman/listinfo/python-list
Τη Τρίτη, 28 Μαΐου 2013 1:18:06 π.μ. UTC+3, ο χρήστης Chris Angelico έγραψε:
> You're effectively asking people to put in a few minutes' work,
> sometimes quite a few minutes, to help you. Is it too much to hope
> that you'll spend one more minute on your posts?
No it is not, you are right, i sh
I have checked the database through phpMyAdmin and it is indeed UTF-8.
I have no idea why python 3.3.1 chooses to work with latin-iso only
--
http://mail.python.org/mailman/listinfo/python-list
Τη Δευτέρα, 27 Μαΐου 2013 6:52:32 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε:
> So you want to pay someone who won't ask for money?
> It may be sordid, but you're going to have to discuss money at some
> point if you're serious about paying someone.
> Oh, and you may want to hire a typist, too. A
Τη Δευτέρα, 27 Μαΐου 2013 5:45:25 μ.μ. UTC+3, ο χρήστης Mark Lawrence έγραψε:
> Sure, all you need do is get your cheque book out. Also have you ever
> heard the expression "patience is a virtue"?
Well, if i'am gonna pay someone and i will at some point because i want my
script to be also re-w
I cant solve this plz help!
--
http://mail.python.org/mailman/listinfo/python-list
Please, do you see an error in this?
As i said the 2nd solution doesnt provide an error but also doesn't get the
mail send too.
--
http://mail.python.org/mailman/listinfo/python-list
But iu have it set up for 'utf-8' as seen in this statement.
con = pymysql.connect( db = 'metrites', host = 'localhost', user =
'me', passwd = 'somepass', charset='utf-8', init_command='SET NAMES UTF8' )
Yoiu mean i shoudl chnag eit to greek isoo= (iso-8859-7)
but then i store english names an
else:
sp = subprocess.Popen(['mail', '-f', FROM, '-s', 'Mail from
Guest', 'supp...@superhost.gr'], sp.stdin=subprocess.PIPE)
sp.communicate( input.encode(MESSAGE, 'utf-8') )
status = sp.wait()
this gives me an internal server error Cameron, but i g
No thi is not a mysql issue becaus ei have this line above for storing and
retrieval form database.
con = pymysql.connect( db = 'metrites', host = 'localhost', user = 'me', passwd
= 'somepass', init_command='SET NAMES UTF8' )
--
http://mail.python.org/mailman/listinfo/python-list
I'am receiving this now after some tries:
A problem occurred in a Python script. Here is the sequence of function calls
leading up to the error, in the order they occurred.
/home/nikos/public_html/cgi-bin/metrites.py in ()
139 else:
140 sp = subprocess.Popen(['ma
Any idea how to correct this encoding issue?
--
http://mail.python.org/mailman/listinfo/python-list
This is the code that although correct becaus it works with englisg(standARD
ASCII letters) it wont with Greek:
if( log ):
name = log
# print specific client header info
cur.execute('''SELECT hits, money FROM clients WHERE name = %s''',
(name,) )
data = cur.fetcho
Here is the live error log coming form apacher when i request the webpage form
browser:
==> /usr/local/apache/logs/error_log <==
[Sun May 26 19:07:41 2013] [error] [client 46.12.46.11] suexec failure: could
not open log file
[Sun May 26 19:07:41 2013] [error] [client 46.12.46.11] fopen: Permissi
Τη Κυριακή, 26 Μαΐου 2013 3:58:12 μ.μ. UTC+3, ο χρήστης Νίκος Γκρ33κ έγραψε:
> Τη Κυριακή, 26 Μαΐου 2013 3:20:19 μ.μ. UTC+3, ο χρήστης Peter Otten έγραψε:
>
>
>
> > At some point you have to admit that coding isn't your cup of tea.
>
> > Or Ouzo ;(
>
>
Τη Κυριακή, 26 Μαΐου 2013 6:24:55 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε:
> On Mon, May 27, 2013 at 1:00 AM, wrote:
>
> > Τη Κυριακή, 26 Μαΐου 2013 4:10:02 μ.μ. UTC+3, ο χρήστης Chris Angelico
> > έγραψε:
>
> >> On Sun, May 26, 2013 at 11:00
Anyone seeign somethign wrong?
--
http://mail.python.org/mailman/listinfo/python-list
Τη Κυριακή, 26 Μαΐου 2013 3:20:19 μ.μ. UTC+3, ο χρήστης Peter Otten έγραψε:
> At some point you have to admit that coding isn't your cup of tea.
> Or Ouzo ;(
And i didn't evne drank anyhting, iam sober! Imagine what i would have written
if i had some shots of Ouzo :-)
I chnage my code to:
mont
python3 pelatologio.py gives me error in this line:
Traceback (most recent call last):
File "pelatologio.py", line 283, in
''' % (months[key], key) )
KeyError: 1
The code is:
#populating months into a dropdown menu
years = ( 2010, 2011, 2012, 2013 )
months = { 'Ιανουάριος':1, 'Φε
Perhaps cna you help a bit with tha too:
used to work in 2.6 but not with 3.3.1
#!/usr/bin/python3
# coding=utf-8
import cgitb; cgitb.enable()
import cgi, os, sys
from http import cookies
# initialize cookie
cookie = cookies.SimpleCookie( os.environ.get('HTTP_COOKIE') )
cookie.load( cookie )
ni
Τη Κυριακή, 26 Μαΐου 2013 11:23:40 π.μ. UTC+3, ο χρήστης Peter Otten έγραψε:
> Νίκος Γκρ33κ wrote:
>
>
>
> > Hello this is the following snippet that is causing me the error i mention
>
> > in the Subject:
>
>
>
> > print( " > href='htt
Hello this is the following snippet that is causing me the error i mention in
the Subject:
try:
cur.execute( '''SELECT url, hits FROM counters ORDER BY hits
DESC''' )
data = cur.fetchall()
for row in data:
(url, hi
Hello Cameron,
Did you received my yesterday's mail?
--
http://mail.python.org/mailman/listinfo/python-list
Τη Πέμπτη, 18 Απριλίου 2013 2:00:48 π.μ. UTC+3, ο χρήστης Cameron Simpson
έγραψε:
> Reply to this message. I will email you my ssh public key. Please make me an
> _ordinary_ user account called "cameron" and send me the ssh details of your
> VPS.
Thank you very much Cameron, i appreciate all yo
Hello, can you still help me please?
--
http://mail.python.org/mailman/listinfo/python-list
Τη Τετάρτη, 10 Απριλίου 2013 9:08:38 μ.μ. UTC+3, ο χρήστης Nobody έγραψε:
> On Wed, 10 Apr 2013 00:23:46 -0700, nagia.retsina wrote:
>
>
>
> > Look at what 'python3 metrites.py' gives me
>
>
>
> > File "/root/.local/lib/python2.7/lib/python3.3/os.py", line 669, ...
>
>
I'am not sure i follow you.
How did my topic changed?! Is this possible?
How about the oce i posted at patebin.com.
Did anyone by any chnace had a look into?
It's only a single thing iam missing for the encoding and the the script will
load properly with python 3.3
--
http://mail.python.org/mai
Anyone please?
--
http://mail.python.org/mailman/listinfo/python-list
Thank you just altered it but i still get the same encoding issues.
please its only a matter of simple alternation that iam not able to see.
When you have the time plz take a look.
Thank you!
--
http://mail.python.org/mailman/listinfo/python-list
os.environ['HTTP_USER_AGENT'] is only set when running from browser.
so i faked it by using:
userinfo = os.environ.get('HTTP_USER_AGENT', 'some default')
but the encoding issues are still there.
--
http://mail.python.org/mailman/listinfo/python-list
Here is the whole code for metrites.py in case someone wants to take allok.
Everything is correct after altering it to meet python 3.3, everythign aprt
from the weird unicode error thing.
http://pastebin.com/5Mpjx5Fd
please take a look.
Thank you.
--
http://mail.python.org/mailman/listinfo/py
Hello, iam still trying to alter the code form python 2.6 => 3.3
Everyrging its setup except that unicode error that you can see if you go to
http://superhost.gr
Can anyone help with this?
I even tried to change print() with sys.stdout.buffer() but still i get the
same unicode issue.
I don't k
I'am looking for this:
Reseller Plan with 200$ per year
α) 20 GB ftp quota
b) 200 GB traffic
c) cPanel
d) Python 3
e) Python MySQLdb module
f) ssh support
Please make the best offer possible.
Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
it's me Nikos i just posted under the wrong gmail account againsorry for
that.
--
http://mail.python.org/mailman/listinfo/python-list
Just today i changed from HostGator to EZPZ, which means from Apache Web Server
to LiteSpeed.
Does anyone know why iam seeing what iam seeing at http://superhost.gr
I see weird encoding although inside my python script i have:
#!/usr/bin/python
# -*- coding=utf-8 -*
Also dod you advise me to s
Τη Κυριακή, 31 Μαρτίου 2013 11:21:21 μ.μ. UTC+3, ο χρήστης ru...@yahoo.com
έγραψε:
> On 03/31/2013 02:08 PM, Νίκος Γκρ33κ wrote:
>
>
>
> > But i look the code and run python via interactive prompt and it says
>
> > it has no error.
>
>
>
> Does it
Τη Κυριακή, 31 Μαρτίου 2013 10:46:57 μ.μ. UTC+3, ο χρήστης ru...@yahoo.com
έγραψε:
> On 03/31/2013 01:12 PM, Νίκος Γκρ33κ wrote:
>
> > Firsly, thank you for your willing to help me. i wrote, uploaded an
>
> > chmoded test.py and you can see the cgi enviromental ta
I just tried the testmysql.py script:
#!/usr/bin/python3
# coding=utf-8
import cgitb; cgitb.enable()
import cgi, re, os, sys, socket, datetime, MySQLdb, locale, random, subprocess
# connect to database
con = MySQLdb.connect( db = 'nikos_metrites', host = 'localhost', user =
'nikos_nikos', pas
Τη Κυριακή, 31 Μαρτίου 2013 9:14:43 μ.μ. UTC+3, ο χρήστης ru...@yahoo.com
έγραψε:
> On 03/31/2013 08:03 AM, Νίκος Γκρ33κ wrote:
>
> > Hello all,
>
> >
>
> > i need some help
>
> > i recently changes pythoon 2.6 code => python 3.2.3 but my script
Hello all,
i need some help
i recently changes pythoon 2.6 code => python 3.2.3 but my script although not
producing any errors now doesnt display anything else but a blank page at
htp://superhost.gr
can you help?
I tried MySQLdb, pymysql, oursql, but nothing happens.
i still get a blank page.
Τη Πέμπτη, 28 Μαρτίου 2013 10:54:55 μ.μ. UTC+2, ο χρήστης Alan Meyer έγραψε:
> On 3/27/2013 11:50 PM, Νίκος Γκρ33κ wrote:
>
> > I'am about to go nuts with python 3.2.3
>
> >
>
> > Do you see somehtign wrong with the following statement?
>
> >
>
Τη Πέμπτη, 28 Μαρτίου 2013 4:51:16 μ.μ. UTC+2, ο χρήστης David M Chess έγραψε:
> Νίκος Γκρ33κ
> :
>
>
>
> >> What paramstyle are you using?
>
> >
>
> >Yes it is Chris, but i'am not sure what exactly are you asking me.
>
> >
Well i dont like people taking to me this way espceially when iam tryign 2 days
for something and thats changing from 2.6 => 3.2.3
I follow advice as long as i can understand whats being said to me.
So if someone wants to help by asking me to try things please do.
--
http://mail.python.org/mail
Will someone help me out here please?
--
http://mail.python.org/mailman/listinfo/python-list
Like you werent of any help
--
http://mail.python.org/mailman/listinfo/python-list
Τη Πέμπτη, 28 Μαρτίου 2013 5:59:55 μ.μ. UTC+2, ο χρήστης Chris Angelico έγραψε:
> On Fri, Mar 29, 2013 at 2:51 AM, Νίκος Γκρ33κ wrote:
>
> > Τη Πέμπτη, 28 Μαρτίου 2013 5:25:26 μ.μ. UTC+2, ο χρήστης Chris Angelico
> > έγραψε:
>
> >> On Fri, Mar 29, 2013 at 2:20
Τη Πέμπτη, 28 Μαρτίου 2013 4:42:59 μ.μ. UTC+2, ο χρήστης Miki Tebeka έγραψε:
> > Fianlly my cgi .py script doesnt produce any more errors, i think i ahve
> > correct them but it present a blank screen
>
> > Any idea why?
>
> Please post the code to the script, otherwise we can't help you.
Can y
Τη Πέμπτη, 28 Μαρτίου 2013 5:25:26 μ.μ. UTC+2, ο χρήστης Chris Angelico έγραψε:
> On Fri, Mar 29, 2013 at 2:20 AM, Νίκος Γκρ33κ wrote:
>
> > PLEASE GIVE ME A CLUE ABOUT THIS SITUATION.
>
> >
>
> > EVEN JAILED SHELL ACCESS SAYS ITS OKEY BUT I CNA ONLY SEE A BLANK
PLEASE GIVE ME A CLUE ABOUT THIS SITUATION.
EVEN JAILED SHELL ACCESS SAYS ITS OKEY BUT I CNA ONLY SEE A BLANK PAGE NOT EVEN
AN INTERNAL SERVER ERROR.
ni...@superhost.gr [~/www/cgi-bin]# /usr/bin/python3 metrites.py
says its ok.
--
http://mail.python.org/mailman/listinfo/python-list
this is correct when it runs from a browser thats not the issue here othwerise
it would prodice an error.
the question is why the blank screen...
somehting with param style perhaps?
--
http://mail.python.org/mailman/listinfo/python-list
Τη Πέμπτη, 28 Μαρτίου 2013 4:42:59 μ.μ. UTC+2, ο χρήστης Miki Tebeka έγραψε:
> > Fianlly my cgi .py script doesnt produce any more errors, i think i ahve
> > correct them but it present a blank screen
>
> > Any idea why?
>
> Please post the code to the script, otherwise we can't help you.
who e
Τη Πέμπτη, 28 Μαρτίου 2013 4:42:59 μ.μ. UTC+2, ο χρήστης Miki Tebeka έγραψε:
> Please post the code to the script, otherwise we can't help you.
I wanted to make my website running Python 3 which is more new and bette:)
i treid to execute metrites.py via my jailed shell, please take a look if i'a
Fianlly my cgi .py script doesnt produce any more errors, i think i ahve
correct them but it present a blank screen
http://superhost.gr
Any idea why?
What should i check?
--
http://mail.python.org/mailman/listinfo/python-list
Can someone else esxcept Chris help me please?
I'm strugling with this and cannot see whats wrong.
--
http://mail.python.org/mailman/listinfo/python-list
I'am just tryign to print the date with proper greek letters as it uses to work
with Python v2.6
date gets calculated here:
date = ( datetime.utcnow() + timedelta(hours=2) ).strftime( '%y-%m-%d %H:%M:%S'
)
I'am not sure but i believe that the decode must be taken out in python 3.x
because
Τη Πέμπτη, 28 Μαρτίου 2013 6:35:14 π.μ. UTC+2, ο χρήστης Chris Angelico έγραψε:
> No. I said to print out the paramstyle attribute. If it's that late
>
> and you haven't slept, get some sleep, then reread this thread. You
>
> may be able to respond more intelligently.
What is a paramstyle attri
Τη Πέμπτη, 28 Μαρτίου 2013 6:26:48 π.μ. UTC+2, ο χρήστης Chris Angelico έγραψε:
> On Thu, Mar 28, 2013 at 3:18 PM, Νίκος Γκρ33κ wrote:
>
> > Τη Πέμπτη, 28 Μαρτίου 2013 6:08:28 π.μ. UTC+2, ο χρήστης Chris Angelico
> > έγραψε:
>
> >
>
> >> As it says in t
Τη Πέμπτη, 28 Μαρτίου 2013 6:08:28 π.μ. UTC+2, ο χρήστης Chris Angelico έγραψε:
> As it says in that document, paramstyle is a top-level module
> attribute. Try printing it out. See what it says. Then match your code
sql = '''SELECT hits FROM counters WHERE url = %s''' % page
print( sql )
cur.ex
If you mean if iam using '?' or this '%s' the latter used to work flawlessly
with python 2.6 but it does not in pythin 3.2.3
both this command fail in python 3.x
cur.execute( '''SELECT hits FROM counters WHERE url = ?''', (page,) )
cur.execute( '''SELECT hits FROM counters WHERE url = %s''', (
Τη Πέμπτη, 28 Μαρτίου 2013 6:00:17 π.μ. UTC+2, ο χρήστης Chris Angelico έγραψε:
> What paramstyle are you using?
Yes it is Chris, but i'am not sure what exactly are you asking me.
Please if you cna pout it even simper for me, thank you.
--
http://mail.python.org/mailman/listinfo/python-list
I'am about to go nuts with python 3.2.3
Do you see somehtign wrong with the following statement?
cur.execute( '''SELECT hits FROM counters WHERE url = ?''', (page,) )
data = cur.fetchone()
because as you can see by visiting my webpage at http://superhost.gr it
produces an error and i dont have
this worked
quote = random.choice( list( open( "/home/nikos/www/data/private/quotes.txt",
'rb') ) )
and also this
f = open( "/home/nikos/www/" + page, 'rb' )
i dont know why python 3 needs 'rb' though.
Now ima having problem with this:
htmldata = htmldata % (quote, music)
it says soemthign
Τη Πέμπτη, 28 Μαρτίου 2013 4:46:48 π.μ. UTC+2, ο χρήστης Chris Angelico έγραψε:
> On Thu, Mar 28, 2013 at 1:36 PM, Νίκος Γκρ33κ wrote:
>
> > Thank you for verifying this,
>
> >
>
> > Also now http://superhost.gr seems to stuck in the following line which i
&
Τη Πέμπτη, 28 Μαρτίου 2013 4:28:04 π.μ. UTC+2, ο χρήστης Chris Angelico έγραψε:
> On Thu, Mar 28, 2013 at 1:16 PM, Νίκος Γκρ33κ wrote:
>
> > Τη Πέμπτη, 28 Μαρτίου 2013 12:55:11 π.μ. UTC+2, ο χρήστης Chris Angelico
> > έγραψε:
>
> >> On Thu, Mar 28, 2013 at 7:18
Thank you for verifying this,
Also now http://superhost.gr seems to stuck in the following line which i try
to open an acii file to slect a random line, please take a look.
--
http://mail.python.org/mailman/listinfo/python-list
I think i have figured this out:
cur.execute( '''SELECT hits FROM counters WHERE url = %s''') , (page,)
is a tuple of two objects. The first is the result of
cur.execute( '''SELECT hits FROM counters WHERE url = %s''')
and the second is
(page,)
cur.execute( '''SELECT hits FROM counters WHERE u
The following works in python 3.2
[code]
cur.execute( '''SELECT hits FROM counters WHERE url = ?''') , (page,)
[/code]
is there a difefrence between the above and the follwong which works in python
2.6
[code]
cur.execute( '''SELECT hits FROM counters WHERE url = ?''' , (pag
Τη Πέμπτη, 28 Μαρτίου 2013 12:48:54 π.μ. UTC+2, ο χρήστης Dennis Lee Bieber
έγραψε:
> On Wed, 27 Mar 2013 16:48:44 +, MRAB
>
> declaimed the following in gmane.comp.python.general:
>
>
>
>
>
> > A brief look at the documentation tells me that MySQL uses '?' as the
>
> > placeholder ins
Τη Πέμπτη, 28 Μαρτίου 2013 12:55:11 π.μ. UTC+2, ο χρήστης Chris Angelico έγραψε:
> On Thu, Mar 28, 2013 at 7:18 AM, Νίκος Γκρ33κ wrote:
>
> > date = date.strftime('%A, %e %b %Y').decode('cp1253').encode('utf8')
>
>
>
> For a start, fig
Hello folks,
With what do i need to replace:
---
print ( "Query Error: ", sys.exc_info()[1].excepinfo()[2] )
-
and
--
date = date.strftime('%A, %e %b %Y').decode('cp1253').encode('utf8')
--
in Python3? because in 2.6 used to work but they dont in Pytho 3
thank yo
Τη Τετάρτη, 27 Μαρτίου 2013 9:28:35 μ.μ. UTC+2, ο χρήστης Chris Angelico έγραψε:
> On Thu, Mar 28, 2013 at 3:48 AM, MRAB wrote:
> > A brief look at the documentation tells me that MySQL uses '?' as the
> > placeholder instead of '%s':
> cur.execute('''SELECT hits FROM counters WHERE url = ?''', (
Even better:
try:
sql = '''SELECT hits FROM counters WHERE url = %s''' % page
print( sql )
cur.execute( sql )
data = cur.fetchone()
except MySQLdb.ProgrammingError as e:
print ( "Query Error: ", dir( sys.exc_info()[1] ) )
sql statement seems okey.
Τη Τετάρτη, 27 Μαρτίου 2013 9:06:27 μ.μ. UTC+2, ο χρήστης Joel Goldstick έγραψε:
> You should print the sql statement to see what is being created. Create the
> > > >sql, and assign it to a variable name. Print that. Then execute the
> command.
Ok Joe, i just tried the followinf as you sugge
I had encoding isseus as well!
Now i tried your suggestion changing comma with '%' and now the error is more
clear.
[code]
_mysql_exceptions.OperationalError: (1054, "Unknown column 'index.html' in
'where clause'")
[/code]
loook at http://superhost.gr please to see the whoel traceback
--
htt
=> 187 print ( "Query Error: ",
sys.exc_info()[1].excepinfo()[2])
excepinfo is probably mis-spelled---I have no idea what you intend.l
Python3 raised exceptions in an except: clause giving the double exception
message that I don't think you'd have seen in python2. Maybe the pu
any help here please?
--
http://mail.python.org/mailman/listinfo/python-list
And also i must show you that 'page' values are calculated by:
# detect how 'index.html' is called and validate variables 'htmlpage' & 'page'
if page and os.path.isfile( '/home/nikos/www/cgi-bin/' + page ):
page = page
elif form.getvalue('show') and os.path.isfile( htmlpage ):
page
Τη Τετάρτη, 27 Μαρτίου 2013 6:26:06 π.μ. UTC+2, ο χρήστης ru...@yahoo.com
έγραψε:
> If not, maybe you can try adding a print statement to your code that
> will print the value of 'page'. This will be easier to do if you
> can run you code interactively. If you have to run it via a webserver
>
Hello today i deiced to go form python 2.6 to python 3.2.3
although in 2.6 my script runs in the ht enewest python i ge this error:
Traceback (most recent call last):
File
"/opt/python3/lib/python3.2/site-packages/MySQL_python-1.2.3-py3.2-linux-x86_64.egg/MySQLdb/cursors.py",
line 171, in ex
Because Python 3 doesnt support MySQLdb moudle yet i decided to use
mypysql-0.5.5.tar.gz which i found in google.
problem is that i dont know how to run this file in my webost account so it
cant be utilized and so i can pass to Python 3 at last.
i ahve uplaoded the file viua cPnael in webhost b
Τη Τρίτη, 12 Μαρτίου 2013 12:34:50 π.μ. UTC+2, ο χρήστης Thomas Rachel έγραψε:
> Am 10.03.2013 19:39 schrieb οΏ½οΏ½οΏ½οΏ½οΏ½ οΏ½οΏ½οΏ½33οΏ½:
>
> > Hey man this worked via Python!
>
>
>
> [...]
>
>
>
> > if( os.system( 'echo "%s" | mail -s "%s" supp...@superhost.gr'
> > % (MESSA
Τη Κυριακή, 10 Μαρτίου 2013 6:09:53 μ.μ. UTC+2, ο χρήστης Michael Torrie έγραψε:
> You need to post the code snippet that's failing (possibly changing
> private details like smtp server ip address for security reasons), and
> any exception trace that you are getting! Other wise, sorry we've done
Anyone else migth ahve an idea please so that i can successfully send mail via
python?
--
http://mail.python.org/mailman/listinfo/python-list
Τη Κυριακή, 10 Μαρτίου 2013 7:56:45 π.μ. UTC+2, ο χρήστης Steven D'Aprano
έγραψε:
> My wild guess is that the mail server is properly rejecting mail because
> you are trying to send to it without an account.
Account 'support(-at-)hostgator.com' exists. It's the recipient mail address
which is
1 - 100 of 159 matches
Mail list logo