| |
thread by: David Bear |
last post Jul 18 '05 by: Hans-Joachim Widmaier
I'm writing a filter and would like to be able to do what the Linux
'file' command does, i.e. look at a couple of bytes to see what kind of
data I'm dealing with, the branch based on the type.
I scanned the python library and couldn't find anything that seemed to
approximate this. I know I could do os.popen and call the file
command then...
|
thread by: Achim Domma |
last post Jul 18 '05 by: Achim Domma
Hi,
should the HTMLParser be able to handle unicode input? I get the following
traceback:
self.feed(self.data)
File "C:\Python23\lib\sgmllib.py", line 94, in feed
self.goahead(0)
File "C:\Python23\lib\sgmllib.py", line 183, in goahead
self.handle_entityref(name)
|
thread by: ads |
last post Jul 18 '05 by: David M. Cook
Hi All,
I need some help, whe trying to run some gtk examples, show below
messages:
Traceback (most recent call last):
File "D:\Downloads\python\test\pygtk\examples\pygtk-demo\demos\stock_browser.py", line 216, in -toplevel-
main()
File "D:\Downloads\python\test\pygtk\examples\pygtk-demo\demos\stock_browser.py", line 160, in main
|
thread by: dan |
last post Jul 18 '05 by: Jacek Generowicz
I was recently surprised, and quite shocked in fact, to find that
Python treats negative indices into sequence types as if they were
mod(length-of-sequence), at least up to -len(seq).
This fact is *deeply* buried in the docs, and is not at all intuitive.
One of the big advantages of a high-level language such as Python is
the ability to...
|
thread by: John Ladasky |
last post Jul 18 '05 by: Jacek Generowicz
Hi there,
Just wanted to share a frustrating programming bug that, when I
figured it out, made me gasp, and then laugh.
In one of my programs I wrote...
c = max(a,b)
....and I was getting the most annoying, frustrating error message:
|
thread by: Gaubitzer Erwin |
last post Jul 18 '05 by: Gaubitzer Erwin
Hi everybody
I want to recompile the DISLIN graphics module for Python under Linux, because
I think it is one of the best graphics libraries at present.
The included module was for version 2.0 and I want it for 2.2 or maybe 2.3.
The problem is, that I use the small make_py script which only
calls the gcc compiler
CC="gcc -fPIC -c -O"...
|
thread by: Maxime Biais |
last post Jul 18 '05 by: Max M
Hello,
I heard that is possible to replace %(word) in a string with a dictionary
containing { "word" : "replaced word" } with a function or a builtin from
the python library.
For example with the string: "hello, %(word1) %(word2) !" and the
dictionary: {"word1" : "python", "word2" : "lovers"} the final string
would be: "hello python...
|
| |
thread by: Paul Moore |
last post Jul 18 '05 by: Invalid User
I was just writing some code which did date/time manipulations, and I
found that the Python 2.3 datetime module does not supply a number of
fairly basic functions. I understand the reasoning (the datetime
module provides a set of datatypes, and doesn't attempt to get into
the murky waters of date algorithms) but as these things can be quite...
|
thread by: Tom |
last post Jul 18 '05 by: Max M
Hi,
I have a list that consists of lists.
E.g. T=, , ]
Is there a way to address the a specific component in the "inner" list
directly?
E.g. right now I want to get the second value of the first list.
Unfortunately I have to save it to a variable first and then read it.
a = T
print a
|
thread by: Christopher Blunck |
last post Jul 18 '05 by: Christopher Blunck
This is shameless self promotion, so please discard it if you're
offended. But if you're a geek maybe you'll read on . . .
My family owns a house on the Outer Banks of North Carolina. On top
of our house is a Davis Vantage Pro weather station. I have a daemon
running every minute capturing weather data into a MySQL database.
The data...
|
thread by: srijit |
last post Jul 18 '05 by: Steve Holden
Hello All,
I have been seeing this term "duck typing" for quite sometime now. It
will be nice if one of us can give an example in Python demonstrating
duck typing and/or link to some Python references.
Regards,
Srijit
|
thread by: Link |
last post Jul 18 '05 by: Link
Hello!I am new to Python and I would like to rewrite the following code to
python use to call by C program:// JPython code
=======================================
import org.python.util.PythonInterpreter;
import org.python.core.*;
public class SimpleEmbedded {
public static void main(String args)
throws PyException
{
|
thread by: Grant Edwards |
last post Jul 18 '05 by: Dave Reed
I see there's a Python binary package available for the Sharp
Zaurus PDA. Has anybody deleloped an app for that platform?
I'm wondering if the resource requirement of Python are a
problem on that platform.
--
Grant Edwards grante Yow! Am I accompanied by
at a PARENT or GUARDIAN?
visi.com
|
thread by: python |
last post Jul 18 '05 by: David Eppstein
When I pass a function as an arg, like for map(...), how do I pass args to
use for that function?
If I have a function like this:
def pretty_format(f, fmt='%0.3f'):
return fmt % f
I want to use it with map() like this:
|
thread by: John D |
last post Jul 18 '05 by: Simon Burton
I'm writing a class definition in python with some array atributes
from Numeric 2.0. I'm using UserArray, UserList, to subclass my
classes. But some of the methods I need to write in C mainly because
of computing speed. I need to pass to those C functions array and
lists objects that the C functions can access their contained values
like...
|
| |
thread by: ads |
last post Jul 18 '05 by: Graham Fawcett
Hi Everyone,
I'm starting learning python about 2 weeks, and still have
difficulties to create GUI based application because I never learn
about classes and other OOP things. Does anyone knows how to
create text console application like clipper using python.
Thanks,
|
thread by: Alan Dechert |
last post Jul 18 '05 by: Alan Dechert
A couple of months ago, I posted a call for volunteers on C.L.PY for our
demo voting system development project (open source Python on SourceForge).
I am very pleased with the result so far. We have some excellent developers
to go along with some top notch experts in voting technology we have on
board.
David Mertz has taken the Development...
|
thread by: Fernando Armenta |
last post Jul 18 '05 by: Christos TZOTZIOY Georgiou
Hello!
I am new to Python and I would like to write the following code:
I need to check for a directory and move it to other directory if is
found. The directory always starts with outlog.XYZ and ends in XYZ
|
thread by: python |
last post Jul 18 '05 by: M.-A. Lemburg
Hi-
I want to make a list of mx.DateTime objects that cover all the monthly
intervals between two points. For example:
>>> import mx.DateTime
>>> nov1999 = mx.DateTime.Date(1999, 11)
>>> mar2003 = mx.DateTime.Date(2003, 3)
>>> alldates = mk_list(startdate=nov1999, enddate=mar2003)
|
thread by: Daniel Joyce |
last post Jul 18 '05 by: Markus Wankus
Well, it seems there are groups of python audio interface libraries out
there.
One problem. I can't tell if any of them support multiple sound cards. I'm
working on a project that will require me to access and record from more
than one soundcard.
Does anyone know of a Python wrapper that allows this? I know Alsa allows
multiple sound...
|
thread by: Partho Bhowmick |
last post Jul 18 '05 by: Harri Pesonen
I am building extension modules for Python 2.3 under Windows using MS Visual
Studio .Net 2003.
In the debug build, there is a pragma statement in <pyconfig.h> that causes
a link to the lib python23_d.lib
This library does not exist.
Am I missing something or is the installation missing something?
|
thread by: M-a-S |
last post Jul 18 '05 by: M-a-S
How can I have tooltips for buttons of a toolbar
or for control items of a dialog?
Does such feature exist at all?
M-a-S
|
thread by: Tobiah |
last post Jul 18 '05 by: Erik Max Francis
This is a stumbling block for me. Is there
a better way to output *just* what I want?
I want the output "foobar"
>>> print "foo"; print "bar"
foo
bar
>>> print "foo",; print "bar"
|
| |
thread by: Larry |
last post Jul 18 '05 by: Larry
I've had a production system running for a long time that uses
xmlrpclib with timeoutsocket, and with my recent upgrade to 2.3 it's
no longer able to use xmlrpclib with the xmlrpc servers I communicate
with. I can call remote procedures still, but as soon as I import
timeoutsocket and the old socket switcharoo is done it's over.
To add to...
|
thread by: Patrick Useldinger |
last post Jul 18 '05 by: M-a-S
Hi,
I have the following configuration:
- Apache 2.0.47 (win32)
- mod_python 3.0.3 win32
- python 2.3
I have added the loadModule command for mod_python: "LoadModule
python_module modules/mod_python.so", and the file is there.
|