Re: A certainl part of an if() structure never gets executed.

2013-06-16 Thread Νίκος
On 16/6/2013 9:53 μμ, R. Michael Weylandt wrote: On Sun, Jun 16, 2013 at 2:47 PM, Ferrous Cranus wrote: On 16/6/2013 2:13 μμ, Jussi Piitulainen wrote: If, instead of the above, you have a = 6 b = a b = 5 you will find that b == 5 and a == 6. So b is not the same as a. Else one would have ch

Re: Why 'files.py' does not print the filenames into a table format?

2013-06-16 Thread Νίκος
On 15/6/2013 11:37 μμ, Joshua Landau wrote: On 15 June 2013 20:51, Nick the Gr33k wrote: On 15/6/2013 10:46 μμ, Jarrod Henry wrote: Nick, at this point, you need to hire someone to do your work for you. The code is completely ready. Some detail is missing and its not printing the files as

Re: Why 'files.py' does not print the filenames into a table format?

2013-06-16 Thread Νίκος
On 17/6/2013 8:58 πμ, Νίκος wrote: On 15/6/2013 11:37 μμ, Joshua Landau wrote: On 15 June 2013 20:51, Nick the Gr33k wrote: On 15/6/2013 10:46 μμ, Jarrod Henry wrote: Nick, at this point, you need to hire someone to do your work for you. The code is completely ready. Some detail is

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-17 Thread Νίκος
On 17/6/2013 7:23 μμ, Benjamin Kaplan wrote: On Mon, Jun 17, 2013 at 8:55 AM, Simpleton wrote: On 17/6/2013 5:22 μμ, Terry Reedy wrote: On 6/17/2013 7:34 AM, Simpleton wrote: On 17/6/2013 9:51 πμ, Steven D'Aprano wrote: Now, in languages like Python, Ruby, Java, and many others, there is

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Νίκος
On 17/6/2013 8:40 μμ, MRAB wrote: On 17/06/2013 17:39, Simpleton wrote: Hello again, something simple this time: After a user selects a file from the form, that sleection of his can be found form reading the variable 'filename' If the filename already exists in to the database i want to update

Re: Don't feed the troll...

2013-06-17 Thread Νίκος
On 17/6/2013 8:42 μμ, Oscar Benjamin wrote: On 17 June 2013 17:35, D'Arcy J.M. Cain wrote: On Mon, 17 Jun 2013 14:39:56 + (UTC) Grant Edwards wrote: I don't want _any_ copies from from Mailman. I don't subscribe to whatever mailing list you're talking about. I'm reading this via an NNTP

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Νίκος
On 17/6/2013 8:54 μμ, Jens Thoms Toerring wrote: Also take care to check the filename you insert - a malicous user might cobble together a file name that is actually a SQL statement and then do nasty things to your database. I.e. never insert values you received from a user without checking them.

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Νίκος
On 17/6/2013 10:19 μμ, John Gordon wrote: Print the cur.rowcount attribute, which contains the number of rows that were affected by the update. If it's zero, that should tell you something. #update file's counter if cookie does not exist cur.execute('''UPDATE files SET hits = hits + 1, host =

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Νίκος
On 17/6/2013 10:05 μμ, Alister wrote: You are correct Nicos, passing the values as a parameter list does protect you from SQL injection JT has made an error. Even if the query is somehting like: http://superhost.gr/cgi-bin/files.py?filename="Select."; From what exactly the comma protects

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Νίκος
Στις 18/6/2013 1:22 πμ, ο/η MRAB έγραψε: On 17/06/2013 21:44, John Gordon wrote: In Alister writes: > #update file's counter if cookie does not exist cur.execute('''UPDATE > files SET hits = hits + 1, host = %s, lastvisit = > %s WHERE url = %s''', (host, lastvisit, filename) ) > > if cur.row

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-17 Thread Νίκος
Στις 18/6/2013 2:09 πμ, ο/η Steven D'Aprano έγραψε: {"a": "Hello world"} Do you see a memory location there? There is no memory location. There is the name, "a", and the object it is associated with, "Hello world". Either the dict, or the string, may move around memory if the underlying memory m

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Νίκος
Finally i made it!! Here it is: # = # Have 1:1 mapping of files <-> database records, delete spurious # ==

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Νίκος
Στις 18/6/2013 2:30 πμ, ο/η Dennis Lee Bieber έγραψε: In the case of MySQLdb -- IT will wrap each argument with quotes, along with escaping any special characters. Even if the query is something like: http://superhost.gr/cgi-bin/files.py?filename="Select."; From what exactly the

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Νίκος
Στις 18/6/2013 4:42 πμ, ο/η Dennis Lee Bieber έγραψε: Do you ever COMMIT the changes. cur.execute("update anything set something = whatever where that = this") without doing a con.commit() is just going to rollback the changes. committing the changes inst necessary neither i

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-18 Thread Νίκος
Στις 18/6/2013 9:39 πμ, ο/η Larry Hudson έγραψε: Not quite: a and b _are_ memory addresses, At the same time, a and b are references to the data (the objects) stored in those memory locations. The distinction is probably more important in languages like C/C++, where the _language_ gives you di

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-18 Thread Νίκος
Στις 18/6/2013 12:05 μμ, ο/η Steven D'Aprano έγραψε: Names are *always* linked to objects, not to other names. a = [] b = a # Now a and b refer to the same list a = {} # Now a refers to a dict, and b refers to the same list as before I see, thank you Steven. But since this is a fact how do y

Re: A certainl part of an if() structure never gets executed.

2013-06-19 Thread Νίκος
Στις 19/6/2013 8:08 πμ, ο/η Tim Roberts έγραψε: Nick the Gr33k wrote: On 16/6/2013 4:55 ??, Tim Roberts wrote: Nick the Gr33k wrote: Because Python lets you use arbitrary values in a Boolean context, the net result is exactly the same. What is an arbitrary value? don even knwo what arbitr

Making a pass form cgi => webpy framework

2013-06-23 Thread Νίκος
Hello, as you all know i'am using cgi method for my web script. I have been told that webpy is the way to go sor script simple enough as mines. Can you please show me the simplest example you can think of utilizing a templates (index.html) and a python script (metrites.py) ? I want to see i

Re: Making a pass form cgi => webpy framework

2013-06-23 Thread Νίκος
Στις 23/6/2013 5:57 μμ, ο/η ru...@yahoo.com έγραψε: On 06/23/2013 07:01 AM, Νίκος wrote:> Hello, as you all know i'am using cgi method for my web script. I have been told that webpy is the way to go sor script simple enough as mines. Can you please show me the simplest example you c

Re: Making a pass form cgi => webpy framework

2013-06-23 Thread Νίκος
Στις 24/6/2013 1:29 πμ, ο/η ru...@yahoo.com έγραψε: In this simple example, there is not much advantage of Mako over your templates. But with more complicated cases, for instance, when you have tables or forms that you want to dynamically construct from external data (info extracted from a datab

Re: Making a pass form cgi => webpy framework

2013-06-24 Thread Νίκος
Στις 24/6/2013 7:37 πμ, ο/η Michael Torrie έγραψε: Why use mako's approach which requires 2 files(an html template and the actual python script rendering the data) when i can have simple print statements inside 1 files(my files.py script) ? After all its only one html table i wish to display. So

Re: Making a pass form cgi => webpy framework

2013-06-25 Thread Νίκος
Στις 25/6/2013 9:53 μμ, ο/η Joel Goldstick έγραψε: I haven't tried webpy but I have used django. django has a tutorial that takes a couple of hours to set up and go through completely. Its not just reading, its hands on trying out a small website. It gives a very good understanding of what th

Re: Making a pass form cgi => webpy framework

2013-06-27 Thread Νίκος
Στις 25/6/2013 9:00 μμ, ο/η ru...@yahoo.com έγραψε: On 06/23/2013 07:44 PM, Νίκος wrote:> Why use mako's approach which requires 2 files(an html template and the actual python script rendering the data) when i can have simple print statements inside 1 files(my files.py script) ? After

Re: Making a pass form cgi => webpy framework

2013-06-27 Thread Νίκος
Στις 28/6/2013 2:08 πμ, ο/η Cameron Simpson έγραψε: On 27Jun2013 16:32, Νίκος wrote: | a) keep my existing Python cgi way that embed print ''' statements | within python code to displays mostly tables? I'd argue against this approach. Like hand constructing SQL, this is r

Re: Making a pass form cgi => webpy framework

2013-06-28 Thread Νίκος
Στις 28/6/2013 12:35 μμ, ο/η Robert Kern έγραψε: On 2013-06-28 04:38, Νίκος wrote: Στις 28/6/2013 2:08 πμ, ο/η Cameron Simpson έγραψε: Pick a simple framework or templating engine and try it. I have no recommendations to make in this area myself. Can you explain to me the difference of the

Re: python adds an extra half space when reading from a string or list

2013-06-30 Thread Νίκος
Στις 29/6/2013 8:00 μμ, ο/η Mark Lawrence έγραψε: Why this when the approach to Nick the Incompetant Greek has been to roll out the red carpet? Your mother is incompetent who raised a brat like you. -- What is now proved was at first only imagined! -- http://mail.python.org/mailman/listinfo

Re: python adds an extra half space when reading from a string or list

2013-06-30 Thread Νίκος
Στις 30/6/2013 10:58 μμ, ο/η Robert Kern έγραψε: On 2013-06-30 18:24, Νίκος wrote: Στις 29/6/2013 8:00 μμ, ο/η Mark Lawrence έγραψε: Why this when the approach to Nick the Incompetant Greek has been to roll out the red carpet? Your mother is incompetent who raised a brat like you. That is

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Νίκος
Στις 1/7/2013 9:23 πμ, ο/η Antoon Pardon έγραψε: Enough is enough. Iam not a troll, neither incompetent. Period. No not period. You have by your behaviour made yourself a reputation of being an incompetent inconsiderate jerk. You don't lose such a repuation by simply claiming you are not. Bei

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Νίκος
Στις 1/7/2013 9:37 πμ, ο/η Antoon Pardon έγραψε: Remember that Nick is as much a human as all of us, he is bound to have his feelings hurt when so many people pick on him -- whether they are justified or not. So? Should we particularly care about Nikos's feelings? Nikos is not the victim, he is

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Νίκος
Στις 1/7/2013 11:54 πμ, ο/η Antoon Pardon έγραψε: So shut your piehole and start proving yourself useful in this list. Or sod off. Preferably do the latter. Oh we do have illusions of grandeur, don't we? You are in no position to judge who is useful on this list or not. I'am not waste any more

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Νίκος
Στις 1/7/2013 12:32 μμ, ο/η Antoon Pardon έγραψε: Op 01-07-13 11:05, Νίκος schreef: Στις 1/7/2013 11:54 πμ, ο/η Antoon Pardon έγραψε: So shut your piehole and start proving yourself useful in this list. Or sod off. Preferably do the latter. Oh we do have illusions of grandeur, don't we

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Νίκος
Στις 1/7/2013 12:31 μμ, ο/η Steve Simmons έγραψε: I don't know about the other members of this list but I am becoming increasingly disturbed by the rudeness and especially the foul language that is being perpetrated on this thread. Please, if you have any decency at all, continue the rest of thi

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Νίκος
Στις 1/7/2013 3:28 μμ, ο/η Antoon Pardon έγραψε: Did i told you to fuck off? Well never mind. Fuck off! I think this needs some work. You need more creativity. Try to think of something more forceful. My little niece of 10 can do better than that. Well i could, but i don't want to spend my tim

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Νίκος
Στις 1/7/2013 3:43 μμ, ο/η Steven D'Aprano έγραψε: On Mon, 01 Jul 2013 10:52:28 +0300, Νίκος wrote: All i did was asking for help for issues i couldn't solve. That what everybody would do if he couldn't help himself solve something. [...] So shut your piehole and start p

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Νίκος
Στις 1/7/2013 6:34 μμ, ο/η Steven D'Aprano έγραψε: And no, i do not want to piss off people like you, who have spend time helping me. Too late. I asked you to stop flaming on-list, and you didn't. I am now kill-filing you for a month. Feel grateful that it is not permanent, and take this time

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Νίκος
Στις 1/7/2013 6:00 μμ, ο/η rusi έγραψε: On Monday, July 1, 2013 7:31:18 PM UTC+5:30, Walter Hurry wrote: Please...enough. Polite request: consider killfiling him and having done with it. It is irritating to see all the responses even though I killfiled him long ago. Whilst I realise, of course

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Νίκος
Στις 1/7/2013 6:34 μμ, ο/η Steven D'Aprano έγραψε: The above of course assumes that I have not kill-filed you for continuing to be abusive on-list. So, Steven you want me to sit tight and read all the insults coming from this guy? If that happened to you, wouldn't you feel the need and urge to

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Νίκος
Στις 1/7/2013 7:56 μμ, ο/η Joshua Landau έγραψε: So yes, Antoon Pardon and Nikos, please stop. You are not representing the list. I haven't followed any of the other arguments, true, but you two in particular are causing a lot of trouble for the rest of us. It is not hard to avoid making your dis

OSError [Errno 26] ?!?!

2013-07-01 Thread Νίκος
After making a slightly chnage inside my pelatologio.py script substituting '*' instead of '-' for no apparent reason i receive the following error: [Tue Jul 02 06:33:06 2013] [error] [client 46.12.97.148] OSError: [Errno 26] \\u0391\\u03c1\\u03c7\\u03b5\\u03af\\u03bf \\u03ba\\u03b5\\

Re: OSError [Errno 26] ?!?!

2013-07-01 Thread Νίκος
Στις 2/7/2013 8:15 πμ, ο/η Cameron Simpson έγραψε: On 02Jul2013 06:37, Νίκος wrote: | After making a slightly chnage inside my pelatologio.py script | substituting '*' instead of '-' for no apparent reason i | receive the following error: | | [Tue Jul 02 06:33:06 2

Re: OSError [Errno 26] ?!?!

2013-07-02 Thread Νίκος
Στις 2/7/2013 10:21 πμ, ο/η Cameron Simpson έγραψε: On 02Jul2013 08:57, Νίκος wrote: | Thank you, the error have been caused due to the fact that the | uploading procedure of my edited 'pelatologio.py' hadn't been | completed yet, while i was requesting the execution of the scrip

Re: OSError [Errno 26] ?!?!

2013-07-02 Thread Νίκος
Στις 2/7/2013 3:00 μμ, ο/η Dave Angel έγραψε: ou need to reconfigure FileZilla then. Site Manager (first icon on the toolbar) → your site → Charset → Force UTF-8. Much better: upload all files as binary, so they are byte for byte identical on both systems. Sometimes that might require some l

Re: python adds an extra half space when reading from a string or list

2013-07-03 Thread Νίκος
Στις 3/7/2013 12:45 μμ, ο/η Chris Angelico έγραψε: ] You have betrayed the trust of all your customers. Which seemed to be accepted on this list without a problem. If my boss gave a random stranger from a mailing list the root password to one of our servers, I would say to his face that he ha

Re: How to tell Script to use pythonw.exe ?

2013-07-03 Thread Νίκος
Στις 3/7/2013 6:43 πμ, ο/η Tim Roberts έγραψε: goldtech wrote: I just changed the file extension of the script file from .py to .pyw and it uses pythonw.exe. I didn't read it anywhere, just intuited it and tried it. Python has some very smart people working the language... While your stateme

Re: python adds an extra half space when reading from a string or list

2013-07-03 Thread Νίκος
Στις 3/7/2013 5:44 μμ, ο/η Chris Angelico έγραψε: On Wed, Jul 3, 2013 at 8:00 PM, � wrote: 3/7/2013 12:45 ��, �/� Chris Angelico ��: ] You have betrayed the trust of all your customers. Which seemed to be accepted on this list without a problem. If my boss gave a random stran

Re: python adds an extra half space when reading from a string or list

2013-07-03 Thread Νίκος
Στις 3/7/2013 6:44 μμ, ο/η Chris Angelico έγραψε: On Thu, Jul 4, 2013 at 1:36 AM, � wrote: I will *not* give away my root pass to anyone for any reason but i will open a norla user account for someone if i feel like trusting him and copy my python file to his homr dir to take alook from wit

Re: How to tell Script to use pythonw.exe ?

2013-07-03 Thread Νίκος
Στις 3/7/2013 7:36 μμ, ο/η Benjamin Kaplan έγραψε: On Jul 3, 2013 8:27 AM, "Νίκος" mailto:ni...@superhost.gr>> wrote: > > Στις 3/7/2013 6:43 πμ, ο/η Tim Roberts έγραψε: > >> goldtech mailto:leeg...@operamail.com>> wrote: >>> >>> &

Re: python adds an extra half space when reading from a string or list

2013-07-03 Thread Νίκος
Στις 3/7/2013 7:53 μμ, ο/η Chris Angelico έγραψε: On Thu, Jul 4, 2013 at 2:47 AM, Νίκος wrote: Στις 3/7/2013 6:44 μμ, ο/η Chris Angelico έγραψε: On Thu, Jul 4, 2013 at 1:36 AM, � wrote: I will *not* give away my root pass to anyone for any reason but i will open a norla user account

Re: python adds an extra half space when reading from a string or list

2013-07-03 Thread Νίκος
Στις 3/7/2013 7:42 μμ, ο/η Steve Simmons έγραψε: On 03/07/2013 16:44, Chris Angelico wrote: On Thu, Jul 4, 2013 at 1:36 AM, � wrote: I will *not* give away my root pass to anyone for any reason but i will open a norla user account for someone if i feel like trusting him and copy my python

Re: python adds an extra half space when reading from a string or list

2013-07-03 Thread Νίκος
Στις 3/7/2013 8:23 μμ, ο/η Chris Angelico έγραψε: >>> What are the file permissions (file modes) on all your home >>> directories? Do you know what they mean? >> >> >> root@nikos [~]# ls -al /home >> total 88 >> drwx--x--x 22 root root 4096 Jul 3 20:03 ./ >> drwxr-xr-x 22 root root

Re: python adds an extra half space when reading from a string or list

2013-07-03 Thread Νίκος
Στις 4/7/2013 8:44 πμ, ο/η ru...@yahoo.com έγραψε: On 07/03/2013 09:07 PM, rusi wrote: [...] I got into it because I felt Chris had done more service to Nikos and the list than others and then was being misrepresented. I don't know why you think I "misrepresented" him. I questioned the morali

Re: Important features for editors

2013-07-04 Thread Νίκος
Στις 4/7/2013 10:32 πμ, ο/η cutems93 έγραψε: I am researching on editors for my own reference. I found that each of them has some features that other don't, but I am not sure which features are significant/necessary for a GOOD editor. What features do you a good editor should have? Keyboard sh

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Νίκος
I just started to have this error without changing nothing in my index.html(template) and metrites.py(which ipen the template) [Thu Jul 04 11:35:14 2013] [error] [client 108.162.229.97] Original exception was: [Thu Jul 04 11:35:14 2013] [error] [client 108.162.229.97] Traceback (most recent ca

Re: Important features for editors

2013-07-04 Thread Νίκος
Στις 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 found that each of them has some features that other don't, but I am not sure which features are signif

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Νίκος
Στις 4/7/2013 12:59 μμ, ο/η Dave Angel έγραψε: On 07/04/2013 04:37 AM, Νίκος wrote: I just started to have this error without changing nothing in my index.html(template) and metrites.py(which ipen the template) [Thu Jul 04 11:35:14 2013] [error] [client 108.162.229.97] Original exception was

Fwd: Re: python adds an extra half space when reading from a string or list

2013-07-04 Thread Νίκος
Στις 3/7/2013 8:23 μμ, ο/η Chris Angelico έγραψε: What are the file permissions (file modes) on all your home directories? Do you know what they mean? root@nikos [~]# ls -al /home total 88 drwx--x--x 22 root root 4096 Jul 3 20:03 ./ drwxr-xr-x 22 root root 4096 Jun 12 01:21 .

Fwd: Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Νίκος
n 07/04/2013 06:03 AM, Νίκος wrote: Στις 4/7/2013 12:59 μμ, ο/η Dave Angel έγραψε: On 07/04/2013 04:37 AM, Νίκος wrote: I just started to have this error without changing nothing in my index.html(template) and metrites.py(which ipen the template) [Thu Jul 04 11:35:14 2013] [error] [client

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Νίκος
Στις 4/7/2013 12:50 μμ, ο/η Ulrich Eckhardt έγραψε: Am 04.07.2013 10:37, schrieb Νίκος: I just started to have this error without changing nothing Well, undo the nothing that you didn't change. ;) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Νίκος
Στις 4/7/2013 1:54 μμ, ο/η Chris Angelico έγραψε: On Thu, Jul 4, 2013 at 8:38 PM, � wrote: So you are also suggesting that what gesthostbyaddr() returns is not utf-8 encoded too? What character is 0xb6 anyways? It isn't. It's a byte. Bytes are not characters. http://www.joelonsoftware.c

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Νίκος
Στις 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:37, schrieb Νίκος: I just started to have this error without changing nothing Well, undo the nothing that you didn't change. ;) UnicodeDecode

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Νίκος
Στις 4/7/2013 2:52 μμ, ο/η MRAB έγραψε: On 04/07/2013 12:29, Νίκος wrote: Στις 4/7/2013 1:54 μμ, ο/η Chris Angelico έγραψε: On Thu, Jul 4, 2013 at 8:38 PM, � wrote: So you are also suggesting that what gesthostbyaddr() returns is not utf-8 encoded too? What character is 0xb6 anyways

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Νίκος
Στις 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:37, schrieb Νίκος: I just started to have this error without changing

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Νίκος
Στις 4/7/2013 3:07 μμ, ο/η MRAB έγραψε: Also, try printing out ascii(os.environ['REMOTE_ADDR']). '108.162.229.97' is the result of: print( ascii(os.environ['REMOTE_ADDR']) ) Seems perfectly valid. and also have a PTR record, so that leaved us clueless about the internal server error. -- Wha

Target WSGI script cannot be loaded as Python module.

2018-05-22 Thread Νίκος
Hello all, Iam tryign to run a bootle script iw rote as wsgi app and iam gettign the follwing eroor. === [Tue May 22 06:49:45.763808 2018] [:error] [pid 24298] [client 46.103.59.37:14500] mod_wsgi (pid=24298): Target WSGI script '/hom

Re: Target WSGI script cannot be loaded as Python module.

2018-05-22 Thread Νίκος
Τη Τρίτη, 22 Μαΐου 2018 - 10:55:54 μ.μ. UTC+3, ο χρήστης Alexandre Brault > > Any ideas as to why iam getting the above error although i have python36 > > isntalled along with all modules? why can it find it? > How did you install geoip2? Was it by any chance in a virtual > environment? If it was

Re: Target WSGI script cannot be loaded as Python module.

2018-05-23 Thread Νίκος
Τη Τετάρτη, 23 Μαΐου 2018 - 6:18:13 μ.μ. UTC+3, ο χρήστης John Gordon έγραψε: > Is your web server using Python 2 or Python 3 to execute WSGI? I really dont knwo that detail. How can i check that? -- https://mail.python.org/mailman/listinfo/python-list

Connection refused when tryign to run bottle/flask web framweworks

2018-08-19 Thread Νίκος
Hello, i just installed bottle and flask web frameworks in my CentOS environment but i canno get it working even with the simpleste xample. The coonection is refused always. from bottle import route, run, template @route('/hello/') def index(name): return template('Hello {{name}}!', name=n

Re: Connection refused when tryign to run bottle/flask web framweworks

2018-08-20 Thread Νίκος
Τη Δευτέρα, 20 Αυγούστου 2018 - 7:59:06 π.μ. UTC+3, ο χρήστης dieter έγραψε: > Νίκος writes: > > i just installed bottle and flask web frameworks in my CentOS environment > > but i canno get it working even with the simpleste xample. The coonection > > is refused alw

Re: Connection refused when tryign to run bottle/flask web framweworks

2018-08-20 Thread Νίκος
Τη Δευτέρα, 20 Αυγούστου 2018 - 9:49:00 π.μ. UTC+3, ο χρήστης Miki Tebeka έγραψε: > If you're trying to access the machine from another machine, you need to > change the host to '0.0.0.0'. 'localhost' is the internal interface. > > On Sunday, August 19, 2

Re: Connection refused when tryign to run bottle/flask web framweworks

2018-08-21 Thread Νίκος
Τη Δευτέρα, 20 Αυγούστου 2018 - 7:18:16 μ.μ. UTC+3, ο χρήστης Chris Warrick έγραψε: > On Mon, 20 Aug 2018 at 18:15, Νίκος wrote: > > > > Τη Δευτέρα, 20 Αυγούστου 2018 - 9:49:00 π.μ. UTC+3, ο χρήστης Miki Tebeka > > έγραψε: > > > If you're trying to access th

Re: Connection refused when tryign to run bottle/flask web framweworks

2018-08-21 Thread Νίκος
Τη Τρίτη, 21 Αυγούστου 2018 - 4:39:50 μ.μ. UTC+3, ο χρήστης Michael Torrie έγραψε: > On 08/20/2018 06:07 AM, Νίκος wrote: > > Iam trying to access the bottle web framework running on my VPS as > > > > http://superhost.gr:8080/hello > > > > i get connection refus

Re: Question regarding 2 modules installed via 'pip'

2013-11-16 Thread Νίκος
HELP ME Στις 16/11/2013 3:53 μμ, ο/η Joel Goldstick έγραψε: not related to python On Sat, Nov 16, 2013 at 8:10 AM, Ferrous Cranus wrote: Perhaps by doing: locate pymysql locate pygeoip or perhaps by using find as follows: /usr/local/lib/python3.4/site-packages/PyMySQL-0.6.1-py3.4.egg

Re: Tryign to send mail via a python script by using the local MTA

2013-09-21 Thread Νίκος
On 18/9/2013 2:29 πμ, Dennis Lee Bieber wrote: On Tue, 17 Sep 2013 18:17:43 +0300, Ferrous Cranus declaimed the following: So cant this be done in python or not? or is a mtetr of configuring the MTA? conf file? You can't... Those headers get added by the ISP and any other host the ma

How to send an anonymous mail via Python script

2013-09-21 Thread Νίκος
I'll have to ask this atgain because i got no proper reply: Here is the code i wrote to try tos end anonymous mail: # = # if html form is submitted then send user mail #

Re: How to send an anonymous mail via Python script

2013-09-21 Thread Νίκος
On 21/9/2013 1:04 μμ, Chris Angelico wrote: On Sat, Sep 21, 2013 at 7:58 PM, Νίκος wrote: Can you please tell me what alternation must be made in order to send this anonymously? that is my question. There must be a way. No, there isn't. The nearest you could come to anonymous mail wou

Referrer key missing form os.environ dictionary?

2013-09-25 Thread Νίκος
Hello, i decided am ong other os.environ variables to also grab the 'HTTP_REFERER' fiel but when i try to run my script i was seeing a KeyError complaining that 'HTTP_REFERER' didnt exist. So, to see what existed in the os.environ dictionary i issues a print( os.environ ) to see all available

Re: Referrer key missing form os.environ dictionary?

2013-09-25 Thread Νίκος
Στις 25/9/2013 3:45 μμ, ο/η Νίκος έγραψε: Hello, i decided am ong other os.environ variables to also grab the 'HTTP_REFERER' fiel but when i try to run my script i was seeing a KeyError complaining that 'HTTP_REFERER' didnt exist. So, to see what existed in the os.environ d

Re: Referrer key missing form os.environ dictionary?

2013-09-25 Thread Νίκος
Στις 25/9/2013 5:01 μμ, ο/η Chris “Kwpolska” Warrick έγραψε: On Wed, Sep 25, 2013 at 2:45 PM, Νίκος wrote: Hello, i decided am ong other os.environ variables to also grab the 'HTTP_REFERER' fiel but when i try to run my script i was seeing a KeyError complaining that 'HTTP_REFER

Re: Referrer key missing form os.environ dictionary?

2013-09-25 Thread Νίκος
Στις 25/9/2013 5:01 μμ, ο/η Chris “Kwpolska” Warrick έγραψε: On Wed, Sep 25, 2013 at 2:45 PM, Νίκος wrote: Hello, i decided am ong other os.environ variables to also grab the 'HTTP_REFERER' fiel but when i try to run my script i was seeing a KeyError complaining that 'HTTP_REFER

Re: Referrer key missing form os.environ dictionary?

2013-09-25 Thread Νίκος
Στις 25/9/2013 5:52 μμ, ο/η Steven D'Aprano έγραψε: On Wed, 25 Sep 2013 17:04:55 +0300, Νίκος wrote: I would like to check for its existence and retrieve it if possible, if its not there then default to the string "UnKnown Ref". I try to do this with: referer = os.environ.ge

Re: Referrer key missing form os.environ dictionary?

2013-09-25 Thread Νίκος
Στις 25/9/2013 6:04 μμ, ο/η Steven D'Aprano έγραψε: On Wed, 25 Sep 2013 14:26:23 +, John Gordon wrote: You could try this: try: referer = os.environ.get('HTTP_REFERER', 'UnknownRef') except KeyError: referer = None if not referer: referer = 'Unknow

Re: Referrer key missing form os.environ dictionary?

2013-09-25 Thread Νίκος
Στις 25/9/2013 6:14 μμ, ο/η Tim Chase έγραψε: On 2013-09-25 18:02, Νίκος wrote: This indeed works now: ref = os.environ.get('HTTP_REFERER', 'Άγνωστο Ref') but iam wondering why this doesnt work also: ref = os.environ('HTTP_REFERER') Shouldnt both work? No

Re: Referrer key missing form os.environ dictionary?

2013-09-25 Thread Νίκος
Στις 25/9/2013 6:18 μμ, ο/η Grant Edwards έγραψε: On 2013-09-25, Steven D'Aprano wrote: On Wed, 25 Sep 2013 17:04:55 +0300, ?? wrote: I would like to check for its existence and retrieve it if possible, if its not there then default to the string "UnKnown Ref". I try to do this with:

Handling 3 operands in an expression without raising an exception

2013-09-26 Thread Νίκος
Hello, How can i wrote the two following lines so for NOT to throw out KeyErrors when a key is missing? city = gi.time_zone_by_addr( os.environ['HTTP_CF_CONNECTING_IP'] ) or gi.time_zone_by_addr( os.environ['REMOTE_ADDR'] ) or "Άγνωστη Πόλη" host = socket.gethostbyaddr( os.environ['HTTP_CF_

Re: Handling 3 operands in an expression without raising an exception

2013-09-26 Thread Νίκος
Στις 26/9/2013 10:48 πμ, ο/η Jussi Piitulainen έγραψε: Νίκος writes: How can i wrote the two following lines so for NOT to throw out KeyErrors when a key is missing? city = gi.time_zone_by_addr( os.environ['HTTP_CF_CONNECTING_IP'] ) or ... I was under the impression that the &#x

Re: Handling 3 operands in an expression without raising an exception

2013-09-26 Thread Νίκος
Στις 26/9/2013 11:12 πμ, ο/η Jussi Piitulainen έγραψε: Νίκος writes: Σ�ις 26/9/2013 10:48 πμ, ο/η Jussi Piitulainen έγ�α�ε: > ί�ος writes: How can i wrote the two following lines so for NOT to throw out KeyErrors when a key is missing? city = gi.time_zone_by_addr( os.envi

Re: Handling 3 operands in an expression without raising an exception

2013-09-26 Thread Νίκος
Στις 26/9/2013 11:46 πμ, ο/η Νίκος έγραψε: Στις 26/9/2013 11:39 πμ, ο/η Νίκος έγραψε: Στις 26/9/2013 11:12 πμ, ο/η Jussi Piitulainen έγραψε: Νίκος writes: Σ�ις 26/9/2013 10:48 πμ, ο/η Jussi Piitulainen έγ�α�ε: > ί�ος writes: How can i wrote the two following lines so for NOT to throw

Re: Handling 3 operands in an expression without raising an exception

2013-09-26 Thread Νίκος
Στις 26/9/2013 11:39 πμ, ο/η Νίκος έγραψε: Στις 26/9/2013 11:12 πμ, ο/η Jussi Piitulainen έγραψε: Νίκος writes: Σ�ις 26/9/2013 10:48 πμ, ο/η Jussi Piitulainen έγ�α�ε: > ί�ος writes: How can i wrote the two following lines so for NOT to throw out KeyErrors when a key is missing? c

Re: Handling 3 operands in an expression without raising an exception

2013-09-26 Thread Νίκος
Στις 26/9/2013 12:07 μμ, ο/η Antoon Pardon έγραψε: Experiment and find out for yourself. That is the only way you will acquire the experience and understanding you need. Sure we could spoon feed you the line you need, but that will only result in you using that line without any understanding of w

Re: Handling 3 operands in an expression without raising an exception

2013-09-26 Thread Νίκος
Στις 26/9/2013 12:04 μμ, ο/η Jussi Piitulainen έγραψε: Up until now i have this: city = gi.time_zone_by_addr( os.environ['HTTP_CF_CONNECTING_IP'] ) or gi.time_zone_by_addr( os.environ['REMOTE_ADDR'] ) or "�γν���η Π�λη" can this be written as: city = gi.time_zone_by_addr( os.environ.get('HTTP

Re: Handling 3 operands in an expression without raising an exception

2013-09-26 Thread Νίκος
Στις 26/9/2013 11:55 πμ, ο/η Nobody έγραψε: On Thu, 26 Sep 2013 10:26:48 +0300, Νίκος wrote: How can i wrote the two following lines so for NOT to throw out KeyErrors when a key is missing? city = gi.time_zone_by_addr( os.environ['HTTP_CF_CONNECTING_IP'] ) or gi.time_zone_by_addr(

Re: Handling 3 operands in an expression without raising an exception

2013-09-26 Thread Νίκος
Στις 26/9/2013 1:12 μμ, ο/η Antoon Pardon έγραψε: Op 26-09-13 11:56, Νίκος schreef: Στις 26/9/2013 11:55 πμ, ο/η Nobody έγραψε: On Thu, 26 Sep 2013 10:26:48 +0300, Νίκος wrote: How can i wrote the two following lines so for NOT to throw out KeyErrors when a key is missing? city

Re: Handling 3 operands in an expression without raising an exception

2013-09-26 Thread Νίκος
Στις 26/9/2013 1:41 μμ, ο/η Antoon Pardon έγραψε: Op 26-09-13 12:18, Νίκος schreef: Στις 26/9/2013 1:12 μμ, ο/η Antoon Pardon έγραψε: Op 26-09-13 11:56, Νίκος schreef: Στις 26/9/2013 11:55 πμ, ο/η Nobody έγραψε: On Thu, 26 Sep 2013 10:26:48 +0300, Νίκος wrote: How can i wrote the two

Re: Handling 3 operands in an expression without raising an exception

2013-09-26 Thread Νίκος
Στις 26/9/2013 2:07 μμ, ο/η Antoon Pardon έγραψε: Op 26-09-13 12:51, Νίκος schreef: Στις 26/9/2013 1:41 μμ, ο/η Antoon Pardon έγραψε: Op 26-09-13 12:18, Νίκος schreef: Στις 26/9/2013 1:12 μμ, ο/η Antoon Pardon έγραψε: Op 26-09-13 11:56, Νίκος schreef: It is far better than the ifs, even

Re: Handling 3 operands in an expression without raising an exception

2013-09-26 Thread Νίκος
Στις 26/9/2013 2:24 μμ, ο/η Dave Angel έγραψε: On 26/9/2013 06:51, Νίκος wrote: socket.gethostbyaddr( os.environ.get('HTTP_CF_CONNECTING_IP') or os.environ.get('REMOTE_ADDR') or "Άγνωστη Προέλευση" )[0] Traceback (most recent call last): File "&qu

Re: Handling 3 operands in an expression without raising an exception

2013-09-26 Thread Νίκος
Στις 26/9/2013 3:53 μμ, ο/η Antoon Pardon έγραψε: Op 26-09-13 14:39, Νίκος schreef: Yes, you are right, in my shell it fails too givign the same error message as yours, while on the other had in the websste is working. Can you explain this please? why doesnt it fail to both enviroments? Your

Re: Handling 3 operands in an expression without raising an exception

2013-09-26 Thread Νίκος
Στις 26/9/2013 5:22 μμ, ο/η Dave Angel έγραψε: On 26/9/2013 09:34, Νίκος wrote: Στις 26/9/2013 3:53 μμ, ο/η Antoon Pardon έγραψε: Op 26-09-13 14:39, Νίκος schreef: Yes, you are right, in my shell it fails too givign the same error message as yours, while on the other had in the websste is

Re: Handling 3 operands in an expression without raising an exception

2013-09-26 Thread Νίκος
Στις 26/9/2013 11:16 μμ, ο/η Denis McMahon έγραψε: On Thu, 26 Sep 2013 19:58:02 +0300, Νίκος wrote: except socket.gaierror as e: city = host = "UnKnown Origin" But then what if in case of an error i needed different string set to be assigned on city and host respectively

Re: Handling 3 operands in an expression without raising an exception

2013-09-27 Thread Νίκος
Στις 27/9/2013 1:55 πμ, ο/η Dave Angel έγραψε: On 26/9/2013 18:14, Νίκος wrote: Στις 26/9/2013 11:16 μμ, ο/η Denis McMahon έγραψε: On Thu, 26 Sep 2013 19:58:02 +0300, Νίκος wrote: except socket.gaierror as e: city = host = "UnKnown Origin" But then what if in case of

Re: Handling 3 operands in an expression without raising an exception

2013-09-27 Thread Νίκος
Στις 27/9/2013 12:26 μμ, ο/η Steven D'Aprano έγραψε: On Fri, 27 Sep 2013 12:19:53 +0300, Νίκος wrote: I'am not sure what you mean though when you say: Simply assign the default values BEFORE the try block, and use pass as the except block. Can you please make it more cl

  1   2   3   4   5   6   >