473,545 Members | 2,388 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.
3
2,372
thread by: David Mertz | last post Jul 18 '05 by: John J. Lee
At the suggestion of one of my correspondents, I slightly reluctantly implemented an RSS feed for my website/writing. It is perhaps a bit crude so far, but maybe I'll spiff it up. The RSS also has an HTML front to it. If you want to see the latest news about my _Charming Python_ or _XML Matters_ columns, or about other articles (later,...
1
3,459
thread by: Andre | last post Jul 18 '05 by: Noah
I'm trying to read packets from a tun device in Python, the code I used for this is the following: f = file( '/dev/tun0', 'r+' ) pkt = f.read( 1500 ) The problem is that the f.read() call doesn't return. When I used a small value in the f.read() call instead of the 1500, like 1 or 5, it did return the first bytes of the packet. I then...
2
7,333
thread by: MK | last post Jul 18 '05 by: Miki Tebeka
I have a Win32 console application (SNMPUTIL.EXE) which listens to incoming SNMP messages: C:\>snmputil trap snmputil: listening for traps... When a trap is generated on a remote server, it is being sent to the PC running SNMPUTIL.EXE, and then finally printed out to stdout like this:
2
1,507
thread by: Lorenzo Bolognini | last post Jul 18 '05 by: Lorenzo Bolognini
Hi all, i'm googling for an old post appeared here about XML overhyped. I do remember a sentence that sounded like this (more | less): "Management thinks that webservices are good because xml is good and exchainging data between different platforms is good" I'm not able to find it could somebody point to the original post and help me...
0
1,895
thread by: postmaster | last post Jul 18 '05 by: postmaster
This is an automatically generated Delivery Failure Notification. Delivery to the recipient failed. Status Code: 5.1.1 User Unknown If you are trying to reach Blue, please send email to newaddress@bluetiger.com.
1
2,368
thread by: vincent delft | last post Jul 18 '05 by: vincent_delft
I'm using Python 2.2.2 the standard cgihttpserver (example given in the python doc). All HTML and CGI work. BUT by writing a simple python-cgi script like this : " #!/usr/bin/env python import os
8
7,074
thread by: sebastien.hugues | last post Jul 18 '05 by: John Roth
Hi I would like to retrieve the application data directory path of the logged user on windows XP. To achieve this goal i use the environment variable APPDATA. The logged user has this name: sébastien. The second character is not an ascii one and when i try to encode the path that contains this name in utf-8,
11
97,171
thread by: dmbkiwi | last post Jul 18 '05 by: dmbkiwi
I am new to this group, and relatively new to python programming, however, have encountered a problem I just cannot solve through reading the documentation, and searching this group on google. I have written a theme in python for the superkaramba theme engine on kde (see http://netdragon.sourceforge.net - if you are a kde/linux user, it is...
0
1,813
thread by: Ken Erickson | last post Jul 18 '05 by: Ken Erickson
Does anyone know if the example code in John Grayson's book is available online? He has some interesting examples and I really don't want to spend hours re-typing his work (too many typo's late at night). I rather spend time walking through the code via the debugger. TIA.
9
6,723
thread by: hokiegal99 | last post Jul 18 '05 by: Bengt Richter
This script works as I expect, except for the last section. I want the last section to actually remove all spaces from the front and/or end of filenames. For example, a file that was named " test " would be renamed "test" (the 2 spaces before and after the filename removed). Any suggestions on how to do this? import os, re, string print...
0
1,242
thread by: L-Soft list server at Fraunhofer IMK for DFNList ( | last post Jul 18 '05 by: L-Soft list server at Fraunhofer IMK for DFNList (
0
1,412
thread by: ken | last post Jul 18 '05 by: ken
Please pardon my ignorance regarding this question, I'm new to Python. I'm running Python 2.2.3 (win32) with the latest download of Python MegaWidgets 1.1. I'm attempting to run the demos but get the following: C:\Python22\Pmw\demos>python all.py Traceback (most recent call last): File "all.py", line 84, in ? DemoVersion.setPmwVersion()...
1
1,534
thread by: cybersamurai | last post Jul 18 '05 by: Michael S. Jessop
I install MacPython 2.3 on a Jaguar 2.6 on my house but I don't know how I install others modules. When I use python setup install the module is installed on usr/lib/... and not inside frameworks. How I can solve this?? Thanks about help me.
2
4,896
thread by: selwyn | last post Jul 18 '05 by: selwyn
hi all, I would like some advice on how I can include a timeout for a scanning operation using unzip on linux and os.popen3. I am scanning through about 30g of rescued zip files, looking for xml extensions within those files. What I have put together 'works', but only for what appears to be properly reconstructed files. Unfortunately,...
1
1,626
thread by: Robin Becker | last post Jul 18 '05 by: Robin Becker
Is there a preferred way to intercept floating point exceptions in python extensions? I assume one should be careful to restore any existing error handler. Does python have a standard mechanism for setting up fpu control words etc? -- Robin Becker
0
1,661
thread by: Irmen de Jong | last post Jul 18 '05 by: Irmen de Jong
QOTW: "I'll claim without proof that how mixed-type comparisons work with Python classes is also beyond wizard prediction in all cases: the implementation of comparison in Python is crushingly complicated." -- Tim Peters "Honest to God, if it doesn't have coloured cells all over the place, then they kind of stare at you like rabbits...
0
1,353
thread by: frank | last post Jul 18 '05 by: frank
I have just finished my first python application. I am a beginner so I wrote this just to improve my programming skills. it is a GUI app that scans a selected range of ip addresses and try to get info about the hosts such as users, localgroups, shares, operating system. This program only runs under windows enviorment (tested under windows...
3
1,726
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
3
7,267
thread by: Peter Vestergaard | last post Jul 18 '05 by: Peter Vestergaard
Hi Probably a simple question but I have not been able to find out how: I want my python script to generate a path based on some simple lookups and then change my path so that when the script exits my command prompt (from which I launched the script) is standing at this path. The path already exists. I have tried chdir(path), system('cd...
1
1,725
thread by: Casey Kohrt | last post Jul 18 '05 by: Alan Kennedy
I get the following error for the list item below. I know I have to encode it, but am unsure how or where to write that in. I am new to python and have had good luck thus far. Any help is greatly apprecieated. I am not on the list, so a response to me is appreciated. UnicodeError: ASCII encoding error: ordinal not in range(128) ...
1
2,297
thread by: Sean | last post Jul 18 '05 by: Eddie Corns
I'm playing around times and dates. I'd like to determine the age of particular sets of data in a user friendly matter. I've got everything ready but dealing with time in a user friendly manner. What would be a good way to express (in python): time.localtime()+30 days time.localtime()+5 minutes time.localtime()+2 months...
0
1,758
thread by: Holly | last post Jul 18 '05 by: Holly
Hello List, My windows laptop configured as: XP, Python 1.5.2, MySQL 4.0.9 and Appache 1.3.17 A form ("Post" has been used) has a product list with about 400 products. The user checks each item he wants and place an order. NOw when they hit "Place Order" or "Cancel Order" , apache pops an error in log:
12
2,782
thread by: Raymond Hettinger | last post Jul 18 '05 by: Chris Reedy
For your amusement and edification, I'm working on a series of Python puzzles designed to highlight areas of the language known only to those who have read the docs more than once. Each of the following sections contains a code snippet that someone, somewhere might find a little mysterious. Your goal is to sleuth through the code,...
1
2,657
thread by: .d.hos | last post Jul 18 '05 by: .d.hos
ok, fairly new to python, relatively familiar w/ ms-sql. here's my issue: my .py script parses the contents of a (tab delim.) flat file, then attempts to insert the information into the db. I've been fighting this for a day or so, and i'm stuck on the db insertion... basically the script uses .readlines() to capture the flat file...
6
5,961
thread by: 0wl | last post Jul 18 '05 by: Peter Hansen
Hi, I am trying to get the value of child from xmlstr = """<p:root xmlns:p="http://tempuri.org/string"><p:child DataType="String">Hellpppp</p:child></p:root>""" using doc=parseString(xmlstr) nodeList = xml.xpath.Evaluate("/p:root/p:child/text()", doc)

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.