473,566 Members | 3,102 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,403
thread by: Barry Warsaw | last post Jul 18 '05 by: Barry Warsaw
Python 2.3b2 is the second beta release of Python 2.3. There have be a slew of fixes since the first beta, and a few new "features". Our goal is to have a final Python 2.3 release by early August, so we encourage lots of testing for this beta. Highlights since beta 1 include: - IDLEfork has been merged in and now replaces the old IDLE. ...
2
1,901
thread by: Stephan Diehl | last post Jul 18 '05 by: Stephan Diehl
I have a question about metaclasses: How would be the best way to "merge" different metaclasses? Or, more precisely, what is the best way to merge metaclass functionality? The idea is basicly the following: One has several (metaclass) modules that implements an interesting feature. Lets say, I have a metaclass L, that adds logging...
0
1,814
thread by: Irmen de Jong | last post Jul 18 '05 by: Irmen de Jong
QOTW: "Giving full access rights to a secretary or new programmer ought to insure an occasional random file deletion." -- Raymond Hettinger "I always use join, but that's probably because that method is more likely to run code that I once wrote. Never trust code written by a man who uses defines to create his own C syntax." -- Fredrik...
12
8,099
thread by: alr | last post Jul 18 '05 by: alr
I need to repeat each item in a list n times, like this function does: def repeatitems(sequence, repetitions): newlist = for item in sequence: for i in range(repetitions): newlist.append(item) return newlist Output:
0
1,739
thread by: sameer | last post Jul 18 '05 by: sameer
hi guys, plzz give ur valuable suggestion for the following problem..... my objective is to retrieve a row from jtable using jython scripting.so i started from jython where i mentioned connection and with the help ofcursor ,retrieve records from table. then import(let mytable.class)class file into jython. from this i get all the data from...
3
1,918
thread by: Leo | last post Jul 18 '05 by: Thomas Heller
hi all i'm new to python and new to the group and i want to develop python with emacs :-) i try to use python-mode.el version 4.6. does somebody else uses this? or what is your recommendation for editing python code in emacs? btw: i have a little customisation problem with python mode:
4
16,287
thread by: Anand Pillai | last post Jul 18 '05 by: Bengt Richter
Hi I am quite familiar with normal python errors which can be caught by using the try... except... finally clause. But very often I find other kinds of exceptions raised in my programs. Here is an example. <TRACEBACK> Traceback (most recent call last):
3
8,485
thread by: Krisztian Kepes | last post Jul 18 '05 by: Bengt Richter
Hi ! I want to start many py programs - with other parameters. Because the programs have many to-do, I don't want to wait for them. In Delphi it is like this: >>>>>>>>>>>>>>>
0
2,198
thread by: Mickel Grönroos | last post Jul 18 '05 by: Mickel Grönroos
Hi, I'm trying to put an Tkinter.Entry of fixed size onto a specific location on a canvas using the place manager. The idea is that one can double-click a rectangle object on a canvas to get an entry field of the same size as the rectangle placed exactly over the rectangle thus creating the effect that the rectangle has entered "input...
0
3,262
thread by: Thomas Nücker | last post Jul 18 '05 by: Thomas Nücker
Hi! I have the following problem within a program, that is using the python dll. With this program i want to use Tkinter, but after setting all paths i get the following error: Traceback (most recent call last): File "c:/mtt/bg_private_area/truefalsetest.py", line 32 in ? ListSelection(datal)
2
1,588
thread by: Anand Pillai | last post Jul 18 '05 by: Aahz
Some of the newsgroups in comp.lang have the auto-mailing facility where a program mails the first time poster in the newsgroup, a welcome mail with an brief introduction to the language and the newsgroup and useful web links for the language. I recently posted in comp.lang.tcl and received a rather large welcome mail detailing tcl and the...
7
1,927
thread by: michael | last post Jul 18 '05 by: Hans Nowak
Hello, Apologies if this seems like a trivial question, but it would help me with my python, coming from a Java background. What is the preferred naming convention for a .py file, that contains a class ? For example, if I have one class (MyClass), I wouldn't really want to put it in myclass.py, as I'd end up referencing myclass.MyClass...
7
2,263
thread by: jodocus | last post Jul 18 '05 by: Martin Maney
hi, I am new to python (but not to programming - have programmed in many other languages like C++/lisp/perl etc.) and I would like to buy a good book. The local bookstore has no books about Python, so I cannot look into a book and see whether I like it. That is why I turned to this newsgroup for advise. I would like a book with a very...
0
1,475
thread by: Erhan Ekici | last post Jul 18 '05 by: Erhan Ekici
Hi, How do I get partition names (i.e. C:\ , D:\ ,E:\ on windows, hda,hda1 , hda2 on Linux machines) using Python. Thanks for answers:) Erhan, --
9
1,969
thread by: Aurélien Géron | last post Jul 18 '05 by: Aurélien Géron
Hi all, As a newly converted Python lover, I am impressed at how concise Python code actually is. But really... how concise can it GET? As an experiment to find out the very limits of Python, I'm generously offering a free smiley as well as my utmost and sincere admiration to whoever can come up with the shortest python module which can...
3
9,402
thread by: Shi Sherebrin | last post Jul 18 '05 by: News M Claveau /Hamster-P
A colleague wants some functionality that I've built in a Python class available to 'drop' into her Visual C++ project. Some time ago she gave up on trying to use 'regular' COM servers, since ActiveX controls integrate so much more easily. So if I can't wrap the Python class into an ActiveX object, I'll have to port it. I've been...
1
3,937
thread by: Ram | last post Jul 18 '05 by: Ram
Hi, The following small script has a child thread which restart the network on a Linux system. The problem is it never seems to return from the os.spawnlp. It executes some portions of the network script and then hangs. If the os.spawnlp is executed in the main thread, it works fine and there is no problem at all. os.system also has...
1
4,673
thread by: Benoit BESSE | last post Jul 18 '05 by: Egor Bolonev
Hi, I try to write a fonction which take a date and time and convert it into a NTP time. I have to use mktime but I did not work at all. Here is my code dans the exécution. Please help. Thanks def ToNTPTime(d,h): "Retuen a NTP time" year,month,day=d.split("/")
7
3,830
thread by: Greg Brunet | last post Jul 18 '05 by: Greg Brunet
I'm writing some routines for handling dBASE files. I've got a table (DBF file) object & field object already defined, and after opening the file, I can get the field info like this: >>> tbl.Fields() What I would like to do is be able to extract the field names into a single, separate list. It should look like:
25
4,314
thread by: Rim | last post Jul 18 '05 by: Corey Coughlin
Hi, I have been thinking about how to overload the assign operation '='. In many cases, I wanted to provide users of my packages a natural interface to the extended built-in types I created for them, but the assign operator is always forcing them to "type cast" or coerce the result when they do a simple assign for the purpose of setting the...
3
1,727
thread by: Rim | last post Jul 18 '05 by: Moshe Zadka
Hi, With the great unification of types and classes, what will happen to the following identity inconsistency? >>> class myint(int): pass .... >>> a=int(1); b=int(1) >>> a is b 1
0
1,327
thread by: erez | last post Jul 18 '05 by: erez
Hi, When i try to run python script that uses com object from dll (was registered already) i got the next error message the script already was run on some other computer (win2k, xp) but in this specific device it refused. The Message: dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx) File...
0
2,976
thread by: RJS | last post Jul 18 '05 by: RJS
Hi all, I can't get a py2exe compiled app to run with numarray (numarray-0.5.win32- py2.2). Also wxPythonWIN32-2.3.3.1-Py22 and ActivePython-2.2.1-222. In the sample below, commenting out "import numarray" allows the exe to run. Left in, I get "4.exe has generated errors" etc. I'm going around and around and there isn't much on Google....
0
1,227
thread by: Gina Schuffenhauer | last post Jul 18 '05 by: Gina Schuffenhauer
Hallo newsgroup, I have some questions concerning Python 2.2. First question: I try to port source code from Python 2.0 to Python 2.2.The following source code works with Python 2.0. If I compile it with Python 2.2, the modul "tci" is not imported. "tci" is a python module written by us. How can I change the source code to get it working...
6
1,544
thread by: Damir Hakimov | last post Jul 18 '05 by: Bengt Richter
Hi, All! say, i have a function: def f(*b): print b return then i do: f(3,4,5)

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.