Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Steven D'Aprano
On Sun, 02 Jun 2013 22:05:28 -0700, Νικόλαος Κούρας wrote: > Why subprocess fails when it has to deal with a greek flename? and that > an indirect call too It doesn't. The command you are calling fails, not subprocess. The code you show is this: /home/nikos/public_html/cgi-bin/metrites.p

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Νικόλαος Κούρας
Thankls Michael, are these two behave the same in your opinion? sys.stdout = os.fdopen(1, 'w', encoding='utf-8') which is what i have now opposed to this one import ocdecs sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach()) Which one should i keep and why? -- http://mail.python.org/ma

Re: PyWart: The problem with "print"

2013-06-02 Thread Michael Torrie
On 06/02/2013 12:18 PM, Rick Johnson wrote: > On Sunday, June 2, 2013 12:49:02 PM UTC-5, Dan Sommers wrote: >> On Mon, 03 Jun 2013 03:20:52 +1000, Chris Angelico wrote: >>> On Mon, Jun 3, 2013 at 3:04 AM, Rick Johnson >> [...] Or use the logging module. It's easy to get going quickly >> (just cal

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Michael Torrie
On 06/02/2013 11:22 PM, Νικόλαος Κούρας wrote: > Ok, this email is something of a recital of how I approached this. Excellent. You're making progress. Keep doing research, and learn how to debug your python programs. One thing I've done as a last resort when I just can't get good error reportin

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Michael Torrie
On 06/02/2013 12:34 PM, Νικόλαος Κούρας wrote: > The whole subprocess fails when it has to deal with a greek lettered > filename. No it doesn't. subprocess is working correctly. It's the program subprocess is running that is erring out. subprocess is merely reporting to you that it erred out, j

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Νικόλαος Κούρας
But still when it comes to subprocess trying to call files.py which in turn tries to call a greek filename i get the same response i posted at my initial post. -- http://mail.python.org/mailman/listinfo/python-list

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Νικόλαος Κούρας
Ok, this email is something of a recital of how I approached this. The apache error log: I restarted the apache: /etc/init.d/httpd restart Then a: ps axf gave me the PID of a running httpd. Examining its open files: lsof -p 9287 shows me: httpd 9287 nobody2w REG0,192 1271960

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Νικόλαος Κούρας
Chris can you please help me solve this problem? Why subprocess fails when it has to deal with a greek flename? and that an indirect call too -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Heisenbugs? (was: Re: PyWart: The problem with "print")

2013-06-02 Thread Chris Angelico
On Mon, Jun 3, 2013 at 2:34 PM, Dan Sommers wrote: > On Mon, 03 Jun 2013 13:37:27 +1000, Tim Delaney wrote: > >> With the increase in use of higher-level languages, these days >> Heisenbugs most often appear with multithreaded code that doesn't >> properly protect critical sections, but as you say

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Chris Angelico
On Mon, Jun 3, 2013 at 9:10 AM, Tim Delaney wrote: >> A programmer chooses his own clients, and you are the Atherton Wing to >> my Inara Serra. > > > I've just been watching this train wreck (so glad I didn't get involved at > the start) but I have to say - that's brilliant Chris. Thank you for >

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Νικόλαος Κούρας
I did all the google searh i could, but iwht no luxk, this is no suexec issue. Why you say it is one? The other problem i had was 'suexec' related, not this one, this is a subprocess issue. -- http://mail.python.org/mailman/listinfo/python-list

Python Heisenbugs? (was: Re: PyWart: The problem with "print")

2013-06-02 Thread Dan Sommers
On Mon, 03 Jun 2013 13:37:27 +1000, Tim Delaney wrote: > With the increase in use of higher-level languages, these days > Heisenbugs most often appear with multithreaded code that doesn't > properly protect critical sections, but as you say, with lower-level > languages uninitialised memory is a c

Re: PyWart: The problem with "print"

2013-06-02 Thread Dan Sommers
On Sun, 02 Jun 2013 23:23:42 -0400, Jason Swails wrote: > On Sun, Jun 2, 2013 at 11:10 PM, Dan Sommers > wrote: >> Ah, yes. The Heisenbug. ;-) > > Indeed. Being in the field of computational chemistry/physics, I was > almost happy to have found one just to say I was hunting a Heisenbug. > It

Re: PyWart: The problem with "print"

2013-06-02 Thread Tim Delaney
On 3 June 2013 13:23, Jason Swails wrote: > Yea, I've only run into Heisenbugs with Fortran or C/C++. Every time I've > seen one it's been due to an uninitialized variable somewhere -- something > valgrind is quite good at pinpointing. (And yes, a good portion of our > code is -still- in Fortra

Re: PyWart: The problem with "print"

2013-06-02 Thread Jason Swails
On Sun, Jun 2, 2013 at 11:10 PM, Dan Sommers wrote: > On Sun, 02 Jun 2013 20:16:21 -0400, Jason Swails wrote: > > > ... If you don't believe me, you've never hit a bug that 'magically' > > disappears when you add a debugging print statement ;-). > > Ah, yes. The Heisenbug. ;-) > Indeed. Being

Re: Too many python installations. Should i remove them all and install the latest?

2013-06-02 Thread Chris Angelico
On Mon, Jun 3, 2013 at 12:30 PM, alex23 wrote: > On Jun 1, 10:24 am, Chris Angelico wrote: >> Hmm. What other MUD commands have obvious Unix equivalents? >> >> say --> echo >> emote --> python -c >> attack --> sudo rm -f > > who --> who > tell --> write > alias --> ln > look --> cat > go --> cd >

Re: PyWart: The problem with "print"

2013-06-02 Thread Dan Sommers
On Sun, 02 Jun 2013 20:16:21 -0400, Jason Swails wrote: > ... If you don't believe me, you've never hit a bug that 'magically' > disappears when you add a debugging print statement ;-). Ah, yes. The Heisenbug. ;-) We used to run into those back in the days of C and assembly language. They're m

Re: How to Begin Web Development with Python ?

2013-06-02 Thread alex23
On Jun 1, 11:23 pm, Giorgos Tzampanakis wrote: > Modulok suggested using ORM software. ORM should not really be needed if > you are aiming at scientific content for your application, you should > be fine with straight SQL (many consider ORM a hindrance rather than > help for any project  [1], [2])

Re: xsd:anyType parameter in suds!

2013-06-02 Thread alex23
On Jun 2, 12:56 pm, Tamer Higazi wrote: > The original sample is an application, where a "PHP Array" is being > passed for the remoted method. What is the same type in python to > accomplish the task?! In this case, you probably want to use a dict(). -- http://mail.python.org/mailman/listinfo/p

Re: Too many python installations. Should i remove them all and install the latest?

2013-06-02 Thread alex23
On Jun 1, 1:20 am, Νικόλαος Κούρας wrote: > Why so many pythons in my system. Because _you_ installed them. And we _know_ this because you've posted multiple threads relating to your problems with _your_ installations of Python 3. Even more entertainingly: > root@nikos [~]# which python3 > /root

Re: Python #ifdef

2013-06-02 Thread Chris Angelico
On Mon, Jun 3, 2013 at 9:57 AM, Erik Max Francis wrote: > On 05/29/2013 08:05 AM, Chris Angelico wrote: >> >> It's not a bad tool. I used it as a sort of PHP preprocessor, because >> requirements at work had me wanting to have a source file defining a >> PHP class and having an autogenerated secti

Re: Issue converting to string to integer.

2013-06-02 Thread Chris Angelico
On Mon, Jun 3, 2013 at 11:52 AM, Dan Sommers wrote: > On Sun, 02 Jun 2013 18:12:33 -0700, Fdama wrote: > >> I combined the int conversion and the input on the same line, rather >> than to have two different statements. But got an error message: > >> Traceback (most recent call last): >> File "C:

Re: Issue converting to string to integer.

2013-06-02 Thread alex23
On Jun 3, 11:12 am, Fdama wrote: > I combined the int conversion and the input on the same line, rather than to > have two different statements. But  got an error message: > > Traceback (most recent call last): >   File "C:\Users\Faisal\Documents\python\pizza_slicer.py", line 23, in > >     sta

Re: PyWart: The problem with "print"

2013-06-02 Thread Chris Angelico
On Mon, Jun 3, 2013 at 10:16 AM, Jason Swails wrote: > Copy-and-pasting your timeit experiment on my machine yields different > timings (Python 2.7): > import sys timeit.timeit('debugprint("asdf")','def debugprint(*args):\n\tif not DEBUG: return\n\tsys.stdout.write(*args)\nDEBUG=Fal

Re: Issue converting to string to integer.

2013-06-02 Thread Dan Sommers
On Sun, 02 Jun 2013 18:12:33 -0700, Fdama wrote: > I combined the int conversion and the input on the same line, rather > than to have two different statements. But got an error message: > Traceback (most recent call last): > File "C:\Users\Faisal\Documents\python\pizza_slicer.py", line 23, in

Re: Please help with Threading

2013-06-02 Thread Jurgens de Bruin
On Saturday, 18 May 2013 10:58:13 UTC+2, Jurgens de Bruin wrote: > This is my first script where I want to use the python threading module. I > have a large dataset which is a list of dict this can be as much as 200 > dictionaries in the list. The final goal is a histogram for each dict 16 > h

Re: Issue converting to string to integer.

2013-06-02 Thread Dan Stromberg
On Sun, Jun 2, 2013 at 6:12 PM, Fdama wrote: > Hi, > > I was following an exercise in a book when I edited the code and came > across something I did not get. Here is the relevant part of the code that > works: > > start=None #initialise > while start !="": > start=input("\nStart: ") > >

Issue converting to string to integer.

2013-06-02 Thread Fdama
Hi, I was following an exercise in a book when I edited the code and came across something I did not get. Here is the relevant part of the code that works: start=None #initialise while start !="": start=input("\nStart: ") if start: start=int(start) finish=int(in

Re: Python #ifdef

2013-06-02 Thread Skip Montanaro
> The terror that most people feel when hearing "m4" is because m4 was associated with sendmail, not because m4 was inherently awful. In fact, m4 made sendmail configs easier to maintain. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python #ifdef

2013-06-02 Thread Roy Smith
In article , Erik Max Francis wrote: > On 05/29/2013 08:05 AM, Chris Angelico wrote: > > It's not a bad tool. I used it as a sort of PHP preprocessor, because > > requirements at work had me wanting to have a source file defining a > > PHP class and having an autogenerated section in the middle

Re: PyWart: The problem with "print"

2013-06-02 Thread Jason Swails
On Sun, Jun 2, 2013 at 1:20 PM, Chris Angelico wrote: > > Hmm. Could be costly. Hey, you know, Python has something for testing that. > > >>> timeit.timeit('debugprint("asdf")','def debugprint(*args):\n\tif not > DEBUG: return\n\tprint(*args)\nDEBUG=False',number=100) > 0.5838018519113444 > >

Re: Python #ifdef

2013-06-02 Thread Erik Max Francis
On 05/29/2013 08:05 AM, Chris Angelico wrote: It's not a bad tool. I used it as a sort of PHP preprocessor, because requirements at work had me wanting to have a source file defining a PHP class and having an autogenerated section in the middle of that class. PHP's 'include' directive doesn't wor

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Tim Delaney
On 3 June 2013 09:10, Tim Delaney wrote: > A programmer chooses his own clients, and you are the Atherton Wing to >> my Inara Serra. >> > > I've just been watching this train wreck (so glad I didn't get involved at > the start) but I have to say - that's brilliant Chris. Thank you for > starting

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Tim Delaney
> > A programmer chooses his own clients, and you are the Atherton Wing to > my Inara Serra. > I've just been watching this train wreck (so glad I didn't get involved at the start) but I have to say - that's brilliant Chris. Thank you for starting my week off so well. Tim Delaney -- http://mail.

Re: Output from to_bytes

2013-06-02 Thread Ned Batchelder
On 6/2/2013 3:09 PM, Mok-Kong Shen wrote: Am 28.05.2013 17:35, schrieb Grant Edwards: On 2013-05-26, Mok-Kong Shen wrote: I don't understand why with the code: for k in range(8,12,1): print(k.to_bytes(2,byteorder='big')) one gets the following output: b'\x00\x08' b'\x0

Re: Arp cache poisoning using scapy

2013-06-02 Thread bakbakinfo123
On Sunday, June 2, 2013 11:19:46 AM UTC-7, bakbak...@gmail.com wrote: > I am trying to get the arp cache poisoning working with scapy and python but > having problems > > > > The python script itself is very simple: > > root@ubuntu:/home/joker/Downloads/scapy-2.2.0/scripts# cat arp_poison.py

Re: Arp cache poisoning using scapy

2013-06-02 Thread bakbakinfo123
On Sunday, June 2, 2013 11:19:46 AM UTC-7, bakbak...@gmail.com wrote: > I am trying to get the arp cache poisoning working with scapy and python but > having problems > > > > The python script itself is very simple: > > root@ubuntu:/home/joker/Downloads/scapy-2.2.0/scripts# cat arp_poison.py

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Chris Angelico
On Mon, Jun 3, 2013 at 5:51 AM, wrote: > Now, is anyone willing to help me on this please? > I also accept hints on how to solve this! Hints I can do. Here, I've set up a scavenger hunt for you. You'll go to a number of web sites that I nominate, type in keywords, and hit enter. The first web s

Re: PyWart: The problem with "print"

2013-06-02 Thread Ned Batchelder
On 6/2/2013 2:18 PM, Rick Johnson wrote: On Sunday, June 2, 2013 12:49:02 PM UTC-5, Dan Sommers wrote: On Mon, 03 Jun 2013 03:20:52 +1000, Chris Angelico wrote: On Mon, Jun 3, 2013 at 3:04 AM, Rick Johnson [...] Or use the logging module. It's easy to get going quickly (just call logging.bas

Re: PyWart: The problem with "print"

2013-06-02 Thread Chris Angelico
On Mon, Jun 3, 2013 at 4:58 AM, Steven D'Aprano wrote: >> I've found that many subtle bugs are caused by not limiting the inputs >> to sane values (or types). And with Python's duct typing > > Nothing worse than having pythons roaming through your ducts, eating your > ducks. Steven, you misunders

Re: PyWart: The problem with "print"

2013-06-02 Thread Chris Angelico
On Mon, Jun 3, 2013 at 4:09 AM, Rick Johnson wrote: > On Jun 2, 12:20 pm, Chris Angelico wrote: >> On Mon, Jun 3, 2013 at 3:04 AM, Rick Johnson >> > * Woefully inadequate because: Switching on or off the debug >> >messages is only valid in the current module that the >> >function was imp

Re: How to get an integer from a sequence of bytes

2013-06-02 Thread Chris Angelico
On Mon, Jun 3, 2013 at 5:25 AM, Mok-Kong Shen wrote: > b'7' is the byte with the character 7 in a certain code, so that's > ok. In other PLs one assigns an int to a byte, with that int in either > decimal notation or hexadecimal notation, or else one assigns a > character to it, in which case it g

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread nagia . retsina
Τη Κυριακή, 2 Ιουνίου 2013 10:44:05 μ.μ. UTC+3, ο χρήστης Carlos Nepomuceno έγραψε: > Hey guys! Come on!!! > Repeat with me: "Googsfraba!" You are not and Jack Nicholson and this is not an Anger Management lesson (which was a great movie btw). I'am the one that i should chant that mantra becau

RE: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Carlos Nepomuceno
Hey guys! Come on!!! Repeat with me: "Googsfraba!" http://www.youtube.com/watch?v=Fscuv4PIjws lol > To: python-list@python.org > From: breamore...@yahoo.co.uk > Subject: Re: Changing filenames from Greeklish => Greek (subprocess complain) > Date: Sun, 2

Re: How to get an integer from a sequence of bytes

2013-06-02 Thread Mok-Kong Shen
Am 30.05.2013 21:22, schrieb Ned Batchelder: On 5/30/2013 2:26 PM, Mok-Kong Shen wrote: Am 27.05.2013 17:30, schrieb Ned Batchelder: On 5/27/2013 10:45 AM, Mok-Kong Shen wrote: From an int one can use to_bytes to get its individual bytes, but how can one reconstruct the int from the sequence

Re: Arp cache poisoning using scapy

2013-06-02 Thread Dan Stromberg
On Sun, Jun 2, 2013 at 11:19 AM, wrote: > > I am trying to get the arp cache poisoning working with scapy and python > but having problems > > The python script itself is very simple: > root@ubuntu:/home/joker/Downloads/scapy-2.2.0/scripts# cat arp_poison.py > #!/usr/bin/env python > > import sys

Re: Output from to_bytes

2013-06-02 Thread Mok-Kong Shen
Am 28.05.2013 17:35, schrieb Grant Edwards: On 2013-05-26, Mok-Kong Shen wrote: I don't understand why with the code: for k in range(8,12,1): print(k.to_bytes(2,byteorder='big')) one gets the following output: b'\x00\x08' b'\x00\t' b'\x00\n' b'\x00\x0b' I mea

Re: PyWart: The problem with "print"

2013-06-02 Thread Steven D'Aprano
On Sun, 02 Jun 2013 11:09:12 -0700, Rick Johnson wrote: > Maybe you don't care about destroying someone's CPU, however, i do! And yet here you are, destroying millions of people's CPUs by sending them email or usenet messages filled with garbage. -- Steven -- http://mail.python.org/mailman/l

Re: PyWart: The problem with "print"

2013-06-02 Thread Steven D'Aprano
On Sun, 02 Jun 2013 10:04:00 -0700, Rick Johnson wrote: > Many > languages provide a function, method, or statement by which users can > write easily to stdout, and Python is no exception with it's own "print" > function. However, whilst writing to stdout via "print" is slightly less > verbose tha

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Νικόλαος Κούρας
Τη Κυριακή, 2 Ιουνίου 2013 8:21:46 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: > Or you could do a quick web search, like we keep telling you to do for > other things. I'm pretty sure Google is familiar with both those > names, and will point you to a mighty fine shindig. I see, nice one! :) I

Arp cache poisoning using scapy

2013-06-02 Thread bakbakinfo123
I am trying to get the arp cache poisoning working with scapy and python but having problems The python script itself is very simple: root@ubuntu:/home/joker/Downloads/scapy-2.2.0/scripts# cat arp_poison.py #!/usr/bin/env python import sys from scapy.all import * arpcachepoison("00:22:fa:98:

Re: PyWart: The problem with "print"

2013-06-02 Thread Rick Johnson
On Sunday, June 2, 2013 12:49:02 PM UTC-5, Dan Sommers wrote: > On Mon, 03 Jun 2013 03:20:52 +1000, Chris Angelico wrote: > > On Mon, Jun 3, 2013 at 3:04 AM, Rick Johnson > [...] > Or use the logging module. It's easy to get going quickly > (just call logging.basicConfig at startup time), and with

Re: PyWart: The problem with "print"

2013-06-02 Thread Rick Johnson
On Jun 2, 12:20 pm, Chris Angelico wrote: > On Mon, Jun 3, 2013 at 3:04 AM, Rick Johnson > > * Woefully inadequate because: Switching on or off the debug > >messages is only valid in the current module that the > >function was imported. What if you want to kill all > >debugprint messa

Re: PyWart: The problem with "print"

2013-06-02 Thread Dan Sommers
On Mon, 03 Jun 2013 03:20:52 +1000, Chris Angelico wrote: > On Mon, Jun 3, 2013 at 3:04 AM, Rick Johnson > wrote: >> * Woefully inadequate because: Switching on or off the debug >>messages is only valid in the current module that the function was >>imported. What if you want to kill all

Re: PyWart: The problem with "print"

2013-06-02 Thread Chris Angelico
On Mon, Jun 3, 2013 at 3:30 AM, Andrew Berg wrote: > I don't think you go far enough. Obviously we need way more flexibility. A > simple on/off is okay for some things, but a finer granularity > would be really helpful because some things are more important than others. > And why stop at stdout/

Re: Too many python installations. Should i remove them all and install the latest?

2013-06-02 Thread Michael Torrie
On 06/01/2013 01:51 AM, Νικόλαος Κούρας wrote: > Τη Σάββατο, 1 Ιουνίου 2013 9:18:26 π.μ. UTC+3, ο χρήστης Chris > Angelico έγραψε: > >> That would require that the repo have a 3.3.2 build in it. I don't >> know the Red Hat / CentOS policies there, but I know Debian stable >> wouldn't have anythi

Re: PyWart: The problem with "print"

2013-06-02 Thread Andrew Berg
I don't think you go far enough. Obviously we need way more flexibility. A simple on/off is okay for some things, but a finer granularity would be really helpful because some things are more important than others. And why stop at stdout/stderr? We need to add a consistent way to output these mess

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Chris Angelico
On Mon, Jun 3, 2013 at 3:12 AM, Νικόλαος Κούρας wrote: > Τη Κυριακή, 2 Ιουνίου 2013 8:05:32 μ.μ. UTC+3, ο χρήστης Chris Angelico > έγραψε: > >> A programmer chooses his own clients, and you are the Atherton Wing to >> my Inara Serra. > > You might want to explain this mystique call-name you inpro

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Michael Torrie
On 06/02/2013 11:12 AM, Νικόλαος Κούρας wrote: > Τη Κυριακή, 2 Ιουνίου 2013 8:05:32 μ.μ. UTC+3, ο χρήστης Chris Angelico > έγραψε: > >> A programmer chooses his own clients, and you are the Atherton Wing to >> my Inara Serra. > > You might want to explain this mystique call-name you inprovised

Re: PyWart: The problem with "print"

2013-06-02 Thread Chris Angelico
On Mon, Jun 3, 2013 at 3:04 AM, Rick Johnson wrote: > * Woefully inadequate because: Switching on or off the debug >messages is only valid in the current module that the >function was imported. What if you want to kill all >debugprint messages EVERYWHERE? Do you really want to edit >

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Νικόλαος Κούρας
Τη Κυριακή, 2 Ιουνίου 2013 8:05:32 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: > A programmer chooses his own clients, and you are the Atherton Wing to > my Inara Serra. You might want to explain this mystique call-name you inprovised for me. -- http://mail.python.org/mailman/listinfo/python-l

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Chris Angelico
On Mon, Jun 3, 2013 at 2:44 AM, Νικόλαος Κούρας wrote: > Τη Κυριακή, 2 Ιουνίου 2013 7:31:25 μ.μ. UTC+3, ο χρήστης Chris Angelico > έγραψε: >> On Mon, Jun 3, 2013 at 2:21 AM, Νικόλαος Κούρας >> wrote: >> >> > Paying for someone to just remove a dash to get the script working is too >> > much to

PyWart: The problem with "print"

2013-06-02 Thread Rick Johnson
Note to those of you who may be new to Python: I will refer to "print" as a function -- just be aware that "print" was a statement before Python3000 was introduced. Introduction: --

Re: Getting Error can't find '__main__' module in 'X'

2013-06-02 Thread meakaakka
I think I am the dumbest guy.I got it.I was running it in a wrong way. I was running it like python X hello.py and the problem was in C:\Users\John I should have first gone in C:\Users\John\X then I should run it like python hello.py Dave Angel,Steven D'Aprano-Thank you for the help. -- http://

Re: Python 2-3 compatibility

2013-06-02 Thread Terry Jan Reedy
On 6/2/2013 10:13 AM, Jason Swails wrote: Because Python 2.4 and 2.5 don't support the except Exception as err: syntax, I've used except Exception, err: Is there any way of getting this effect in a way compatible with Py2.4 and 3.x? Don't do either. Just catch the exception with 'except Ex

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Νικόλαος Κούρας
Τη Κυριακή, 2 Ιουνίου 2013 7:31:25 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: > On Mon, Jun 3, 2013 at 2:21 AM, Νικόλαος Κούρας wrote: > > > Paying for someone to just remove a dash to get the script working is too > > much to ask for > One dash: 1c > Knowing where to remove it: $99.99 > Tota

Re: Python 2-3 compatibility

2013-06-02 Thread Dan Stromberg
From http://stromberg.dnsalias.org/~dstromberg/Intro-to-Python/Python%202%20and%203.pdf: Try/Except: both 2.x and 3.x try: print(1/0) except ZeroDivisionError: extra = sys.exc_info()[1] print('oops') HTH On Sun, Jun 2, 2013 at 7:13 AM, Jason Swails wrote: > Hello Everyone, > > I ha

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Chris Angelico
On Mon, Jun 3, 2013 at 2:21 AM, Νικόλαος Κούρας wrote: > Paying for someone to just remove a dash to get the script working is too > much to ask for One dash: 1c Knowing where to remove it: $99.99 Total bill: $100.00 Knowing that it ought really to be "utf8mb4" and giving hints that the docs sh

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Νικόλαος Κούρας
Τη Κυριακή, 2 Ιουνίου 2013 6:55:31 μ.μ. UTC+3, ο χρήστης Mark Lawrence έγραψε: > I don't think, I know. How can you be putting in any effort when you > give yourself no thinking time? When you ask for a response maybe two > hours after you've first posted? Basically you're using this group as

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Mark Lawrence
On 02/06/2013 16:36, Νικόλαος Κούρας wrote *IF* ? So, you think i'm not putting any effort? Almost always i post out snippets of what i have tried in my numerous attempts to solve some issue i've encountered. Putting forward effort and being able to actually solve a problem is two difeerent

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Νικόλαος Κούρας
Τη Κυριακή, 2 Ιουνίου 2013 6:24:10 μ.μ. UTC+3, ο χρήστης Mark Lawrence έγραψε: Nikos wrote: > > Apart from the "funny" commenting, can you for once contribute towards to > > an actual solution or this is the best you can do to prove yourself smart > > in here by talking down on me? > The only

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Mark Lawrence
On 02/06/2013 16:04, Νικόλαος Κούρας wrote: Τη Κυριακή, 2 Ιουνίου 2013 5:51:31 μ.μ. UTC+3, ο χρήστης Mark Lawrence έγραψε: You've obviously arrived very late at the party. Apart from the "funny" commenting, can you for once contribute towards to an actual solution or this is the best you can

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Νικόλαος Κούρας
Τη Κυριακή, 2 Ιουνίου 2013 6:15:16 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: >> Apart from the "funny" commenting, can you for once contribute towards to an >> >> actual solution or this is the best you can do to prove yourself smart in >> here >> by talking down on me? > What makes you thi

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Chris Angelico
On Mon, Jun 3, 2013 at 1:04 AM, Νικόλαος Κούρας wrote: > Τη Κυριακή, 2 Ιουνίου 2013 5:51:31 μ.μ. UTC+3, ο χρήστης Mark Lawrence έγραψε: > >> You've obviously arrived very late at the party. > > Apart from the "funny" commenting, can you for once contribute towards to an > actual solution or this

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Νικόλαος Κούρας
Τη Κυριακή, 2 Ιουνίου 2013 5:51:31 μ.μ. UTC+3, ο χρήστης Mark Lawrence έγραψε: > You've obviously arrived very late at the party. Apart from the "funny" commenting, can you for once contribute towards to an actual solution or this is the best you can do to prove yourself smart in here by talki

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Νικόλαος Κούρας
Τη Κυριακή, 2 Ιουνίου 2013 5:36:57 μ.μ. UTC+3, ο χρήστης Giorgos Tzampanakis έγραψε: > On 2013-06-02, Νικόλαος Κούρας wrote: > > > > [snip unreadable code] > > > > Okay, this sounds like a homework exercise. Also, it doesn't appear like > you've spent any amount of time researching a solutio

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Mark Lawrence
On 02/06/2013 15:36, Giorgos Tzampanakis wrote: On 2013-06-02, Νικόλαος Κούρας wrote: [snip unreadable code] Okay, this sounds like a homework exercise. Also, it doesn't appear like you've spent any amount of time researching a solution yourself. You've obviously arrived very late at the par

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Giorgos Tzampanakis
On 2013-06-02, Νικόλαος Κούρας wrote: [snip unreadable code] Okay, this sounds like a homework exercise. Also, it doesn't appear like you've spent any amount of time researching a solution yourself. -- Real (i.e. statistical) tennis and snooker player rankings and ratings: http://www.statsfair.

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Νικόλαος Κούρας
Τη Κυριακή, 2 Ιουνίου 2013 10:01:50 π.μ. UTC+3, ο χρήστης Giorgos Tzampanakis έγραψε: OK George, nd the rest fo the guys here it is the snippet of files.py responsible to print the greek filenames: for row in data: (url, hits, host, lastvisit) = row short

Python 2-3 compatibility

2013-06-02 Thread Jason Swails
Hello Everyone, I have a Python script that I wrote to support a project that I work on (that runs primarily on Unix OSes). Given its support role in this package, this script should not introduce any other dependencies. As a result, I wrote the script in Python 2, since every Linux currently sh

Re: Apache and suexec issue that wont let me run my python script

2013-06-02 Thread Paul Kölle
Am 01.06.2013 07:30, schrieb Νικόλαος Κούρας: [snipp] [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 May 30 15:29:33 2013] [error] [client 46.12.46.11] Prematu

Re: Getting Error can't find '__main__' module in 'X'

2013-06-02 Thread Steven D'Aprano
On Sun, 02 Jun 2013 04:04:50 -0700, meakaakka wrote: > Hey I am newbie in python.I have installed python 2.7.5 correctly.It is > working fine but I am having some issues.I have set windows Enviroment > variables. Any particular environment variables? Shall we guess which ones? > The problem is

Re: Getting Error can't find '__main__' module in 'X'

2013-06-02 Thread Dave Angel
On 06/02/2013 07:04 AM, meakaakka wrote: Hey I am newbie in python.I have installed python 2.7.5 correctly.It is working fine but I am having some issues.I have set windows Enviroment variables. Please be a lot more specific. Do you have any particular environment variables you suspect, and

Getting Error can't find '__main__' module in 'X'

2013-06-02 Thread meakaakka
Hey I am newbie in python.I have installed python 2.7.5 correctly.It is working fine but I am having some issues.I have set windows Enviroment variables. The problem is when I try to save my program in a folder(C:\Users\John\X)it shows that module error but when I save it outside this X folder (

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Nobody
On Sat, 01 Jun 2013 08:44:36 -0700, Νικόλαος Κούρας wrote: > CalledProcessError: Command '/home/nikos/public_html/cgi-bin/files.py' > returned non-zero exit status 1 > args = (1, '/home/nikos/public_html/cgi-bin/files.py') > cmd = '/home/nikos/public_html/cgi-bin/files.py' >

Free Money

2013-06-02 Thread MoneyMaker
Get Free Money here: http://horrorhorrorhorror.webs.com/free-money -- http://mail.python.org/mailman/listinfo/python-list

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread David
On 02/06/2013, Mark Lawrence wrote: > On 02/06/2013 08:01, Giorgos Tzampanakis wrote: >> >> You are not offering enough information, because you have not posted the >> contents of your files.py script. Thus it's difficult to help you. Please >> post your code to pastebin or somewhere similar becau

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Mark Lawrence
On 02/06/2013 08:01, Giorgos Tzampanakis wrote: You are not offering enough information, because you have not posted the contents of your files.py script. Thus it's difficult to help you. Please post your code to pastebin or somewhere similar because posting long lines on usenet is considered ba

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-02 Thread Giorgos Tzampanakis
> The above error message happened when i tried to reanme one of my > filenames from > > its greeklish name to greek charcters. > > files.py is a script that allows users to downlaod fiels form my server. > But i wish to presnt filename sin Greek and not in Greeklish > > http://superhost.gr/?page=f