Re: Controlling WinAMP (WM_COPYDATA problem)

2005-06-30 Thread Thomas Heller
instances itself are deleted immediately, so the addresses are no longer valid. (Hint: ctypes might also be a solution for you - it allows flexible creation of C compatible data structures) Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re:

2005-07-01 Thread Thomas Heller
language. Just a single datapoint: Implementing a trivial COM object in Python requires, let's guess, about 10 or 20 lines of source code. When I do the same in MSVC6, the wizard creates 10 files, with nearly 400 lines of code. Sure, I didn't have to write these code lines,

Re:

2005-07-01 Thread Thomas Heller
Thomas Heller <[EMAIL PROTECTED]> writes: > "Adriaan Renting" <[EMAIL PROTECTED]> writes: > >> I'm not a very experienced Python programmer yet, so I might be >> mistaken, but there are a few things that would make me prefer C++ over &g

Re: I am a Java Programmer

2005-07-01 Thread Thomas Bartkus
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I am a java programmer and I want to learn Python Please help me. > Well! Your condition is certainly tragic! But what can anyone do? Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: importing pyc from memory?

2005-07-04 Thread Thomas Heller
memory, and I have a pointer to the beginning of the file and the size > in bytes at my disposal, can I import that by any means? The .pyc file format is sort of 'documented' in lib/py_compile.py. IIRC, it is a magic number, a timestamp, plus a marshalled code object. Thomas -- ht

Re: Python exception hook simple example needed

2005-07-05 Thread Thomas Guettler
o create a HTML page if an uncaught exception is raised. HTH, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Py2Exe and the log file...

2005-07-05 Thread Thomas Heller
ng to aviod the log > file creation error ? > > Thanx for your help: ft The code that creates the logfile is in "Lib/site-packages/py2exe/boot_common.py". This code is executed before the main script is started. You can override it by assigning another object to sys.stderr, at th

Re: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code

2005-07-05 Thread Thomas Heller
), then is can simply be included inline with > every script that needs to use it. > >> - The ``adopt_init_args(self, locals())`` incantation is hard to >> remember and difficult to explain to new-comers. > > A better name would help with this. The need for locals() is > unavoidable. Ahem - sys._getframe() Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Favorite non-python language trick?

2005-07-06 Thread Thomas Heller
if one wanted, one could also implement a decorator which calls warnings.warn when the function is called: def c_buffer(init, size=None): "deprecated, use create_string_buffer instead" import warnings warnings.warn("c_buffer is deprecated, use create_string_buffer instead&q

Conditionally implementing __iter__ in new style classes

2005-07-06 Thread Thomas Heller
quot; (neither is __getattribute__, btw). Probably this has to do with data descriptors and non-data descriptors, but I'm too tired at the moment to think further about this. Is there any way I could make the above code work with new style classes? Thanks, Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Conditionally implementing __iter__ in new style classes

2005-07-06 Thread Thomas Heller
Thomas Heller <[EMAIL PROTECTED]> writes: > I'm trying to implement __iter__ on an abstract base class while I don't > know whether subclasses support that or not. > Hope that makes sense, if not, this code should be clearer: > > class Base: > def __getatt

Re: The GIL, callbacks, and GPFs

2005-07-06 Thread Thomas Heller
allObject(my_callback, arglist); > PyGILState_Release(gil); > Py_DECREF(arglist); > Py_DECREF(result); } > } Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Conditionally implementing __iter__ in new style classes

2005-07-07 Thread Thomas Heller
[EMAIL PROTECTED] (Bengt Richter) writes: > On Wed, 06 Jul 2005 17:57:42 +0200, Thomas Heller <[EMAIL PROTECTED]> wrote: > >>I'm trying to implement __iter__ on an abstract base class while I don't >>know whether subclasses support that or not. > Will a prop

Re: Windows Cmd.exe Window

2005-07-07 Thread Thomas Heller
This way I not only see the traceback, but I can also poke around in the environment to find the problem. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Conditionally implementing __iter__ in new style classes

2005-07-07 Thread Thomas Heller
[EMAIL PROTECTED] (Bengt Richter) writes: > On Thu, 07 Jul 2005 09:51:42 +0200, Thomas Heller <[EMAIL PROTECTED]> wrote: > >>[EMAIL PROTECTED] (Bengt Richter) writes: >> >>> On Wed, 06 Jul 2005 17:57:42 +0200, Thomas Heller <[EMAIL PROTECTED]> wrote: >>

Re: Python Module Exposure

2005-07-08 Thread Thomas Lotze
es ISomething. -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

pygtk does ... ?

2005-07-08 Thread Thomas Bartkus
What the heck is the pygtk library for? help(pygtk) tells me not much more than - "Python bindings for the GTK+ widget set" Why would I want to "import pygtk" with it's single function "require(version)"? What is it supposed to do? Where does i

Re: Legacy data parsing

2005-07-08 Thread Thomas Bartkus
t; is immediately followed by several lines of an address - up until the empty line. And you can look at each of those address lines and use trim() to remove leading and trailing blanks. Similarly, the line that begins " LANG:" would seem to immediately precede another address. None o

Re: Should I use "if" or "try" (as a matter of speed)?

2005-07-09 Thread Thomas Lotze
implementation of exceptions but I suspect most of what try does doesn't happen at run-time at all, and things get checked and looked for only if an exception did occur. An I suspect that it's machine code that does that checking and looking, not byte code. (Please correct me if I'm

Re: Should I use "if" or "try" (as a matter of speed)?

2005-07-10 Thread Thomas Lotze
ight into the problem and tools in the process. YMMV, of course. -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: importing files from a directory

2005-07-11 Thread Thomas Guettler
and > I'd like to have just blah. I realize I could say: > > my_module = __import__("Modules.%s" % mod) > module_list.append(getattr(my_module, mod)) I use this getattr() after __import__, too. I don't think there is a easier way. HTH, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: httplib/HTTPS Post Problem

2005-07-11 Thread Thomas Guettler
oogle.com/ is different from www.google.com) response = connection.getresponse() What does "print response" do? You can listen on the wire with ethereal (Capture, then "follow tcp-stream") HTH, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Lisp development with macros faster than Python development?..

2005-07-11 Thread Thomas Bartkus
down to is which language(s) have the best balance of approachability (easy to learn!) and capability. Bear in mind though, that if the language sacrifices capability in favor of being easy, then the fun runs out of it too soon :-) Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: append one file to another

2005-07-12 Thread Thomas Guettler
d() > outfile = open(outfilename, 'a') > outfile.write(filestr) > > I wonder if there is a more efficient way doing this? > Thanks. I guess (don't know), that this is faster: for line in infile: outfile.write(line) At least if this a file with "lines". If i

Re: Search & Replace with RegEx

2005-07-12 Thread Thomas Guettler
54aa4cdc4b7}\components\wml-service.js,111470502 > > to: > > rel:nsForecastfox.js,18590 > rel:wml-service.js,111470502 Hi, some time ago I wrote "replace-recursive.py": http://www.thomas-guettler.de/scripts/replace_recursive.py.txt Maybe thi

Re: Missing Something Simple

2005-07-12 Thread Thomas Guettler
e. You only change the reference, not the value. Maybe this code helps you: a="a" b="b" c="c" varList = [a, b, c] for x in varList: x = "foo" # nothing changed print varList # --> ["a", "b", "c"] for i in range(len(va

Re: Yet Another Python Web Programming Question

2005-07-12 Thread Thomas Bartkus
"Daniel Bickett" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > It was his opinion that > web programming should feel no different from desktop programming. Should that ever become even remotely possible - I'll be interested in web program

Frankenstring

2005-07-12 Thread Thomas Lotze
terator; as long as it does both efficiently, I'm happy. I'd even consider writing such a beast in C, albeit more as a learning exercise than as a worthwhile measure to speed up some code. Thanks for any hints. -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Fwd: Should I use "if" or "try" (as a matter of speed)?

2005-07-12 Thread Thomas Lotze
nd doesn't seem like good > programming to me. Neither does it to me. What about try: f=file('file_here') except IOError: #File doesn't exist error_handle else: do_setup_code do_stuff_with(f) (Not that I'd want to defend Joel's article, mind you...) -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Slicing every element of a list

2005-07-12 Thread Thomas Lotze
her why > didn't the first one return an error? Because you didn't make any. You just discarded your results; why should anyone stop you from burning cycles? *g -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Frankenstring

2005-07-12 Thread Thomas Lotze
jay graves wrote: > see StringIO or cStringIO in the standard library. Just as with files, iterating over them returns whole lines, which is unfortunately not what I want. -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Frankenstring

2005-07-12 Thread Thomas Lotze
tion of the next char I will get. -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Frankenstring

2005-07-13 Thread Thomas Lotze
nctionalities don't play together. -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Frankenstring

2005-07-13 Thread Thomas Lotze
nce it returned one after seeking or switching to another buffer chunk. -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Frankenstring

2005-07-13 Thread Thomas Lotze
f the ways of doing it with existing tools I labelled "clumsy" in the original posting ;o) Thanks anyway. -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: all possible combinations

2005-07-13 Thread Thomas Bartkus
er) FROM Letters As t1, Letters As t2, Letters As t3, Letters As t4 Will return those 81 combinations in an eyblink. In order to stay on topic, you are required to call your favorite SQL engine from Python :-) Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: Frankenstring

2005-07-14 Thread Thomas Lotze
hing: I wonder why there doesn't seem to be an str.iterfind or str.itersplit thing. And I wonder whether there shouldn't be str.findany and str.iterfindany, which takes a sequence as an argument and returns the next match on any element of it. -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Frankenstring

2005-07-14 Thread Thomas Lotze
k and tell, that's the point of doing it. But for half-way simple state machines, hiding the index handling in a Python class that slows things down it just not worth it. Doing index += 1 here and there is fine if it happens only half a dozen times. I know it's not beautiful, that'

Re: Frankenstring

2005-07-14 Thread Thomas Lotze
Thomas Lotze wrote: > And I wonder whether there shouldn't be str.findany and > str.iterfindany, which takes a sequence as an argument and returns the > next match on any element of it. On second thought, that wouldn't gain much on a loop over finding each sequence, but add m

Re: Native ODBC access for python on linux?

2005-07-14 Thread Thomas Bartkus
query away at the server. As long as the MySQL server accepts your IP/usr/pwd, it will respond to the SQL you pass it from Python. IOW - who/what needs an ODBC driver here? Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: using hotshot for timing and coverage analysis

2005-07-15 Thread Thomas Lotze
verage analysis and to display timing per line? Haven't looked thoroughly yet; all I know is what's in the Python docs. -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Programming Contest

2005-07-15 Thread Thomas Lotze
re problems. It would be nice if you could put up a suite of test data with oracle solutions for download. For those sitting behind a modem line (like me), it would be a great help and speed up of the testing cycle. Thanks for your effort, in any case! -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Native ODBC access for python on linux?

2005-07-15 Thread Thomas Bartkus
at. Just point MySQLdb.connect() at the servers IP address. Go to SourceForge and download the MySQLdb installation for win32 [MySQL-python.exe-1.2.0.win32-py2.4.exe]. Sometimes you can't believe it because it's too easy :-) Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: Opinions on KYLIX 3 (Delphi 4 Linux)

2005-07-18 Thread Thomas Bartkus
train on a new platform, > > and re-write from scratch? What do you do when an open source project you were using gets abandoned? Hard to see much difference here. Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: Frankenstring

2005-07-18 Thread Thomas Lotze
in performance now that the stupid character searching has been done in C, but it'll hopefully make for more elegant Python code. -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Opinions on KYLIX 3 (Delphi 4 Linux)

2005-07-18 Thread Thomas Bartkus
t came out of Borland. I'm guessing that Microsoft has successfully targeted this perceived competitor with destruction. If Kylix were of the quality of Delphi, it would be a killer Linux app. Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: Opinions on KYLIX 3 (Delphi 4 Linux)

2005-07-18 Thread Thomas Bartkus
On Mon, 18 Jul 2005 19:56:24 -0400, Mike Meyer wrote: > "Thomas Bartkus" <[EMAIL PROTECTED]> writes: >>> > Re-train on a new platform, >>> > and re-write from scratch? >> >> What do you do when an open source project you were using gets

Re: is this pythonic?

2005-07-21 Thread Thomas Lotze
Mage wrote: > Or is there better way? > > for (i, url) in [(i,links[i]) for i in range(len(links))]: > ... > > "links" is a list. for i, url in enumerate(links): -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Opinions on KYLIX 3 (Delphi 4 Linux)

2005-07-21 Thread Thomas Bartkus
up the rear on Linux. Python is fun, but how do we get it to desktop primetime ? Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP on path module for standard library

2005-07-22 Thread Thomas Heller
#x27;ve just notified Jason about this. I presume a solution like mine > will be used, and look forward to seeing Jason's module in stdlib. That was a bug in modulefinder, which was fixed in Python 2.4 and 2.3.4. See http://www.python.org/sf/876278. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Importing User-defined Modules

2005-07-25 Thread Thomas Guettler
his: Copy the file to directory which is in sys.path. Give the file the extension ".py". Import it with __import__ (http://docs.python.org/lib/built-in-funcs.html#l2h-6) Copy the bytecode somewhere. HTH, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: regex problem

2005-07-26 Thread Thomas Guettler
\d\d\d,|\b\d\d\d\d-\d\d\d\d,)*\Z""") Hi, try it without \A and \Z import re rx1=re.compile(r"""(\b\d\d\d\d,|\b\d\d\d\d-\d\d\d\d,)""") print rx1.findall("1234,-,4567,") # --> ['1234,', '-,', '4567,'] Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list

Trimming X/HTML files

2005-07-27 Thread Thomas SMETS
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dear, I need to parse XHTML/HTML files in all ways : ~ _ Removing comments and javascripts is a first issue ~ _ Retrieving the list of fields to submit is my following item (todo) Any idea where I could find this already made ... ? \T, -BEGIN

Re: Graphics files & Python

2005-07-28 Thread Thomas Guettler
oo: http://www.imagemagick.org/script/index.php You can create animated gifs with imagemagick. I use with os.system("...") (Not the python bindings) HTH, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Why Tcl/Tk?

2005-07-28 Thread Thomas Bartkus
d. Soon, these folks will die off, and we'll be left > with GTK+ or wxWidgets. > Ahhh! That devilish little "or" If we only knew which one :-) Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: showing help(M) when running module M standalone

2005-07-30 Thread Thomas Heller
> > Works but does not seem right using exec for such a task. > > any hint would be great! if __name__ == "__main__": help("__main__") The only downside is that the module name is printed as '__main__'. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Trimming X/HTML files

2005-07-31 Thread Thomas SMETS
nced features of 2.3 regular expression are not yet available ! \T, Thomas SMETS wrote: | | Dear, | | I need to parse XHTML/HTML files in all ways : | ~ _ Removing comments and javascripts is a first issue | ~ _ Retrieving the list of fields to submit is my following item (todo) | | Any idea whe

Re: Using gnu readline in my own python program?

2005-08-01 Thread Thomas Lotze
t; Then I want to be able to read the line after it's been edited... Probably the built-in function raw_input already does what you want. It uses readline if available. -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Using gnu readline in my own python program?

2005-08-01 Thread Thomas Lotze
ncy_input function. -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Metaclasses and class variables

2005-08-04 Thread Thomas Heller
ains that the variable isn't defined; it can be > found in the class dictionary _after_ definition, though, and then it > can also be used. But where's the conceptual difference (to the manual > approach)? classvar is defined AFTER the class has been created. So, this should work: class Test: __metaclass__ = Meta Test.classvar.append(1) Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Do I need to have site.py available or not ?

2005-08-06 Thread Thomas Heller
;t do what you want here, it merely activates verbose > mode so that you can find the cause for above error. You want '-S'. I would say that "import site failed" means that something is wrong. The '-v' flag helps to find out what and why. The PYTHONVERBOSE environment variable does the same. Thomas -- http://mail.python.org/mailman/listinfo/python-list

WSGI-server in the standard distro?

2005-08-07 Thread Thomas W
ch here, but still ... Any thoughts? Anyhow, even a test/development-only WSGI-server implementation should be in the standard distro IMHO. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: PyOpenGL

2005-08-10 Thread Thomas Moore
> Hey I'm a programmer looking to port some of my opengl ...although > limited into a python app I've made... I'd like to know where to find > any python/opengl source or a tutorial etc.. whatever I'd like to get a > series of points that represent a 3d slope presented to the user. Try wxPython. -

Re: Jargons of Info Tech industry

2005-08-12 Thread Thomas Fritsch
Xah Lee wrote: > [...] > My time is limited, so i'll just give a brief explanation of my thesis > [...] This is what psychology calls a disordered self-perception. -- "Thomas:Fritsch$ops:de".replace(':','.').replace('$','@') -- http://mail.python.org/mailman/listinfo/python-list

Re: Determining win32 dll dependency

2005-08-15 Thread Thomas Heller
\WINDOWS\\system32\\ADVAPI32.dll', 'C:\\WINDOWS\\system32\\msvcrt.dll', 'C:\\WINDOWS\\system32\\WINSPOOL.DRV', 'C:\\WINDOWS\\system32\\GDI32.dll', 'C:\\WINDOWS\\system32\\KERNEL32.dll'] >>> Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Python as VBA replacement under Windows?

2005-08-17 Thread Thomas Bartkus
"Wolfgang Keller" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > > this is a potentially veeery dumb question, but: > > - If an application supports VBA as a macro language, > - and if you can execute Python code from within a VBA script (how?) > - and if the application exp

Re: GUI tookit for science and education

2005-08-17 Thread Thomas Bartkus
"Paul Rubin" wrote in message news:[EMAIL PROTECTED] > Mateusz £oskot <[EMAIL PROTECTED]> writes: > > Thank you for any piece of advice in advance. > > Ask yourself why you want a GUI toolkit. Maybe you can write a web > application instead, and use a browser as the GUI.

Re: Python as VBA replacement under Windows?

2005-08-17 Thread Thomas Bartkus
e promise for you although I have not been following developments here very closely. As for me - I'm sick of the directions MS is taking. I'm looking to Gnumeric/Python as an open source replacement to Excel/VBA :-) Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: Obfuscator for Python Code

2005-08-17 Thread Thomas Bartkus
ing, the obfuscators might be tempted to flock to it :-) Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: Some questions

2005-08-18 Thread Thomas Ganss
Cameron Laird schrieb: > In article <[EMAIL PROTECTED]>, > Alessandro Bottoni <[EMAIL PROTECTED]> wrote: > >>Titi Anggono wrote: >>>1. Can we use Tkinter for web application such as Java? ... > ... or, if you mean, "is Python an apt language for client-side > Web development in the way Java is, w

Re: Database of non standard library modules...

2005-08-19 Thread Thomas Heller
Python fans I have to > say I think the name sucks in terms of explaining what to expect. If I > ask someone where I can find a piece of code and the direct me to the > cheese shop, I might look for another language. +1 Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: pythonXX.dll size: please split CJK codecs out

2005-08-21 Thread Thomas Heller
load any .pyd file > on interactive startup. That seems to be true. But it will need zlib.pyd as soon if you try to import from compressed zips. So, zlib can be thought as part of the modules required for bootstrap. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Revised PEP 349: Allow str() to return unicode strings

2005-08-23 Thread Thomas Heller
rn a (byte) string instance or raise an error. Wouldn't also a new function make the intent clearer? So I think I'm +1 on the text() built-in, and -0 on changing str. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Unix diff command under Window.

2005-08-24 Thread Thomas Heller
'difflib' standard library module. I do not know whether the Tools directory is installed by default or not. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Unix diff command under Window.

2005-08-25 Thread Thomas Heller
Trent Mick <[EMAIL PROTECTED]> writes: > [Neil Hodgson wrote] >> Thomas Heller: >> >> > Yes. There's a script in your Python distribution: >> > Tools/scripts/diff.py >> > >> > See also the docs for the 'difflib' standard

Embedding Python in other programs

2005-08-25 Thread Thomas Bartkus
direct me to greater enlightenment? Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: ideas for university project ??

2005-08-26 Thread Thomas Guettler
whether anyone here had any suggestions. Hi, you could port Python to the WRT54. The Linksys WRT54 is a WLAN-Router which runs Linux. See http://openwrt.org/ I think it is a good project for a university. It is software and hardware related. Thomas -- Thomas Güttler, http://www.th

Re: ideas for university project ??

2005-08-29 Thread Thomas Guettler
Am Fri, 26 Aug 2005 12:21:36 -0400 schrieb Steve Holden: > Thomas Guettler wrote: >> Am Fri, 26 Aug 2005 11:49:34 +0100 schrieb Jon Hewer: >> you could port Python to the WRT54. >> The Linksys WRT54 is a WLAN-Router which runs Linux. >> See http://openwrt.org/ >>

Re: aproximate a number

2005-08-29 Thread Thomas Bartkus
On Sun, 28 Aug 2005 23:11:09 +0200, billiejoex wrote: > Hi all. I'd need to aproximate a given float number into the next (int) > bigger one. Because of my bad english I try to explain it with some example: > > 5.7 --> 6 > 52.987 --> 53 > 3.34 --> 4 > 2.1 --> 3 > The standard way to do this is

Re: 'ps -A' command freezes Popen3

2005-08-31 Thread Thomas Guettler
at it blocks. It blocks until you read from the stdout of the subprocess. If you don't read, it will wait forever. You can redirect the output to a file "ps -A > /tmp/example". This won't block. Or you use the module select if you are in a unix environment. HTH, Thomas

Re: py2exe and output executable name

2005-09-01 Thread Thomas Heller
executable name is defined by the 'dest_base' attribute of the Target class. This sample uses it to build a console *and* a gui version at the same time from the small wxPython script, with different names. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Python C module questions

2005-09-01 Thread Thomas Heller
initmodule() make a > string object with the contents of the docstring and assign it to > module.__doc__ . There might be a more idiomatic way, but I can't think > of it without trawling through the docs. Use Py_InitModule3() instead. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Python C module questions

2005-09-01 Thread Thomas Heller
x27;s C API has this). The builtin array module does help with this, you can build the C-compatible arrays in Python, pass them to your extension, and access them using the buffer api. Thomas -- http://mail.python.org/mailman/listinfo/python-list

py2exe 0.6.1 released

2005-09-05 Thread Thomas Heller
. * Several other fixes. Homepage: <http://starship.python.net/crew/theller/py2exe> Download from the usual location: <http://sourceforge.net/project/showfiles.php?group_id=15583> Enjoy, Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: py2exe 0.6.1 released

2005-09-05 Thread Thomas Heller
[EMAIL PROTECTED] (Bengt Richter) writes: > On Mon, 05 Sep 2005 21:55:19 +0200, Thomas Heller <[EMAIL PROTECTED]> wrote: > >>* py2exe can now bundle binary extensions and dlls into the >> library-archive or the executable itself. This allows to >>

Re: py2exe 0.6.1 released

2005-09-05 Thread Thomas Heller
Bugs <[EMAIL PROTECTED]> writes: > Thomas Heller wrote: >> Changes in this release: >> * py2exe can now bundle binary extensions and dlls into the >> library-archive or the executable itself. This allows to >> finally build real single-file execu

Re: py2exe 0.6.1 released

2005-09-06 Thread Thomas Heller
"Giovanni Bajo" <[EMAIL PROTECTED]> writes: > Thomas Heller wrote: > >> * py2exe can now bundle binary extensions and dlls into the >> library-archive or the executable itself. This allows to >> finally build real single-file executables. &

Re: py2exe 0.6.1 released

2005-09-06 Thread Thomas Heller
[EMAIL PROTECTED] writes: > First: Thank you Thomas for the good work with py2exe. The single-file > option is something I have been waiting for :-) > Will it also be possible to build independent files (such as > my_app_data.zip) into the executable? Depends on how you want to ac

Re: dual processor

2005-09-06 Thread Thomas Bellman
ble in comparison, and would likely fit within the slots when 'md5sum' is waiting for I/O even on a single-CPU system. And I'm fairly certain that 'sort' won't start spending CPU time until it has collected all its input, so you won't gain much there either. -- T

Re: py2exe 0.6.1 released

2005-09-06 Thread Thomas Heller
t calling PyFatal_Error() when the import failed, which would then give what you see. For py2exe, it may help to use include more modules or the whole package in question and try to build again. Of course, it can also be that py2exe 0.6 has a bug that 0.5.4 did not have, can you try that version? Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: py2exe uses __init__ for class names when logging

2005-09-06 Thread Thomas Heller
found by David Hess. Fortunately he added it to the wiki: http://starship.python.net/crew/theller/moin.cgi/LoggingModule Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: determine if os.system() is done

2005-09-07 Thread Thomas Bellman
s"), but i wish to know if there's non-hack way to > determine when a system process is done. Have you tried reading the manual for the subprocess module? You just *might* find the answer to your question if you look at what you can do with Popen objects. Actually, just learning about

Re: Is there anything "better" than impalib/poplib?

2005-09-07 Thread Thomas Guettler
you like this more than poplib. HTH, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

py2exe 0.6.2 released

2005-09-07 Thread Thomas Heller
<http://sourceforge.net/project/showfiles.php?group_id=15583> Enjoy, Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: py2exe 0.6.1 released

2005-09-07 Thread Thomas Heller
"Giovanni Bajo" <[EMAIL PROTECTED]> writes: > Thomas Heller wrote: > >>> I tried it using the wx singlefile example, but unfortunately the >>> resulting executable segfaults at startup (using Python 2.3.3 on >>> Windows 2000, with latest wxWind

Re: py2exe 0.6.1 released

2005-09-07 Thread Thomas Heller
rograms. > IMO that would be a nice addition to pythonw.exe, but I have no time to care about this myself. For py2exe, I'm still unsure how debugging output from a frozen gui program should be handled. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Construct raw strings?

2005-09-07 Thread Thomas W
' it works ok and os.path.exists(f) returns True, but I cannot the that r' in front using the os.path.join-method in my code. I don't know if this makes any sense at all, but I'm lost. Damn those stupid windows-paths !! Thanks in advance, Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Python with COM to communicate with proprietary Windows software

2005-09-08 Thread Thomas Heller
Joakim Persson <[EMAIL PROTECTED]> writes: [...] > This means that I must come up with a way to interface Python with > this log tool. After some investigations, I have run inte problems -- > my inital approach was to use Python + win32com to communicate with > the COM interface. Unfortunately, it

Re: [Py2exe-users] py2exe 0.6.2 released

2005-09-09 Thread Thomas Heller
Ray Schumacher <[EMAIL PROTECTED]> writes: > First, Thanks again for the update. > > At 08:55 AM 9/7/2005, Thomas Heller wrote: > >> This part of the code is distributed under the MPL 1.1, so this >> license is now pulled in by py2exe. > > As I read

Re: improvements for the logging package

2005-09-13 Thread Thomas Heller
"Vinay Sajip" <[EMAIL PROTECTED]> writes: > OK, it's not right at the top of the docs, but the example at > > http://docs.python.org/lib/minimal-example.html > > has been there for a while, and if you think it can be made clearer, > please suggest how. Maybe I'm missing something, but the code fr

<    10   11   12   13   14   15   16   17   18   19   >