473,554 Members | 5,383 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python Forum

Python programming language - Ask questions about python interpreter, control flow, data structures, modules errors, classes, standard library, gui, databases, unit testing, object oriented, structured programming and more.
36
2,158
thread by: Gonçalo Rodrigues | last post Jul 18 '05 by: Alex Martelli
I've lost the original thread on my news reader so I'm opening a new one. First, i like the name ireverse, much better then inreverse (eek!). Just a simple comment/question: - Why a builtin function? Why not just stuff it in the itertools module? The builtins is already fat as it is, making it fatter is not the way to go, IMHO. I'd...
36
2,598
thread by: Tim Churches | last post Jul 18 '05 by: Jarek Zgoda
If a compiled Python extension module B includes code from some other software A which is licensed only under the GPL, do other Python programmes, C, which import module B also need to be licensed under a GPL-compatible license (assuming C is/are to be distributed to third parties)? I think the answer is yes, both from a lay (IANAL) legal...
36
1,994
thread by: Antoon Pardon | last post Jul 18 '05 by: Jacek Generowicz
I'm rather new at this, so I don't know how I should introduce this, nor whether these ideas are worth much but here goes. What I would like to change is access to variables on an intermediate scope. Given the following example def fun_1() a = some_value
36
2,599
thread by: Armin Rigo | last post Jul 18 '05 by: Stephen Horne
Hi! This is a rant against the optimization trend of the Python interpreter. Sorting a list of 100000 integers in random order takes: * 0.75 seconds in Python 2.1 * 0.51 seconds in Python 2.2 * 0.46 seconds in Python 2.3
36
28,064
thread by: Riccardo Rossi | last post Jul 18 '05 by: Alex Martelli
Hi all! How does Python pass arguments to a function? By value or by reference? Thanks, Riccardo Rossi.
36
6,335
thread by: Andrea Griffini | last post Jul 18 '05 by: Jack Diederich
I did it. I proposed python as the main language for our next CAD/CAM software because I think that it has all the potential needed for it. I'm not sure yet if the decision will get through, but something I'll need in this case is some experience-based set of rules about how to use python in this context. For example... is defining...
36
2,726
thread by: ChinStrap | last post Jul 18 '05 by: Greg Ewing
When not using the interactive prompt, what are you using? I keep hearing everyone say Emacs, but I can't understand it at all. I keep trying to learn and understand why so many seem to like it because I can't understand customization even without going through a hundred menus that might contain the thing I am looking for (or I could go learn...
36
42,379
thread by: Remi Villatel | last post Jul 19 '05 by: Mike Meyer
Hi there, There is always a "nice" way to do things in Python but this time I can't find one. What I'm trying to achieve is a conditionnal loop of which the condition test would be done at the end so the loop is executed at least once. It's some way the opposite of "while". So far, all I got is:
36
9,442
thread by: rbt | last post Jul 28 '05 by: Steve Holden
Say I have a list that has 3 letters in it: I want to print all the possible 4 digit combinations of those 3 letters: 4^3 = 64 aaaa
36
3,251
thread by: dcrespo | last post Oct 13 '05 by: Paul Rubin
Hi all, I have a program that serves client programs. The server has a login password, which has to be used by each client for logging in. So, when the client connects, it sends a string with a password, which is then validated on the server side. The problem is obvious: anyone can get the password just sniffing the network. How can I...
36
4,012
thread by: Wilfredo Sánchez Vega | last post Dec 19 '05 by: and-google
I'm having some issues around namespace handling with XML: >>> document = xml.dom.minidom.Document() >>> element = document.createElementNS("DAV:", "href") >>> document.appendChild(element) <DOM Element: href at 0x1443e68> >>> document.toxml() '<?xml version="1.0" ?>\n<href/>' Note that the namespace wasn't emitted. If I have PyXML,
36
4,087
thread by: peter.mosley | last post Dec 28 '05 by: Kay Schluehr
I am trying to learn GUI programming in Python, but have to confess I am finding it difficult. I am not an experienced programmer - just someone who from time to time writes small programs for my use. Over the years I have moved from GWBASIC to QBASIC to Visual Basic, and now trying to move across to a Linux platform. Python seems to be...
36
3,428
thread by: Alex Martelli | last post Apr 28 '06 by: Chris Mellon
So, I thought I'd tool up to let me build and test Python extensions on Windows (as well as Mac and Linux) -- I'm trying out Parallels Workstation beta on my new Macbook Pro (and so far it seems to work very well), I bought and installed a Win2000 Pro on it (since according to the grapevine it works better than XP in various kinds of virtual...
36
10,945
thread by: python | last post May 29 '06 by: Antoon Pardon
I have new a list , when it hava large number of values, I wonna to delete all the values in it,how to do? And, if a list have 801 values, I want to get its values index from 300 to 400, could use list1,are right me?
36
1,852
thread by: danielx | last post Aug 3 '06 by: Alex Martelli
At first I was going to post the following: <!-- beginning of my original post --> I just discovered the inspect module, which contains the isfunction and ismethod functions. For some reason, I used to be under the impression that Python methods are no different from Python functions. Naturally, I wondered why both of these needed to...
36
1,284
thread by: castironpi | last post Feb 21 '08 by: castironpi
I'm a little dissatisfied, and just thinking aloud. Some of the ideas that have been proposed on Python-ideas as well as Python, have received partial evaluation from the alphas. Lesser individuals than they could not have invented Python, and would be liable to ban me merely for this post. Notwithstanding. The reason they have cited...
36
1,571
thread by: kwitters | last post Apr 1 '08 by: MRAB
I don't know if this is the right place to discuss the death of <in Python 3.0, or if there have been any meaningful discussions posted before (hard to search google with '<>' keyword), but why would anyone prefer the comparison operator != over <>??? I've written an article about it to try and save this nice "is not equal" operator,...
37
17,045
thread by: Grzegorz Staniak | last post Jul 18 '05 by: Bengt Richter
Hello, I'm a newbie Python user, a systems administrator - I've been trying to switch from Perl to Python for administrative tasks - and one thing I cannot understand so far is why I need the special 'self' (or anything esle) argument in class method definitions. I might have missed an explanation in the docs, a quick Google search did not...
37
10,392
thread by: Ubaidullah Nubar | last post Jul 18 '05 by: Christian Reis
Hi, How well is Python suited for developing database based applications? I am new to Python so please bear with me if some of the questions are too simple. I specifically have the following questions: 1. Is there an example of a simple data-entry application written in Python using a GUI interface? Something like a simple address book...
37
40,425
thread by: Jon Perez | last post Jul 18 '05 by: Skip Montanaro
I saw this code snippet: sock.listen(20) for _ in range(20): newsock, client_addr = sock.accept() print "Client connected:", client_addr data = "" why use _ for this example? Is there any optimization to be had using it?
37
2,580
thread by: Bengt Richter | last post Jul 18 '05 by: Anthony Baxter
ISTM that @limited_expression_producing_function @another def func(): pass is syntactic sugar for creating a hidden list of functions. (Using '|' in place of '@' doesn't change the picture much (except for people whose tools depend on '@' ;-)). I.e., (not having the source or time to delve) the apparent semantics of the above is...
37
2,590
thread by: Carlos Ribeiro | last post Jul 18 '05 by: Nick Vargish
Oh well. A mailing list is not the most appropriate place for rants (a blog is better), but it's still better than keeping it for myself. I'm frustrated. My search for a good IDE to support my activities -- doing development for Python in the Windows environment -- are not being succesful as I had originally dreamt. I have big constraints on...
37
2,803
thread by: Mike Meng | last post Jul 18 '05 by: Dirk Thierbach
hi all, I'm a newbie Python programmer with a C++ brain inside. I have a lightweight framework in which I design a base class and expect user to extend. In other part of the framework, I heavily use the instance of this base class (or its children class). How can I ensure the instance IS-A base class instance, since Python is a fully dynamic...
37
2,759
thread by: michele.simionato | last post Jul 18 '05 by: Steve Holden
Paul Rubin wrote: > How about macros? Some pretty horrible things have been done in C > programs with the C preprocessor. But there's a movememnt afloat to > add hygienic macros to Python. Got any thoughts about that? "Movement" seems quite an exaggeration. Maybe 2-3 people made some experiments, but nobody within the core Python developers...
37
4,845
thread by: ajikoe | last post Jul 18 '05 by: Dennis Lee Bieber
Hello, Is anyone has experiance in running python code to run multi thread parallel in multi processor. Is it possible ? Can python manage which cpu shoud do every thread? Sincerely Yours, Pujo

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.