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

2013-06-08 Thread Steven D'Aprano
On Sat, 08 Jun 2013 22:09:57 -0700, nagia.retsina wrote: > chr('A') would give me the mapping of this char, the number 65 while > ord(65) would output the char 'A' likewise. Correct. Python uses Unicode, where code-point 65 ("ordinal value 65") means letter "A". There are older encodings. For e

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

2013-06-08 Thread Steven D'Aprano
On Sun, 09 Jun 2013 07:46:40 +0300, Νικόλαος Κούρας wrote: > Why does every character in a character set needs to be associated with > a numeric value? Because computers are digital, not analog, and because bytes are numbers. Here are a few of the 256 possible bytes, written in binary, decimal a

RE: Listing modules from all installed packages

2013-06-08 Thread Carlos Nepomuceno
Just realized that you've asked for installed packages. Perhaps the following will do the trick. I don't know why the 'lib-tk' isn't included. Why not? toplevel_packages = ['%s\\%s'%(ml.path,name)for ml,name,ispkg in pkgutil.iter_modules() if ispkg] print '\n'.join(toplevel_packages) > Date: Sa

Re: Errin when executing a cgi script that sets a cookie in the browser

2013-06-08 Thread nagia . retsina
Trying yum install dos2unix and root@nikos [/home/nikos/www/cgi-bin]# dos2unix koukos.py dos2unix: converting file koukos.py to UNIX format ... Then browsed to the page again in Chrome it worked as expected :-) -- http://mail.python.org/mailman/listinfo/python-list

RE: Listing modules from all installed packages

2013-06-08 Thread Carlos Nepomuceno
print '\n'.join([re.findall("from '(.*)'",str(v))[0] for k,v in sys.modules.items() if str(v).find('from')>-1]) > Date: Sat, 8 Jun 2013 21:30:48 -0700 > Subject: Listing modules from all installed packages > From: jpha...@gmail.com > To: python-list@python.org > > Hi, > > I'm trying to write a

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

2013-06-08 Thread nagia . retsina
Τη Σάββατο, 8 Ιουνίου 2013 9:47:53 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: > Fortunately, Python lets us hide away pretty much all those details, > just as it lets us hide away the details of what makes up a list, a > dictionary, or an integer. You can safely assume that the string "foo" > i

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

2013-06-08 Thread Νικόλαος Κούρας
On 9/6/2013 1:32 πμ, Cameron Simpson wrote: On 08Jun2013 14:14, =?utf-8?B?zp3Or866zr/PgiDOk866z4EzM866?= wrote: | Τη Σάββατο, 8 Ιουνίου 2013 10:01:57 μ.μ. UTC+3, ο χρήστης Steven D'Aprano έγραψε: | > ASCII actually needs 7 bits to store a character. Since computers are | > optimized to work wi

Listing modules from all installed packages

2013-06-08 Thread Julien Phalip
Hi, I'm trying to write a function that programmatically obtains and returns the exact location of all first-level modules for all installed packages. For example, if the packages named 'django' and 'django-debug-toolbar' are installed, I'd like this function to return something like: >>> insta

Re: Re-using copyrighted code

2013-06-08 Thread Steven D'Aprano
On Sat, 08 Jun 2013 23:31:10 +0200, Malte Forkel wrote: > Hello, > > I have written a small utility to locate errors in regular expressions > that I want to upload to PyPI. Before I do that, I would like to learn > a litte more about the legal aspects of open-source software. What would > be a g

Re: Re-using copyrighted code

2013-06-08 Thread Mark Janssen
I can't tell you as a lawyer, but I can tell you that regarding code for non-commercial use, the only supportable case is requiring fair-credit assignment. If reading the original license (which you are obligated to do if you re-use and re-distribute the code), it stipulates that you must re-share

Re: Installing PyGame?

2013-06-08 Thread Neil Hodgson
Eam onn: ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so, 2): no suitable image found. Did find: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so: no matching architecture in

Re: Re-using copyrighted code

2013-06-08 Thread Andrew Berg
On 2013.06.08 17:09, Benjamin Kaplan wrote: > On Sat, Jun 8, 2013 at 2:31 PM, Malte Forkel wrote: >> # This version of the SRE library can be redistributed under CNRI's >> # Python 1.6 license. For any other use, please contact Secret Labs >> # AB (i...@pythonware.com). >> # >> # Portions of this

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

2013-06-08 Thread Cameron Simpson
On 08Jun2013 14:14, =?utf-8?B?zp3Or866zr/PgiDOk866z4EzM866?= wrote: | Τη Σάββατο, 8 Ιουνίου 2013 10:01:57 μ.μ. UTC+3, ο χρήστης Steven D'Aprano έγραψε: | > ASCII actually needs 7 bits to store a character. Since computers are | > optimized to work with bytes, not bits, normally ASCII character

Re: Errin when executing a cgi script that sets a cookie in the browser

2013-06-08 Thread Chris Angelico
On Sun, Jun 9, 2013 at 2:56 AM, Νικόλαος Κούρας wrote: > Τη Σάββατο, 8 Ιουνίου 2013 7:03:57 μ.μ. UTC+3, ο χρήστης Chris Angelico > έγραψε: >> On Sun, Jun 9, 2013 at 1:36 AM, Νικόλαος Κούρας >> wrote: > >> > Well, www as symlink to public_html is always a symlink to any system i >> > have used s

Re: Re-using copyrighted code

2013-06-08 Thread Chris Angelico
On Sun, Jun 9, 2013 at 7:31 AM, Malte Forkel wrote: > # This version of the SRE library can be redistributed under CNRI's > # Python 1.6 license. For any other use, please contact Secret Labs > # AB (i...@pythonware.com). I presume that's referring to this: http://www.handle.net/python_licenses

Re: Re-using copyrighted code

2013-06-08 Thread Benjamin Kaplan
On Sat, Jun 8, 2013 at 2:31 PM, Malte Forkel wrote: > Hello, > > I have written a small utility to locate errors in regular expressions > that I want to upload to PyPI. Before I do that, I would like to learn > a litte more about the legal aspects of open-source software. What would > be a good i

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

2013-06-08 Thread Chris Angelico
On Sun, Jun 9, 2013 at 7:21 AM, Νικόλαος Κούρας wrote: > Sorry for displaying my code so many times, i know i ahve exhaust you but hti > is the last thinkg i am gonna ask from you in this thread. We are very close > to have this working. You need to spend more time reading and less time frantic

Re: Re-using copyrighted code

2013-06-08 Thread Andrew Berg
On 2013.06.08 16:31, Malte Forkel wrote: > Hello, > > I have written a small utility to locate errors in regular expressions > that I want to upload to PyPI. Before I do that, I would like to learn > a litte more about the legal aspects of open-source software. What would > be a good introductory

Re: Errin when executing a cgi script that sets a cookie in the browser

2013-06-08 Thread Νικόλαος Κούρας
Τη Κυριακή, 9 Ιουνίου 2013 12:17:16 π.μ. UTC+3, ο χρήστης Michael Torrie έγραψε: > > What does this error means anyway? > It means that Apache is unable to find your cgi script. It's turning > the url into a file path, but it can't find the file path. Sometimes > Apache is configured to not f

Re-using copyrighted code

2013-06-08 Thread Malte Forkel
Hello, I have written a small utility to locate errors in regular expressions that I want to upload to PyPI. Before I do that, I would like to learn a litte more about the legal aspects of open-source software. What would be a good introductory reading? Plus, I have one very specific question: I

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

2013-06-08 Thread Νικόλαος Κούρας
Sorry for displaying my code so many times, i know i ahve exhaust you but hti is the last thinkg i am gonna ask from you in this thread. We are very close to have this working. # # Collect directory and its filenames as bytes path = b'/hom

Re: Errin when executing a cgi script that sets a cookie in the browser

2013-06-08 Thread Michael Torrie
On 06/08/2013 10:56 AM, Νικόλαος Κούρας wrote: > its very tedious to always triming everything for me and i know it is > for you to ead it assuc. Damn google groups, why is it behaving as > such? Dont the programmers know about it? Most of us on the list don't use google groups. A number of us use

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

2013-06-08 Thread Νικόλαος Κούρας
Τη Σάββατο, 8 Ιουνίου 2013 10:01:57 μ.μ. UTC+3, ο χρήστης Steven D'Aprano έγραψε: > ASCII actually needs 7 bits to store a character. Since computers are > optimized to work with bytes, not bits, normally ASCII characters are > stored in a single byte, with one bit wasted. So ASCII and Unicode

Re: Installing PyGame?

2013-06-08 Thread cclauss
Type: python -V (That was a capitol V) What version of python is running? Type: python3 -V (That was a capitol V) What version of python is running? Type: python -c 'import pygame' What is the exact error message? Type: python Your prompt should change to something like: >>> Type: import pygame

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

2013-06-08 Thread Chris Angelico
On Sun, Jun 9, 2013 at 4:01 AM, Νικόλαος Κούρας wrote: > Hold on! > > In the beginning there was ASCII with 0-127 values and then there was > Unicode with 0-127 of ASCII's + i dont know how much many more? > > Now ASCIII needs 1 byte to store a single character while Unicode needs 2 > bytes to sto

Re: Installing PyGame?

2013-06-08 Thread Fábio Santos
On 8 Jun 2013 19:19, "Eam onn" wrote: > Wait, the python -c "help('modules')" worked after spamming it a few times. Pygame was listed but it won't do anything when I type in 'import pygame' I still get the error :( Try to always say what your error was. Do you have pip installed? Pygame AFAIK is

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

2013-06-08 Thread Steven D'Aprano
On Sat, 08 Jun 2013 21:01:23 +0300, Νικόλαος Κούρας wrote: > In the beginning there was ASCII with 0-127 values No, there were encoding systems that existed before ASCII, such as EBCDIC. But we can ignore those, and just start with ASCII. > and then there was > Unicode with 0-127 of ASCII's +

Re: Problems with serial port interface

2013-06-08 Thread lionelgreenstreet
Ok, thanks for your reply. But i have another problem: i hadn't always the hardware needed for the tests. Before i've used a terminal and com0com to simulate a serial input: if i want to simulate a transmission every 5ms how can i do? I need a program or a code that i'm sure about its correctne

Re: Installing PyGame?

2013-06-08 Thread Eam onn
On Saturday, June 8, 2013 7:05:49 PM UTC+1, Eam onn wrote: > On Saturday, June 8, 2013 6:58:53 PM UTC+1, ccl...@bluewin.ch wrote: > > > At the Terminal prompt type: python -c "help('modules')" > > > > > > > > > > > > If Pygame is not somewhere in the output then Pygame is not yet installed.

Re: Installing PyGame?

2013-06-08 Thread Eam onn
On Saturday, June 8, 2013 6:58:53 PM UTC+1, ccl...@bluewin.ch wrote: > At the Terminal prompt type: python -c "help('modules')" > > > > If Pygame is not somewhere in the output then Pygame is not yet installed. > > > > If it is not installed then type: pip install --upgrade pygame python -c

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

2013-06-08 Thread Νικόλαος Κούρας
On 8/6/2013 5:49 πμ, Cameron Simpson wrote: On 07Jun2013 04:53, =?utf-8?B?zp3Or866zr/PgiDOk866z4EzM866?= wrote: | Τη Παρασκευή, 7 Ιουνίου 2013 11:53:04 π.μ. UTC+3, ο χρήστης Cameron Simpson έγραψε: | > | >| errors='replace' mean dont break in case or error? | > | > | >Yes. The result will be c

Re: Installing PyGame?

2013-06-08 Thread cclauss
At the Terminal prompt type: python -c "help('modules')" If Pygame is not somewhere in the output then Pygame is not yet installed. If it is not installed then type: pip install --upgrade pygame -- http://mail.python.org/mailman/listinfo/python-list

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

2013-06-08 Thread MRAB
On 08/06/2013 17:53, Νικόλαος Κούρας wrote: Sorry for th delay guys, was busy with other thigns today and i am still reading your resposes, still ahvent rewad them all just Cameron's: Here is what i have now following Cameron's advices: #===

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

2013-06-08 Thread Νικόλαος Κούρας
Okey after reading also Steven post, i was relived form the previous suck position i was, so with an alternation of a few variable names here is the code now: # # Collect directory and its filenames as bytes path = b'/home/nikos/public_htm

Re: Idiomatic Python for incrementing pairs

2013-06-08 Thread Terry Jan Reedy
On 6/8/2013 12:16 AM, Tim Chase wrote: On 2013-06-08 07:04, Carlos Nepomuceno wrote: alpha, beta = (1 if some_calculation(params) else 0, 1 if other_calculation(params) else 0) This one sets them to absolute values, rather than the incrementing functionality in question: alpha += temp_a

Re: Installing PyGame?

2013-06-08 Thread Eam onn
On Saturday, June 8, 2013 5:41:40 PM UTC+1, Fábio Santos wrote: > On 8 Jun 2013 17:17, "Eam onn" wrote: > > > I keep getting an error in all my versions of IDLE. > > What error is that? Show us. Errors carry strong hints. > > Also, are you following an install guide/tutorial? Which one? > > C

Re: Errin when executing a cgi script that sets a cookie in the browser

2013-06-08 Thread Νικόλαος Κούρας
Τη Σάββατο, 8 Ιουνίου 2013 7:03:57 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: > On Sun, Jun 9, 2013 at 1:36 AM, Νικόλαος Κούρας wrote: > > Well, www as symlink to public_html is always a symlink to any system i > > have used so its something defaulted. > It's most certainly not the default, it

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

2013-06-08 Thread Νικόλαος Κούρας
Sorry for th delay guys, was busy with other thigns today and i am still reading your resposes, still ahvent rewad them all just Cameron's: Here is what i have now following Cameron's advices: # # Collect filenames of the path directory as

Re: Installing PyGame?

2013-06-08 Thread Fábio Santos
On 8 Jun 2013 17:17, "Eam onn" wrote: > I keep getting an error in all my versions of IDLE. What error is that? Show us. Errors carry strong hints. Also, are you following an install guide/tutorial? Which one? Cheers -- http://mail.python.org/mailman/listinfo/python-list

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

2013-06-08 Thread MRAB
On 08/06/2013 07:49, Νικόλαος Κούρας wrote: Τη Σάββατο, 8 Ιουνίου 2013 5:52:22 π.μ. UTC+3, ο χρήστης Cameron Simpson έγραψε: On 07Jun2013 11:52, =?utf-8?B?zp3Or866zr/PgiDOk866z4EzM866?= wrote: | ni...@superhost.gr [~/www/cgi-bin]# [Fri Jun 07 21:49:33 2013] [error] [client 79.103.41.173] F

Installing PyGame?

2013-06-08 Thread Eam onn
Perhaps this isn't the right place to post this, but it's the only place I could find. I asked yesterday or the day before about Python Game Development, and have found a few tutorials on PyGame. Now I have a bigger problem: HOW THE HECK DO I INSTALL PYGAME!?!?! System Details: • Mac OS X 10.8

Re: Python Game Development?

2013-06-08 Thread Fábio Santos
> On Fri, 07 Jun 2013 08:53:03 -0700, letsplaysforu wrote: > > > I was planning on making a small 2D game in Python. Are there any > > libraries for this? I know of: It wasn't your question, but I was happy to find out that box2d exists for python. -- http://mail.python.org/mailman/listinfo/python

Re: Errin when executing a cgi script that sets a cookie in the browser

2013-06-08 Thread Chris Angelico
On Sun, Jun 9, 2013 at 1:36 AM, Νικόλαος Κούρας wrote: > Τη Σάββατο, 8 Ιουνίου 2013 10:01:51 π.μ. UTC+3, ο χρήστης Chris Angelico > έγραψε: >> On Sat, Jun 8, 2013 at 4:53 PM, Νικόλαος Κούρας >> wrote: >> >> > Τη Παρασκευή, 7 Ιουνίου 2013 11:47:58 μ.μ. UTC+3, ο χρήστης MRAB έγραψε: >> >> >> On 0

Re: Errin when executing a cgi script that sets a cookie in the browser

2013-06-08 Thread Νικόλαος Κούρας
Τη Σάββατο, 8 Ιουνίου 2013 10:01:51 π.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: > On Sat, Jun 8, 2013 at 4:53 PM, Νικόλαος Κούρας wrote: > > > Τη Παρασκευή, 7 Ιουνίου 2013 11:47:58 μ.μ. UTC+3, ο χρήστης MRAB έγραψε: > > >> On 07/06/2013 19:24, Νικόλαος Κούρας wrote: > > \>> > Τη Παρασκευή, 7 Ι

Riemann and Bernhard, a distributed systems monitor and Python client

2013-06-08 Thread vasudevram
This may be of interest to the group: Riemann and Bernhard, a distributed systems monitor and Python client http://jugad2.blogspot.in/2013/06/riemann-and-bernhard-distributed.html - Vasudev Ram dancingbison.com Python training and consulting -- http://mail.python.org/mailman/listinfo/python-l

Re: Python Game Development?

2013-06-08 Thread Nobody
On Fri, 07 Jun 2013 08:53:03 -0700, letsplaysforu wrote: > I was planning on making a small 2D game in Python. Are there any > libraries for this? I know of: [snip] There's also Pyglet. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Game Development?

2013-06-08 Thread Jan Riechers
On 07.06.2013 18:53, letsplaysf...@gmail.com wrote: I was planning on making a small 2D game in Python. Are there any libraries for this? I know of: • Pygame - As far as I know it's dead and has been for almost a year • PyOgre - Linux and Windows only(I do have those, but I want multi-platform)

Re: Idiomatic Python for incrementing pairs

2013-06-08 Thread Jason Swails
On Sat, Jun 8, 2013 at 2:47 AM, Peter Otten <__pete...@web.de> wrote: > > You can hide the complexity in a custom class: > > >>> class T(tuple): > ... def __add__(self, other): > ... return T((a+b) for a, b in zip(self, other)) > ... > >>> t = T((0, 0)) > >>> for pair in [(1, 10), (

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

2013-06-08 Thread Roel Schroeven
Νικόλαος Κούρας schreef: Session settings afaik is for putty to remember hosts to connect to, not terminal options. I might be worng though. No matter how many times i change its options next time i run it always defaults back. Putty can most definitely remember its settings: - Start PuTTY; you

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

2013-06-08 Thread Steven D'Aprano
On Thu, 06 Jun 2013 23:35:33 -0700, nagia.retsina wrote: >> Working with bytes is only for when the file names are turned to >> garbage. Your file names (some of them) are turned to garbage. Fix >> them, and then use file names as strings. > > Can't '~/data/apps/' is filled every day with more an

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

2013-06-08 Thread Chris Angelico
On Sat, Jun 8, 2013 at 5:26 PM, Steven D'Aprano wrote: > On Fri, 07 Jun 2013 23:49:17 -0700, Νικόλαος Κούρας wrote: > > [...] >> Oh iam very sorry. >> Oh my God i cant beleive i missed a colon *again*: >> >> I have corrected this: > > [snip code] > > Stop posting your code after every trivial edit

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

2013-06-08 Thread Steven D'Aprano
On Fri, 07 Jun 2013 23:49:17 -0700, Νικόλαος Κούρας wrote: [...] > Oh iam very sorry. > Oh my God i cant beleive i missed a colon *again*: > > I have corrected this: [snip code] Stop posting your code after every trivial edit!!! -- Steven -- http://mail.python.org/mailman/listinfo/python-li

Re: Errin when executing a cgi script that sets a cookie in the browser

2013-06-08 Thread Chris Angelico
On Sat, Jun 8, 2013 at 4:53 PM, Νικόλαος Κούρας wrote: > Τη Παρασκευή, 7 Ιουνίου 2013 11:47:58 μ.μ. UTC+3, ο χρήστης MRAB έγραψε: >> On 07/06/2013 19:24, Νικόλαος Κούρας wrote: \>> > Τη Παρασκευή, 7 Ιουνίου 2013 5:32:09 μ.μ. UTC+3, ο χρήστης MRAB έγραψε: >> >> It's looking for '/home/nikos/public_

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

2013-06-08 Thread Chris Angelico
On Sat, Jun 8, 2013 at 4:49 PM, Νικόλαος Κούρας wrote: > Oh my God i cant beleive i missed a colon *again*: For most Python programmers, this is a matter of moments to solve. Run the program, get a SyntaxError, fix it. Non-interesting event. (Maybe even sooner than that, if the editor highlights