Re: Turnign greek-iso filenames => utf-8 iso

2013-06-12 Thread Νικόλαος Κούρας
On 12/6/2013 1:40 μμ, Νικόλαος Κούρας wrote: Thanks Steven , i made some alternations to the variables names and at the end of the way that i check a database filename against and hdd filename. Here is the code: # ==

Re: A few questiosn about encoding

2013-06-12 Thread Chris Angelico
On Thu, Jun 13, 2013 at 4:21 PM, Νικόλαος Κούρας wrote: > How can you be able to tell up to what character utf-8 needs 1 byte or 2 > bytes or 3? You look up Wikipedia, using the handy links that have been put to you MULTIPLE TIMES. ChrisA -- http://mail.python.org/mailman/listinfo/python-list

Re: Version Control Software

2013-06-12 Thread rusi
On Jun 13, 11:00 am, cutems93 wrote: > Thank you everyone for such helpful responses! Actually, I have one more > question. Does anybody have experience with closed source version control > software? If so, why did you buy it instead of downloading open source > software? Does closed source vcs

Re: Wrong website loaded when other requested

2013-06-12 Thread Νικόλαος Κούρας
On 12/6/2013 11:35 μμ, Joel Goldstick wrote: On Wed, Jun 12, 2013 at 1:33 PM, Νικόλαος Κούρας mailto:supp...@superhost.gr>> wrote: == RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^/?(.+\.html) /cgi-bin/metrites.py?file=%{__REQUEST_FIL

Re: Any speech to text conversation python library for Linux and mac box

2013-06-12 Thread dieter
Ranjith Kumar writes: > I'm looking for speech to text conversation python library for linux and > mac box, I found few libraries but non of them supports any of these > platform. > I found following libraries speech, dragonfly and pyspeech supports only > windows and sphinx for linux. You will

Re: A few questiosn about encoding

2013-06-12 Thread jmfauth
-- UTF-8, Unicode (consortium): 1 to 4 *Unicode Transformation Unit* UTF-8, ISO 10646: 1 to 6 *Unicode Transformation Unit* (still actual, unless tealy freshly modified) jmf -- http://mail.python.org/mailman/listinfo/python-list

Re: Debugging memory leaks

2013-06-12 Thread dieter
writeson writes: > ... > Anyway, my real question is how to go about debugging memory leak problems in > Python, particularly for a long running server process written with Twisted. > I'm not sure how to use heapy or guppy, and objgraph doesn't tell me enough > to locate the problem. Analysin

Re: A few questiosn about encoding

2013-06-12 Thread Νικόλαος Κούρας
On 12/6/2013 11:30 μμ, Nobody wrote: On Wed, 12 Jun 2013 14:23:49 +0300, Νικόλαος Κούρας wrote: So, how many bytes does UTF-8 stored for codepoints > 127 ? U+..U+007F 1 byte U+0080..U+07FF 2 bytes U+0800..U+ 3 bytes =U+1 4 bytes 'U' stands for Unicode code-point which

Re: Why doesn't nose see my plugin? (FIXED)

2013-06-12 Thread alex23
On Jun 13, 2:12 am, r...@panix.com (Roy Smith) wrote: > Still strugging to get my head fully around setuptools :-) We should start a club! :D -- http://mail.python.org/mailman/listinfo/python-list

Re: A few questiosn about encoding

2013-06-12 Thread Νικόλαος Κούρας
On 13/6/2013 3:13 πμ, Steven D'Aprano wrote: On Wed, 12 Jun 2013 14:23:49 +0300, Νικόλαος Κούρας wrote: So, how many bytes does UTF-8 stored for codepoints > 127 ? Two, three or four, depending on the codepoint. The amount of bytes needed by UTF-8 to store a code-point(character), depends

Re: Version Control Software

2013-06-12 Thread cutems93
Thank you everyone for such helpful responses! Actually, I have one more question. Does anybody have experience with closed source version control software? If so, why did you buy it instead of downloading open source software? Does closed source vcs have some benefits over open source in some

Re: My son wants me to teach him Python

2013-06-12 Thread Ethan Furman
On 06/12/2013 10:30 PM, Modulok wrote: If he wants to learn game programming, teach him game programming. [. . .] Oh, that reminds me: http://inventwithpython.com/ Which has a number of free books; the two of interest for your son being: Invent Your Own Computer Games with

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

2013-06-12 Thread Νικόλαος Κούρας
On 13/6/2013 4:55 πμ, Steven D'Aprano wrote: On Wed, 12 Jun 2013 14:17:32 +0300, Νικόλαος Κούρας wrote: doesn't that mean? if '=' not in ( name and month and year ): if '=' does not exists as a char inside the name and month and year variables? i think it does, but why it fai

Re: My son wants me to teach him Python

2013-06-12 Thread Modulok
>> *Everything* these days revolves around graphical interfaces. The console, >> which was once the dark and mystical battlefield where knighted geeks would >> slay the plagues of exception demons, has been reduced to a mere: "little black >> box of nostalgia". >> 1. Rock is dead... >> 2. The co

Re: My son wants me to teach him Python

2013-06-12 Thread Andrew Berg
On 2013.06.12 23:47, Rick Johnson wrote: > 1. Rock is dead... Nah, he just does movies now. Seriously, though, GUI stuff might be okay to learn early on since he's interested in making games. There's no reason to focus heavily on it this early, however. -- CPython 3.3.2 | Windows NT 6.2.9200 /

Re: My son wants me to teach him Python

2013-06-12 Thread Rick Johnson
On Wednesday, June 12, 2013 11:08:44 PM UTC-5, Chris Angelico wrote: > No. Definitely not. Programming does NOT begin with a GUI. It begins > with something *simple*, so you're not stuck fiddling around with the > unnecessary. On today's computers, that usually means console I/O > (actually consol

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

2013-06-12 Thread Chris Angelico
On Thu, Jun 13, 2013 at 2:35 PM, Kushal Kumaran wrote: > In [4]: 'cd' in s1 or 'cd' in s2 or 'cd' in s3 > Out[4]: False > > In [5]: 'cd' in s1+s2+s3 > Out[5]: True That's why I said it works for *character* in string, not *string* in string. If your first operand is a single character (which in P

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

2013-06-12 Thread Kushal Kumaran
Chris Angelico writes: > On Thu, Jun 13, 2013 at 11:55 AM, Steven D'Aprano > wrote: >> In English: >> >> "the cat is in the box or the cupboard or the kitchen" >> >> means: >> >> "the cat is in the box, or the cat is in the cupboard, or the cat is in >> the kitchen". >> >> >> But that is not how

Re: My son wants me to teach him Python

2013-06-12 Thread Chris Angelico
On Thu, Jun 13, 2013 at 2:00 PM, Rick Johnson wrote: > On Wednesday, June 12, 2013 2:46:13 PM UTC-5, John Ladasky wrote: >> [...] >> He's a smart kid, but prefers to be shown, to be tutored, >> rather than having the patience to sit down and RTFM. >> Have any of you been down this road before? I

Re: My son wants me to teach him Python

2013-06-12 Thread Rick Johnson
On Wednesday, June 12, 2013 2:46:13 PM UTC-5, John Ladasky wrote: > [...] > He's a smart kid, but prefers to be shown, to be tutored, > rather than having the patience to sit down and RTFM. > Have any of you been down this road before? I would > appreciate it if you would share your experiences, o

Any speech to text conversation python library for Linux and mac box

2013-06-12 Thread Ranjith Kumar
Hello all, I'm looking for speech to text conversation python library for linux and mac box, I found few libraries but non of them supports any of these platform. I found following libraries speech, dragonfly and pyspeech supports only windows and sphinx for linux. Any suggestion? -- Cheers, Ran

Re: Version Control Software

2013-06-12 Thread Roy Smith
In article <98c13a55-dbf2-46a7-a2aa-8c5f052ff...@googlegroups.com>, cutems93 wrote: > I am looking for an appropriate version control software for python > development, and need professionals' help to make a good decision. Currently > I am considering four software: git, SVN, CVS, and Mercuria

Re: Version Control Software

2013-06-12 Thread Tim Chase
On 2013-06-12 16:27, cutems93 wrote: > I am looking for an appropriate version control software for python > development, and need professionals' help to make a good decision. While I'm generally a git user (see my other email), I'll also put in a plug for Fossil which has

Re: Version Control Software

2013-06-12 Thread Tim Chase
[much of my reply echos Chris but elaborate] On 2013-06-13 10:04, Chris Angelico wrote: > On Thu, Jun 13, 2013 at 9:27 AM, cutems93 > wrote: > > Currently I am considering four software: git, SVN, > > CVS, and Mercurial. > > Don't touch CVS unless you absolutely have to. SVN is also > distinctly

Re: Version Control Software

2013-06-12 Thread Ben Finney
cutems93 writes: > I am looking for an appropriate version control software for python > development, and need professionals' help to make a good decision. > Currently I am considering four software: git, SVN, CVS, and > Mercurial. These days there is no good reason to use CVS nor Subversion fo

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

2013-06-12 Thread Chris Angelico
On Thu, Jun 13, 2013 at 11:55 AM, Steven D'Aprano wrote: > In English: > > "the cat is in the box or the cupboard or the kitchen" > > means: > > "the cat is in the box, or the cat is in the cupboard, or the cat is in > the kitchen". > > > But that is not how Python works. In Python, you have to sa

Re: A few questiosn about encoding

2013-06-12 Thread Chris Angelico
On Thu, Jun 13, 2013 at 11:40 AM, Steven D'Aprano wrote: > The *mechanism* of UTF-8 can go up to 6 bytes (or even 7 perhaps?), but > that's not UTF-8, that's UTF-8-plus-extra-codepoints. And a proper UTF-8 decoder will reject "\xC0\x80" and "\xed\xa0\x80", even though mathematically they would tr

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

2013-06-12 Thread Steven D'Aprano
On Wed, 12 Jun 2013 14:17:32 +0300, Νικόλαος Κούρας wrote: > doesn't that mean? > > if '=' not in ( name and month and year ): > > if '=' does not exists as a char inside the name and month and year > variables? > > i think it does, but why it fails then? No. Python is very close

Re: A few questiosn about encoding

2013-06-12 Thread Steven D'Aprano
On Wed, 12 Jun 2013 21:30:23 +0100, Nobody wrote: > The mechanism used by UTF-8 allows sequences of up to 6 bytes, for a > total of 31 bits, but UTF-16 is limited to U+10 (slightly more than > 20 bits). Same with UTF-8 and UTF-32, both of which are limited to U+10 because that is what Un

Re: Pywart: The problem with "Rick Johnson"

2013-06-12 Thread Chris Angelico
On Thu, Jun 13, 2013 at 11:30 AM, Rick Johnson wrote: > PS: Was this a private email sent to you or a thread started on the list? > Because i don't see this thread anywhere -- unless I've gone blind??? It was on-list, but there seems to be an issue with some posts - seems to be @yahoo.com addres

Re: Pywart: The problem with "Rick Johnson"

2013-06-12 Thread Rick Johnson
On Wednesday, June 12, 2013 2:17:49 PM UTC-5, Terry Reedy wrote: > On 6/4/2013 11:45 PM, Mike Hansen wrote: > > Is "Rick Johnson" the alter ego of Xah Lee, or is he the result of a > > cross breeding experiement with a troll by Saruman at Isengard? > He is a Python programmer competent enough with

Debugging memory leaks

2013-06-12 Thread writeson
Hi all, I've written a program using Twisted that uses SqlAlchemy to access a database using threads.deferToThread(...) and SqlAlchemy's scoped_session(...). This program runs for a long time, but leaks memory slowly to the point of needing to be restarted. I don't know that the SqlAlchemy/thre

Re: "Don't rebind built-in names*" - it confuses readers

2013-06-12 Thread Chris Angelico
On Thu, Jun 13, 2013 at 11:08 AM, Steven D'Aprano wrote: > On Thu, 13 Jun 2013 10:08:14 +1000, Chris Angelico wrote: > > int="five" > [__builtins__.int(i) for i in ["1","2","3"]] > > Don't use __builtins__, it's an implementation detail. > > In Python 2.x, there is __builtins__ with an "s"

Re: "Don't rebind built-in names*" - it confuses readers

2013-06-12 Thread Steven D'Aprano
On Wed, 12 Jun 2013 17:26:43 -0700, Mark Janssen wrote: >> The builtins don't need to be imported, but they're identifiers like >> anything else. They're a namespace that gets searched after >> module-globals. > > Yes, I understand, though for clarity and separability, it seems that > having them

Re: "Don't rebind built-in names*" - it confuses readers

2013-06-12 Thread Steven D'Aprano
On Thu, 13 Jun 2013 10:08:14 +1000, Chris Angelico wrote: int="five" [__builtins__.int(i) for i in ["1","2","3"]] Don't use __builtins__, it's an implementation detail. In Python 2.x, there is __builtins__ with an "s" in the global namespace if you are running CPython, but not necessa

Re: "Don't rebind built-in names*" - it confuses readers

2013-06-12 Thread Steven D'Aprano
On Wed, 12 Jun 2013 17:04:48 -0700, Mark Janssen wrote: >> Apart from Erlang, got any other examples? Because it seems to me that >> in languages with nested scopes or namespaces, shadowing higher levels >> is exactly the right thing to do. > > Really? > int="five" [int(i) for i in ["1

Problem creating a regular expression to parse open-iscsi, iscsiadm output (help?)

2013-06-12 Thread rice . cruft
I am parsing the output of an open-iscsi command that contains several blocks of data for each data set. Each block has the format: Target: iqn.1992-04.com.emc:vplex-8460319f-0007 Current Portal: 221.128.52.224:3260,7 Persistent Portal: 221.128.52.224:3260,7

Re: "Don't rebind built-in names*" - it confuses readers

2013-06-12 Thread Ethan Furman
On 06/12/2013 05:04 PM, Mark Janssen wrote: Steven D'Aprono wrote: Apart from Erlang, got any other examples? Because it seems to me that in languages with nested scopes or namespaces, shadowing higher levels is exactly the right thing to do. Really? --> int="five" --> [int(i) for i in ["1",

Re: "Don't rebind built-in names*" - it confuses readers

2013-06-12 Thread Steven D'Aprano
On Thu, 13 Jun 2013 09:53:26 +1000, Chris Angelico wrote: > In Python 2.x, 'print' is actually a keyword. It has its own special > syntax (eg printing to something other than stdout), and absolutely > cannot be overridden: Except that you can: from __future__ import print_function Just to make

Re: "Don't rebind built-in names*" - it confuses readers

2013-06-12 Thread Chris Angelico
On Thu, Jun 13, 2013 at 10:18 AM, Skip Montanaro wrote: > Magic. :-) > int = "five" int("a") > Traceback (most recent call last): > File "", line 1, in > TypeError: 'str' object is not callable from __builtin__ import int as _int _int("5") > 5 > > Not sure of the magic neces

Re: "Don't rebind built-in names*" - it confuses readers

2013-06-12 Thread Mark Janssen
> The builtins don't need to be imported, but they're identifiers like > anything else. They're a namespace that gets searched after > module-globals. Yes, I understand, though for clarity and separability, it seems that having them in a namespace that gets explicitly pulled into the global space

Re: Turnign greek-iso filenames => utf-8 iso

2013-06-12 Thread Steven D'Aprano
On Wed, 12 Jun 2013 15:42:07 +0100, Mark Lawrence wrote: > On 12/06/2013 13:42, Νικόλαος Κούρας wrote: >> >> Something you want me to try? > > I'd suggest suicide Mark, not cool. Seriously not cool. -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: "Don't rebind built-in names*" - it confuses readers

2013-06-12 Thread Skip Montanaro
>>> int="five" >>> [int(i) for i in ["1","2","3"]] TypeError: str is not callable > Now how are you going to get the original int type back? Magic. :-) >>> int = "five" >>> int("a") Traceback (most recent call last): File "", line 1, in TypeError: 'str' object is not callable >>> from __buil

Re: "Don't rebind built-in names*" - it confuses readers

2013-06-12 Thread Chris Angelico
On Thu, Jun 13, 2013 at 10:26 AM, Mark Janssen wrote: >> There's no point forcing them to be looked up in a two-step process. >> If you want that, you can simply reference them as >> __builtins__.whatever, but you can instead just reference them as the >> unadorned name whatever. They contribute h

Re: Turnign greek-iso filenames => utf-8 iso

2013-06-12 Thread Steven D'Aprano
On Wed, 12 Jun 2013 16:18:38 +, Neil Cerutti wrote: > On 2013-06-12, Mark Lawrence wrote: >> On 12/06/2013 13:42, wrote: >>> >>> Something you want me to try? >> >> I'd suggest suicide but that would no doubt start another stream of >> questions along the lines o

Re: A few questiosn about encoding

2013-06-12 Thread Steven D'Aprano
On Wed, 12 Jun 2013 14:23:49 +0300, Νικόλαος Κούρας wrote: > So, how many bytes does UTF-8 stored for codepoints > 127 ? Two, three or four, depending on the codepoint. > example for codepoint 256, 1345, 16474 ? You can do this yourself. I have already given you enough information in previous

Re: "Don't rebind built-in names*" - it confuses readers

2013-06-12 Thread Chris Angelico
On Thu, Jun 13, 2013 at 10:04 AM, Mark Janssen wrote: > Really? > int="five" [int(i) for i in ["1","2","3"]] > TypeError: str is not callable > > Now how are you going to get the original int type back? Either del it from your module namespace, or use the qualified name: >>> int="five

Re: "Don't rebind built-in names*" - it confuses readers

2013-06-12 Thread Skip Montanaro
> Okay, now I'm a bit confused. "print" is both a and a > member of the builtins. What happens then? It's a keyword in Python < 3, a built-in function in Python >= 3: ~% python3 Python 3.4.0a0 (default:96f08a22f562, Feb 24 2013, 23:37:53) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin T

Re: "Don't rebind built-in names*" - it confuses readers

2013-06-12 Thread Mark Janssen
>> This has caused more trouble than it has solved. > > I take it you have never programmed in a programming language with a > single, flat, global namespace? :-) Hey, the purpose a programming language (i.e. a language which has a consistent lexical specification), is to provide some modicum of s

Re: Version Control Software

2013-06-12 Thread Chris Angelico
On Thu, Jun 13, 2013 at 9:27 AM, cutems93 wrote: > I am looking for an appropriate version control software for python > development, and need professionals' help to make a good decision. Currently > I am considering four software: git, SVN, CVS, and Mercurial. Of course, I > already did some r

Re: "Don't rebind built-in names*" - it confuses readers

2013-06-12 Thread Chris Angelico
On Thu, Jun 13, 2013 at 9:07 AM, Mark Janssen wrote: >>> You're right. I was being sloppy. > Okay, now I'm a bit confused. "print" is both a and a > member of the builtins. What happens then? Ah! I see where we are getting confused. When you said keyword, did you mean keyword, a person who ha

Re: Version Control Software

2013-06-12 Thread Joel Goldstick
git or hg. but git is most popular and very easy to learn. Its also great for distributed develpment On Wed, Jun 12, 2013 at 7:36 PM, Mark Janssen wrote: > > I am looking for an appropriate version control software for python > development, and need professionals' help to make a good decision.

Re: Version Control Software

2013-06-12 Thread Mark Janssen
> I am looking for an appropriate version control software for python > development, and need professionals' help to make a good decision. Currently > I am considering four software: git, SVN, CVS, and Mercurial. I'm not real experienced, but I understand that SVN is good if your hosting your ow

Re: My son wants me to teach him Python

2013-06-12 Thread Chris Angelico
On Thu, Jun 13, 2013 at 6:34 AM, Chris Angelico wrote: > Went digging to see what version they support, and found it - buried - > and with some FUD: > > https://developers.google.com/edu/python/set-up > "For Google's Python Class, you want a python version that is 2.4 or > later, and avoiding the

Version Control Software

2013-06-12 Thread cutems93
I am looking for an appropriate version control software for python development, and need professionals' help to make a good decision. Currently I am considering four software: git, SVN, CVS, and Mercurial. Of course, I already did some research on different characteristics of version software,

Re: "Don't rebind built-in names*" - it confuses readers

2013-06-12 Thread Mark Janssen
>> You're right. I was being sloppy. > > ['ArithmeticError', 'AssertionError', 'AttributeError', > 'BaseException', 'BlockingIOError', 'BrokenPipeError', 'BufferError', > 'BytesWarning', 'ChildProcessError', 'ConnectionAbortedError', > 'ConnectionError', 'ConnectionRefusedError', 'ConnectionResetE

Re: My son wants me to teach him Python

2013-06-12 Thread Ian Kelly
On Wed, Jun 12, 2013 at 4:06 PM, John Ladasky wrote: > On Wednesday, June 12, 2013 8:34:15 PM UTC, Chris Angelico wrote: >>Unless you have a good reason for sticking with 2.x, go with 3.x. > > I agree, Chris, I will be teaching my son Python 3 from the start. In fact, > I'm in the middle of a me

Re: My son wants me to teach him Python

2013-06-12 Thread John Ladasky
On Wednesday, June 12, 2013 8:34:15 PM UTC, Chris Angelico wrote: >Unless you have a good reason for sticking with 2.x, go with 3.x. I agree, Chris, I will be teaching my son Python 3 from the start. In fact, I'm in the middle of a messy upgrade of my own computer to get everything ready for Py

Re: My son wants me to teach him Python

2013-06-12 Thread John Ladasky
On Wednesday, June 12, 2013 8:02:46 PM UTC, Chris Angelico wrote: > [1] http://www.greenteapress.com/thinkpython/ I think, but DNS on this > computer is broken at the moment so I can't verify that link Your link is correct, thank you! -- http://mail.python.org/mailman/listinfo/python-list

Re: My son wants me to teach him Python

2013-06-12 Thread Ethan Furman
While I agree with Chris that 3.x is best, there is a free class from Udacity that is actually pretty good, even if it does target Python2 (.7 I believe). https://www.udacity.com/course/cs101 -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

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

2013-06-12 Thread Sibylle Koczian
Am 12.06.2013 22:00, schrieb Νικόλαος Κούρας: On 12/6/2013 10:48 μμ, Sibylle Koczian wrote: if '=' not in ( name and month and year ): i understand: if '=' not in name AND '=' not in month AND '=' not in year Wrong. The "'=' not in (...)" first evaluates the expression in parentheses, that's w

Re: Python Magazine

2013-06-12 Thread Chris Angelico
On Sun, May 26, 2013 at 3:44 PM, Carlos Nepomuceno wrote: > I've been told that in California it is really illegal to block IP addresses > without a court order. Any Californians available to confirm that? > > "The sender of information over the Internet is the "owner" of both the > information

Re: Python #ifdef

2013-06-12 Thread Chris Angelico
On Tue, Jun 4, 2013 at 8:18 AM, Carlos Nepomuceno wrote: > >> Date: Mon, 3 Jun 2013 12:05:49 +1000 >> Subject: Re: Python #ifdef >> From: ros...@gmail.com >> To: python-list@python.org > [...] >> Ah. I actually wasn't aware of m4's use with sendmail. I firs

Re: Wrong website loaded when other requested

2013-06-12 Thread Joel Goldstick
On Wed, Jun 12, 2013 at 1:33 PM, Νικόλαος Κούρας wrote: > == > RewriteEngine Off > RewriteCond %{REQUEST_FILENAME} -f > RewriteRule ^/?(.+\.html) /cgi-bin/metrites.py?file=%{**REQUEST_FILENAME} > [L,PT,QSA] > == > > [code] > file = form.getvalue('file') > pa

Re: A few questiosn about encoding

2013-06-12 Thread Nobody
On Wed, 12 Jun 2013 14:23:49 +0300, Νικόλαος Κούρας wrote: > So, how many bytes does UTF-8 stored for codepoints > 127 ? U+..U+007F 1 byte U+0080..U+07FF 2 bytes U+0800..U+ 3 bytes >=U+1 4 bytes So, 1 byte for ASCII, 2 bytes for other Latin characters, Greek, Cyrillic, Arabi

Oportunidade: Desenvolvedor Python

2013-06-12 Thread zughumancapital
Fabrica de software localizada na Barra da Tijuca contrata: Desenvolvedor Python Objetivo geral da Posição: Desenvolvimento de sistemas Web com Python/Django, HTML5, Javascript e CSS. Pré­requisitos: Experiência com Python/Django ou outro framework MVC. Familiarizado com desenvolvimento front­

Re: My son wants me to teach him Python

2013-06-12 Thread Chris Angelico
On Thu, Jun 13, 2013 at 6:23 AM, Joel Goldstick wrote: > > > > On Wed, Jun 12, 2013 at 4:02 PM, Chris Angelico wrote: >> >> On Thu, Jun 13, 2013 at 5:46 AM, John Ladasky >> wrote: >> > He's a smart kid, but prefers to be shown, to be tutored, rather than >> > having the patience to sit down and

Re: Future standard GUI library

2013-06-12 Thread Wolfgang Keller
> > A "touch-type" GUI is a "must have" for any application that's > > supposed to be used productively. The mouse is nice to "explore" a > > GUI or for occasional/leisurely use, but once you use an > > application daily to earn your living, it's a hopeless roadblock > > for productivity. > > You

Re: "Don't rebind built-in names*" - it confuses readers

2013-06-12 Thread Chris Angelico
On Thu, Jun 13, 2013 at 5:40 AM, Mark Janssen wrote: > On Wed, Jun 12, 2013 at 7:24 AM, Grant Edwards > wrote: >> On 2013-06-11, Mark Janssen wrote: list = [] Reading further, one sees that the function works with two lists, a list of file names, unfortunately called 'lis

Re: My son wants me to teach him Python

2013-06-12 Thread Joel Goldstick
On Wed, Jun 12, 2013 at 4:02 PM, Chris Angelico wrote: > On Thu, Jun 13, 2013 at 5:46 AM, John Ladasky > wrote: > > He's a smart kid, but prefers to be shown, to be tutored, rather than > having the patience to sit down and RTFM. Have any of you been down this > road before? I would appreciate

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

2013-06-12 Thread Chris Angelico
On Thu, Jun 13, 2013 at 6:00 AM, Νικόλαος Κούρας wrote: > On 12/6/2013 10:48 μμ, Sibylle Koczian wrote: >>> >>> if '=' not in ( name and month and year ): >>> i understand: if '=' not in name AND '=' not in month AND '=' not in year >>> >> Wrong. The "'=' not in (...)" first evaluates the expressi

Re: Wrong website loaded when other requested

2013-06-12 Thread Chris Angelico
On Thu, Jun 13, 2013 at 3:33 AM, Νικόλαος Κούρας wrote: > Why is pointing to /home/nikos isntead of /home/dauwin ? Why is question pointing to python-list@python.org isntead [sic] of your home town and some paid support? ChrisA -- http://mail.python.org/mailman/listinfo/python-list

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

2013-06-12 Thread Chris Angelico
On Wed, Jun 12, 2013 at 9:07 PM, wrote: > If you still don't know why you get "0" read: > http://www.w3schools.com/tags/att_option_value.asp (or something in > greek about html forms) > (Sorry, I know, you do not read doks, because they describe what the software > DOES and not what you WANT

Re: Wrong website loaded when other requested

2013-06-12 Thread Νικόλαος Κούρας
What i mean is the the python.cgi script supposed to be executed was "/home/dauwin/public_html/cgi-bin/metrites.py" but instead for this to load for some reason File "/home/nikos/public_html/cgi-bin/metrites.py" But this is crazy. I hit to the browser 'http://superhost.gr/~dauwin' and not 'h

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

2013-06-12 Thread Νικόλαος Κούρας
On 12/6/2013 10:48 μμ, Sibylle Koczian wrote: if '=' not in ( name and month and year ): i understand: if '=' not in name AND '=' not in month AND '=' not in year Wrong. The "'=' not in (...)" first evaluates the expression in parentheses, that's what parentheses are for. And then it looks for

Re: My son wants me to teach him Python

2013-06-12 Thread Chris Angelico
On Thu, Jun 13, 2013 at 5:46 AM, John Ladasky wrote: > He's a smart kid, but prefers to be shown, to be tutored, rather than having > the patience to sit down and RTFM. Have any of you been down this road > before? I would appreciate it if you would share your experiences, or > provide resour

My son wants me to teach him Python

2013-06-12 Thread John Ladasky
Hi folks, My son is 17 years old. He just took a one-year course in web page design at his high school. HTML is worth knowing, I suppose, and I think he has also done a little Javascript. He has expressed an interest in eventually wanting to program 3D video games. For that purpose, HTML

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

2013-06-12 Thread Sibylle Koczian
Am 12.06.2013 20:06, schrieb Νικόλαος Κούρας: Whn i see: if( x and y ): i understand: if x expression = True AND ALSO y expression = True then execute if( x or y ): i understand: if x expression = True OR y expression = True then execute You didn't read MRABs explanation, did you? if '=' n

Re: "Don't rebind built-in names*" - it confuses readers

2013-06-12 Thread Mark Janssen
On Wed, Jun 12, 2013 at 7:24 AM, Grant Edwards wrote: > On 2013-06-11, Mark Janssen wrote: >>> list = [] >>> Reading further, one sees that the function works with two lists, a list of >>> file names, unfortunately called 'list', >> >> That is very good advice in general: never choose a

Re: Pywart: The problem with "Rick Johnson"

2013-06-12 Thread Terry Reedy
On 6/4/2013 11:45 PM, Mike Hansen wrote: Is "Rick Johnson" the alter ego of Xah Lee, or is he the result of a cross breeding experiement with a troll by Saruman at Isengard? He is a Python programmer competent enough with tkinter to have given useful answers to me and others. He occasionally

Re: Turnign greek-iso filenames => utf-8 iso

2013-06-12 Thread Νικόλαος Κούρας
On 12/6/2013 8:27 μμ, Νικόλαος Κούρας wrote: On 12/6/2013 3:42 μμ, Νικόλαος Κούρας wrote: = # Convert wrongly encoded filenames to utf-8 # ===

Re: .mat files processing in Python

2013-06-12 Thread Terry Reedy
On 5/27/2013 4:43 PM, Romila Anamaria wrote: I am beginner in Python programming and I want to make an application Please post plain test only, not html (with a font size too small to read ;-). Don't send attachments, especially not 2 MB files. -- Terry Jan Reedy -- http://mail.python.org/

Re: Split a list into two parts based on a filter?

2013-06-12 Thread Terry Reedy
On 6/12/2013 12:57 PM, Fábio Santos wrote: Why is there no builtin to consume a generator? I find that odd. There are several builtins than consume generators -- and do something useful with the yielded objects. What you mean is "Why is there no builtin to uselessly consume a generator?" The

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

2013-06-12 Thread Νικόλαος Κούρας
On 12/6/2013 8:53 μμ, MRAB wrote: and then what this is doing? if '=' not in ( name or month or year ): In English, the result of: x or y is basically: if bool(x) is true then the result is x, otherwise the result is y For example: >>> bool("") False >>> "" or "world" 'world'

Re: Split a list into two parts based on a filter?

2013-06-12 Thread Terry Reedy
On 6/12/2013 7:39 AM, Roy Smith wrote: starts. But, somewhat more seriously, I wonder what, exactly, it is that freaks people out about: [(new_songs if s.is_new() else old_songs).append(s) for s in songs] Clearly, it's not the fact that it build and immediately discards a list, because that

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

2013-06-12 Thread MRAB
On 12/06/2013 18:13, Νικόλαος Κούρας wrote: On 12/6/2013 7:40 μμ, MRAB wrote: On 12/06/2013 12:17, Νικόλαος Κούρας wrote: As with most of your problems you are barking up the wrong tree. Why not use the actual value you get from the form to check whether you have a valid month? Do you underst

Wrong website loaded when other requested

2013-06-12 Thread Νικόλαος Κούρας
== RewriteEngine Off RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^/?(.+\.html) /cgi-bin/metrites.py?file=%{REQUEST_FILENAME} [L,PT,QSA] == [code] file = form.getvalue('file') page = form.getvalue('page') if not page and os.path.exists( file ):

Re: Turnign greek-iso filenames => utf-8 iso

2013-06-12 Thread Νικόλαος Κούρας
On 12/6/2013 8:14 μμ, Νικόλαος Κούρας wrote: On 12/6/2013 5:42 μμ, Mark Lawrence wrote: On 12/06/2013 13:42, Νικόλαος Κούρας wrote: Something you want me to try? I'd suggest suicide but that would no doubt start another stream of questions along the lines of "How do I do it?". Okey that wa

Re: Turnign greek-iso filenames => utf-8 iso

2013-06-12 Thread Νικόλαος Κούρας
On 12/6/2013 3:42 μμ, Νικόλαος Κούρας wrote: = # Convert wrongly encoded filenames to utf-8 # ==

Re: Turnign greek-iso filenames => utf-8 iso

2013-06-12 Thread Νικόλαος Κούρας
On 12/6/2013 7:18 μμ, Neil Cerutti wrote: On 2013-06-12, Mark Lawrence wrote: On 12/06/2013 13:42, wrote: Something you want me to try? I'd suggest suicide but that would no doubt start another stream of questions along the lines of "How do I do it?". hi. I l

Re: ValueError: I/O operation on closed file. with python3

2013-06-12 Thread Serhiy Storchaka
12.06.13 10:26, Peter Otten написав(ла): @contextmanager def my_urlopen(url): resp = urlopen(url) yield io.TextIOWrapper(resp.fp) with urlopen(url) as resp: yield io.TextIOWrapper(resp) Note that last bugfix releases (i.e. 3.3.1) are needed. There was a

Re: Turnign greek-iso filenames => utf-8 iso

2013-06-12 Thread Νικόλαος Κούρας
On 12/6/2013 5:42 μμ, Mark Lawrence wrote: On 12/06/2013 13:42, Νικόλαος Κούρας wrote: Something you want me to try? I'd suggest suicide but that would no doubt start another stream of questions along the lines of "How do I do it?". Okey that was indeed very finny, i even laughed at my own

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

2013-06-12 Thread Νικόλαος Κούρας
On 12/6/2013 7:40 μμ, MRAB wrote: On 12/06/2013 12:17, Νικόλαος Κούρας wrote: As with most of your problems you are barking up the wrong tree. Why not use the actual value you get from the form to check whether you have a valid month? Do you understand why "0" is submitted instead of "

Re: Split a list into two parts based on a filter?

2013-06-12 Thread Fábio Santos
Why is there no builtin to consume a generator? I find that odd. On Wed, Jun 12, 2013 at 5:28 PM, Serhiy Storchaka wrote: > 12.06.13 09:32, Phil Connell написав(ла): >> >> On 12 Jun 2013 01:36, "Roy Smith" mailto:r...@panix.com>> >> >> wrote: >> > Well, continuing down this somewhat bizarre path

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

2013-06-12 Thread MRAB
On 12/06/2013 12:17, Νικόλαος Κούρας wrote: As with most of your problems you are barking up the wrong tree. Why not use the actual value you get from the form to check whether you have a valid month? Do you understand why "0" is submitted instead of "=="? Bye, Andreas I have correct

Re: www Spankwire - Amazing porn video collection

2013-06-12 Thread tongsai56
เมื่อ วันศุกร์ที่ 25 กรกฎาคม ค.ศ. 2008, 3 นาฬิกา 54 นาที 51 วินาที UTC+7, baba...@gmail.com เขียนว่า: > www spankwire > . > > >>Best Collection of Spankwire Videos<< > http://vids365.com/watch.php<<< > >>FREE www spankwire VIDEOS<<< > > . > www

Re: Split a list into two parts based on a filter?

2013-06-12 Thread Serhiy Storchaka
12.06.13 09:32, Phil Connell написав(ла): On 12 Jun 2013 01:36, "Roy Smith" mailto:r...@panix.com>> wrote: > Well, continuing down this somewhat bizarre path: > > new_songs, old_songs = [], [] > itertools.takewhile( > lambda x: True, > (new_songs if s.is_new() else old_songs).append

Re: Turnign greek-iso filenames => utf-8 iso

2013-06-12 Thread Neil Cerutti
On 2013-06-12, Mark Lawrence wrote: > On 12/06/2013 13:42, wrote: >> >> Something you want me to try? > > I'd suggest suicide but that would no doubt start another > stream of questions along the lines of "How do I do it?". hi. I loopet rope aroung and jumped, but br

Re: Turnign greek-iso filenames => utf-8 iso

2013-06-12 Thread rusi
On Jun 12, 7:42 pm, Mark Lawrence wrote: > On 12/06/2013 13:42, Νικόλαος Κούρας wrote: > > > > > Something you want me to try? > > I'd suggest suicide but that would no doubt start another stream of > questions along the lines of "How do I do it?". There's a saying in some Indian languages (unfor

Re: PYTHONPATH: dev and prod

2013-06-12 Thread rusi
On Jun 12, 6:29 pm, jacopo wrote: > > 1. How you run -- 'launch' -- the code -- from py and from prod > > when I have to test I use "python any_script.py"  but in production there is > a c++ program that is able to wrap and run python code (the technical details > are a bit beyond my knowledge)

  1   2   >