473,396 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

writing my own extension

hi,

i use a lot the enumerate in my scripts and got really interested in
possibly writing my own enumerate as an extension, for which i would
want to extend it to be able to pass a start and step attribute.

can anyone point me on my way with good examples for that and how to
write extensions ?

thank you in advance

Apr 10 '07 #1
1 1791
On Apr 10, 12:52 pm, "spohle" <spo...@gmail.comwrote:
hi,

i use a lot the enumerate in my scripts and got really interested in
possibly writing my own enumerate as an extension, for which i would
want to extend it to be able to pass a start and step attribute.

can anyone point me on my way with good examples for that and how to
write extensions ?

thank you in advance
The range() builtin has this functionality. Also check out
http://docs.python.org/lib/itertools-functions.html

As for writing extensions, check out the following links:

http://docs.python.org/inst/tweak-flags.html
http://docs.python.org/dist/describing-extensions.html
http://www.geocities.com/foetsch/pyt...ing_python.htm
http://cxx.sourceforge.net/
http://www.vrplumber.com/programming/mstoolkit/

Interesting notes on iterators with (or without) a "step()":

http://mail.python.org/pipermail/pyt...ry/022007.html
http://www.thescripts.com/forum/thread556059.html
http://aspn.activestate.com/ASPN/Coo.../Recipe/498272

Mike

Apr 10 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ever Olano | last post by:
Hi. I have the following questions regarding writing a PHP extension. You don't have to answer all questions. Please answer everything you can. I'd really appreciate it. 1. What is the most...
3
by: Csaba Gabor | last post by:
Firefox's configuration settings (Prefs.js) can be accomplished via the interface at about:config. Q1. Is there any such setting that can be repeatedly altered via javascript (in a vanilla...
0
by: robert | last post by:
Hi all, I'm having a hard time resolving a namespace issue in my wsdl. Here's an element that explains my question, with the full wsdl below: <definitions name="MaragatoService"...
4
by: jackpod | last post by:
Hi, I have been trying to write an image to a database table BLOB field in MySQL but when I try to retrieve the image to display it, it shows as being empty. Are there any special considerations I...
7
by: Paolo Pantaleo | last post by:
Hi, I need to write a software that allow to see the desktop and hear the microphone capture of a remote PC across a network. I need to do that for a unviresity assignement. The software must ...
5
by: thewritersclub | last post by:
Hi guys! I'm new to python so please be aware that I'm probably missing the obvious. Here's my problem... Traceback (most recent call last): File "<pyshell#37>", line 1, in <module> f =...
118
by: Chuck Cheeze | last post by:
This might be in the wrong group, but... Here is an example of my data: entry_id cat_id 1 20 2 25 3 30 4 25 5 35
16
by: inhahe | last post by:
Can anyone give me pointers/instructions/a template for writing a Python extension in assembly (or better, HLA)?
2
by: Jeff Gaines | last post by:
I am in the process of upgrading to XP 64. VS2008 is running fine but one of my apps, which adds functionality to the Explorer context menu, just won't work under XP 64. Googling resulted in my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.