Re: [BangPypers] [OT] language fanaticism

2011-07-13 Thread Noufal Ibrahim
Kenneth Gonsalves  writes:


[...]


>> a) Choose Pyramid web-framework because the ORM works well the
>> existing database.
>> 
>> b) Java project with heavy interaction with database.
>> 
>> Which would you likely choose? My bet is a) because it is much easier
>> for a python programmer with django skills to do that than b).
>> Of course, you are free to invent your choices like c) quit and do
>> django elsewhere.
>> 
>> 
>
> I know my limitations - a, if the client agrees or c. But I *have*
> turned away work where my skill set does not fit. (I would not touch
> java with a bargepole - if that is language fanaticism, so be it).

Maybe not code in the language but if something that already does what
your client wants exists in Java, would you stay away from it purely
because you don't like the language? (e.g. Solr for text indexing and
searching)



-- 
~noufal
http://nibrahim.net.in

Procrastination means never having to say you're sorry.
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] [OT] language fanaticism

2011-07-13 Thread Noufal Ibrahim
Kenneth Gonsalves  writes:


[...]

> let us look at all points of view. In an ideal world, one chooses the
> best tool for the job at hand. No quarrel. But the world is not ideal.
> Compromises have to be made (or trade-offs). Given a task one has to
> take into account deadlines, resources/skills available etc etc. Maybe
> for a particular webapp Django is overkill - but do I have the time to
> learn something more suitable (or the ability)?

It's sometimes an option to simply use an app already available
(e.g. Wordpress for blogging) rather than to go out and build a custom
one. If building and deploying (and maintaining) a Django or Flask (or
rails for that matter) blogging app takes 6 hours whereas setting up a
wordpress blog takes 5 minutes, what would you chose?

In the ideal world, all apps would be super awesome and written in our
favourite languages. In the *real* world, good solutions exist in
multiple languages and not using them based just because they're not in
ones favourite language is language fanaticism and it's a bad thing.



-- 
~noufal
http://nibrahim.net.in

I can resist everything except temptation. -Oscar Wilde
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] [OT] language fanaticism

2011-07-11 Thread Noufal Ibrahim
Venkatraman S  writes:

> On Mon, Jul 11, 2011 at 6:43 PM, Noufal Ibrahim  wrote:
>
>>
>> The Ruby Speed Center (which is similar to speed.pypy.org) uses
>> codespeed which is a Python/Django based application[1].
>>
>
> So?

I've just met a lot of people especially in language specific
communities who refuse to use a product just because it's in a different
language than what they tout. 

I wanted to give a counter example to start a "discussion"


>> I think a lot of people get married to a language or a tool and stop
>> seeing the broader ecosystem which is unhealthy. I've also noticed that
>> the more accomplished people are (in any language), they stop being that
>> way (one notable example is Alex MArtelli in the Python community).
>>
>
> Not sure, what did he do?

Look at the stuff he answers questions on (his badges here)
http://stackoverflow.com/users/95810/alex-martelli

This mail is intended to be a warning against getting stuck in a
language rut.


[...]


-- 
~noufal
http://nibrahim.net.in

She used to diet on any kind of food she could lay her hands on. -- Arthur 
Baer, American comic and columnist
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] [OT] language fanaticism

2011-07-11 Thread Noufal Ibrahim

The Ruby Speed Center (which is similar to speed.pypy.org) uses
codespeed which is a Python/Django based application[1].

I think a lot of people get married to a language or a tool and stop
seeing the broader ecosystem which is unhealthy. I've also noticed that
the more accomplished people are (in any language), they stop being that
way (one notable example is Alex MArtelli in the Python community). 



Footnotes: 
[1]  http://speed.rubyspec.org/about/

-- 
~noufal
http://nibrahim.net.in

Everyone writes on the walls except me. -Said to be graffiti seen in Pompeii
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Iterating list of tuples

2011-07-04 Thread Noufal Ibrahim
delegb...@dudupay.com writes:

> Venkatraman,
>
> You sound quite rude and arrogant.

Maybe but these *are* public lists and you'll find all sorts of people
here. 

Venkat's mail was to the point but lacked sugar coating and (in poor
taste) contained an accusation. 

I think you should just let it pass. The list archives are public and if
anyone *does* show interest in the members' behaviour in the future
(which is highly unlikely), they'll have the original emails to make
their own decisions.

[...]


-- 
~noufal
http://nibrahim.net.in

Hegel was right when he said that we learn from history that man can never 
learn anything from history. -George Bernard Shaw
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Iterating list of tuples

2011-07-04 Thread Noufal Ibrahim
Venkatraman S  writes:


[...]

> Right. I wrote this and then didnt send as the OP sounds like a n00b.

n00b (especially with the leet speak) is a tad pejorative. I think you
should not use the word here. 

> Btw, i got a  Q: why doesnt 'any' work in this case? Like...
> for tup in data:
>   if any(tup) > 5:
> print 'greater'
>   else:
> print 'lesser'

[...]

any expects an iterable of items with a truth value (True or
False). It will return True if any of the items are try. 

any(tup) will return True (since all the numbers in his tuple are non
zero and therefore True) so your condition is True > 5 (which ironically
evaluates to False on Python2.x) so it'll just print "lesser". 


-- 
~noufal
http://nibrahim.net.in

I am a deeply superficial person. -Andy Warhol
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Iterating list of tuples

2011-07-03 Thread Noufal Ibrahim
Asif Jamadar  writes:

> Suppose I have list of tuples
>
> data = [
> (10, 25, 18, 17, 10, 12, 26, 5),
> ]
>
> for value in data:
>  if data[value]>5:
> print " greater"
> else:
>print "lesser"


if the list has just one tuple, you need to iterate over it's individual
elements. 

for i in data[0]: # Iterate over elements of the tuple
 if i > 5:
print "greater"
 else:
print "lesser"

`value` in your code does not mean the index, it's the actual element
itself.

[...]


-- 
~noufal
http://nibrahim.net.in

I'm proud of my humility.
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Spell Checker Python

2011-06-30 Thread Noufal Ibrahim
Puneet Aggarwal  writes:

> Hi Gora,
>
> Thanks for the quick reply. Basically I am looking for spell correction in
> the sense if someone does a mistake in spelling.
>
> Let say someone want to search "restaurant" and types the spelling wrong as
> resturant or something. So that we can help him correct it.


Not a library but probably something you should read. 

http://norvig.com/spell-correct.html


[...]


-- 
~noufal
http://nibrahim.net.in

The scene is dull. Tell him to put more life into his dying. -- Samuel Goldwyn
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] svg string to pdf

2011-06-29 Thread Noufal Ibrahim
Venkatraman S  writes:

> On Thu, Jun 30, 2011 at 8:53 AM, Kenneth Gonsalves 
> wrote:
>
>> On Thu, 2011-06-30 at 01:40 +0530, Gora Mohanty wrote:
>> > You must have mistaken me for someone willing to do your homework
>> > for you for free.
>> please watch your tone - this is not ilugd.
>>
>
> Sigh!
>
> Well, if i had asked you to do my homework, i wouldnt have taken the
> hassles of investigating so much before posting. And wouldn't ask you
> pertinent Qs w.r.t what you suggest.  If you namedrop, then
> substantiate it suitably - i.e, suggesting a package should come with
> its own reasons, and you should also be ready to take questions.

[...]

+1. 

A couple of side points. There is a PythonMagick which are bindings to
image magick - http://www.imagemagick.org/download/python/. They look
reasonably uptodate and I'd expect them to perform better than
suprocesses.

-- 
~noufal
http://nibrahim.net.in

As famous as the unknown soldier.
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] bof

2011-06-28 Thread Noufal Ibrahim
Shashidhar P  writes:

> Which Koshys ? Richmond town or where?
> and what is bof?

[...]

http://en.wikipedia.org/wiki/Birds_of_a_Feather_(computing)

-- 
~noufal
http://nibrahim.net.in

This page intentionally left blank.
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] bof

2011-06-28 Thread Noufal Ibrahim
Kenneth Gonsalves  writes:

> hi,
>
> there will be a bof this evening at Koshys, 7 pm onwards.

I'll try to make it. My daughter is not well so I might not be there. 


-- 
~noufal
http://nibrahim.net.in

I never liked you, and I always will. -Samuel Goldwyn
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Invite for today's python sessions

2011-06-24 Thread Noufal Ibrahim
What invite?

On 6/25/11, Sreekanth S Rameshaiah  wrote:
> Hi,
> You said, you will send the invite. Did not get it. If not too late, would
> like to drop in.
> Regards,
> - sree
>
>
>
> --
> Sreekanth S Rameshaiah
> Executive Director
> Mahiti Infotech Pvt. Ltd.
> "OpenSpace", #583,
> Vyalikaval HBCS Layout,
> Nagawara, Veerannapalya,
> Bangalore, India - 560043
> Phone:  +91 80 428-444-44
> Mobile:  +91 98455 12611
> www.mahiti.org
> ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>


-- 
~noufal
http://nibrahim.net.in
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Uninstalling Python 2.6

2011-06-24 Thread Noufal Ibrahim
Baishampayan Ghose  writes:


[...]

> You won't be able to remove python-2.6 because of dependencies, but
> you can install python-2.5 and make it the default by using the
> `update-alternatives` command
> (http://manpages.ubuntu.com/manpages/karmic/man8/update-alternatives.8.html).

[...]

Won't making 2.5 the default mess up quiet a few packages on Ubuntu? 


-- 
~noufal
http://nibrahim.net.in

Gentlemen, I want you to know that I am not always right, but I am never wrong. 
-Samuel Goldwyn
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] [OT] Sponsorships for PyCon India

2011-06-23 Thread Noufal Ibrahim
Sidu Ponnappa  writes:

> Hi Noufal,
>
> Is there a link on the site that shows the sponsor brackets etc. I
> looked and couldn't find it - something like
> http://rubyconf.org/sponsor would be nice.

[...]

Good point. I'll get it up on the website. 

-- 
~noufal
http://nibrahim.net.in

Thank God I'm an atheist.
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] [OT] Sponsorships for PyCon India

2011-06-23 Thread Noufal Ibrahim


Hello everyone,
We're still looking for sponsors for PyCon India 2011. 

The details of the event are on the website
http://in.pycon.org. The summary is that it's in Pune on the 16, 17 and
18 of September of this year.

If you know of any companies who might be interested, please
raise your hand! 

All aspects of the conference are coordinated and conducted by
volunteers and members of the Indian Python community. It relies on all
of us to do our part to get it going. We had a decent run for 2
years. Let's make it happen again and keep it going.

Thanks.

-- 
~noufal
http://nibrahim.net.in

It's more than magnificent-it's mediocre. -Samuel Goldwyn
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] export methods from a python class as RESTful webservice calls

2011-06-23 Thread Noufal Ibrahim
Umar Shah  writes:

> Hello group,
>
> I have used Django, Pylons for different projects before but i want
> something minimal without overheads of MVC frameworks.
>
> say I have something like
>
> class X(object):
>   ...
>
>   def A(p1, p2,...):
>   
>   return {'state':x}
>
>   def B(p1, p2,..):
>   
>   return {'state':y}
>
> I want to expose calls to A and B over HTTP.
>
> Assuming I do not want any more features, I was wondering is what would be
> best/ efficient way to export methods A, B as RESTfull webservice calls.

[...]

You have quite a few options. 
1. Use the plain old SimpleHTTPServer module and write something to
   expose these calls. 
2. Use a microframework like web.py or flask. A complete flask or web.py
   app looks almost like the code you've pasted here. 
3. Use a framework explicitly meant for writing restful services
   (e.g. restish)


-- 
~noufal
http://nibrahim.net.in

Everyone writes on the walls except me. -Said to be graffiti seen in Pompeii
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] python SVN delete functionality

2011-06-22 Thread Noufal Ibrahim
Sriram Narayanan  writes:

> There's also the python API to SVN which let's you d a lot of stuff.

[...]

The last time I checked (and it was a long time ago), it needed physical
access to the repository file system (not just the checkout) to be able
to do anything. That makes it useless for the OPs needs. 

-- 
~noufal
http://nibrahim.net.in

Thank God I'm an atheist.
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] remote ip change

2011-06-22 Thread Noufal Ibrahim
Sriram Narayanan  writes:

> If you _want_ to involve python, then take a look at func. With Func,
> changing the machine IP is just one of the many sysadmin tasks you'll
> be able to perform.

Do you have a URL Sriram? It sounds useful.

[...]


-- 
~noufal
http://nibrahim.net.in

Everyone writes on the walls except me. -Said to be graffiti seen in Pompeii
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] remote ip change

2011-06-22 Thread Noufal Ibrahim
Nitin Kumar  writes:

> Hi All,
>
> I want to change the IP of remote server.  I can do it manually using
> control panel. But i need to do that in a script.  So is there any
> simple API in python which can be used for the same?

You should be able to ssh into the machine and use ifconfig to change
it. I don't know how that will crap your existing connection so it might
be a good idea to simply run it as a shell pipeline. Why involve Python
for this at all?


-- 
~noufal
http://nibrahim.net.in

No one goes to that restaurant anymore-it's always too crowded. (attributed to 
Yogi Berra)
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] looking for python developers

2011-06-17 Thread Noufal Ibrahim
Gopalakrishnan Subramani  writes:

> Prem,
>
> Mentioning [Job] in title is more appropriate.
>
> Is your company name is that secret? I don't think, you get fantastic coder
> program for without knowing company..

My thoughts exactly. A 

"reputed company known for a lot of good products and talented
employees."

surely has a name that it's proud of. 

[...]


-- 
~noufal
http://nibrahim.net.in

"I always avoid prophesying beforehand because it is much better to prophesy 
after the event has already taken place. " - Winston Churchill
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Image comparison using Python

2011-06-13 Thread Noufal Ibrahim
Depends on what you want out of it. You could extract text and just
diff it or you can check sum the files and compare the hashes.

On 6/14/11, Nitin Kumar  wrote:
> HI All,
>
> We are looking for python comparison tool (Don't suggest PIL as it was not
> useful for us).
> please do let me know if you any good one.
>
> we are looking for the tool to compare two pdf files.
>
> --
> Nitin K
> ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>


-- 
~noufal
http://nibrahim.net.in
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Use group meeting

2011-06-13 Thread Noufal Ibrahim
Any +1s at all?

On 6/9/11, Noufal Ibrahim  wrote:
> Sidu Ponnappa  writes:
>
>>>>> I can talk about OuchDB, a project I'm working on to implement CouchDB
>>>>> API on relational databases.
>>>>>
>>>>
>>>> Curious : whats the use case?
>>
>> I would use it just because the name is awesome. :)
>
> [...]
>
> So, do we have any more interest in the talk?
>
> Any other talks which people might be interested in giving?
>
> I did some work myself recently using Lamson[1] which is an MVC
> framework for email based applications. I can give a presentation on
> that if there's interest.
>
> As for time, this weekend is BarCamp. Perhaps the next weekend (18 or 19
> June).
>
>
> Footnotes:
> [1]  http://lamsonproject.org
>
> --
> ~noufal
> http://nibrahim.net.in
>
> Some bird populations soaring down -Headline of an article in Science News,
> page 126, February 20, 1993.
> ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>


-- 
~noufal
http://nibrahim.net.in
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Use group meeting

2011-06-09 Thread Noufal Ibrahim
Sidu Ponnappa  writes:

 I can talk about OuchDB, a project I'm working on to implement CouchDB
 API on relational databases.

>>>
>>> Curious : whats the use case?
>
> I would use it just because the name is awesome. :)

[...]

So, do we have any more interest in the talk? 

Any other talks which people might be interested in giving?

I did some work myself recently using Lamson[1] which is an MVC
framework for email based applications. I can give a presentation on
that if there's interest. 

As for time, this weekend is BarCamp. Perhaps the next weekend (18 or 19
June).


Footnotes: 
[1]  http://lamsonproject.org

-- 
~noufal
http://nibrahim.net.in

Some bird populations soaring down -Headline of an article in Science News, 
page 126, February 20, 1993.
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Use group meeting

2011-06-08 Thread Noufal Ibrahim
Venkatraman S  writes:

> On Wed, Jun 8, 2011 at 12:53 PM, Anand Chitipothu wrote:
>
>> I can talk about OuchDB, a project I'm working on to implement CouchDB
>> API on relational databases.
>>
>
> Curious : whats the use case?

[...]

It's a bit of a long story really. It's mostly based on Anand's
experiences creating another noSQL storage system on top of postgreSQL
and some performance problems with couch itself. 

If there's sufficient interest, it would be a fun talk. All the noSQL
naysayers would be welcome too. :)




-- 
~noufal
http://nibrahim.net.in

All truths are true to an extend, including this one. -XA
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] WSGI app instrumentation - middleware or other

2011-06-08 Thread Noufal Ibrahim
Sriram Narayanan  writes:

> Solaris, opensolaris, openindiana, freebsd, OSX.
>
> Also see crispeditor for dtrace on linux.

[...]

Interesting. 

I think it should be possible (and would be useful) to drop statistics
obtained using dtrace into graphite (along with other things that dtrace
can't do) so that you can a single uniform picture of what's going on.

-- 
~noufal
http://nibrahim.net.in

The first condition of immortality is death. -Stanislaw Lec
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] WSGI app instrumentation - middleware or other

2011-06-08 Thread Noufal Ibrahim
Sriram Narayanan  writes:

> I recommend using DTrace.
>
> There was a video hosted on YouTube last night on using DTrace to
> understand MySQL performance. I have retweeted about it (@sriramnrn)
> today morning.
>
> If you use DTrace, you can understand latencies at various sections of
> the system.

Isn't that Solaris only?

[...]


-- 
~noufal
http://nibrahim.net.in

Goes (Went) over like a lead balloon.
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] Use group meeting

2011-06-07 Thread Noufal Ibrahim

Anyone working on anything interesting that they'd like to share in a
user group meeting? The Bangalore Python scene seems to be stagnating a
little.


-- 
~noufal
http://nibrahim.net.in

Run down, my dear fellow, and open the door, for all virtuous folk have been 
long in bed.
 -- Sherlock Holmes
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] The myth of free software

2011-05-16 Thread Noufal Ibrahim
You're confusing open source, free software and free of cost software.
Also, your approach and choice of words is not one that kindles a
healthy debate. I don't expect this thread to lead anywhere useful.

-- 
~noufal
http://nibrahim.net.in
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] [commercial] python/django training

2011-05-16 Thread Noufal Ibrahim
vikas ruhil  writes:

>> @srinivasaenergy nice ,( city venue )? sure we team -up to train as
> open-source > it sounds good !

[...]

Open source is not necessarily free of cost. 


-- 
Behind every great man, there is a woman -- urging him on.
-- Harry Mudd, "I, Mudd", stardate 4513.3
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] PyCon India CFP now open

2011-05-10 Thread Noufal Ibrahim

The call for proposals for PyCon India 2011 is open now. Please consider
submitting a proposal and spreading the word. 


Ramakrishna Reddy  writes:

> ===
> Pycon India 2011 :: 16 - 18 September, Pune, India.
> ===
>
> The third edition of PyCon India is being held in Pune,India from 16th
> September 2011 to 18th September 2011. The organisers of PyCon India
> 2011 are looking for talk and tutorial proposals to fill the formal
> presentation and tutorial tracks. We accept proposals on a very broad
> range of topics related to Python programming.
>
> Important Dates
> 
> Call for proposals opens: May 10, 2011
> Proposal submission deadline: June 30, 2011
> Proposal acceptance: July 18, 2011
> First presentation upload: Aug 15, 2011
> Final presentation upload (with changes if any): Aug 31, 2011
>
>
> Permission to record/release presentations
> --
> In PyCon India, we intend to record all presentations live and release
> the recordings for free on the Internet so as to benefit the wider
> Python community. When you are submitting a proposal, you
> automatically give the Indian Python Software Society, the organizers
> of PyCon India, the permissions to record/edit and release the
> audio/video of your presentation.No exceptions will be made in this
> regard. If you do not want a recording of your presentation to be
> made, don't submit a proposal. The released media will be licensed
> under the Creative Commons Attribution License, version 3.0.
>
> Topics for PyCon India
> --
> We encourage high quality proposals in all the areas involving Python
> : the language, its implementation, uses, and the community behind it.
> Each proposal will be judged according to its correctness, clarity,
> and elegance. We invite everyone interested in Python to participate.
>
>Core Python (including Python 3.x)
>
>Python standard library
>
>Other Python libraries and extensions
>
>Other Python implementations (such as PyPy, IronPython etc)
>
>Concurrency
>
>Databases
>
>Data Analysis/ Engineering in Python
>
>Scientific Programming
>
>Network programming
>
>Game programming
>
>Education and Training
>
>Embedding/extending
>
>GUI programming
>
>Packaging Python Code
>
>System administration
>
>Business applications
>
>Documentation
>
>Software development tools
>
>Testing
>
>Web programming
>
>Mobile computing
>
>Open source Python projects
>
> Talk Format
> ---
> The typical length of a talk should be no more than 45 minutes. The
> presentation style should be concise, to the point with sufficient
> examples to clarify the discussion to the audience, if needed. After
> every talk there will be time reserved for questions from the audience
> (10 minutes). We will be providing a buffer of 5-10 minutes between
> talks so that the presenters get sufficient time to set-up their talk
> and attendees can move between the halls.
>
>
> Tutorial Format
> ---
> The typical length of the tutorial should be no more than 3 hours. All
> the classes run in PyCon India are volunteered. If you like to propose
> a tutorial, The submission of the tutorials also follow the same time
> lines as the talks.
>
> Proposal submission
> ---
> Talk and tutorial proposals should be submitted to
> http://in.pycon.org/2011/talks/submit

-- 
Captain's Log, star date 21:34.5...
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Web Application Development

2011-05-05 Thread Noufal Ibrahim
Senthil Kumaran  writes:

> On Thu, May 05, 2011 at 06:06:40PM +0530, Kenneth Gonsalves wrote:
>> I do not think you would use it today - with a modern apache.
>
> I should have been more specific. It was 2010 when we were using
> mod_python and still (in 2011) my colleagues who should be maintaining
> the project would be using mod_python.

I remember you talking about this. If I remember correctly, you just
picked it up because it was available and simple to use. 

[...]


> Ofcourse, for quick web projects, I would really not mind using
> mod_python.

I wouldn't mind using CGI or PHP for quick and dirty work. I would
however dissuade people from using it for new projects given its
deprecated status.
[...]


-- 
"Life and death are seldom logical."
"But attaining a desired goal always is."
-- McCoy and Spock, "The Galileo Seven", stardate 2821.7
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Web Application Development

2011-05-05 Thread Noufal Ibrahim
OOMMEN KM  writes:

> Hi All,
>
> I would like to know which technology should I use for developing a
> web based application.  The application will have to handle a huge
> amount of data and we are using MySQL.  Will mod_python a good option
> for the development of this application? Or I need to choose some
> frame works?
[...]

One of the areas in the Python world where "There should be one-- and
preferably only one --obvious way to do it." is violated horribly is web
frameworks. There are tons of them out there each with their own
advantages and disadvantages. Partisans will probably direct you towards
the one they like the best and use but at the end of the day, you're
going to have to evaluate a bunch of them and decide. Here are some
notes on my experiences. 

Django - Very widely used and with a large community and 3rd party
plugins. Easy to get something done since many "standard" things already
have plugins written for them. The Pinax framework (as far as I know) is
Django + a lot of useful apps (in the Django sense) bundled together to
make life easy. The downsides is that it suffers from the NIH
syndrome[1] and you have to buy into it's own way of doing things if you
want to use it. 

Flask - Young and lightweight. Flexible with components (you can mix and
match parts). Very well documented, good community.

There's a bunch of offshoots of Zope (which was one of the earliest
successfuly Python projects) like Grok, web2py etc. Haven't used any of
them. 

I don't know anything about Pyramid and Pylons.

You should use a framework rather than code up everything yourself since
they take care of a lot of "standard" things for you (e.g user
authentication etc.). After you're done with your app, you need to
deploy it and that's where things like mod_wsgi[2], gunicorn etc. come
into the picture. You need to pick one of these and put your app in the
wild.

I'm sorry if you're looking for a clear single answer. There isn't one
and you've got your work cut out for you if you're going to do web
development. 


Footnotes: 
[1]  http://en.wikipedia.org/wiki/Not_Invented_Here
[2]  mod_python was declared dead by Graham Dumpleton (the author) and
 he recommended that people start using mod_wsgi instead. 

-- 
Bones: "The man's DEAD, Jim!"
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] editor for restructured text

2011-05-02 Thread Noufal Ibrahim
Gopalakrishnan Subramani  writes:


[...]

> Typical Emacs(VI?) users are married to Emacs(VI?), so either they fit
> into emacs way(user mindset) or they make emacs to fit into their
> way(customize).

[...]

I have a pimped out Emacs config for editing Python code which I plan to
do a presentation on this year in Pune. 


-- 
I'm sure that that could be indented more readably, but I'm scared of
the awk parser.
-- Larry Wall in <6...@jpl-devvax.jpl.nasa.gov>
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] editor for restructured text

2011-04-29 Thread Noufal Ibrahim
On Fri, Apr 29 2011, Kenneth Gonsalves wrote:

> On Thu, 2011-04-28 at 14:58 +0530, Noufal Ibrahim wrote:
>> > yum install emacs
>> 
>> On Ubuntu, the Emacs mode comes along with the python-docutils
>> package. I don't know how it is for Fedora. 
>
> in fedora the ReSt thingie is there by default

Opening files with a .rst prefix should enable to mode automatically.


-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] editor for restructured text

2011-04-28 Thread Noufal Ibrahim
On Thu, Apr 28 2011, Kenneth Gonsalves wrote:

> On Thu, 2011-04-28 at 13:34 +0530, Noufal Ibrahim wrote:
>> > I have tried to learn emacs several times - each time ending in
>> > failure and frustration
>> 
>> Fair enough. The ReST mode for Emacs' is really excellent though
>> especially for large amounts of editing. 
>
> yum install emacs

On Ubuntu, the Emacs mode comes along with the python-docutils
package. I don't know how it is for Fedora.

http://docutils.sourceforge.net/docs/user/emacs.html has details on all
it's capabilities.


-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] editor for restructured text

2011-04-28 Thread Noufal Ibrahim
On Thu, Apr 28 2011, Kenneth Gonsalves wrote:


[...]

> I have tried to learn emacs several times - each time ending in
> failure and frustration

Fair enough. The ReST mode for Emacs' is really excellent though
especially for large amounts of editing.

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] editor for restructured text

2011-04-28 Thread Noufal Ibrahim
On Thu, Apr 28 2011, Kenneth Gonsalves wrote:

> hi,
>
> I have a lot of writing to do in restructured text. Any suggestions for
> an editor (on linux) to make life easier? (please do not suggest vim or
> emacs)

Why not Emacs? The mode for ReST is written by David Goodger as far as I
know who wrote docutils itself. It does an excellent job and is quite
feature rich. For large amounts of text, it's really quite excellent. 

Contrary to popular opinion, you *can* use Emacs as just a text editor
without buying into it's whole lispy philsophy.

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] New bug

2011-04-27 Thread Noufal Ibrahim
On Thu, Apr 28 2011, Senthil Kumaran wrote:

> On Wed, Apr 27, 2011 at 10:05:33AM -0500, kaushik kalyanaraman wrote:
>> On Wed, Apr 27, 2011 at 5:28 AM, Senthil Kumaran  wrote:
>> 
>> > The second line is bit confusing, because the way to check for nan is
>> > usually via math.isnan.  The report says that identity comparison is
>> > not done in containers that may be the bug.
>> I believe that the second-line behavior is the bug since the first one
>> is correct from a math point of view.
>
> Actually no, the original python-dev discussion is more enlightening.
> This got rejected as not a bug, because of it is theoretical only
> value.

Yes. It's very enlightening. Especially Raymond's posts. 

> Yeah, you can play around and find subtleties nan,inf and -0, but
> there are set of methods which are defined for proper operation of
> those.

While true, I don't like surprises. I don't expect to come across corner
cases like these in my day to day life but when I do, I don't want to
have to look up the manual for some subtlety that explains this counter
intuitive behaviour.



-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] New bug

2011-04-27 Thread Noufal Ibrahim

Just came across it on Python dev.

>>> nan = float("nan")
>>> nan == nan
False
>>> [nan] == [nan]
True

Nice eh?

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] How to combine a Reminder-bot to a Single-server IRCbot

2011-04-27 Thread Noufal Ibrahim
On Wed, Apr 27 2011, vikas ruhil wrote:

>> HERE is a bot that uses the SingleServerIRCBot class from  ircbot.py
>> The bot enters a channel and listens for commands in private messages or
> channel traffic.

[...]

Please trim your email, format it properly and start new threads for
asking questions. I couldn't read any of what you sent. 

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] User group meeting

2011-04-21 Thread Noufal Ibrahim
On Fri, Apr 22 2011, Diptanu Choudhury wrote:

> So are we meeting today?
>
> Let me propose a time and place and let's do a show of hands
>
> 4PM at ThoughtWorks office in Diamond District(2nd Floor) ?

[...]

+1

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Django + NoSQL

2011-04-20 Thread Noufal Ibrahim
On Wed, Apr 20 2011, Anush Shetty wrote:

> Hi All,
>
> What is the most preferred NoSQL engine with Django here. Would like
> to hear out some experiences.

[...]

You could just let Django use it's own ORM and relational backend and
then use any of the popular bindings to one of the non relational
systems and use that in your app. You won't have tight coupling with
Djano and all that but that's an advantage (atleast in my opinion).

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] User group meeting

2011-04-20 Thread Noufal Ibrahim
On Wed, Apr 20 2011, Diptanu Choudhury wrote:

> Noufal,
>
> I guess the situation(people going to their native places) won't change even
> on Saturday.
>
> And do we have anything else in the agenda, other than me talking about
> Mangrove?

[...]

Not that I'm aware of. Mangrove it is. 

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] User group meeting

2011-04-19 Thread Noufal Ibrahim
On Wed, Apr 20 2011, Diptanu Choudhury wrote:

> Hello folks,
>
> Given that Friday is a holiday, can we have our user group meeting sometime
> on Friday?

[...]

Works for me but I expect that a lot of the people will have gone back
to their native places for the long weekend. 

How many people can make it? 

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] How not to interview a Pythonista

2011-04-17 Thread Noufal Ibrahim

A nice article by Danny Greenfeld on interview blunders made by people
looking for Python programmers. Given the number of companies here
looking for people, this seemed relevant. 

http://pydanny.blogspot.com/2011/04/how-not-to-interview-pythonistas.html

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] mac IP

2011-04-16 Thread Noufal Ibrahim
On Sun, Apr 17 2011, Sriram Narayanan wrote:

> If it's machine setup, then please use either puppet or chef or func.
> You'll get a lot by way of features.

[...]

Do you have a recommendation from those 3? 

We wrote a custom scritp to set up machines and it's working quite well
but I'm eager to use as few home brewn tools as possible.

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] mac IP

2011-04-14 Thread Noufal Ibrahim
On Fri, Apr 15 2011, Nitin Kumar wrote:

> Hi Noufal,
>
> I am not in a condition to use any third party, I need any way to fetch ip
> using normal python command. Should i use Popen with ipconfig?

[...]

Last option. That would work. :)

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] mac IP

2011-04-14 Thread Noufal Ibrahim
On Fri, Apr 15 2011, Nitin Kumar wrote:

> the reason for the same is:
>
> We got to machine setup, one is US and one in India, according to
> machine location we need to use local server.  So I was looking for IP
> which help me differentiate the position of client Machine to use that
> to chose server.

[...]

If it's inside a corporate network, they often have some kind of file
that contains information on it's location and other details like that
which you can use to make a signature. I'd do that instead of relying on
IP.



-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] mac IP

2011-04-14 Thread Noufal Ibrahim
On Thu, Apr 14 2011, Ruchir Shukla wrote:

> here is a sample code
>
>
 import fcntl, socket, struct

 def getHwAddr(ifname):
> ... s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
> ... info = fcntl.ioctl(s.fileno(), 0x8927,  struct.pack('256s',
> ifname[:15]))
> ... return ''.join(['%02x:' % ord(char) for char in info[18:24]])[:-1]
> ...
 print getHwAddr('eth0')

[...]

The IOCTL request code is probably platform specific. Does it work on
MacOS?

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] mac IP

2011-04-14 Thread Noufal Ibrahim
On Thu, Apr 14 2011, Nitin Kumar wrote:

> Hi All,
>
> Is anyone aware how to fetch mac machine IP using python?

This module http://pypi.python.org/pypi/pynetinfo/0.1.9
seems to be able to to do it. 


-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Broken pipe error

2011-04-14 Thread Noufal Ibrahim
On Thu, Apr 14 2011, Kenneth Gonsalves wrote:

> On Thu, 2011-04-14 at 15:21 +0530, Amit Sethi wrote:
>> File "/usr/lib/python2.6/socket.py", line 286, in flush
>> self._sock.sendall(buffer)
>> error: [Errno 32] Broken pipe 
>
> strange - I have been using it for over 5 years and have never got this
> error

It occurs quite often with the dev server especially if you use
debuggers and tools on the client side.

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] returning value from a class

2011-04-06 Thread Noufal Ibrahim
On Wed, Apr 06 2011, Sidu Ponnappa wrote:

>> Why do you want to create a class that doesn't create itself when called?
> It's interesting this came up today - we were just arguing about this
> at work on Monday. Some of my colleagues are of the opinion that this
> is a Bad Thing and should never be done. I agree that while it's a bad
> thing, there are rare occasions where it's still the most elegant
> solution. After all, the allocator is just a factory - I don't see why
> it should be treated as something special. As long as you have some
> rules (like the rules for overriding the default equality method in
> any OO language) you should be fine.

Yup. It is a factory and seeing it that way makes things
clearer. However, it's one of those things that comes after messing with
stuff for a while rather than something taught.


> FWIW, these are my two rules:
> * Don't do it unless there's no other sensible option. Like, absolutely
> nothing else exists that is more elegant.

I'm not "against" it. Overriding the __new__ method in python (i.e. the
allocator) is often done while metaclassing to create speciallised
objects. e.g. with custom accessors and stuff like that. 

However, like you said, it's a rule to be broken only when you know what
you're doing. 

> * Ensure that you're returning a sub-class of the class where you're
> implementing a custom allocator. No returning a different type, and
> definitely no returning a nil.

This makes sense. Liskov's principle would be honoured and things would
be more predictable.

> Here's one occasion where I had call to do this. See
>
> https://github.com/kaiwren/wrest/blob/master/spec/wrest/native/response_spec.rb#L41
>
> for the spec and
>
> https://github.com/kaiwren/wrest/blob/master/lib/wrest/native/response.rb#L43
>
> for the code. It's in Ruby, though.

So you'll actually build a redirection instead of just a response for
the 3xx status codes? 

I don't know Wrest and the rest of the code well enough to have an
opinion on being right or wrong but it does illustrate your point
though. 

[...]



-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] returning value from a class

2011-04-06 Thread Noufal Ibrahim
On Wed, Apr 06 2011, Nitin Kumar wrote:

> Thanks a lot Noufal,
>
> I was just missing overloading object (i got remind of this after checking
> your mail only) class in mine.
> Thanks for the info in such detail.
[...]


So, what are you trying to do?
-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] returning value from a class

2011-04-06 Thread Noufal Ibrahim

You're opening up can of worms here but I'll try to sort it out since
I'm feeling messed up anyway. 

First : Old style and new style classes
---
"class X:" in Python 2.x creates an old style class[1]

These classes were distinct from builtin "type"s. All such classes were
of type "classobj" and instances would be of type "instance". 

"class X(object):" in Python 2.x creates a new style class[1]

for which the class is of type 'type' which is ultimately the root of
for all the builtin types as well. Instances would have the class as
their type. So if you do

   x = X()

and then ask for the type of X, you'd get "class X" for new style and
"instance" for old style. 

With Python 3, the old style class was dropped and no longer
supported. A plain class declaration would create a new style class. 

In your example, the 2.x variant is using an old style class and the 3.x
one a new style class. Replacing your 2.x definition with 

   class x(object):

will create a new style class that will work in the same way as with
Python 3.

Second : The __new__ and __init__ methods
-

The __new__ method is an allocator. It "creates" the object. The
__init__ method is an "initialiser" and might not always be called
(e.g. while depickling). It will initialise the object created. 

Python semantics[2] state that if your __new__ method returns an object
of a type different from the class it's allocating, the __init__ method
will not be called. That's what's happening in your situation. 

Now, why is this not happening for old style classes? Well, I need to
dig into the source to confirm this but one of the things that was added
when they moved to new style classes (after 2.1 I think) is hooks that
allow overriding of the allocation process. This made metaclasses and
all that possible. This is not the case with old style classes where the
allocator was not even exposed. 


>>> class F:
...   def __new__(cls):
... print "Hello"
... return 5
... 
>>> F()
<__main__.F instance at 0x7fa759a4e908>
>>> 


will not even print the "Hello" since there was no __new__. 

Thirdly : What are you trying to do? 


Why do you want to create a class that doesn't create itself when
called? I'm not chastising you but most situations where this kind of
thing is done are interesting and I'm curious to know more. 


On Wed, Apr 06 2011, Nitin Kumar wrote:

> Hi All,
>
> I am looking for a return value when an object is created.
> but can see different behavior in different python version.
>
> Python 3 gives
 class x:
> def __new__(self):
> return 5
>
 x()
> 5
>
>
> Python 2.6.5 gives
 class x:
> def __new__(self):
> return 5
>
 x()
> <__main__.x instance at 0x017CFD00>
>
> I need to use 2.6 only, so how to achieve the same functionality as in
> python 3.


Footnotes: 
[1]  http://docs.python.org/release/2.5.2/ref/node33.html

[2]  http://docs.python.org/reference/datamodel.html#object.__new__

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] User group meeting

2011-04-04 Thread Noufal Ibrahim
On Mon, Apr 04 2011, Diptanu Choudhury wrote:

> Hey Noufal,
>
> I will be in Bangalore only on the 23rd/24th weekend.

[...]

Unless we have a serious talk offer before that, I think we can schedule
the meetup for that weekend.
-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] User group meeting

2011-04-04 Thread Noufal Ibrahim
On Mon, Apr 04 2011, Diptanu Choudhury wrote:

[...]

> And Python was our first choice because people who has worked in this domain
> has the opinion that it is easier for average programmers to learn Python
> than Ruby. And ultimately Mangrove has to be supported by tech people
> running the operations in the field.

[...]

This sounds interesting. When *will* you be available to talk about it?
-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] User group meeting

2011-04-04 Thread Noufal Ibrahim
On Mon, Apr 04 2011, Santosh Rajan wrote:

> Looks like a solution looking for a problem, rather than a problem looking
> for a solution.

[...]

That's a premature evaluation.

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] User group meeting

2011-04-03 Thread Noufal Ibrahim
On Sun, Apr 03 2011, Diptanu Choudhury wrote:

> I could have talked about a new open source project that we just
> kickstarted, Open Mangrove. But, unfortunately I will be out of town.
>
> The project homepage is here: http://mangroveorg.github.com/

[...]

What by the way is mangrove? It's a bit of a fail for the docs and
website if I can't figure that out in 5 minutes. :)
-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] User group meeting

2011-04-03 Thread Noufal Ibrahim
On Sun, Apr 03 2011, Diptanu Choudhury wrote:

> I could have talked about a new open source project that we just
> kickstarted, Open Mangrove. But, unfortunately I will be out of town.
>
> The project homepage is here: http://mangroveorg.github.com/

[...]

When will you be back?
-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] User group meeting

2011-04-01 Thread Noufal Ibrahim

Shouldn't we have one of these? It's been too long. Anyone here have a
fun project they want to talk about?

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Nice "feature"

2011-04-01 Thread Noufal Ibrahim
On Fri, Apr 01 2011, Ruchir Shukla wrote:

> Hello,
>
> This is just because you are changing the value of b and in foo there is a
> reference of b.
>
> while in
 foo = (1,[2,3,4])
 foo[1] += [6]
> Traceback (most recent call last):
>  File "", line 1, in 
> TypeError: 'tuple' object does not support item assignment
 foo
> (1, [2, 3, 4, 6])

> it is changing the value in List but after that python has realized that the
> error .

I like your use of "realized". Sort of like "Oops. I'm sorry I shouldn't
have done that but I've half messed things up already". :)

I can explain this behaviour just fine. Two operations etc.

BG's thing about append can be explained I think with a disassemble. 

>>> def foo():
...   x = []
...   x += [1]
... 

>>> def bar():
...   x = []
...   x.append(1)
... 


>>> dis.dis(foo)
  2   0 BUILD_LIST   0
  3 STORE_FAST   0 (x)

  3   6 LOAD_FAST0 (x)
  9 LOAD_CONST   1 (1)
 12 BUILD_LIST   1
 15 INPLACE_ADD 
 16 STORE_FAST   0 (x)
 19 LOAD_CONST   0 (None)
 22 RETURN_VALUE
>>> dis.dis(bar)
  2   0 BUILD_LIST   0
  3 STORE_FAST   0 (x)

  3   6 LOAD_FAST0 (x)
  9 LOAD_ATTR0 (append)
 12 LOAD_CONST   1 (1)
 15 CALL_FUNCTION1
 18 POP_TOP 
 19 LOAD_CONST   0 (None)
 22 RETURN_VALUE

With `foo`, I think either STORE_FAST will alter an
element of the tuple so it will die but by the time INPLACE_ADD has
already taken place so the list has been modified. 

Would anyone here characterise this as a bug? 



[...]


-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Nice "feature"

2011-04-01 Thread Noufal Ibrahim
On Fri, Apr 01 2011, Roshan Mathews wrote:

> On Fri, Apr 1, 2011 at 18:44, Hussain Bohra  wrote:
>> Atleast on changing list, you gets an exception.
>>
>> On updating dictionary living inside tuple wont throw an exception as well.
>>
> I thought the surprising part was that it threw an exception, not that
> it updated the list.  Even more surprising was that it threw the
> exception and updated the list too.

[...]

Exactly. I don't expect things to change after a single operation if it
raises an exception. Leaky abstractions?
-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Nice "feature"

2011-04-01 Thread Noufal Ibrahim
On Fri, Apr 01 2011, Navin Kabra wrote:

> With Python 2.6.5 (on ubuntu) I get even more bizarre behavior:
 foo=(1,[2,3,4])
 foo[1]+=6

Use [6] rather than 6. 

> Traceback (most recent call last):
>   File "", line 1, in 
> TypeError: 'int' object is not iterable
 foo
> (1, [8, 9, 10])

[...]


-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Nice "feature"

2011-04-01 Thread Noufal Ibrahim
On Fri, Apr 01 2011, Baishampayan Ghose wrote:


[...]

 foo = (1, [2, 3, 4])
 foo[1].append(5)
 foo
> (1, [2, 3, 4, 5])
 foo[1].append(6)
 foo
> (1, [2, 3, 4, 5, 6])

This is an inplace modification. Does the other one "change" the list in
some sense that the tuple gets annoyed?

[...]



-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] Nice "feature"

2011-04-01 Thread Noufal Ibrahim

Came across this at PyCon. Comments?

>>> foo = (1,[2,3,4])
>>> foo[1] += [6]
Traceback (most recent call last):
  File "", line 1, in 
TypeError: 'tuple' object does not support item assignment
>>> foo
(1, [2, 3, 4, 6])
>>> 

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Fwd: Help with Python IDE's

2011-03-28 Thread Noufal Ibrahim
On Mon, Mar 28 2011, Anand Balachandran Pillai wrote:

[...]

> -- Forwarded message --
> From: Cherian Thomas 

[...]

> Can you suggest me an IDE for Django development? I looking to build
> an app at Zynga in extremely fast iterations.  I am not very
> conversant with Python, though i have programmed proabably 8-10 times.

[...]

If you're doing this for a commercial organisation, you should get them
to buy a license for whatever IDE you're comfortable with
using. Switching IDEs when you switch languages seems (atleast to me) to
be a non productive way to go since there are a new batch of idioms to
learn [1].

I use Emacs and nxhtml mode with mumamo to edit my templates when I do
any Django work and that works fine for me. Apart from the templates,
Django is (mostly) just Python so the stock Python mode works fine for
me along with pylint and a wrapper to do on the fly semantic checking.

JetBrains (creators of the famous Java IDE IntelliJ which a lot of good
people I knwo swear by) created PyCharm[2] that specifically boasts of
good Django integration. I met the devs and they seem like bright
people. 


Footnotes: 
[1]  Given that I use Emacs for everything except browsing and games,
 you should take this with a few bags of salt. 
[2]  http://www.jetbrains.com/pycharm/

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Fwd: Help with Python IDE's

2011-03-28 Thread Noufal Ibrahim
On Mon, Mar 28 2011, Noufal Ibrahim wrote:


[...]

> JetBrains (creators of the famous Java IDE IntelliJ which a lot of
> good people I knwo swear by) created PyCharm[2] that specifically
> boasts of good Django integration. I met the devs and they seem like
> bright people.

Another interesting proprietary product is the Python integration plugin
for Microsoft Visual Studio. I saw a demo of it and was quite impressed
especially with its introspection and code completion capabilities. It's
Open Source (although the IDE itself is not). It doesn't however have
any Django specific functionality. And also, it's Windows
only. http://pytools.codeplex.com/

This SO thread discusses a bunch of other options that you might find
useful.
http://stackoverflow.com/questions/537689/python-ide-built-into-visual-studio-2008

My personal recommendation? Choose a single, cross platform, open source
editor that you can script and customise (vim, emacs, eclipse etc.) and
learn it well. Use it for all your work. The comfort you get with being
a master at your work environment will more than compensate for all the
bells and whistles you get with language specific IDEs.

-- 
~noufal
http://nibrahim.net.in
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] How to handle files efficiently in python

2011-03-22 Thread Noufal Ibrahim
On Tue, Mar 22 2011, briji...@gmail.com wrote:

> Hi All,
> How can I print last five lines of a file using python. The file may
> contain thousands of lines each line may differ in length.

[...]

You'd have to use some kind of heuristic (a.k.a. dirty hack). Stat the
file to find it's size and use an "average" length of line to go a few
lines back. Then count the number of newlines from there to the end. If
it's 4, then you have your 5 lines. Otherwise, seek back a little more
and repeat. 

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] issues using constructor in unittest

2011-03-14 Thread Noufal Ibrahim
On Mon, Mar 14 2011, Senthil Kumaran wrote:


[...]

>> This whole XUnit style unit testing thing is not really necessary in
>> the Python world. 
>
> Why? It is very much part of python world. It is part of the stdlib,
> because it is so easy to use.

There are lots of libraries in the standard library that are not really
pythonic and which are mirrors of a corresponding C library.

> There are easier frameworks like py.test which do a lot of
> metaprogramming magic and make the testing fun, but that does not
> count of removing xUnit style test, which can imbibe in you pattern to
> think about tests.

It's probably just my personal preference but I'd like a few functions
like.

def test_foo():
x = do_foo()
assert x == "some true value"

in a file which I could just run rather than subclassing and doing all
that which Xunit demands. Python is about less boilerplate and more
simplicity isn't it? 

unittest2 is getting better but I think Xunit is a more a child of
Smalltalk and Java than Python. 

Options are always a good thing though and YMMV. 


-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] issues using constructor in unittest

2011-03-14 Thread Noufal Ibrahim
On Mon, Mar 14 2011, Nitin Kumar wrote:

[...]

> I used this way as explained by you, still getting the same error.

[...]

Why don't you consider using an alternate test runner like nose or
py.test? This whole XUnit style unit testing thing is not really
necessary in the Python world. You just need functions that pass or fail
(using assert) and some simple setup/teardown routines.
-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] unittest failing

2011-03-08 Thread Noufal Ibrahim
On Tue, Mar 08 2011, Kenneth Gonsalves wrote:

> hi,
>
> I am trying to figure out unittests on exceptions. I have a test which
> should pass - but it is failing. The simplest possible code is here:
>
> #!/usr/bin/env python
> import unittest
> def testfunc():
> if 1:
> raise TypeError

You should raise raise an instance of TypeError. Not the class itself. 

> 
> class Testfunc(unittest.TestCase):
> def testit(self):
> self.assertRaises(TypeError,testfunc())

You should say 

self.assertRaises(TypeError, testfunc) 

i.e. without the (). assertRaises will do the invocation.




> if __name__ == '__main__':
> unittest.main()

I'd recommend that you use a harness like py.test (which I highly
recommend) or nose to run your tests rather than do it raw like this. 

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Python Script to communicate to Application Servers

2011-03-03 Thread Noufal Ibrahim
On Thu, Mar 03 2011, Python User wrote:

> Hi All,
>
> I am new user to python, I am interested in knowing how to use python script
> to communicate with Application server. All I need is Establish connection
> with an Application server, Send a Request XML and get the Response XML.

Probably the urllib, urllib2, elementree modules if you want to go raw
or xmlrpclib if you want to use XML-RPC. All of these are in the
standard library.

> Please suggest me what are the python services which I need to use for
> performing the above task. It would be great if you could also provide
> me some help links or documentation links where I can get more
> information on the same.

http://docs.python.org/ but these were just a google away. 


[...]



-- 
~noufal
http://nibrahim.net.in
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] [OT] NoSQL Bangalore Meetup

2011-02-26 Thread Noufal Ibrahim
On Sat, Feb 26 2011, Venkatraman S wrote:

> On Sat, Feb 26, 2011 at 9:55 AM, Anand Chitipothu wrote:
>
>>
>> NoSQL Bangalore meetup is happening this sunday.
>>
>> Venue: C42 - http://maps.google.co.in/maps?q=C42
>> Time: Sunday, Feb 27 - 15:00
>>
>> Sorry for OT post. Posting it here as I've noticed lot of interest in
>> nosql here.
>>
>
>
> It would be great if such meetups are posted well in advance, so that people
> could plan well.
[...]


There is a nosql bangalore mailing list (which I announced after the
last BangPypers meetup and which resulted in a rather tedious thread
over there). This meeting was decided after around 2 weeks of
deliberation on that list. You should join it if you're one of the cool
kids. 

-- 
~noufal
http://nibrahim.net.in
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Python GUI Tkinter Button arrangement

2011-02-17 Thread Noufal Ibrahim
On Thu, Feb 17 2011, Ganesh Kumar wrote:

> Hi.,
>
> I have changed my code but now also not working..
>
> This my updated code
>
> http://pastebin.com/22BgyQsD

[...]

I haven't looked through your code.

The order of packing is important and you should read through
http://effbot.org/tkinterbook/pack.htm

before you try. 
-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] [Announcement] Delhi/NCR Python Users Group India - Started

2011-02-14 Thread Noufal Ibrahim
On Tue, Feb 15 2011, Arulalan T wrote:

> Dear All,
>              I am happy to announce that a new  Python usergroup is
> created for  Nation Capital Region consisting  of * NCT Delhi *
> Haryana * Rajasthan *Uttar Pradesh .
>
> Do join us on the mailing list for " NCR Python Users Group India ".
>
> Mailing List : http://mail.python.org/mailman/listinfo/ncr-python.in
>
> Wiki Page : http://wiki.python.org/moin/Ncr-Python.in
>
> This mailing list is for all those who want to know about  "What is
> Python?", "How to learn it?" as a beginner etc..
>
> If you are a  Python Geek, then please join with us and share your
> Python coding stuff. So that all of us can improve our Python
> knowledge.

[...]

Cool! All the best with the list. Python is growing in India. :)
-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] NoSQL

2011-02-13 Thread Noufal Ibrahim
On Sun, Feb 13 2011, Anand Balachandran Pillai wrote:


[...]

> Hmmm, "better" in what sense ? By "better" if you mean the
> programmer's or maintainer's work is reduced from designing schema,
> writing SQL to store/retrieve data, basically all the RDBMS stuff vs
> designing a rather flat key/value store using a Document store
> (nosql), I am not convinced.

Better meaning that it models the domain properly. I have documents that
I want to store with versioning and couch (haven't used Mongo) does
exactly that.

> Does it really matter in a small-size wiki project whether you are
> using SQLite to store your data, vs a mongodb that just runs on your
> machine ?

Perhaps not but you'd have to select one anyway. 

> I would rather go for the sqlite solution since,
>
> 1. It is the most simplistic RDBMs one can think of.
> 2. You get the power of SQL, thereby chance of writing
>  adhoc queries in the future.

I'd consider using Couch simply because I don't have to write a *real*
application. Just a few views to present the pages and that's it. I
don't need to bother with a relational database, a schema, an ORM, a
separate web application and what not. At the end of the day, a wiki is
just a bunch of documents that are versioned. My example probably has
flaws because I'm not that comfortable with document stores yet but I
think the point I'm making is clear.

As for point 2., Sounds like YAGNI to me. 

My point is that there's not need to "default" to RDBMS (except the fact
that we're mostly "used to" relational databases rather than document
stores).


> I don't agree with it. One of the basic premises from where the nosql
> platforms come is that they are trying to solve problems where your
> data is distributed in a scale that traditional RDBMs would find it
> difficult to address with sufficient performance. If I use the "CAP"
> terminology, nosql is solving the problems of A and P on a large scale
> while making no promises on the C side.

Probably but that doesn't mean that scale is the only reason to move
away from RDBMS. 

Once upon a time, I had binary file formats, then XML, then lightweight
markups. In the future more of these might come. Just like that, I have
a new way of storing data now. 

> Unless your wiki need to scale to at least 100K nodes or more, I don't
> see a real technical reason to use document stores apart from
> relieving you upfront of complex schema design and writing SQL
> queries.  If you mean that is "better" for you, then we are talking of
> different problems here. Mileages vary.

I don't think the schema design for a wiki is "complex". I just don't
see any reason to bother doing it at all. I also don't plan to scale to
100s of nodes. Maybe just run it as a personal wiki.

I have a problem and a data store that models the domain almost
exactly. Why do I have to restructure my data as "relations" and then
write "queries" to get them? The only reason I can think of to do that
is because I'm "used to" SQL.

[...]

> You might have got me wrong. My point was that there seems to be a
> trend where programmers and designers choose to implicitly assume that
> just because their data is expected to scale to gigabytes or terabytes
> in the future, the right choice upfront is a Document store (I prefer to
> use this term as against the confusing "nosql" one), which is not
> the correct way to do this. 

Agreed. 

> I think any complex data storage problem will at the end consist of a
> mix of Document stores and Relational stores. For example, in the link
> I quoted the O.P seems to come from that kind of a thinking. Something
> to do with all the current thinking in terms of "cloud" and "data out
> there" and the fashion to think of SQL as "that old thing" and
> Document store as "this flashy new thing".

Agreed there too. Technical reasons and decisions are fine. It's the
whole "SQL camp" vs. "noSQL camp" thing that's fruitless and I think
Santosh's mail that started this thread with the "god help you",
suggests that. 

> Looking at the hardware part of it, RDBMs have been severely limited
> by current storage technology, i.e platter spinning disks, which is a
> limiting factor when trying to optimize closer to the metal. SSDs
> could solve a whole lot of the problems at that level, though now a
> day's the trend is to blame the poor performance on the DB and think
> of a document store which scales to millions of nodes, like Digg did
> for example.

Well, if you *already* have a relational setup, you can beef up the
machine with SSDs and things to keep it going but if it doesn't work,
you might have to consider scaling horizontally and then things change. 

[...]


-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] NoSQL

2011-02-13 Thread Noufal Ibrahim
On Sun, Feb 13 2011, Anand Balachandran Pillai wrote:

> I am sure many of you must have gone through this discussion, but
> sharing it anyway since I liked the analogy he makes with SQL against
> NoSQL compared to transmission in cars.

I liked the analogy but don't agree with the second paragraph. It's not
only about size. Thanks to the dominance of SQL databases, everyone
tends to think of them as the "default" and use noSQL only if
necessary. That needn't be the case. Small (non Google, non Facebook)
applications that need to store documents (e.g. a wiki) *might* work
better with a noSQL backend than a relational one.

> http://stackoverflow.com/questions/2559411/sql-mysql-vs-nosql-couchdb
>
> It might be a cliche, but I kind of feel the current "NoSQL movement"
> is simply a case of "The grass must be greener on the other side".

I don't really follow "movements" but disagree agree with your general
statement.

The kinds of data and hardware that people are dealing with have changed
and different problems are cropping up. The constraints and requirements
have changed as well. New technologies have come up to address these
problems and given that we live in these times, it's quite possible that
the problems we face might fall into the categories for which these
systems have been designed. It's unwise to summarily dismiss document
stores out of the box.

Also, the transition is not abrupt (SQL yesterday, noSQL today). SQL
databases have been used in a semi schemaless fashion e.g. Triple
stores[1], Entity-attribute-value model[2] etc. 

For some kinds of datasets, sound RDMS rules are violated to gain
performance. e.g. Denormalisation[3]. These kinds of things indicate
that RDBMs systems are not designed to handle certain classes of
problems that are cropping up and new solutions have to be sought out. 

It's an engineering problem. Different situations call for different
tools and solutions.

I personally tend to ignore the whippersnappers with their "SQL suxx0rZ!
noSQL roX!" outlook and the grumpy SQL advocates with their "Get off my
lawn!" attitude.

[...]


Footnotes: 
[1]  http://en.wikipedia.org/wiki/Triplestore
[2]  http://en.wikipedia.org/wiki/Entity-attribute-value_model
[3]  http://en.wikipedia.org/wiki/Denormalization

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] NoSQL (was: BangPypers meeting February 2011)

2011-02-12 Thread Noufal Ibrahim
On Sun, Feb 13 2011, Santosh Rajan wrote:

> Google has BigTable as its nosql implementation. You would think that,
> for a mission critical massive scale operation like Google adwords,
> Google uses BigTable right? Wrong! They use MySQL.
> http://en.wikipedia.org/wiki/AdWords#Technology
>
> Google see's so much value with what works, that in fact they submit
> patches to MySQL, for any large scale problem they faced.
>
> Understanding that your job is "to get the job done", and new fangled
> stuff is simply not worth the risk, when postgresql or MySQL can get
> the job done, will take you a long way towards database zen.

RDBMS and document stores optimise for different things[1]. This diagram
shows where these different systems fall
http://guide.couchdb.org/editions/1/en/consistency.html#cap

Shoehorning an application that would best work with an RDMBS (and all
the things that it offers) to work with a document store is folly.

It's equally dumb to force something that's a natural fit for a document
store to use an RDMBS.

Google used mySQL for adwords because they needed what it offered. 
They use BigTable for a number of other products because it's a better
fit over there http://en.wikipedia.org/wiki/BigTable#History

I'm new to the whole NoSQL thing but it offers new ideas and I think
dismissing them as "new fangled stuff" that's "not worth the risk" is
myopic.



[...]



Footnotes: 
[1]  http://en.wikipedia.org/wiki/CAP_theorem

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] BangPypers meeting February 2011

2011-02-12 Thread Noufal Ibrahim
On Sat, Feb 12 2011, Santosh Rajan wrote:

> My 2 cents before you jump into the nosql bandwagon.
>
> 1) If sql works for you, stick with it. RDBMS's like postgeSQL, MySQL
> will not wake you up in the middle of the night with a crash.
> 2) If you have scaling problems, add some horse power to you hardware,
> battery backed RAID, and solid state hard drives are good for you.
> (Prices have come down in the last year or two).
> 3) Disk space is cheap. Avoid joins while using sql as far as
> possible. Create additional table to do your indexing and grouping.
> 4) And if you still think you need nosql, god help you.

[...]

One of the things mentioned during the event was collecting logs from
remote sites that have only access to the net for a short while every
day. A data store like couch which works by appending documents is ideal
for collecting log output. You keep dumping logs into it (over a local
connection) and when you have access to the internet, you replicate all
the local databases to a master couch database. I liked the idea and
think it's an interesting way to approach the problem of synchronising
logs.

NoSQL databases are interesting and while RDBMs have their own
applications, a lot of possiblities open up with document stores. To
view them *purely* as alternatives to relational databases is, in my
opinion, missing the point.

>From your last point, I take it that you feel that one shouldn't even
consider noSQL databases and somehow spend money and time squeezing
performance out of relational databases. That reminds me of people who
refuse to try out new languages and technologies and make engineering
decisions and stick to, say, COBOL. 


-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] BangPypers meeting February 2011

2011-02-12 Thread Noufal Ibrahim
On Sat, Feb 12 2011, Noufal Ibrahim wrote:

> On Sat, Feb 12 2011, Baiju M wrote:
>
>> I just started from home (Banashankari), will reach the meeting place
>> (Domlur) aroud 4pm.
>
> [...]
>
> I'll be there slightly after 4. 

We had a fun little meeting. Sorted out some task for the getpython3
website and got a little bit done.

As an aside, there was a lot of interest in noSQL databases. To all who
are into it, there is a noSQL group in Bangalore that meets up roughly
once a month http://groups.google.com/group/nosql-bangalore
Do join it if you're interested. 


-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] BangPypers meeting February 2011

2011-02-12 Thread Noufal Ibrahim
On Sat, Feb 12 2011, Baiju M wrote:

> I just started from home (Banashankari), will reach the meeting place
> (Domlur) aroud 4pm.

[...]

I'll be there slightly after 4. 
-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] BangPypers meeting February 2011

2011-02-11 Thread Noufal Ibrahim
On Fri, Feb 11 2011, Noufal Ibrahim wrote:


[...]


> Sidu is no longer with TW. I have Sriram's number. I will call him in
> the morning tomorrow and mail the list. I'm not sure if the venue will
> be available though. Sorry I didn't do this earlier. I was occuppied
> with the PyCon business and work. :-/

I called Sriram and Habib. TW is available but there's some construction
going on there which might make it slightly noisy. 

We can use a different room and it should be fine. 

Shall we meet at aroun1 1630? We're planning to spring on the getpython3
website are we not?


-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] BangPypers meeting February 2011

2011-02-11 Thread Noufal Ibrahim
On Fri, Feb 11 2011, Noufal Ibrahim wrote:

> On Fri, Feb 11 2011, Baiju M wrote:
>
>> On Fri, Feb 11, 2011 at 5:51 PM, Baiju M  wrote:
>>> On Fri, Feb 11, 2011 at 12:03 PM, devjyoti patra  wrote:
>>>> Hi All,
>>>>
>>>> Is tomorrow's meet confirmed? Anyone please post the details for the
>>>> meet-venue and time if things have changed from this
>>>> http://doodle.com/53iqx4gdu5fuzws7
>>>
>>> The meeting will be there.  But, we didn't got a confirmation about venue 
>>> yet.
>>>
>>> Can anyone from ThoughtWorks arrange a meeting place for us ?
>>> (Sorry for late notice, I have already already send this request
>>> three days back)
>>
>> Anyone has Sriram's or Sidu's number ?
>
> [...]
>
> Sidu is no longer with TW. I have Sriram's number. I will call him in
> the morning tomorrow and mail the list. I'm not sure if the venue will
> be available though. Sorry I didn't do this earlier. I was occuppied
> with the PyCon business and work. :-/

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] BangPypers meeting February 2011

2011-02-11 Thread Noufal Ibrahim
On Fri, Feb 11 2011, Baiju M wrote:


[...]

> I can see the current month archive size has become 33 KB now :)
> http://mail.python.org/pipermail/inpycon/

[...]

Nice metric. :)

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] BangPypers meeting February 2011

2011-02-11 Thread Noufal Ibrahim
On Fri, Feb 11 2011, Baiju M wrote:

> On Fri, Feb 11, 2011 at 5:51 PM, Baiju M  wrote:
>> On Fri, Feb 11, 2011 at 12:03 PM, devjyoti patra  wrote:
>>> Hi All,
>>>
>>> Is tomorrow's meet confirmed? Anyone please post the details for the
>>> meet-venue and time if things have changed from this
>>> http://doodle.com/53iqx4gdu5fuzws7
>>
>> The meeting will be there.  But, we didn't got a confirmation about venue 
>> yet.
>>
>> Can anyone from ThoughtWorks arrange a meeting place for us ?
>> (Sorry for late notice, I have already already send this request
>> three days back)
>
> Anyone has Sriram's or Sidu's number ?

[...]

Sidu is no longer with TW. I have Sriram's number. I will call him in
the morning tomorrow and mail the list. I'm not sure if the venue will
be available though. Sorry I didn't do this earlier. I was occuppied
with the PyCon business and work. :-/

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Ideas for Python concurrency...

2011-02-08 Thread Noufal Ibrahim
On Tue, Feb 08 2011, vikas ruhil wrote:

> i am telling about that specific case for that project , also specific
> about question which is ask by Vishal . i know OS always matter but
> not in some specific case i know you talking about this
> "multiprocessing is a package that supports spawning processes using
> an API similar to the threading
> module.

I know the difference between the threading and multiprocessing
modules. 

> The multiprocessing package offers both local and remote concurrency,
> effectively side-stepping the *Global Interpreter
> Lock*by
> using subprocesses instead of threads. Due to this, the
> multiprocessing module allows the programmer to fully leverage
> multiple processors on a given machine. It runs on both Unix and
> Windows."

Yes but it comes with it's own disadvantages. It still doesn't solve the
problem of effective multi*threading*. CPU bound threads are still
forcefully serialised by the GIL. If you use processes instead of
threads, you won't face the problem but you'll use processed which are
more heavyweight than threads. 

> Noufal everything what they is not correct you can visit here with
> expectation of python documentation  OK i go through with this type problem
> with on all  type that's why i am saying they update very later okay z .
> check there are two link one of unix , another for Linux may these for are
> appropriate python for using  mutiprocessing.
> http://archive.debian.net/sarge/allpackages?format=txt.gz*
> *
>
> *http://www.freebsd.org/cgi/man.cgi?query=sem_open&apropos=0&sektion=0&manpath=FreeBSD+6.3-RELEASE&format=html)*

I'm not sure how these links are relevant to this whole discussion. I'm
also a little unsure about the point you're trying to make. The
difference between Windows and Linux is mentioned here by Jesse (the
original author and maintainer of multiprocessing)

http://stackoverflow.com/questions/765129/hows-python-multiprocessing-implemented-on-windows/765207#765207

[...]



-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Ideas for Python concurrency...

2011-02-08 Thread Noufal Ibrahim
On Tue, Feb 08 2011, vikas ruhil wrote:

> I am using Linux , unix both for this , whatsoever OS never matter?
[...]

The OS matters in many cases. It's folly to think otherwise. 

The multiprocessing modules implementation on windows is significantly
different (and inferior) to the implementation on UNIX. This is
primarily due to the lack of a decent "fork" system call on Windows.

Here are some of the details
http://docs.python.org/library/multiprocessing.html#windows

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Ideas for Python concurrency...

2011-02-08 Thread Noufal Ibrahim
On Tue, Feb 08 2011, Baishampayan Ghose wrote:

>> Mutliprocessing means, data copying, talking to each other through PIPES,
>> also it has its issues with running on Windows (all function calls should be
>> pickelable)
>>
>> Threads seems pretty stable on most platforms where Python runs.
>
> Threads won't help you much because of the Python GIL.

[...]

He's suggesting an alternate implementation which might work around the
serialisation enforced by the GIL for CPU bound threads.

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Google Docs - trick for coordinating date/ time/place for meetings

2011-02-06 Thread Noufal Ibrahim
On Sun, Feb 06 2011, Anand Balachandran Pillai wrote:


[...]

>  Not sure about others, but of late incidence of spam emails landing
> in Inbox has increased drastically in my gmail account. Earlier it
> used to do a thorough job of catching almost all of them.

I've not had the problem. 

>  It is simply the tremendous search power you get for free, that is
> preventing me from migrating to something else.

I don't use that either. I download my emails and classify them rather
than use Google's own search.

[...]


-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] BangPypers meeting February 2011

2011-02-04 Thread Noufal Ibrahim
On Fri, Feb 04 2011, Baiju M wrote:


[...]

> It looks like majority of the people prefer Feb 12th (Saturday):
> http://doodle.com/53iqx4gdu5fuzws7
> We can finalize the date by next Tuesday (Feb 8th)
> based on the majority preference.
>
> Meanwhile let's discuss about the agenda for the meeting.
> If you want to present something, please come forward.
>
> These are the topics I am interested to listen:
>
> 1. Using MongoDB with Python
> 2. Python 3 porting experience
> 3. Using Jenkins/Hudson for continuous integration
>
> Well, I cannot present on any of these topics :)

[...]

Nice topics but I think we should sprint on the website you made.

Diamond district is a more central location than is Jayanagar (I think)
so participation will be higher if we hold it there.

It would be an achievement if we collaboratively got something out the
door that the entire community benefits from. 

What do you feel?


-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Google Docs - trick for coordinating date/ time/place for meetings

2011-02-03 Thread Noufal Ibrahim
On Thu, Feb 03 2011, CsquaredinOmaha wrote:

> Regarding  discussing date, time, and place for meetings, here is a suggestion
> that works, is simple, (and cuts down on all the emails!).

This sounds too process heavy for me. Baiju's link to Doodle is much
more convenient and specifically designed for this purpose.

http://doodle.com/53iqx4gdu5fuzws7

On a personal note, I'm trying to reduce my dependence on the big G. 

[...]


-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] BangPypers meeting February 2011

2011-02-03 Thread Noufal Ibrahim
On Fri, Feb 04 2011, Baiju M wrote:

> Hi All,
>
> Let's have a meeting this month ?  I have created a Doodle for this:
> http://doodle.com/53iqx4gdu5fuzws7
> Please add your convenient dates.
>
> We can meet at ThoughtWorks place: http://goo.gl/AmDA9
> If they have any inconvenience, we can move some other place.

[...]

I've added my vote.

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Problem installing Maverick on lenovo

2011-02-03 Thread Noufal Ibrahim

This is *way* off topic for a Python programming language list. You
should find a forum more appropriate. 

On Thu, Feb 03 2011, Neha Jain wrote:

> Hey all,
>
> I tried to run maverick first from the CD, live everything was working
> absolutely fine. Then I installed(simply, erase and install) maverick on the
> machine, but it ended up with an I/O error. I tried again, again the same
> error. Next time I tried to install after rebooting, though it got
> installed, but when I tried to activate the Broadcom STA wireless driver, it
> never showed up in the apt-cache or in the
> system->admininstrator->additional drivers.
> I thought may be its because the complete packages have been copied  from
> the CD.
> I prepared a bootable USB with maverick and tried another format using the
> USB. But this time when I ran it live from the USB, it showed SystemError:
> InstallArchives() failed. This happened for Broadcom STA as well as software
> Modem driver. when I try to do
> $sudo apt-get update
> It fails saying failed to fetch from the web address..
> I have no LAN connection at present, All I have is a wireless connection, to
> which I am unable to connect. What can I do, to resolve this problem..?
> Is this a specific issue or some bug with maverick as in
> https://bugs.launchpad.net/ubuntu/+source/jockey/+bug/626320
> I have tried http://ubuntuforums.org/showthread.php?t=1593717&page=2
> No help..
>
> Please help me. I was very happy till now with my karmic!! or should I
> return to it back?
>
> PS, I tried posting it to iitd...@googlegroups.com, but it returned an
> error.., how may I be able to post it there?

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] how to uninstall a package installed using easy_install

2011-02-03 Thread Noufal Ibrahim
On Thu, Feb 03 2011, Kenneth Gonsalves wrote:

> hi,
>
> I installed hg-git using easy_install. Now hg is b0rked. What is the
> best way of uninstalling hg-git - I do not see any uninstall option in
> easy_install.

The only way is to to use easy_install -m to remove the entry from the
.pth file and then manually delete the package. The details are here
http://peak.telecommunity.com/DevCenter/EasyInstall?action=highlight&value=uninstall#uninstalling-packages

However, you shouldn't be using easy_install at all. pip[1] has all but
superseded it. It has an uninstall command and does most things more
sanely than does easy_install.


Footnotes: 
[1]  http://pypi.python.org/pypi/pip

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] [Ann] [Commercial] Weekend training program on Core Python

2011-02-02 Thread Noufal Ibrahim

Mea Culpa. The original email follows.


From: Shrinivasan T 
Subject: [chennaipy 724] Fwd: [Ilugc] [COMMERCIAL] Weekend training program on 
Core Python
To: chenna...@googlegroups.com
Date: Thu, 3 Feb 2011 00:02:36 +0530
Reply-To: chenna...@googlegroups.com

FYI.


-- Forwarded message --
From: Chandrashekar Babu 
Date: Wed, Feb 2, 2011 at 11:50 PM
Subject: [Ilugc] [COMMERCIAL] Weekend training program on Core Python
To: il...@ae.iitm.ac.in


Hi All,

On behalf of Slashprog Technologies, I’m organizing a 40 hour
weekend training program on Core Python programming starting
from February 5th, 2011 (Saturday). The details of this
training program are as below:
   Course duration: 40 hours (5 hours per module x 8 weekends)
   Course span: 2 months, 8 weekends (approximately).

The training program will be conducted on every Saturday
between  9:00 AM to 2:00 PM

The first introductory training module is FREE for all and is
scheduled on February 5th, 2011 (Saturday) between
9:00 AM to 2:00 PM at our office venue.

Kindly do refer to your friends/colleagues who might be
interested in learning Python programming.

For more details, kindly visit the following URL:

http://www.slashprog.com/events/core-python-training-program-february_05_2011.html

Thanks,

Chandrashekar Babu.

--
http://www.chandrashekar.info/
http://www.slashprog.com/
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc



-- 
Regards,
T.Shrinivasan


My Life with GNU/Linux : http://goinggnu.wordpress.com
Free/Open Source Jobs : http://fossjobs.in

-- 
You received this message because you are subscribed to the Google Groups 
"Chennaipy" group.
Wiki at http://nrcfosshelpline.in/chennaipy/
To post to this group, send email to chenna...@googlegroups.com
To unsubscribe from this group, send email to 
chennaipy-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/chennaipy?hl=en




-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] [Ann] [Commercial] Weekend training program on Core Python

2011-02-02 Thread Noufal Ibrahim


-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] [OT] I need python job please let me know !

2011-02-01 Thread Noufal Ibrahim
On Wed, Feb 02 2011, jaya kumar wrote:

> hi to all
>
> am looking for a python job in bangalore
>
> is there any openings in python ? please let me know !
>
> when and where the python user group meet will be held in bangalore ?
>
> location and timings please ?
>
> thank u bye take care

[...]

The archives should have some opportunities. There were quite a few
posted recently. As for user group meetings, they'll be discussed anda
nnounced here. 
-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] PyCon APAC CFP

2011-02-01 Thread Noufal Ibrahim

Hello everyone,
The APAC PyCon scheduled to held in early June is looking for
quality talks and other presentations. 

An overview of last years conference and this years dates and
plans is over here http://nibrahim.net.in/pycon-apac-2011.pdf

Please take a look and consider sending in a proposal.

Important dates:

March 15, 2011   : Deadline for Proposal Submissions
March 31, 2011   : Notification of Proposal Acceptance
May 15, 2011 : Submission of Proposals
June 9, 2011 : PyCon APAC Tutorial Day
June 10-11, 2011 : PyCon APAC Conference

The visa process for the country is quite hassle free (it's
completely online) and to and fro tickets are not very pricey especially
if you plan in advance. Having this conference grow is a good thing
since the US PyCon is quite far and unreachable for many of us in the
eastern hemisphere and making this a world class event would give the
Pythonistas in this region something to look forward to every year. 

Please help spread the word and participate.

Thanks.
-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] User group meeting

2011-02-01 Thread Noufal Ibrahim
On Tue, Feb 01 2011, satyaakam goswami wrote:

>  On Tue, Feb 1, 2011 at 8:34 PM, vikas ruhil  wrote:
>
>> i am ready..so meet up their for python okayz
>>
>
> yes that is why i am inviting you go ahead and add your name and topic on
> the wiki page.
[...]


Someone with some experience with user groups and stuff should take
charge if this is to get done. :)

-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] How to get class names from DLL file

2011-01-31 Thread Noufal Ibrahim
On Tue, Feb 01 2011, Anand Balachandran Pillai wrote:


[...]

>  I think he said "unix" :)

[...]

You have better eyes than me. I stopped reading when I saw "DLL".
-- 
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


<    1   2   3   4   5   6   7   8   9   10   >