Python

#slider
#adsense

Python - Yahoo News Search Results

Giant python gets a health check

Zoo team gives an enormous reticulated python its annual check-up, including using ultrasound to scan its heart.

Monty Python says goodbye

Python has always been equal parts deadpan and silly, highbrow and low, and the "Monty Python Live (Mostly)" show -- which concluded Sunday at London's O2 Arena and was simulcast all over the world -- highlighted those distinctions.

Monty Python performs last show ever at London's O2 Arena

John Cleese, Michael Palin, Terry Gilliam, Eric Idle and Terry Jones took their final bows as Monty Python last night in London after 50 years of performing as the iconic comedy troupe. The emotional finale was the last of their farewell stage shows in London’s O2 Arena, and the surviving pythons said it would be their final performance together ever. Surprise guests included self-professed ...

All over for Monty Python crew?

Python has always been equal parts deadpan and silly, highbrow and low, and the "Monty Python Live (Mostly)" show -- which concluded Sunday at London's O2 Arena and was simulcast all over the world -- highlighted those distinctions.

Pythons bid farewell in final show

Monty Python have bid farewell to their fans in the last of their live shows at London's O2, watched by admiring stars from the world of comedy.

Monty Python stars bid an emotional farewell in final show

The Monty Python comedy group performed the final show of their ten-day residency "Monty Python Live (Mostly): One Down, Five to Go" at the O2 Arena in London on Sunday (July 20) in front of a 16,000-strong audience.

Monty Python Group Performs (Probably) for Last Time

The Monty Python comedy group performed the final show of their 10-day residency “Monty Python Live (Mostly): One Down, Five to Go” at the O2 Arena in London on Sunday in front of a 16,000-strong audience. The show was broadcast live, which meant fans all over the world got to see Eric Idle, John Cleese, Terry Jones, Michael Palin and Terry Gilliam, all in their 70s, perform a string of medleys ...

Delicious/tag/Python

recent bookmarks tagged Python

20.19. SimpleHTTPServer — Simple HTTP request handler — Python v2.7.7 documentation

Posted on 5 June 2014

Must Have Python Packages | Algorithm.co.il

Posted on 5 June 2014

Le blog de Thomas Blanchard: Configure pydistutils.cfg - example python distutils config file

Posted on 5 June 2014

3.2 Installation

Posted on 5 June 2014

How can I represent an 'Enum' in Python? - Stack Overflow

Posted on 5 June 2014

WADParser.py

Posted on 4 June 2014

kikocorreoso / brython-bryplot — Bitbucket

Posted on 4 June 2014

Painting with Code : programming

Posted on 4 June 2014

Painting with Code | IDEO Labs

Posted on 4 June 2014

pretty printing nested dictionaries in Python? - Stack Overflow

Posted on 4 June 2014

Questions About Python (programming language) on Quora

Questions About Python (programming language)

reddit.com: search results

Transition from PHP to Python

I come from a PHP background(so to speak) and just started to look over Python. Christ, this is amazing, it's fantastic. I love it. So smooth, so simple.

Why does nobody tell me these things.

This post doesn't have a purpose.

I just really wanted to tell somebody.

You guys rock.

submitted by SmartAssUsername to Python
[link] [118 comments]

Posted on 12 July 2014

What are the top 10 built-in Python modules that a new Python programmer needs to know in detail?

I'm fairly new to Python but not to Programming. With the programming languages that I've learned in the past I always see a recurring pattern — some libraries (modules) are more often used than others.

It's like the Pareto Principle (80/20 rule), which states that 80 of the outputs (or source code) will come from 20 of the inputs (language constructs/libraries).

That being said, I would like to ask the skilled Python veterans here on what they think are the top 10 most used built-in modules in a typical Python program, which a beginner Python programmer like me would benefit to know in detail?

EDIT:

Thanks to all that have replied :)

I found a site where I can study most of the modules that you suggested:

(Python Module of the Week)

Contents: http://pymotw.com/2/contents.html

Index: http://pymotw.com/2/py-modindex.html

Of course, there is no substitute for the official documentation when it comes to detailed information:

Python 2.7.*: https://docs.python.org/2/library/index.html

Python 3.4.*: https://docs.python.org/3.4/library/index.html

submitted by ribbon_tornado to Python
[link] [133 comments]

Posted on 24 June 2014

Which Python projects do you see as the "Gold Standard"?

I've been programming in Python on and off now for a few years now and have recently gone freelance. I'm looking to up my game and create some really solid projects following good Python practices.

I find learning from other peoples code really helpful, so of the thousands of Python projects on Github, which do you think are the best examples in terms of structure, testing, coding style, etc...

submitted by honeybadgerUK to Python
[link] [109 comments]

Posted on 15 May 2014

I made my first ever thing in Python, and am really proud of it.

I'm not sure if this is more appropriately posted to /r/learnpython, but I'm new here and new at programming and I just really felt like sharing my excitement with someone! I've been interested in computers since almost forever, and have more recently been trying to actually learn some coding (a little html and python, just the basics). After figuring out how to use Python bit I got Portable Python and sat myself down with the project of creating a 2 player game of Tic Tac Toe, and I did.

I've never really done anything on this level with a computer before and I just feel like I've opened up a door to a whole new world! I feel powerful for what I've done and I can't wait to do more.

Here is my little program if you guys are interested in seeing what an awful newb's poorly documented code looks like.

And happy coding to all! :D

submitted by DiscyD3rp to Python
[link] [130 comments]

Posted on 13 May 2014

Learning python earned me a 50% raise, and it's about to again.

(Sorry for the throwaway, but I wanted to be able to answer questions honestly without any hesitation.)

I've been in IT since I was 17 in 1999. I started off at a help desk, and worked my way up to a Systems Administrator where I was making 60k USD/yr. (I currently have only an associates degree with no plans to go back to school.) I was primarily a Windows domain/ network admin, with a few *nix boxes spread throughout. I had known windows batch scripting, and way back in the day had programmed in BASIC before the world was.

I had tossed around the idea of learning a programming language before, but when asked I'd often say "Developers' brains just work differently than mine. I'm not a coder." Programming seemed so abstract and I couldn't really wrap my head around it. I finally decided though, to try something.

It was 2010 and I had heard a lot of Ruby on Rails and thought that Ruby would be a great language to learn. I ran through the tutorial of making a polls app at least 5 times, but I just couldn't wrap my head around it. So I gave up.

One year later I heard about python. Despite all the negative talk about python while googling for "python vs ruby vs php vs ..." (GIL, speed, whitespace, duck typing, (not that I knew what ANY of that meant anyway)) I decided that I really wanted to give it a shot. I started out with codeacademy to get my feet wet, I'd tinker with idle while my wife and I would watch netflix after the kids went to bed. Then I started dreaming in code.

Have you ever had "work dreams"? The kind you have for about 2 weeks after starting a new job that's really hard? That was python for me. Being primarily in a Windows environment it was hard to find anything for python to do initially at work. My boss didn't program, and really didn't see the value in it. Then one day I found myself needing to compare a list of files. I needed to find all the files that were in one column but not in the other. I had them in excel and after working through a formula I had my answer, but I hated it. All I wanted to do was write something like--

select name from column1 where name not in (select name from column2); 

Enter python and sqlite. It probably took me about 3 hours to figure it out, but I imported a csv into a sqlite table in python so I could query it. BAM! I was hooked from then on.

Every night I would tinker, read, and play. I found tons of things to automate at work, making my time so much more effective. I loved it. I became a python evangelist. I'd like to say that my boss was impressed, but really he never came around, and it frustrated me. Fast forward a year.

I had heard about the DevOps movement and though I didn't understand it completely at the time I thought that being a Developer and Systems Admin mutant sounded like a lot of fun, and something I could really be good at.

After having a rough time with my boss one day I decided to check the local classifieds. I saw an ad for a DevOps Admin. Basically this guy needed to know hardware, networking, provisioning, something called puppet, and one of three scripting languages- ruby, bash, or python.

I looked at puppet, and after having learned about booleans and strings and syntax from python, picking it up wasn't a problem. I got hired on the spot for $90k USD. A clean 50% raise. I use python every single day. I write scripts to check if databases back up properly, if services are up, if all 1000 of my physical servers are getting their updates, to provision RAIDs, you name it. I integrate what I write into puppet, fabric, and a host of other tools that I've learned along the way.

After doing that for a little over a year now, I'm about to hire 2 guys under me as we expand and I'm moving up to $120k USD. I'm learning django for fun and am just starting into machine learning. I check out /r/python every day, you guys have been so helpful to me along my way. And if I can learn python, anybody can!!!

TL;DR I learned python in a year and got a 50% raise. 1 year later I got another 25% raise, all from python!

edit: percentages, oh math...

submitted by self_made_sysad to Python
[link] [143 comments]

Posted on 6 May 2014

What is the best part of python you wish people knew about?

I just quit my job at a major software company to be with a startup in downtown seattle and it looks like our stack is Python based. I'm new to Python but I want to learn fast; So please, let me what you like the most (or hate the most?) about python, other python developers code, etc so I can take all the good and not use the bad as I learn this new language.

Who knows, maybe you will need to maintain my code someday, so you could only be helping yourself!

Thanks in advance!

submitted by honestduane to Python
[link] [230 comments]

Posted on 16 December 2013

Eric Idle here. I've brought John Cleese, Terry Gilliam, Terry Jones and Michael Palin with me. We are Monty Python. AUA.

Hello everybody. I had so much fun last November doing my previous reddit AMA that I decided to return. I'm sure you've seen the exciting news, but here we are to confirm it, officially: Monty Python is reunited. Today is the big day and as you can imagine it's a bit of a circus round here, but we'll be on reddit from 9am for ninety minutes or so to take your questions. We'll be alternating who's answering, but everyone will be here!:

  • J0hnCleese
  • Terry_Gilliam
  • TerryJonesHere
  • _MichaelPalin

Proof: https://twitter.com/EricIdle/status/403525056740851714

Update: We're running a little late but will be with you 10-15 minutes!

Update 2: The url for tickets - http://www.montypythonlive.com - available Monday

Update 3: Thank you for all the questions. We tried to answer as many as we could. Thanks everyone!

submitted by ericidle to IAmA
[link] [7786 comments]

Posted on 21 November 2013

I've been using Python for 3 years and I've never defined a Class

I consider myself a nearly advanced-level Python programmer. From data processing and statistical analysis to web development and systems administration of large clusters, I do it all regularly.

I started using it in grad school for my research and now use it everyday in my job as a computational scientist. However, I simply do not use classes. I use functions for everything, often many small functions whose output I feed into another. For large highly parallel data processing tasks, I'll have one main worker function that does the heavy lifting on each item that I'll pass to a multiprocessing Pool.

So my question is: Given that I know how to get stuff done quickly, what am I really missing out on or shorting myself on by never using classes?

submitted by zissou_society to Python
[link] [174 comments]

Posted on 17 November 2013

What you do not like in Python?

I'm a big fun of Python! I use it every day! But there are things which are annoying, strange and so forth in Python (you really don't like it). If any, please, share your thoughts. For example:

  • built-in set type has method like symmetric_difference_update. I don't like so long methods in built-in types.
submitted by krasoffski to Python
[link] [897 comments]

Posted on 18 September 2013

Python interview questions

I'm about to go to my first Python interview and I'm compiling a list of all possible interview questions. Based on resources that I've found here, here and here I noted down the following common questions, what else should I add?

easy/intermediate

  • What are Python decorators and how would you use them?
  • How would you setup many projects where each one uses different versions of Python and third party libraries?
  • What is PEP8 and do you follow its guidelines when you're coding?
  • How are arguments passed – by reference of by value? (easy, but not that easy, I'm not sure if I can answer this clearly)
  • Do you know what list and dict comprehensions are? Can you give an example?
  • Show me three different ways of fetching every third item in the list
  • Do you know what is the difference between lists and tuples? Can you give me an example for their usage?
  • Do you know the difference between range and xrange?
  • Tell me a few differences between Python 2.x and 3.x?
  • The with statement and its usage.
  • How to avoid cyclical imports without having to resort to imports in functions?
  • what's wrong with import all?
  • Why is the GIL important? (This actually puzzles me, don't know the answer)
  • What are "special" methods (<foo>), how they work, etc
  • can you manipulate functions as first-class objects?
  • the difference between "class Foo" and "class Foo(object)"

tricky, smart ones

  • how to read a 8GB file in python?
  • what don't you like about Python?
  • can you convert ascii characters to an integer without using built in methods like string.atoi or int()? curious one

subjective ones

  • do you use tabs or spaces, which ones are better?

Ok, so should I add something else or is the list comprehensive?

submitted by dante9999 to Python
[link] [187 comments]

Posted on 19 August 2013

Python saved my ass tonight.

It's Friday night, and I'm stuck at work because Apache isn't working, and without it, I can't serve the files I need to update the embedded device I'm working on. So on a whim, I googled "python fileserver", and this little gem popped up:

python -m SimpleHTTPServer 

Running that from the directory I needed to grab files from saved me the time of debugging Apache (aka my worst nightmare), and, possibly by extension, my job. Thanks Python!

submitted by LightWolfCavalry to Python
[link] [86 comments]

Posted on 9 August 2013

Common misconceptions in Python

What are some common misconceptions that people have when programming in Python? Here are a couple that were passed around a mailing list I'm on:


'list.sort' returns the sorted list. (Wrong: it actually returns None.)


Misconception: The Python "is" statement tests for equality.

Reality: The "is" statement checks to see if two variables point to the same object.

This one is especially nasty, because for many cases, it "works", until it doesn't :)

In [1]: a = 'hello'

In [2]: b = 'hello'

In [3]: a is b

Out[3]: True

In [4]: a = 'hello world!'

In [5]: b = 'hello world!'

In [6]: a is b

Out[6]: False

In [7]: a = 3

In [8]: b = 3

In [9]: a is b

Out[9]: True

In [10]: a = 1025

In [11]: b = 1025

In [12]: a is b

Out[12]: False

This happens because the CPython implementation caches small integers and strings, so the underlying objects really are the same, sometimes.

If you want to check if two objects are equivalent, you must always use the == operator.


submitted by rhiever to Python
[link] [243 comments]

Posted on 13 May 2013

What is Python not a good language for?

I am moving from writing one-off code and scripts to developing tools which are going to be used by a larger group. I am having trouble deciding if Python is the right tool for the jobs.

For example I am responsible for process a 1gb text file into some numerical results. Python was the obvious choice for reading the text file but I am wondering if Python is fast enough for production code.

Edit: Thanks for the all responses. I will continue to learn and develop in Python.

submitted by Hopemonster to Python
[link] [233 comments]

Posted on 6 May 2013

Why do you choose Python over other language?

Hi, coding newbie here, I want to know why do you prefer Python over other language and it pro's and con's. Really interesed into learning Python, any tips?

Edit: Wow, such a great feedback, as I see the main Pro is the overall badass community that Python has behind (refer to all the comments in this thread), thanks guys.

Edit 2: The question now. Python 2.x or 3.x?

submitted by Rokxx to Python
[link] [165 comments]

Posted on 5 April 2013

I use PHP. Whenever I meet a Python guy, they tell me how much better it is, and I'd like the low-down on the reasons.

I'm not bothered with the fact that PHP was not designed and has inconsistencies etc., because I know my way around it well enough that it doesn't matter. I'm curious whether using Python would help me, as I don't hear much negativity around it.

What I want to know is, in terms of web dev, are there things Python can do that PHP can't? Is the language so much better that I'll be able to write better code in less time? Is it as fast as PHP, and are the frameworks as varied and battle tested? Are there any shortcomings to Python that would trip me up?

Thanks guys.

submitted by maloney7 to Python
[link] [208 comments]

Posted on 19 November 2011

Are there any things about Python that you do *not* like, or that you wish were done differently, or that you flat out think are wrong?

I lightheartedly joked in another thread that if the person had agreed with my point (that Python 3 seems very slightly harder to code in than Python 2.x - also a lighthearted, almost completely unfounded critique), that it would be the first time I'd ever seen any Python user online agree with any criticism of any part of the language. In this last bit I'm not really joking.

I had many newbie critiques a few years ago - 'self', the fact that you can't join a string list with myList.join(', '), something about slicing that I forget now, that it was confusing which things worked in-place, and which worked on a copy, etc. - and in a forum (not reddit) where I posted up my lengthy list (mostly to see what people thought of these things), I was met with a wall of responses, all strongly in favor of every last part of all of it, and even of things I hadn't mentioned. In 3 years I realize now I have never once seen anyone critique any part of the language and not be met with all manner of deep, philosophical justifications as to why that thing or those things must be that way.

It's the perfect language, I guess.

So my new question is just straight up: IS there anything about Python you don't like? I mean, it is moving to 3, and there are changes, so clearly 2.x had room for improvement, so let's hear it. Be prepared for a battle on all fronts from everyone else in here, though, whatever you say :) I'd love to hear from the real experts, the people who usually wield seemingly powerful reasoning and long strings of computer science words in their arguments.

This itself isn't a critique, nor even a jab, but just another attempt to learn more.

submitted by gfixler to Python
[link] [576 comments]

Posted on 16 November 2011

A website that lets you browse Reddit like you're reading/coding in Python!

...or Java (and soon, Ruby, PHP, C#, etc.).

It's my first website with Flask (my first real dynamic website?). I wanted the domain to be coderedd.it, but it was too expensive :(. So I just asked my brother to help me host it.

Comments appreciated. :)

r.doqdoq.com

UPDATES:

  • NSFW indicator for Python (can't figure out where/how to place it in Java, but it still checks for NSFW so it won't load image previews)
  • don't preload all images (thanks to canuckkat)
  • use def instead of class in Python

UPDATES 2:

I just opened up the repo at bitbucket https://bitbucket.org/john2x/rdoqdoq :)

Thanks everyone!

submitted by ares623 to Python
[link] [73 comments]

Posted on 6 September 2011

Ask PyReddit: If you were making your own Python-like programming language, what would be different?

We all know Python isn't perfectly perfect, just practically perfect.

With that in mind, what changes would you make if you were brainstorming the ideal Python-like language? For example, do we really need the colon after an if statement? Shouldn't def f(default=[]): work the way you'd expect and not end up with a single global []? Isn't Ruby onto something when it makes mutating methods end in an exclamation mark by convention? And don't we really need a better syntax for passing an anonymous block as a callback? …

What are your ideas, /r/Python?

submitted by earthboundkid to Python
[link] [250 comments]

Posted on 29 May 2011