Martin v. Löwis wrote:
The point is that you can tell UTF-8 reliably. If the data decodes
as UTF-8, it *is* UTF-8, because no other encoding in the world
produces the same byte sequences (except for ASCII, which is
an UTF-8 subset).
It should be obvious that any 8-bit single-byte character
[EMAIL PROTECTED] wrote:
I've always been happy with the debugger in PythonWin. You can even
use:
from pywin.debugger import set_trace;set_trace()
to bring up the debugger directly from a script that wasn't originally
run in the ide.
I use that one also.
There is also Boa
bruno at modulix wrote:
FWIW, I've almost never used a debugger with Python.
It's pourtant very simpa from time to time !
--
http://mail.python.org/mailman/listinfo/python-list
Today, I found strange error while using py2exe:
1. I wrote simple program and save as 1.py:
import win32ui
import win32con
win32ui.MessageBox('Test messageBox.' , 'Test', win32con.MB_OK |
win32con.MB_TOPMOST )
2. I create 1_setup.py file for py2exe:
from distutils.core import setup
import
Michael Ekstrand enlightened us with:
clients aren't expected to have their own certificates. I think that
the only time you really need the clients to have certificates is
when the certificate *is* your authentication (e.g., in OpenVPN).
Fact remains that a strong certificate is much more
Martin wrote:
The point is that you can tell UTF-8 reliably.
RFC 3629 says fairly reliably rather than reliably, but they mean
the same thing...
If the data decodes
as UTF-8, it *is* UTF-8, because no other encoding in the world
produces the same byte sequences (except for ASCII, which
Hello guys,
Is there any nice library to generate word documents using Python.
As of today I am generating a HTML document and then open it with MS
Word.
But the problem is that I am not able to control the pages in the
document and as a result of it the output looks terrible.
I have been
Sybren Stuvel wrote:
Michael Ekstrand enlightened us with:
clients aren't expected to have their own certificates. I think that
the only time you really need the clients to have certificates is
when the certificate *is* your authentication (e.g., in OpenVPN).
Fact remains that a strong
Frank Millman [EMAIL PROTECTED] writes:
You also want to generate a client
certificate to install on the server.
Both you and Sybren are insistent that this is a necessary step, but I
confess I cannot see the need for it. The client is lightweight, and
authenticates itself to the server
Python:
ActivePython 2.4.2 Build 10 (ActiveState
Corp.) based on
Python 2.4.2 (#67, Jan 17 2006, 15:36:03) [MSC
v.1310 32 bit (Intel)] on win32
-
win32ui:
Dont know how to get version info.
Little snippet
[code:1:f18a50c332]import win32ui
aa = sorted(dir(win32ui))
for i
Hi,
I'm trying to install the numpy library (precisely
numpy-0.9.6-py2.4-linux-i686) on Linux but I encounter several
problems.
After unpacking the file it creates the following folders:
usr/lib/python2.4/site-packages/numpy/
The file setup.py and the whole library is located under the folder
[EMAIL PROTECTED] schrieb:
Is there any editor or IDE in Python (either Windows or Linux) which
has very good debugging facilites like MS VisualStudio has or something
like that.
I like SPE but couldn't easily use winPDP. I need tips to debug my code
easily.
You can try out PyScripter, a
Raja Raman Sundararajan wrote:
I was wondering if there was any library as reportlab to generate word
documents.
If you are on Windows, why dont you use word for it? You can call it
from Python.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
Phone: +45 66 11 84 94
Using global variables in Python often raises chaos. Other languages use
a clear prefix for globals.
* you forget to declare a global
* or you declare a global too much or in conflict
* you have a local identical variable name and want to save/load it
to/from the global with same name
* while
Hi Robert,
I was using global variables some time ago, too.
But with the time the program simply got unmaintainable, because it is very
hard
to trace, why a global variable has some special value and not the one, you
thought it should have.
So I redesigned the program and now I can do it
I fixed problem using Atypes:
import ctypes
ctypes.windll.user32.MessageBoxA(0, 'test', 'Title',
win32con.MB_ICONINFORMATION | win32con.MB_OK |
win32con.MB_TOPMOST)
It compiles and runs fine with py2exe.
Dont remember buggy pywin32 :)
--
http://mail.python.org/mailman/listinfo/python-list
Raja Raman Sundararajan wrote:
Hello guys,
Is there any nice library to generate word documents using Python.
As of today I am generating a HTML document and then open it with MS
Word.
But the problem is that I am not able to control the pages in the
document and as a result of it the
Kent Johnson wrote:
[EMAIL PROTECTED] wrote:
But I was wondering whether I could fool or backend the normal import
mechanism. Even in Java, I can write my own class loader which can
quick compile Java snippets and load the anonymous byte code.
See
In message [EMAIL PROTECTED], Tim
Peters [EMAIL PROTECTED] writes
[EMAIL PROTECTED]
I'd like to know if for Python there is a similar program to
dynamically see the memory in a similar way.
If such tool doesn't exist yet, I'd like to know if it may be diffifult
to create it.
One already
Ross Ridge wrote:
It should be obvious that any 8-bit single-byte character set can
produce byte sequences that are valid in UTF-8.
Fredrik Lundh wrote:
it should be fairly obvious that you don't know much about UTF-8...
Despite this malicious and false accusation, your post only confirms
Hi,
good advice, but note that an envelope (e.g a HTTP request or response
body) may override the encoding in the XML file itself. if this arrives
in a MIME message with the proper charset information, it's perfectly okay
to leave out the encoding from the file.
It might be practical -
pyexpat has only limited support for non-standard encodings; the core
expat library only supports UTF-8, UTF-16, US-ASCII, and ISO-8859-1,
and the Python glue layer then adds support for all byte-to-byte en-
codings support by Python on top of that.
Interesting.
Maybe 4suite is more
Diez B. Roggisch wrote:
good advice, but note that an envelope (e.g a HTTP request or response
body) may override the encoding in the XML file itself. if this arrives
in a MIME message with the proper charset information, it's perfectly okay
to leave out the encoding from the file.
It
Ross Ridge wrote:
Despite this malicious and false accusation, your post only confirms
what I wrote above is true and what Martin wrote was false. Even with
the desperate and absurd semantic game you tried to play, like falsely
equating fairly reliably with reliably, in a database as large
Could you perhaps use basic netiquette stuff, such as sticking to the same sub-
ject line for followup posts in the same thread, and including a least some
trace
of the post you're commenting on ?
(this would be less of a problem if everyone was reading your posts in a news-
reader, but this
Unless someone has any other ideas I'm
giving up now.
btw, have you looked at using
http://musicbrainz.org/products/server/download.html
instead? they appear to guarantee UTF-8 (to the extent that *they* have managed
to autodecode the FreeDB junk, of course). not sure how complete it
Paul Rubin enlightened us with:
The client cert approach isn't strictly necessary but it means that
the SSL stack takes care of stuff that your application would
otherwise have to take care of at both the client and the server
side.
Indeed. I always try to take the route of the least wheels I
Hi,
how to enable EVT_CHAR or EVT_KEY_DOWN in a wxButton?
Thank's, Luca
--
http://mail.python.org/mailman/listinfo/python-list
Istvan Albert wrote:
See this:
https://networkx.lanl.gov/
Or if you want to be able to handle large graphs efficiently, igraph
might be a good choice:
http://igraph.sourceforge.net/
It's written in pure C, but has a Python interface and according to my
measurements, it's much faster than any
Xaver Hinterhuber wrote:
Hi Robert,
I was using global variables some time ago, too.
But with the time the program simply got unmaintainable, because it is very
hard
to trace, why a global variable has some special value and not the one, you
thought it should have.
So I redesigned the
Hello,
consider this code
class A(object):
... def __init__(self):
... self.a = 1
... self.b = 2
...
class B(A):
... __slots__ = [x,y]
...
b=B()
b.a
1
b.b
2
b.x = 100
b.y = 100
b.z = 100
no exception here
does __slots__ nothing when used in
cesco wrote:
Hi,
I'm trying to install the numpy library (precisely
numpy-0.9.6-py2.4-linux-i686) on Linux but I encounter several
This is a dumb pre-built binary package (useful perhaps because it links
against ATLAS already) built using distutils.
You don't build it and install it using
robert wrote:
Most variable read-s in Python anyway go to module globals - as there
are no other kinds of namespaces except __builtins__
your post made some sense until I got to this paragraph, which appears to
completely ignore local variables, arguments, and variables in intermediate
scopes
no, the parser must not to choke on a file for which the encoding has been
overridden.
for example, the HTTP standard allows the transport layer to recode text/*
re- sources as long as it updates the charset properly, so if you e.g send
an XML document as text/xml and charset=iso-8859-1,
Scott David Daniels wrote:
[EMAIL PROTECTED] wrote:
... Is the Python debugger fairly stable?
Yes, but it is not massively featured. The Pythonic way is to
rarely use a debugger (test first and straightforward code should
lead to shallow bugs). Often for most of us judiciously placed
Thanks guys. The networkx and igraph packages look to have the sort of
features I want. I'm surprised there's nothing in the standard module
library really.
--
Ant...
--
http://mail.python.org/mailman/listinfo/python-list
Exactly...this is how most of my Perl modules are written and tested,
actually.
--
http://mail.python.org/mailman/listinfo/python-list
Diez B. Roggisch wrote:
Interestingly enough, that has not to be the case. A document can very well
be well-formed without a header. The constraints for well-formedness are
scattered throughout the spec, so I'm not sure what they say about the used
encoding in absence of a header.
if there's
I am having some fun running a program called pygps. This uses libglade
and runs fine on my very old Redhat 7.? system running Python 1.5.2. I
have not needed to make any changes to the import files (see below). The
program uses a glade generated pygps.glade xml file for the gui. I like
the
[EMAIL PROTECTED] wrote:
Nobody likes long-winded, abstract philosophical discussions on a
technology NG.
not even on comp.lang.python ? ;-)
/F
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
I'm having difficulty installing pysqlite 2.1.3 on Mac OS X 10.4.4
There are some notes on the pysqlite wiki regarding modification of the
setup.py script and I've followed them to no avail.
Build and install appear to go smoothly but attempting to run the tests
from the python
mwt wrote:
(Whoops, again.)
def __init__(self, config_file):
self.fahdata = fahdata.FAHData()
self.INI = ConfigParser.ConfigParser()
if os.path.exists(config_file):
try:
self.INI.read(config_file)
except ConfigParser.Error,
In article [EMAIL PROTECTED],
robert [EMAIL PROTECTED] wrote:
Using global variables in Python often raises chaos. Other languages use
a clear prefix for globals.
Unsing globals raises chaos in any language. They should be shunned and
avoided.
--
Rob Cowie wrote:
There are some notes on the pysqlite wiki regarding modification of the
setup.py script and I've followed them to no avail.
Build and install appear to go smoothly but attempting to run the tests
from the python interpreter fails. Likewise any attempt to utilise
pysqlite2
I'm using FeedParser.org to import feeds into our MySQL database.
Our problem is that we haven't found a solution to translate the date
of a post item into GMT.
Any ideas?
Thanks,
Jacob
--
http://mail.python.org/mailman/listinfo/python-list
Schüle Daniel wrote:
Hello,
consider this code
class A(object):
... def __init__(self):
... self.a = 1
... self.b = 2
...
class B(A):
... __slots__ = [x,y]
...
b=B()
b.a
1
b.b
2
b.x = 100
b.y = 100
b.z = 100
no exception here
Fredrik Lundhwrote:
Could you perhaps use basic netiquette stuff, such as sticking to the
same sub-
ject line for followup posts in the same thread, and including a
least some trace
of the post you're commenting on ?
(this would be less of a problem if everyone was reading your posts
in a
Fredrik Lundhwrote:
Could you perhaps use basic netiquette stuff, such as sticking to the
same sub-
ject line for followup posts in the same thread, and including a
least some trace
of the post you're commenting on ?
(this would be less of a problem if everyone was reading your posts
in a
Fredrik Lundhwrote:
Could you perhaps use basic netiquette stuff, such as sticking to the
same sub-
ject line for followup posts in the same thread, and including a
least some trace
of the post you're commenting on ?
(this would be less of a problem if everyone was reading your posts
in a
Fredrik Lundh wrote:
[EMAIL PROTECTED] wrote:
Nobody likes long-winded, abstract philosophical discussions on a
technology NG.
not even on comp.lang.python ? ;-)
I wish :-)
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd
Hi all,
i'm looking for a module to implement a digital FIR filter!
Can anyone help me?
Thanks,
Vincent
--
http://mail.python.org/mailman/listinfo/python-list
PyDenis wrote:
1. When I post new message to WEBFORUM (not a Mailing List nor News
Group) not to include even part of message.
comp.lang.python is a newsgroup and the python-list mailing list is a mailing
list. your messages appear in both places.
/F
--
I have written a small server application (for Windows) which handles
sending and receiving information from an instant messaging client and
a database. This server needs to run 24/7, however it stops when the
computer screen is locked.
I assume there is a way to make it run in the background
Roy Smith wrote:
In article [EMAIL PROTECTED],
robert [EMAIL PROTECTED] wrote:
Using global variables in Python often raises chaos. Other languages use
a clear prefix for globals.
Unsing globals raises chaos in any language. They should be shunned and
avoided.
Solution: replace
friis wrote:
I'm using FeedParser.org to import feeds into our MySQL database.
Our problem is that we haven't found a solution to translate the date
of a post item into GMT.
from what I can tell, feedparser returns a 9-item UTC time tuple (which
is the same thing as GMT, at least for all
You can create a Windows Service which will run as long as Windows are
up, well, except if you stop it.
You can find more info here: http://www.python.org/windows/win32/
Sebastjan
On 15 Mar 2006 05:26:45 -0800, rodmc [EMAIL PROTECTED] wrote:
I have written a small server application (for
rodmc wrote:
I have written a small server application (for Windows) which handles
sending and receiving information from an instant messaging client and
a database. This server needs to run 24/7, however it stops when the
computer screen is locked.
I assume there is a way to make it run in
Schüle Daniel wrote:
consider this code
class A(object):
... def __init__(self):
... self.a = 1
... self.b = 2
...
class B(A):
... __slots__ = [x,y]
...
b=B()
b.a
1
b.b
2
b.x = 100
b.y = 100
b.z = 100
no exception here
does __slots__
How do I install Universal Encoding Detector
(http://chardet.feedparser.org/)?
Thanks,
Jacob
--
http://mail.python.org/mailman/listinfo/python-list
Enigma Curry wrote:
Can some kind person please further my education on Threads?
When I create a thread called t and I do a t.start() am I
guaranteed that t.isAlive() will return True as long as the thread
hasn't already completed? Put another way, does t.start() ever return
before
Jacob wrote:
How do I install Universal Encoding Detector
(http://chardet.feedparser.org/)?
it comes with a setup.py file, so I suppose the answer is in the usual way:
1. download
2. unpack
3. cd to the distribution directory
4. run python setup.py install
more here:
LabWINC wrote:
i'm looking for a module to implement a digital FIR filter!
Can anyone help me?
Is this for homework, for academic interest, for a control system
problem, or what? Some context would be useful in helping us answer.
(The first thing that occurs to me, for example, is why don't
It's for research work. I'm implementing an algorithm from a matlab
one.
It could be very difficult to find the fir coefficients because i have
lot of fileters to implement.
Vincent
--
http://mail.python.org/mailman/listinfo/python-list
Hi Tim,
Thanks for your PyRTF suggestion. I am checking it out now
:-)
/R
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
Rob Cowie wrote:
There are some notes on the pysqlite wiki regarding modification of the
setup.py script and I've followed them to no avail.
Build and install appear to go smoothly but attempting to run the tests
from the python interpreter fails. Likewise any
LabWINC wrote:
Hi all,
i'm looking for a module to implement a digital FIR filter!
Can anyone help me?
Thanks,
Vincent
gnuradio?
Hans Georg
--
http://mail.python.org/mailman/listinfo/python-list
Thanks :)
--
http://mail.python.org/mailman/listinfo/python-list
PyDenis wrote:
I fixed problem using Atypes:
import ctypes
ctypes.windll.user32.MessageBoxA(0, 'test', 'Title',
win32con.MB_ICONINFORMATION | win32con.MB_OK |
win32con.MB_TOPMOST)
It compiles and runs fine with py2exe.
Dont remember buggy pywin32 :)
better use
Nick Kew wrote:
Tony Houghton wrote:
...
But regardless of whether it's 'safe' amongst current devices,
you're setting yourself up for a Y2K-family bug. Except it'll
be a real one, not a storm-inna-teacup.
Hey, hey, don't go spouting off like one of those ignorant journalists!
I and a lot
While epydoc is nice, I'll point out that one thing that Unix people
like myself really like is to be able to check docs on a remote server
that we're logged into via a terminal session. The help() function in
the interpreter is great for this, although it seems that python eggs
broke it. :(
I'd love to have a unified documentation system where *all* the
documentation for *all* installed modules was available to pydoc *and*
the web browser and *all* this documentation was in .py files.
Seconded!
Mike
--
http://mail.python.org/mailman/listinfo/python-list
Jacob wrote:
How do I install Universal Encoding Detector
(http://chardet.feedparser.org/)?
The usual process:
download
unpack with your favorite tool - tar or WinZip, maybe
cd chardet-1.0
python setup.py install
Kent
--
http://mail.python.org/mailman/listinfo/python-list
I have found the Python sidebar VERY helpful:
Personally, I can't use local docs on my desktop as they may not be the
same version of the docs for the Python distro running on the server
that I'm deploying on. I usually go to python.org and use the wayback
machine to look at the old docs for the
On 3/15/06, robert [EMAIL PROTECTED] wrote:
PyDenis wrote:
I fixed problem using Atypes:
import ctypes
ctypes.windll.user32.MessageBoxA(0, 'test', 'Title',
win32con.MB_ICONINFORMATION | win32con.MB_OK |
win32con.MB_TOPMOST)
It compiles and runs fine with py2exe.
Dont
msoulier wrote:
But, if Python would match Perl for docs available on the command-line,
then I'd have it all at my fingertips. I simply don't understand why
this is not being done. When I'm coding in C, I use the manpages on the
remote host so that I know the docs are correct for my target.
Hi,
Thanks to both of you for your help.
cheers,
rod
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
robert wrote:
Most variable read-s in Python anyway go to module globals - as there
are no other kinds of namespaces except __builtins__
your post made some sense until I got to this paragraph, which appears to
completely ignore local variables, arguments, and
What's gnuradio?
--
http://mail.python.org/mailman/listinfo/python-list
On 2006-03-15, Raja Raman Sundararajan [EMAIL PROTECTED] wrote:
Is there any nice library to generate word documents using Python.
I find the following works well for me:
f = open(file.doc)
f.write(Hello there.\n)
f.write(How are you?\n)
f.close()
As of today I am generating a HTML document
In article [EMAIL PROTECTED],
=?ISO-8859-1?Q?Sch=FCle_Daniel?= [EMAIL PROTECTED] wrote:
does __slots__ nothing when used in derived classes?
Short answer: don't use __slots__ until you're comfortable writing
metaclasses and decorators. __slots__ are a performance hack strictly
for advanced
LabWINC wrote:
What's gnuradio?
http://www.gnu.org/software/gnuradio/
It's a c++ lib with a python wrapper.
BTW, thats the first hit in google ...
Hans Georg
--
http://mail.python.org/mailman/listinfo/python-list
Rob Cowie wrote:
[...]
However, if I do from pysqlite2 import test as suggested after
installation, I get the following traceback...
Traceback (most recent call last):
File stdin, line 1, in ?
File pysqlite2/test/__init__.py, line 25, in ?
from pysqlite2.test import dbapi, types,
wx is also in
a far better position for most non-trivial UIs, becuase it has
infrastructure that win32 (pretty much alone among modern UI toolkits)
lacks, like layout algorithms and i18ln support.
Qt has all of this. On all platforms. Just for the record.
And layout algorithms - that was
LabWINC wrote:
What's gnuradio?
Google dead again? Boy, must be one of these days...
Diez
--
http://mail.python.org/mailman/listinfo/python-list
I can't understand how gnuradio can help me...
I find scipy is the only way to implement a good FIR.
Thanks,
Vincent
--
http://mail.python.org/mailman/listinfo/python-list
LabWINC == LabWINC [EMAIL PROTECTED] writes:
LabWINC Hi all, i'm looking for a module to implement a digital
LabWINC FIR filter! Can anyone help me?
scipy.org
Between scipy and matplotlib, you'll feel quite comfortable with
python as a former matlab user
help scipy.filter (see FIR
LabWINC wrote:
I can't understand how gnuradio can help me...
I find scipy is the only way to implement a good FIR.
Well, then do it with scipy...
gnuradio has a module for FIR. I never used it. I just wanted to share
that information.
Hans Georg
--
On 3/15/06, Diez B. Roggisch [EMAIL PROTECTED] wrote:
wx is also in
a far better position for most non-trivial UIs, becuase it has
infrastructure that win32 (pretty much alone among modern UI toolkits)
lacks, like layout algorithms and i18ln support.
Qt has all of this. On all platforms.
Hi,
I'm just starting out with Python, and so far I am thoroughly impressed
with what you can do very easily with the language. I'm coming from a
C++ background here. A couple of questions came up as I was thinking
about dynamically typed languages:
1. If someone releases an interface in
Thank you too Georg
--
http://mail.python.org/mailman/listinfo/python-list
LabWINC wrote:
It's for research work. I'm implementing an algorithm from a matlab
one.
It could be very difficult to find the fir coefficients because i have
lot of fileters to implement.
Oh, you mean you need to find the coefficients, not just implement the
FIR filter itself. (Perhaps to
Fredrik Lundh wrote:
objects don't have names in Python, and the source is not part of
the running program.
have you read this ?
http://effbot.org/zone/python-objects.htm
I have now. Thank you very much.
objects don't have names in Python: It appears from the code that
Michael
[EMAIL PROTECTED] wrote:
Scott David Daniels wrote:
[EMAIL PROTECTED] wrote:
... Is the Python debugger fairly stable?
Yes, but it is not massively featured. The Pythonic way is to
rarely use a debugger (test first and straightforward code should
lead to shallow bugs). Often for most of us
I'm interested in finding coefficient and implementig the filter as
well.
John's post is what i need.
John Hunter wrote:
help scipy.filter (see FIR filter design below)
How can i get the help like yours?
If i type help scipy.filter it give me an error
help scipy.filter
File input, line 1
a far better position for most non-trivial UIs, becuase it has
infrastructure that win32 (pretty much alone among modern UI toolkits)
lacks, like layout algorithms and i18ln support.
Qt has all of this. On all platforms. Just for the record.
I know - so do almost all other toolkits,
Gerhard Häring wrote:
Rob Cowie wrote:
[...]
However, if I do from pysqlite2 import test as suggested after
installation, I get the following traceback...
Traceback (most recent call last):
File stdin, line 1, in ?
File pysqlite2/test/__init__.py, line 25, in ?
from
Chris Mellon wrote:
win32gui and wxPython use *exactly* the same controls in almost all
(win32ui or win32gui? the later is almost only a better ctypes replacement )
cases. If you're seeing something donald duck then you're either
doing something wrong, or you're using a custom control. wx
meeper34 wrote:
Hi,
I'm just starting out with Python, and so far I am thoroughly impressed
with what you can do very easily with the language. I'm coming from a
C++ background here. A couple of questions came up as I was thinking
about dynamically typed languages:
1. If someone
robert [EMAIL PROTECTED] wrote:
...
( And that later scheme is fairly wonderful - compare for example the
namespace fuzz in C/C++, Pascal, Ruby, ... where you never know which
module file addeds what to which namespace;
Pascal (per se) doesn't really have much by the way of namespaces
robert [EMAIL PROTECTED] wrote:
Using global variables in Python often raises chaos. Other languages use
a clear prefix for globals.
Ruby does ($ means global), but, what other languages? Perl, C, C++,
Java (taking a class's statics as Java's equivalent of other languages'
globals), etc, etc,
1 - 100 of 236 matches
Mail list logo