FAQ

Search Discussions

984 discussions - 5,686 posts

  • The python code below generates a cartesian product subject to any logical combination of wildcard exclusions. For example, suppose I want to generate a cartesian product S^n, n =3, of [a,b,c,d] that ...
    WkehowskiWkehowski
    Mar 16, 2006 at 11:14 am
    Mar 28, 2006 at 5:32 pm
  • I like cheeseshop just fine, but have been a Monty Python fan since they appeared on the CBC in, I think, 1969. I'm one of those people who is always surprised when a MP bon mot is greeted with ...
    Michael TobisMichael Tobis
    Mar 11, 2006 at 6:04 pm
    Mar 18, 2006 at 1:23 am
  • So I wrote PyPI back a couple of years ago. It was just a simple cgi script and some distutils code. I needed to call it *something* and "Python Package Index" seemed like a fairly obvious name. ...
    RichardRichard
    Mar 11, 2006 at 5:50 am
    Mar 18, 2006 at 12:51 pm
  • So, Python 2.5 will have new any() and all() functions. http://www.python.org/dev/peps/pep-0356/ any(seq) returns True if any value in seq evaluates true, False otherwise. all(seq) returns True if ...
    Steve R. HastingsSteve R. Hastings
    Mar 29, 2006 at 5:32 am
    Apr 10, 2006 at 1:17 pm
  • Hey guys, this maybe a stupid question, but I can't seem to find the result anywhere online. When is the right time to use 'is' and when should we use '=='? Thanks alot~
    MwqlMwql
    Mar 27, 2006 at 11:31 am
    Apr 3, 2006 at 3:00 pm
  • 1) From 2.4.2 documentation: There are two new valid (semantic) forms for the raise statement: raise Class, instance raise instance 2) In python: Traceback (most recent call last): File "<stdin ", ...
    Gregory PetrosyanGregory Petrosyan
    Mar 21, 2006 at 7:23 pm
    Apr 5, 2006 at 8:32 am
  • beta.python.org evolved very nice and noticed today the new python.org website going live. There is a change in the look n feel, wherein it looks "more official" and maximum possible information ...
    Phoe6Phoe6
    Mar 7, 2006 at 4:55 am
    Mar 14, 2006 at 12:34 pm
  • My first project when I started learning C# was to make a little timer to tell me when my laundry was done :) and I thought it would be fun to convert this to Python. Here's what I came up with after ...
    John SalernoJohn Salerno
    Mar 9, 2006 at 4:06 am
    Apr 8, 2006 at 4:47 pm
  • Hi, I am struggling to understand how to really appreciate object orientation. I guess these are FAQ's but I have not been able to find the answers. Maybe my problem is that my style and ...
    Brian ElmegaardBrian Elmegaard
    Mar 8, 2006 at 10:04 am
    Mar 10, 2006 at 9:06 pm
  • Just tried Ruby over the past two days. I won't bore you with the reasons I didn't like it, however one thing really struck me about it that I think we (the Python community) can learn from. Ruby has ...
    John_sips_teaJohn_sips_tea
    Mar 14, 2006 at 4:52 pm
    Mar 17, 2006 at 10:02 pm
  • In very rare cases a program crashes (hard to reproduce) : * several threads work on an object tree with dict's etc. in it. Items are added, deleted, iteration over .keys() ... ). The threads are ...
    RobertRobert
    Mar 11, 2006 at 11:19 am
    Mar 14, 2006 at 6:22 am
  • Ok, here's a problem I've sort of assigned to myself for fun, but it's turning out to be quite a pain to wrap my mind around. It's from a puzzle game. It will help if you look at this image: ...
    John SalernoJohn Salerno
    Mar 22, 2006 at 8:24 pm
    Mar 27, 2006 at 3:46 pm
  • One of the things I dislike about Java is the need to declare exceptions as part of an interface or class definition. But perhaps Java got this right... I've writen an application that uses urllib2, ...
    Rene PijlmanRene Pijlman
    Mar 3, 2006 at 11:10 pm
    Mar 5, 2006 at 5:06 pm
  • Hi, Code below shows that property() works only if you use it within a class. ------------------------------------------------ class A(object): pass a = A() a.y = 7 def method_get(self): return ...
    Michal KwiatkowskiMichal Kwiatkowski
    Mar 10, 2006 at 3:06 am
    Mar 13, 2006 at 8:02 pm
  • Since Python does so many things different, especially compared to compiled and statically typed languages, do most of the basic design patterns still apply when writing Python code? If I were to ...
    John SalernoJohn Salerno
    Mar 2, 2006 at 8:48 pm
    Jan 27, 2008 at 3:20 am
  • Personally, I *like* the new website look, and I'm glad to see Python having a proper logo at last! I've taken the opportunity to knock up some icons using it, finally banishing the poor old ...
    And-GoogleAnd-Google
    Mar 20, 2006 at 4:56 pm
    Mar 27, 2006 at 11:26 pm
  • Hello I have solve the problem of configuration with pyserial but i have another question. The serial port close every time i make the read and re-open when i do i new write. In my script there is ...
    Luca72Luca72
    Mar 6, 2006 at 4:16 pm
    Mar 8, 2006 at 2:39 pm
  • This is a real small point, but I'd like to hear what others do in this case. It's more an 'administrative' type question than Python code question, but it still involves a bit of syntax. One thing I ...
    John SalernoJohn Salerno
    Mar 2, 2006 at 6:39 pm
    Mar 6, 2006 at 4:31 pm
  • For writing testcode, it looks like there's three ways that it's typically done: (1). using the doctest module, (2). using the unittest module (i.e. "pyunit"), or else (3). just putting an "if ...
    John_sips_teaJohn_sips_tea
    Mar 21, 2006 at 8:55 pm
    Mar 29, 2006 at 10:41 am
  • Hello I've recently learnt python and I do love it! I congratulate all those geeks who produce this nice language; well, because I could be called a nearby newbee I've decided to improve my abilities ...
    Invitro81Invitro81
    Mar 10, 2006 at 12:36 pm
    Mar 22, 2006 at 10:45 am
  • Way back when, I got a lot of training and experience in highly structued software development. These days, I dabble with web-development, but I may become more serious. I consider php to be an ...
    WalterbyrdWalterbyrd
    Mar 28, 2006 at 3:24 pm
    Apr 12, 2006 at 6:55 pm
  • Now that I've learned much of Python, I'm sort of stuck with what to do with it. I'm not a professional programmer, so I don't really have a use for Python now. But I really want to come up with some ...
    John SalernoJohn Salerno
    Mar 29, 2006 at 6:07 pm
    Mar 30, 2006 at 9:35 pm
  • The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations Xah Lee, 2006-03-15 Let me summarize: The LISP notation, is a functional notation, and is not a so-called ...
    Xah LeeXah Lee
    Mar 16, 2006 at 6:20 am
    Mar 21, 2006 at 7:02 am
  • Hi All, I am going to try and learn Python because I want to write at least one program to help my disabled son with communitation. I am not asking for anyone to do this for me I simply want to know ...
    SkipperSkipper
    Mar 13, 2006 at 2:19 am
    Mar 15, 2006 at 4:14 pm
  • I am a newbie with Python. It's a great language, but I would like to be able to present a simple gui menu for some of my scripts; something better than using 'raw_input' prompts. Any recommendations ...
    Glurt WuntalGlurt Wuntal
    Mar 2, 2006 at 2:56 pm
    Mar 6, 2006 at 5:59 pm
  • i have a python program which attempts to call 'cls' but fails: sh: line 1: cls: command not found i tried creating an alias from cls to clear in .profile, .cshrc, and /etc/profile, but none of these ...
    MpMp
    Mar 29, 2006 at 10:42 pm
    May 3, 2006 at 7:20 pm
  • Hi, Can one of you say to me what's the best editor for editing the python programs ( for linux or windows ), and if you can send it to me to the adresse Ahcheriet at gmail.com Thanks
    PythonStudentPythonStudent
    Mar 24, 2006 at 4:42 pm
    Mar 26, 2006 at 10:36 pm
  • I discovered Python a few months ago and soon decided to invest time in learning it well. While surfing the net for Python, I also saw the hype over Ruby and tried to find out more about it, before I ...
    FrancoisFrancois
    Mar 5, 2006 at 3:44 pm
    Mar 6, 2006 at 4:49 pm
  • I mean, it's very convenient when default parameters can be in any position, like def a_func(x = 2, y = 1, z): ... (that defaults must go last is really a C++ quirk which is needed for overload ...
    Dmitry AnikinDmitry Anikin
    Mar 10, 2006 at 9:06 am
    Mar 13, 2006 at 1:04 pm
  • hi, I want to know which is the best IDE for python.Please if possible mention the features of the IDE. Thank You. Sushant
    Sushant SirsikarSushant Sirsikar
    Mar 31, 2006 at 5:32 am
    Apr 3, 2006 at 4:54 pm
  • Is there any editor or IDE in Python (either Windows or Linux) which has very good debugging facilites like MS VisualStudio has or something like that. I like SPE but couldn't easily use winPDP. I ...
    Krypto WizardKrypto Wizard
    Mar 14, 2006 at 5:28 pm
    Mar 30, 2006 at 1:40 pm
  • hey i've been seeing lots of config-file-readers for python. be it ConfigObj (http://www.voidspace.org.uk/python/configobj.html) or the like. seems like a trend to me. i came to this conclusion a ...
    TomerfilibaTomerfiliba
    Mar 10, 2006 at 2:48 pm
    Mar 11, 2006 at 4:36 pm
  • Let me first say that I'm sure that this subject has come up before, and so forgive me for beating a dead horse. Secondly, let me say that Python's strength is its dynamic nature, and I don't believe ...
    Tom BradfordTom Bradford
    Mar 7, 2006 at 8:44 pm
    Mar 10, 2006 at 6:25 pm
  • I thought I understood raw strings, then I got bitten by this: x=r'c:\blah\' which is illegal! I thought that \ had no special meanning in a raw string so why can't it be the last character? making ...
    PlaheyPlahey
    Mar 5, 2006 at 8:49 am
    Mar 7, 2006 at 3:14 pm
  • Like in C we comment like /* Bunch of lines of code */ Should we use docstring """ """ Or there is something else too ?? Every help is appreciated. Thanks
    Diffuser78Diffuser78
    Mar 30, 2006 at 11:21 pm
    Apr 5, 2006 at 9:40 pm
  • What is the best way to count nested loop iterations? I can only figure to use an index but that seems kludgy. index = 0 for animal in zoo: for color in animal: index += 1 Thanks, Derek Basch
    Derek BaschDerek Basch
    Mar 16, 2006 at 8:12 pm
    Mar 19, 2006 at 11:17 pm
  • I have made and recently posted a libary I made to do Modular Arithmetic and Prime numbers on my website at http://www.geocities.com/brp13/Python/index.html . I am currently in a crypotology class, ...
    TuvasTuvas
    Mar 4, 2006 at 3:45 pm
    Mar 6, 2006 at 11:47 pm
  • hi i'am making a program for formatting string, or i've added : #!/usr/bin/python # -*- coding: utf-8 -*- in the begining of my script but str = str.replace('?', 'C') str = str.replace('?', 'E') str ...
    Bussiere bussiereBussiere bussiere
    Mar 23, 2006 at 11:07 am
    Mar 25, 2006 at 1:31 pm
  • Using global variables in Python often raises chaos. Other languages use a clear prefix for globals. * you forget to declare a global * or you declare a global too much or in conflict * you have a ...
    RobertRobert
    Mar 15, 2006 at 10:03 am
    Mar 20, 2006 at 9:33 pm
  • I have been programming in Python for years, and I'm STILL learning new features about the language. I'm looking for the best way to handle events with my own UI developed in PyGame, and I've ...
    KamilcheKamilche
    Mar 17, 2006 at 7:03 pm
    Mar 20, 2006 at 10:23 am
  • Hi I wonder if Python is capable of the following: define a function which returns its argument. I mean: def magic_function(arg): ...... some magic code ... that behaves the following way: assert ...
    AlainpointAlainpoint
    Mar 13, 2006 at 8:34 am
    Mar 15, 2006 at 6:28 am
  • I'm still tyring to figure out what "Pythonic" means, and I have a feeling the answer to my question may fall into that category. Are block comments somehow unpythonic?
    John SalernoJohn Salerno
    Mar 8, 2006 at 3:31 pm
    Mar 11, 2006 at 2:33 pm
  • Okay, I'm working on devoloping a simple, cryptographically secure number, from a range of numbers (As one might do for finding large numbers, to test if they are prime). My function looks like this: ...
    TuvasTuvas
    Mar 4, 2006 at 11:43 pm
    Mar 8, 2006 at 12:45 am
  • Hi folks! For debugging purposes I tried this: --- snip --- def foo(): pass function = type(foo) class PrintingFunction(function): def __init__(self, func): self.func = func def __call__(self, *args, ...
    Fabiano SidlerFabiano Sidler
    Mar 18, 2006 at 7:50 pm
    Mar 31, 2006 at 11:09 am
  • In the example below from the python docs (http://docs.python.org/tut/node7.html#SECTION007140000000000000000), I am not able to understand the ** operator in the following expression: I understand ...
    SathyaishSathyaish
    Mar 20, 2006 at 5:39 am
    Mar 22, 2006 at 9:08 am
  • For more details about the plan for Python 2.5, see: http://www.python.org/doc/peps/pep-0356/ The highlights are that we are hoping to put out the first alpha Real Soon Now, hopefully in a week or ...
    NnorwitzNnorwitz
    Mar 18, 2006 at 7:40 am
    Mar 21, 2006 at 10:47 pm
  • I have used Perl for a long time, but I am something of an experimental person and mean to try something new. Most of my 'work' with Vector Linux entails the use of Perl (a bit of a misnomer as it is ...
    HanumizzleHanumizzle
    Mar 13, 2006 at 1:58 am
    Mar 18, 2006 at 1:16 am
  • IDLE is no longer satisfactory for me. Other IDEs make me very confused. Really do not know which one to use. I use WinXP sp2 for current development. So far as I know, Eclipse + PyDev + PyDev ...
    Sullivan WxPyQtKinterSullivan WxPyQtKinter
    Mar 11, 2006 at 11:33 pm
    Mar 16, 2006 at 9:25 pm
  • Here's the code I wrote: file = open('C:\switches.txt', 'r') switches = file.readlines() i = 0 for line in switches: line = switches[i][:-1] i += 1 print switches You can probably tell what I'm ...
    John SalernoJohn Salerno
    Mar 3, 2006 at 3:13 am
    Mar 6, 2006 at 4:51 pm
  • A minor concern, but I'm curious if there is any kind of best practice for using whitespace within expressions and argument lists in the Python world. For example: 1 + 2 or 1+2 func(1,2) or func(1, ...
    John SalernoJohn Salerno
    Mar 2, 2006 at 3:17 pm
    Mar 4, 2006 at 12:14 am
Group Navigation
period‹ prev | Mar 2006 | next ›
Group Overview
grouppython-list @
categoriespython
discussions984
posts5,686
users1,098
websitepython.org

1,098 user for March 2006

Fredrik Lundh: 217 posts John Salerno: 163 posts Alex Martelli: 100 posts Diez B. Roggisch: 94 posts Bruno: 80 posts Steve Holden: 76 posts Kent Johnson: 72 posts Steven D'Aprano: 71 posts Terry Reedy: 59 posts Sybren Stuvel: 58 posts Felipe Almeida Lessa: 56 posts Scott David Daniels: 53 posts Duncan Booth: 52 posts James Stroud: 51 posts Bruno Desthuilliers: 46 posts Peter Otten: 45 posts Peter Hansen: 44 posts Terry Hancock: 44 posts Grant Edwards: 43 posts Rc: 43 posts
show more
Archives