Re: python examples

  • From: "Octavian Rasnita" <orasnita@xxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Mon, 8 Dec 2008 10:51:56 +0200

No it is not code obfuscation. It is just a Unix/Linux/Windows command line 
that can do something without needing to write a perl program separately.
And my example was just one that came to my mind, but of course it is not a 
helpful one. This way it could be done search and replacements in more files of 
a certain type, or other things like that.

And these are not possible with python.

Octavian

----- Original Message ----- 
From: "Nick Stockton" <nstockton@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Monday, December 08, 2008 12:20 AM
Subject: Re: python examples


>$ python
> Python 2.5.2 (r252:60911, Nov 14 2008, 19:46:32)
> [GCC 4.3.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import urllib;from BeautifulSoup import BeautifulSoup;data = 
>>>> BeautifulSoup(urllib.urlopen("http://www.google.com";));print 
>>>> data.title.string
> Google
>>>>
> 
> I consider putting multiple statements on one line like that to be bordering 
> on code obfuscation.
> 
> Nick Stockton
> ----- Original Message ----- 
> From: "Octavian Rasnita" <orasnita@xxxxxxxxx>
> To: <programmingblind@xxxxxxxxxxxxx>
> Sent: Sunday, December 07, 2008 3:32 PM
> Subject: Re: python examples
> 
> 
>> The first code that should print an expression on more lines doesn't do 
>> this, but just prints it in a single line escaping the end of line char 
>> with \.
>>
>> And the second code that in perl is done in the command line, here it 
>> needs a full program with more lines.
>> So you were not right when you told that you can write a full program in 
>> the command line, without needing to press enter more than once.
>>
>> Am I right?
>>
>> Octavian
>> 
> __________
> View the list's information and change your settings at 
> //www.freelists.org/list/programmingblind
>
__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind

Other related posts: