473,606 Members | 2,453 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.
1
1,812
thread by: Stan Cook | last post Jul 18 '05 by: Ben Finney
I'm trying to have my program write to a log file. I have the idea, but I'm getting an error and don't understand why. File "D:\AetInstall\aet.py", line 201, in load_progs _log.write(string.ljust( _serv, 25)) AttributeError: 'str' object has no attribute 'write' I get the above message from this section of code: for s in _image:
14
2,643
thread by: Mars | last post Jul 18 '05 by: Ian Bicking
I have looked long and hard at Mr. Martelli's Borg recipe: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66531 It is a very useful substitute for a Singleton, but I can't figure out how it works. _shared_state is never assigned any value, only self.__dict__ is assigend self._shared_sate's value - or rather (self.)_shared_state...
2
5,824
thread by: Jørgen Hansen | last post Jul 18 '05 by: Jørgen Cederberg
Hi I have a problem with a Listbox in Tkinter. When I tab through several widgets with the tab-key, the listbox looses its selection, even though it has been selected with .selection_set. The example below demonstrates this. Can anyone provide me with some help on this? Regards Jorgen
7
11,499
thread by: Grant Edwards | last post Jul 18 '05 by: Gerhard Häring
How does one do raw Ethernet under Win32? Ultimately, I want to do it in a Python program, but if somebody can point me to a clue on how to do it from C, I could probably figure out the rest. I want to: 1) Send an arbitrary Ethernet packet. [Well, not completely arbitrary, the source MAC will be "right", but the protocol number is a...
4
11,152
thread by: ken | last post Jul 18 '05 by: ken
I've been looking for a solution to a string to long conversion problem that I've run into >>> x = 'e10ea210' >>> print x e10ea210 >>> y=long(x) Traceback (most recent call last): File "<pyshell#2>", line 1, in ? y=long(x)
0
1,570
thread by: Grant Edwards | last post Jul 18 '05 by: Grant Edwards
How do I make sure that sys.stdout (or sys.stdin) is in "binary" mode? This seems to work, is it the "right" way of doing it? sys.stdout = os.fdopen(sys.stdout.fileno(),'wb') -- Grant Edwards grante Yow! -- I can do at ANYTHING... I can
1
1,636
thread by: Psymaster | last post Jul 18 '05 by: John Roth
How could I do that? I'm writing an image viewer and I would want to associate all images to be opened with my proggie when they are double-clicked.
0
1,793
thread by: Garth | last post Jul 18 '05 by: Garth
Hi, I think there's an error in ther socketmodule.c code under windows. The code in internal connect should test exceptfds to check for connecttion refused. If this is so it should call getsockopt(SOL_SOCKET, SO_ERROR,..) to get the error status. (Source microsoft Platform SDK) If this isn't then the asynccore module fails on windows and...
3
10,562
thread by: Don Hiatt | last post Jul 18 '05 by: Skip Montanaro
Greetings, Is there an easy way to remove multiple non-printable (e.g. "not strings.printable") from a string? Perhaps something like foo.replace(list_of_nonprintables, '') if it only existed? :-) Cheers, don
0
1,354
thread by: John Goerzen | last post Jul 18 '05 by: John Goerzen
Hello, I am the author of OfflineIMAP, a program that currently is a heavy user of threads. For various reasons (see below), thread groups are something that is highly desirable for me in Python. Is anyone aware of an implementation of thread groups for Python? Is anyone else working on this? Is anyone else experiencing this sort of...
0
1,648
thread by: David Stark | last post Jul 18 '05 by: David Stark
I have Mac OS 10.2 which ships with python. I downloaded TclTkAqua from ActiveState and installed it. Then I get: >>> import Tkinter Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.2/lib-tk/Tkinter.py", line 35, in ? import _tkinter # If this fails your Python may not be configured for Tk...
0
1,400
thread by: David Stark | last post Jul 18 '05 by: David Stark
I have Mac OS 10.2 which ships with python. I downloaded TclTkAqua from ActiveState and installed it. Then I get: >>> import Tkinter Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.2/lib-tk/Tkinter.py", line 35, in ? import _tkinter # If this fails your Python may not be configured for Tk...
2
16,395
thread by: Michael Bendzick | last post Jul 18 '05 by: Alan Gauld
Is there a simple way in python to read a keyboard scan code? I'm working on a shell script that interfaces with a proprietary keyboard device (extra buttons) and need to be able to distinguish between those keys. Thank you
1
2,410
thread by: Joe Kmoch | last post Jul 18 '05 by: Ben Finney
I've tried to install python2.2 on our Solaris 8 system using the package available on the sunfreeware.com site. When I try to run python I get the following: # ls -al python2.2 -rwxr-xr-x 1 bin bin 4902360 Feb 17 20:44 python2.2 # python2.2 ld.so.1: python2.2: fatal: libstdc++.so.5: open failed: No such file or directory...
2
3,427
thread by: Codepunk | last post Jul 18 '05 by: John Landahl
Hi Everyone, I have written a specialized server in python and now I wish to look at making it scalable. To do this I wish to include automatic discovery of peer nodes operating on my network. Can anyone provide me a pointer as to how I do such a thing? By how to do it I mean how does something like that work at the network level? ping...
3
3,461
thread by: Xah Lee | last post Jul 18 '05 by: Peter Hansen
it would be good if Bash and Python have a decent logo. the current logos of simplistic font http://cnswww.cns.cwru.edu/~chet/img/bash-org.jpg http://python.org/pics/pythonHi.gif are homely. -- some quick tips for good logos:
2
3,008
thread by: Bryan | last post Jul 18 '05 by: Raymond Hettinger
i tried using ndiff and Differ.compare today from the difflib module. i have three questions. 1. both ndiff and Differ.compare return all the lines including lines that are the same in both files, not just the diffs. is the convention to take the output and then filter out lines that contain a space as the first character to just get the...
0
1,293
thread by: Barry Warsaw | last post Jul 18 '05 by: Barry Warsaw
Python 2.3c2 is the second and last release candidate for Python 2.3. There have been a bunch of bug fixes and memory leak plugs since the first release candidate, but no new features. As described in PEP 283, Python 2.3 final will be released before the end of July 2003. We are planning for Tuesday 29-Jul-2003 if everything looks good. ...
10
2,646
thread by: Conrad | last post Jul 18 '05 by: yaipa h.
Greetings, I have a need to print from Win98SE to a little serial label printer provided by United Parcel, so based on Mark Hammond's recommendation in 'Programming on Win32' I decided to try the Sio module at http://starship.python.net/crew/roger/ My problem:
1
1,673
thread by: Holden Caulfield | last post Jul 18 '05 by: Martin v. Löwis
Hi, I am trying to build Python 2.3 RC1 (2.3c1) on Cray SV1 running UNICOS 10.0. And I am difficulty building it on this architecture. Background -------------- .. Python 2.2.3 builds withs no problem. (without any changes).
3
1,549
thread by: Guyon Morée | last post Jul 18 '05 by: Guyon Morée
recently i've visited SARAH, the academic supercomputer in Amsterdam, Holland. this is next to the CWI, where Guido founded Python.... ....Yeah!...
1
1,902
thread by: TheDustbustr | last post Jul 18 '05 by: Sami Hangaslammi
<code> from __future__ import generators from time import time threads= def sleep(n): print "In Sleep" t=time() while (t+n>time()): yield None
3
3,391
thread by: Sonia Rovner | last post Jul 18 '05 by: Sonia Rovner
Hello, I'm using Python2.2.1 and Tcl/Tk 8.3 running on Win2000. I've been researching how to change the icon on the title bar and found that hackicon is the one I should pursue. However, hackicon package uses a dll. When I run the hi.py, I get an error saying ImportError: DLL load failed: The specified module could not be found. I copied...
3
2,816
thread by: Don Rivard | last post Jul 18 '05 by: Don Rivard
zope 2.71b ZMySQLDA 2.08 MySQL-python-0.9.2 mysql 3.23.55NT When I attempt to connect, by creating a Add Z MySQL Database Connection, I set the connection string to database user password, and i keep getting the following error Site Error An error was encountered while publishing this resource.
0
1,254
thread by: Ton K. | last post Jul 18 '05 by: Ton K.
Folks, I'm experiencing this myself with an event driven simulator that makes *heavy* use of after() and after_cancel(). I've seen references to this bug. Has it been fixed in Python 2.2.2? Python 2.3? Thanks Ton K.

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.