473,608 Members | 2,689 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.
0
1,565
thread by: Andrew Gregory | last post Jul 18 '05 by: Andrew Gregory
In Python 2.2, I compiled some C++ code on Windows (MinGW compiler) to create an extension using distutils and the following setup.py file: from distutils.core import setup, Extension setup (name = "_pysimple", version = "1.0", maintainer = "AG", maintainer_email = "xxx@xx.co.uk", description = "Sample Python C++ DLL", ext_modules = ,
1
1,623
thread by: Wiebke Pätzold | last post Jul 18 '05 by: Brian Kelley
Hi all! I have to work with MetaKit. My job is it to filter. For example: If I search for the initial letter "P", the programm should all results print with this characteristic. Couls somebody help me with this task? Wiebke
0
1,555
thread by: martin z | last post Jul 18 '05 by: martin z
I'm having a lot of trouble figuring out the details of controlling Python compiling. I can compile and embed just fine, but I want some finer granularity on what gets compiled into Python. I can find little to no documentation of the compiler flags besides the ones essential to operating system compatibility. How does one choose what...
5
1,840
thread by: meinrad recheis | last post Jul 18 '05 by: Heather Coppersmith
hi pythoneers i am very annoyed by the List's index out of bouds exception it forces me to complicate my code by adding length checking i might be spoilt by Ruby which returns nil for not existing indices. i want to change the List so that it returns None if the index for accesssing list elements is out of bound.
0
1,203
thread by: Erendil | last post Jul 18 '05 by: Erendil
Alright, this is my first post here. =) Let's try to get this right? I have a slight problem right now. I wrote a plugin architecture in Python, allowing any python app or python using app to use plugins. It's very flexible and open-ended, except for one thing: It has to use imp to load python source from files. Now, using imp is not the...
12
3,015
thread by: vincent_delft | last post Jul 18 '05 by: Jon Ribbens
I'm looking for a Web Tool kit to build web pages with the following criteria (in priority order) : - easy to use, develop (reuseability of code, ...) - flexible (ideally should run with Python CGIHTTPServer and/or with Apache (with or wihout mod_python) - possibility to have load balancing and/or caching (for very high loaded web pages) ...
0
1,287
thread by: Colin J. Williams | last post Jul 18 '05 by: Colin J. Williams
This PEP was written 30 or more months ago. It appears to set out design objectives for what is becoming numarray. The original ArrayType and Array seem to have become NDArray and NumArray/ComplexArray respectively. The use of __init__ seems to have been deprecated in favour of factory functions.
5
1,453
thread by: Simon Burton | last post Jul 18 '05 by: Simon Burton
It seems this is a more general way to build classes than inheritance. Is this a reasonable viewpoint? >>> >>> def meth1(self): .... print "i am meth1" .... >>> def meth2(self): .... print "i am meth2" ....
6
3,250
thread by: Stephen Boulet | last post Jul 18 '05 by: Skip Montanaro
When I upgrade from 2.2.3 to 2.3 on windows, do I first uninstall 2.2.3? -- Stephen
1
2,210
thread by: Sybren Stuvel | last post Jul 18 '05 by: Sybren Stuvel
Hi there! I'm going on a holiday, and to leave something behind to remember me by, I've released Discuss Jabber 0.0.1. It's a jabber client written in Python/Qt for the Sharp Zaurus. It is still lacking a lot of features, but if you already have a jabber account somewhere, you can use this baby to chat on your Zaurus. Feel free to take a...
6
2,110
thread by: Guyon Morée | last post Jul 18 '05 by: wzhang
I've been looking for a nice python editor for a while. I was using a great general purpose editor called EditPlus. It did the job pretty good.... I've now downloaded Eclipse with the TruStudio plug-ins from www.xored.com and it's great! i had to share that with you guyon
1
2,372
thread by: nabugoon | last post Jul 18 '05 by: Cliff Wells
Hi all. I'm trying to write gnome applet program with python. But, it is too difficult to find any document about that. One web page I had found was old. (http://www.onlamp.com/pub/a/python/2000/07/25/gnome_applet.html?page=2) There is no AppletWidget attribute anymore and 'Gtk' prefix at gtk module functions Please let me know some...
5
1,444
thread by: Danny Castonguay | last post Jul 18 '05 by: John Hunter
Simple question but I can't find the answer. Using an example: listA = listB = listA listB.append(3) #listA now is I want to avoid listA's value to change. Clearly, "listB = listA" creates the problem. listB and listA become two pointers to the same object. How then, do I duplicate the two objects; ie make a copy of the
1
1,895
thread by: Rajarshi Guha | last post Jul 18 '05 by: Scott David Daniels
Hi, I have a large list of words (each on its own line) and I would like to find words that contain a specific string. I have been trying to use a regexp but I cant see how I can find the word that contained the regex pattern - all I get is the pattern itself if I use match or findall. I know that I could just go through the list line by...
3
1,464
thread by: Richard Wesley | last post Jul 18 '05 by: John J. Lee
Hi all - I am trying to retrofit some units test into our code using the unittest module. I can get individual rewrites to work, but I am having trouble writing the "one test to run them all and in the darkness bind them" script. There are two main sources of trouble: - Test data that is stored next to the script that uses it; -...
4
1,394
thread by: Guyon Morée | last post Jul 18 '05 by: Irmen de Jong
suspect that most time-critical code is not written in python. Depends on which time is critical: CPU time, or programmer time? -jcr
1
1,644
thread by: Guyon Morée | last post Jul 18 '05 by: Mark Hammond
I recently found out about XPCom and it's python bindings and it sounded very promising. Then I found out that the source of this information was pretty old. I was wondering what the status is currently. I couldn't find any documentation or binaries for the python interface. has anyone examples, docs, binaries, urls, etc????
2
2,025
thread by: Mauro Baraldi | last post Jul 18 '05 by: Irmen de Jong
Hello World ! Someone can help how to convert a number to it name. Well I'll explain... 11 -> leven. 48 -> forty eight. Something like it. Thanks
2
6,925
thread by: HP | last post Jul 18 '05 by: Kevin Cazabon
I am using urllib.urlretrieve() to download a file from a web site. THe trouble is that the file name has spaces in it, such as "string string1 foo.doc". The statement: urllib.urlretrieve("http://website.com/path/string string1 foo.doc", "local_file"); produces local_file which contains the following one line:...
7
2,734
thread by: Tino Lange | last post Jul 18 '05 by: Paul Rubin
Hi! I identified a bottleneck in my programs. I just want to "encrypt" data by easy xoring. Ok - that's no encryption at all - I know. But it's hardly readable - and that's enough :-) Just some quick obscurity. It turns out not to be quick at all. I really didn't expect this to be a bottleneck, but it takes quite some time.
3
5,194
thread by: Rajarshi Guha | last post Jul 18 '05 by: Mark Day
Hi I have a file containing 168092 lines (each line a single word) and when I use for line in f: s = s + line it takes for ages to read it all in - so long in fact that it makes the program unusable. Is there any way to do something like C's fread in Python so that I can just slurp in 1.7MB of data at one go, rather than
2
2,564
thread by: BalyanM | last post Jul 18 '05 by: Andrew Dalke
Hi, I am new to python.I am using it on redhat linux 9. I am interested to run python on a sun machine(SunE420R,os=solaris) with 4 cpu's for a pattern discovery/search program on biological sequence(genomic sequence).I want to write the python code so that it utilizes all the 4 cpu's.Moreover do i need some other libraries. Kindly advice....
3
2,074
thread by: Rich | last post Jul 18 '05 by: Rich
Hi all, I'm trying to write an app to monitor an IIS server, by connecting and getting a page via httplib. the problem seems to be when IIS (or ASP) dies httplib does not always return and sometimes I'm left with an app that hangs. what is the best way to handle this ? thanks, rich.
5
2,727
thread by: Udo Gleich | last post Jul 18 '05 by: Jeremy Bowers
Hi, I try to implement mixin classes. Thats why I need to make a new class at runtime. --tmp.py------------------------------------- import new class K1(object):
6
1,375
thread by: David Lees | last post Jul 18 '05 by: David Lees
Flawless install and it ran my very simple minded (try not to laugh) nested loop integer arithmetic benchmark twice as fast as 2.2.3 version 2.3 5.04 sec version 2.2.3 9.77 sec import time def speedTest(N): t1 = time.time() k = 0

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.