Re: Fire Method by predefined string!

2013-11-17 Thread Rick Johnson
On Sunday, November 17, 2013 3:46:16 PM UTC-6, Tamer Higazi wrote: > class(object): > def Fire(self,param) > #possible ?! > self.__param(): > def _DoSomething(self): > print 'I did it!' 1. First off your class declaration is not valid -- it needs an identifier! 2.

Re: Self-defence

2013-11-17 Thread Nikos
Στις 17/11/2013 7:45 μμ, ο/η Johannes Findeisen έγραψε: On Sun, 17 Nov 2013 14:09:44 -0300 Zero Piraeus wrote: Since Nikos is providing downloads to torrent files from Hollywood movies I reported abuse/copyright violation to CloudFlare where he is hosting his site. I made screenshots of that

Next time it would be better to help instead of responding with threats!

2013-11-17 Thread Ferrous Cranus
== root@secure [~/distribute-0.6.49]# pip install pygeoip Downloading/unpacking pygeoip Downloading pygeoip-0.3.0.tar.gz (97kB): 97kB downloaded Running setup.py egg_info for package pygeoip Traceback (most recent call last): File "", line 1

That's for trying to threat me

2013-11-17 Thread Ferrous Cranus
== root@secure [~/distribute-0.6.49]# pip install pygeoip Downloading/unpacking pygeoip Downloading pygeoip-0.3.0.tar.gz (97kB): 97kB downloaded Running setup.py egg_info for package pygeoip Traceback (most recent call last): File "", line 1

I don't care about your threats!

2013-11-17 Thread Ferrous Cranus
== root@secure [~/distribute-0.6.49]# pip install pygeoip Downloading/unpacking pygeoip Downloading pygeoip-0.3.0.tar.gz (97kB): 97kB downloaded Running setup.py egg_info for package pygeoip Traceback (most recent call last): File "", line 1

Re: Oh look, another language (ceylon)

2013-11-17 Thread Gregory Ewing
Mark Lawrence wrote: As a rule of thumb people don't like change? This obviously assumes that language designers are people :) That's probably true (on both counts). I guess this means we need to encourage more Pythoneers to become language designers! -- Greg -- https://mail.python.org/mail

If you continue being rude i will continue doing this

2013-11-17 Thread Ferrous Cranus
== root@secure [~/distribute-0.6.49]# pip install pygeoip Downloading/unpacking pygeoip Downloading pygeoip-0.3.0.tar.gz (97kB): 97kB downloaded Running setup.py egg_info for package pygeoip Traceback (most recent call last): File "", line 1

Re: Self-defence

2013-11-17 Thread Ferrous Cranus
Τη Κυριακή, 17 Νοεμβρίου 2013 8:00:19 μ.μ. UTC+2, ο χρήστης Petite Abeille έγραψε: > On Nov 17, 2013, at 6:50 PM, Yaşar Arabacı wrote: > > > > > 2013/11/17 Georg Brandl : > > >> Let the barrage of posts continue for a few more days; if he doesn't get > > >> replies he will get fed up eventua

Re: Fire Method by predefined string!

2013-11-17 Thread Rick Johnson
On Sunday, November 17, 2013 4:23:11 PM UTC-6, Rick Johnson wrote: > 2. Never start a function or method with a lowercase letter. > Please read PEP8 Urm... let me correct that: 2. Never start a function or method with a UPPERCASE letter. Initial uppercase should be reserved for class names only

Re: [ANN] Pythonium Core 0.2.5

2013-11-17 Thread Amirouche Boubekki
2013/11/17 Salvatore DI DIO > Are lists comprehensions are featured in Veloce ? > Ah! Good question, I did not think about it can probably add it to Core. Thanks > > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list

Re: Obtaining "the" name of a function/method

2013-11-17 Thread Cameron Simpson
On 17Nov2013 13:47, Tim Chase wrote: > On 2013-11-17 11:34, Ned Batchelder wrote: > > Functions have a __name__ attribute, which is the name they were > > defined as: > > > > >>> def foo(): pass > > ... > > >>> foo.__name__ > > 'foo' > > >>> bar = foo > > >>> bar.__nam

Re: Oh look, another language (ceylon)

2013-11-17 Thread Rick Johnson
On Saturday, November 16, 2013 9:41:07 PM UTC-6, Gregory Ewing wrote: > The type system looks very interesting! Indeed. I went to the site assuming this would be another language that i would never like, however, after a few minutes reading the tour, i could not stop! I read through the entire t

Re: Oh look, another language (ceylon)

2013-11-17 Thread Chris Angelico
On Mon, Nov 18, 2013 at 9:33 AM, Gregory Ewing wrote: > Mark Lawrence wrote: > >> As a rule of thumb people don't like change? This obviously assumes that >> language designers are people :) > > > That's probably true (on both counts). > > I guess this means we need to encourage more > Pythoneers

Re: RapydScript : Python to Javascript translator

2013-11-17 Thread Chris Angelico
On Mon, Nov 18, 2013 at 6:16 AM, Salvatore DI DIO wrote: > Hello, > > If someone is interested about a fast Python to Javascript translator (not a > compiler like Brython which is another beast) > > Here is a link of a RapydScript Tester. > For now it's only for windows. > > Regards > > http://s

Re: When to use assert

2013-11-17 Thread Steven D'Aprano
On Sun, 17 Nov 2013 06:50:56 -0600, Tim Chase wrote: > On 2013-11-17 07:35, Steven D'Aprano wrote: >> py> x = 23 >> py> assert x > 0, "x is not zero or negative" > > This is the worst way to use an assertion: with a misleading message > ;-) D'oh! Sorry about that. -- Steven -- https://m

Re: Fire Method by predefined string!

2013-11-17 Thread Steven D'Aprano
On Sun, 17 Nov 2013 17:20:52 -0500, Roy Smith wrote: > In article , > Tamer Higazi wrote: >> I want the param which is a string to be converted, that I can fire >> directly a method. Is it somehow possible in python, instead of writing >> if else statements ???! > > I'm not sure why you'd want

Data structure question

2013-11-17 Thread Joseph L. Casale
I have a need for a script to hold several tuples with three values, two text strings and a lambda. I need to index the tuple based on either of the two strings. Normally a database would be ideal but for a self-contained script that's a bit much. Before I re-invent the wheel, are there any built-

Re: Data structure question

2013-11-17 Thread Tim Chase
On 2013-11-18 02:03, Joseph L. Casale wrote: > I have a need for a script to hold several tuples with three > values, two text strings and a lambda. I need to index the tuple > based on either of the two strings. Normally a database would be > ideal but for a self-contained script that's a bit much

Re: Data structure question

2013-11-17 Thread Chris Angelico
On Mon, Nov 18, 2013 at 1:03 PM, Joseph L. Casale wrote: > I have a need for a script to hold several tuples with three values, two text > strings and a lambda. I need to index the tuple based on either of the two > strings. Normally a database would be ideal but for a self-contained script > that

Re: Data structure question

2013-11-17 Thread Ned Batchelder
On Sunday, November 17, 2013 9:03:38 PM UTC-5, Joseph L. Casale wrote: > I have a need for a script to hold several tuples with three values, two text > strings and a lambda. I need to index the tuple based on either of the two > strings. Normally a database would be ideal but for a self-contained

Re: Fire Method by predefined string!

2013-11-17 Thread Mark Lawrence
On 18/11/2013 01:41, Steven D'Aprano wrote: On Sun, 17 Nov 2013 17:20:52 -0500, Roy Smith wrote: In article , Tamer Higazi wrote: I want the param which is a string to be converted, that I can fire directly a method. Is it somehow possible in python, instead of writing if else statements

Python @ FOSDEM 2014 - Call For Proposals

2013-11-17 Thread Stephane Wirtel
Hi all, This is the official call for sessions for the FOSDEM 2014 [1] Python Devroom. For this edition, Python will be represented by its Community. If you want to discuss with a lot of Python Users, it's the place to be in February ! Like every year, FOSDEM [1] will take place the first week-e

RE: Data structure question

2013-11-17 Thread Joseph L. Casale
> Not entirely sure I understand you, can you post an example? > > If what you mean is that you need to locate the function (lambda) when > you know its corresponding strings, a dict will suit you just fine. > Either maintain two dicts for the two separate strings (eg if they're > "name" and "loca

Re: Data structure question

2013-11-17 Thread Dave Angel
On Mon, 18 Nov 2013 02:03:38 +, "Joseph L. Casale" wrote: I have a need for a script to hold several tuples with three values, two text strings and a lambda. I need to index the tuple based on either of the two strings. Normally a database would be ideal but for a self-contained script

Re: Program Translation - Nov. 14, 2013

2013-11-17 Thread Terry Reedy
On 11/17/2013 5:25 AM, E.D.G. wrote: [snip several paragraphs that have nothing to do with Python] A couple of sentences of follow-up would have been sufficient. 'We decided to go with Fortran and True-Basic and not Python." PERL SPEED COMPARISON Some of the early discussions leading t

RE: Data structure question

2013-11-17 Thread Joseph L. Casale
> How about two dictionaries, each containing the same tuples for > values? If you create a tuple first, then add it to both dicts, you > won't have any space-wasting duplicates. Thanks guys. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Beginner

2013-11-17 Thread ngangsia akumbo
Thank you guys for the replies Cameroon is a third world country, the IT skills of the people here is far from attaining any legitimacy. Many people are doing business here just like in the days of the Roman empire when computers had not been invented. We have many companies needing skills pro

Re: Python Beginner

2013-11-17 Thread Terry Reedy
On 11/17/2013 11:02 PM, ngangsia akumbo wrote: Cameroon is a third world country, the IT skills of the people here is far from attaining any legitimacy. Many people are doing business here just like in the days of the Roman empire when computers had not been invented. We have many companies ne

Re: sendmail library ?!

2013-11-17 Thread Tim Roberts
Tamer Higazi wrote: > >I am looking for a python library that does mailing directly through >"sendmail". > >When I look into the docs, I see only an "smtlip" library but nothing >that could serve with sendmail or postfix. > >Any ideas ?! Remember that import smtplib s = smtplib.SMTP("localh

Re: Program Translation - Nov. 14, 2013

2013-11-17 Thread Charlton Wilbur
> "BB" == Ben Bacarisse writes: BB> There is a slight air in unreality to all this, This is a far more polite way of putting it than I would. It's an earthquake predictor based on pseudoscience and technobabble. BB> Finally, why are you timing Perl arithmetic? A translation into

Re: Oh look, another language (ceylon)

2013-11-17 Thread Gregory Ewing
Rick Johnson wrote: The multiplication operator can ONLY be used on numerics. I'm not convinced about that part. I notice that subtraction, multiplication and division are bundled into a single interface Numeric, but there is a separate one called Summable for addition -- apparently so

Re: Oh look, another language (ceylon)

2013-11-17 Thread Chris Angelico
On Mon, Nov 18, 2013 at 5:45 PM, Gregory Ewing wrote: > Rick Johnson wrote: >> >> The multiplication operator can ONLY be used on >> numerics. > > > I'm not convinced about that part. I notice that > subtraction, multiplication and division are bundled > into a single interface Numeric, bu

<    1   2