Writing Win32 shell extensions in python?

2005-11-08 Thread Thomas W
appreciated. Regards, Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Invoking Python from Python

2005-11-08 Thread Thomas Guettler
ource code with a script, is no good solution. Once I had to maintain lisp code which stored its data in lisp code, too (incl. conditions and loops). It was a nightmare. Please explain what you want to do, and we will find a better solution. HTH, Thomas -- Thomas Güttler, http://www.thomas

Re: which feature of python do you like most?

2005-11-08 Thread Thomas Guettler
erl is no fun. I switched from perl to python because the emacs-perl mode was not able to understand all those backslashed anymore (the code was correct). Regards, 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

Re: append to non-existing list

2005-11-09 Thread Thomas Bellman
ee it is much more work than to do it the right way. It's also much more fragile; think for example about what happens if your SQL statement (I assume that's what sqlsth is) yields zero rows, and you then try to look at pkcolumns after that loop. -- Thomas Bellman, Lysator Computer Club,

Re: generate HTML

2005-11-15 Thread Thomas Guettler
nd("") rows=''.join(rows) date=time.strftime() html=""" Today: %(date)s %(rows)s """ % locals() outfile="out.html" fd=open(outfile, "wt") fd.write(html) fd.close() print "Created %s" % outfile 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

It looks like my mails to @python.org are all blocked

2005-11-15 Thread Thomas Moore
Hi: What's wrong with this? The python-anounce tells me that my message has a suspicious header? --Thomas -- http://mail.python.org/mailman/listinfo/python-list

Is there any Iterator type example?

2005-11-15 Thread Thomas Moore
Hi: Is there any example about how to use Iterator type? --Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there any Iterator type example?

2005-11-15 Thread Thomas Moore
Hi: Nice example too! But what I really want to know is how to use __iter()__ and next() in a class with an example. >> How about this one: >>.. -- http://mail.python.org/mailman/listinfo/python-list

Is there any Iterator type example?

2005-11-16 Thread Thomas Moore
Hi: Is there any example about how to use the Iterator type? --Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there any Iterator type example?

2005-11-16 Thread Thomas Moore
Hi: Thanks, it does help. Besides, I search the web and find several other examples, too. --Thomas - Original Message - From: "Fredrik Lundh" <[EMAIL PROTECTED]> To: Sent: Wednesday, November 16, 2005 4:02 PM Subject: Re: Is there any Iterator type example? >

Using gettext to provide different language-version of a script

2005-11-22 Thread Thomas W
ls, start_stepping) File "C:\Program Files\Python24\Lib\site-packages\pythonwin\pywin\debugger\debugger.py", line 631, in run exec cmd in globals, locals File "C:\Program Files\Python24\Tools\i18n\test2.py", line 4, in ? lang1 = gettext.translation('test2', lan

Re: Simple photo collage using Python and PIL

2005-11-23 Thread Thomas Guettler
. At the end create png from pnm with convert. I hope this helps. Thomas [1] convert: http://www.imagemagick.org [2] pnm: http://netpbm.sourceforge.net/doc/pnm.html -- Thomas Güttler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] --

Re: Can bdist_wininst built installer require minimum python version?

2005-11-23 Thread Thomas Heller
e included, with the --target-version command line switch. Of course, then you have to build separate installers for each version. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading binary data

2005-11-23 Thread Thomas Heller
>>> acct.ASU 2 >>> acct.acct.ac_comm >>> acct.acct.ac_utime >>> from ctypes import sizeof >>> sizeof(acct.acct) 64 >>> acct.acct.ac_flag >>> [EMAIL PROTECTED]:~/ctypes> But it won't help you to decode/encode the comp_t fields into floats. Note that the h2xml.py script requires gccxml. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get started in GUI Programming?

2005-11-25 Thread Thomas Guettler
original size, but every new step brings another > struggle search for scale2pixbuf in the link. > Can anyone offer any suggestions as to the least painful way forwards? Only the beginning is painful. After some time you don't miss anything from Visual Basic anymore. Happy Learnin

Re: How to get started in GUI Programming?

2005-11-25 Thread Thomas Guettler
their original size, but every new step brings another > struggle > search for scale2pixbuf in the link. > Can anyone offer any suggestions as to the least painful way forwards? > Only the beginning is painful. After some time you don't miss anything from Visual Basic anymore. H

newbie question concerning formatted output

2005-11-29 Thread Thomas Liesner
Hello all, i am having some hard time to format the output of my small script. I am opening a file which containes just a very long string of hexdata seperated by spaces. Using split() i can split this string into single words and print them on stdout. So far so good. But i want to print always th

Re: newbie question concerning formatted output

2005-11-30 Thread Thomas Liesner
Hi all, thanks for all your answers. Is see that there are - as ususal - several ways to accomplish this. I decided to go for the way Frederik suggested, because it looked as the most straight forward method for that kind of data. Thanks again, ./Tom -- http://mail.python.org/mailman/listinfo/py

Debugging functionality for embedded Python

2005-11-30 Thread Thomas Korimort
it. Does anyone know any literature/references regarding this topic? What i would need would be tracebacks of errors with info on line numbers, files and so on. Greets, Thomas Korimort. -- http://mail.python.org/mailman/listinfo/python-list

Debugging of Python code in embedded interpreter

2005-11-30 Thread Thomas Korimort
Hi! I have embedded a Python interpreter into a C++ framework. When running some Python code in the interpreter, how can i get a traceback with line number file..., when an exception occurs? Greetings, Thomas Korimort. -- http://mail.python.org/mailman/listinfo/python-list

Re: Distutils postinstall script: useless?

2005-11-30 Thread Thomas Heller
nstallation path from inside the script? > > Answering to myself, sys.prefix combined with the dictionary > INSTALL_SCHEMES from distutils.commands.install might do the work. See also the functions in distutils.sysconfig. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Louie-1.0b2 - Signal dispatching mechanism

2005-12-01 Thread Thomas Heller
ouie.berlios.de/> > > Patrick K. O'Brien and contributors > <[EMAIL PROTECTED]> What is the difference between PyDispatcher and Louie? (I'm still using a hacked version of the original cookbook recipe...) Thanks, Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Louie-1.0b2 - Signal dispatching mechanism

2005-12-02 Thread Thomas Heller
"Pat" <[EMAIL PROTECTED]> writes: > Thomas Heller wrote: >> >> What is the difference between PyDispatcher and Louie? >> (I'm still using a hacked version of the original cookbook recipe...) > > Not too much at this point, but the general

Re: How to wake up the jython list moderator

2005-12-06 Thread Thomas Heller
the message and decide if it is posted or not. The easiest solution for this is to join the mailing list (with the email address that you use to post), disable list delivery, and repost your message via gmane. Thomas -- http://mail.python.org/mailman/listinfo/python-list

newby question: Splitting a string - separator

2005-12-08 Thread Thomas Liesner
Hi all, i am having a textfile which contains a single string with names. I want to split this string into its records an put them into a list. In "normal" cases i would do something like: > #!/usr/bin/python > inp = open("file") > data = inp.read() > names = data.split() > inp.close() The probl

Re: Proposal: Inline Import

2005-12-10 Thread Thomas Heller
every > import in both modules as well as examine the code I moved for missing > imports. And I still miss a lot of cases. My test suite catches a lot > of the mistakes, but it can't catch everything. I understand this use case. You can use pychecker to find NameErrors without

Re: Python equivalent of script(1)

2005-01-01 Thread Thomas Rast
og your whole session, including output, try using the 'screen' utility. HTH - Thomas -- If you want to reply by mail, substitute my first and last name for 'foo' and 'bar', respectively, and remove '.invalid'. -- http://mail.python.org/mailman/listinfo/python-list

Re: Reaching the real world

2005-01-04 Thread Thomas Bartkus
and the microprocessor based controller will turn on the appropriate relay. Your challenge from Python will be to control the computers I/O ports or to communicate with one of the serial ports. I'm sure someone else will point to libraries that will help you with this. Much *much* more but you ha

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 30)

2005-01-04 Thread Thomas Heller
nge(128) >>> Hm, why does the 'encode' call complain about decoding? Why do string objects have an encode method, and why do unicode objects have a decode method, and what does this error message want to tell me: >>> u"ä".decode("latin-1") Traceback (most recent call last): File "", line 1, in ? UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 0: ordinal not in range(128) >>> Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 30)

2005-01-04 Thread Thomas Heller
Max M <[EMAIL PROTECTED]> writes: > Thomas Heller wrote: > >> It seems also the error messages aren't too helpful: >> >>>>>"ä".encode("latin-1") >> Traceback (most recent call last): >> File "", line 1, in ?

Re: Reaching the real world

2005-01-04 Thread Thomas Bartkus
and the microprocessor based controller will turn on the appropriate relay. Your challenge from Python will be to control the computers I/O ports or to communicate with one of the serial ports. I'm sure someone else will point to libraries that will help you with this. Much *much* more but you ha

Re: [Hack] Import binary extensions from zipfiles, windows only

2005-01-04 Thread Thomas Heller
/__init__.pyc > 7808 11-08-04 11:00 zope/thread/__init__.pyo > zipextimporter, as published, doesn't handle extensions in packages. The patch I attached at the end, may fix this - I tested it with PIL. It may work with zope, or may not - depends o

Re: date/time

2005-01-05 Thread Thomas Guettler
- parse the string with time.strptime - timetuple[2]+=1 - mktime(timetuple) # --> secs - strftime(localtime(secs)) HTH, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there any way/where to subscribe for automated PEP status emails?

2005-01-05 Thread Thomas Heller
gt; Subscription/unsubscription could be like an ordinary read-only mail list. > You could just bounce replies with some advice as to where to go ;-) You could probably subscribe to python-checkins, and filter it. Or read it via gmane. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there any way/where to subscribe for automated PEP status emails?

2005-01-06 Thread Thomas Heller
Nick Coghlan <[EMAIL PROTECTED]> writes: > Thomas Heller wrote: >> You could probably subscribe to python-checkins, and filter it. >> Or read it via gmane. > > Hmm - can SF be used to setup a mailing list just for checkins to a > single directory in the source tree?

static compiled python modules

2005-01-09 Thread Thomas Linden
them from outside? kind regards, Tom -- Thomas Linden (http://www.daemon.de/) tom at co dot daemon dot de -- http://mail.python.org/mailman/listinfo/python-list

Re: Powerful CGI libraries for Python?

2005-01-10 Thread Thomas Guettler
asy to learn. Quixote 1.x is quite stable. The version I use is more then six months old, and there is no need to update. Take a look at: http://www.python.org/cgi-bin/moinmoin/WebProgramming Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: static compiled python modules

2005-01-10 Thread Thomas Linden
Nick Coghlan wrote: > http://www.python.org/dev/doc/devel/api/importing.html > Take a look at the last three entries about registering builtin modules. Thanks a lot, it works! regards, Tom -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows GUIs from Python

2005-01-11 Thread Thomas Bartkus
ows portablility of the code. 2) The fact that wxPython follows the look and feel of whatever window themes might be installed in Linux/Gnome or MS Windows. 3) Apps so written have that native "look and feel" and fit right in. Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

appending data to an xml file

2005-01-11 Thread Thomas Heller
get this additional data with an error handler, or somehow else. Maybe I can find the end of the xml data myself, before giving it to the sax parser. Better, imo, would be to add the dumped info into a proper xml tag, and inject it into the original file. Is that (efficiently) possib

Re: Windows GUIs from Python

2005-01-11 Thread Thomas Heller
e the apps I write would be fine > with just the core Windows widgets along with a few add-ons like a > grid and the extended Win95 widgets. Well, venster. Although it is most certainly alpha. But with some work... Thomas -- http://mail.python.org/mailman/listinfo/python-list

how to visualize symbol table?

2005-01-12 Thread Thomas Korimort
Hi, how can i visualize the content of the symbol table in Python? Sometimes i want to know which symbols are imported from apackage and such kind of things Greetings, THomas Korimort -- http://mail.python.org/mailman/listinfo/python-list

Re: from __future__ import decorators

2005-01-13 Thread Thomas Heller
code with the new syntax. > > How could I best automate the process of making the syntax digestible > by Python2.3 ? The only way that I know of is this, although you have to rewrite your code somewhat: http://dirtsimple.org/2004/11/using-24-decorators-with-22-and-23.html Thomas

Re: MemoryError with parser.suite and wrong encoding declaration

2005-01-18 Thread Thomas Heller
e behaviour of the (C) python interpreter. Ignore the wrong declaration? All Python's that I have (on windows, at least) raise a SyntaxError: File "x.py", line 1 SyntaxError: 'unknown encoding: IBO-8859-1' See also: http://www.python.org/sf/979739 Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: simultaneous multiple requests to very simple database

2005-01-18 Thread Thomas Bartkus
without malice. Do you seriously expect to write your own (database) solution and that this will save you time and effort over learning an existing (SQL) solution? Because - If you are seeking to "save time" on "puzzles", you are certainly going about it the wrong way. Best of lu

Re: simultaneous multiple requests to very simple database

2005-01-18 Thread Thomas Bartkus
exity to what you are attempting. The problems you mention are precisely those that databases are meant to solve. The only tough (impossible?) requirement you have is that you don't want to use one. When you write that "super dictionary", be sure to post code! I could use one of

Re: [OT] Good C++ book for a Python programmer

2005-01-19 Thread Thomas Bartkus
you seek - couldn't you just C a few slow functions and use them in your Python? Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: Graph and Table implementation

2005-01-21 Thread Thomas Bartkus
o manipulate the Excel object model . On the Linux/Unix side. Gnumeric seems to serve very well although I don't yet have sufficient personal experience with it to know about the "gotcha's" you might encounter. I am also guessing that the Open Office spreadsheet would work too

Re: Installer made with bdist_wininst segfaulting...

2005-01-25 Thread Thomas Heller
run from a different drive (as you reported) - the installer installs for Python 2.4 I will fix these issues in Python 2.3.5, which will probably be out as a release candidate this week, and in Python 2.4.1. I urge everyone to install this release candidate, rebuild the installer with it, and test

Re: Help! Host is reluctant to install Python

2005-01-25 Thread Thomas Bartkus
re: I'll second what you are already hearing. Find a new hosting service because the one you have now is not qualified. Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: python without OO

2005-01-25 Thread Thomas Bartkus
with Python at all. It seems you could be happy doing BASH scripts for Linux or DOS batch files for Windows. Both are "nice&simple" scripting languages free of object oriented contamination. Why would you use an object oriented language if you don't want to? Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: py2exe problem

2005-01-26 Thread Thomas Heller
FAIK, McMillan Installer solves this by including all the encodings stuff by default, and it has a --ascii flag to override this behaviour. Would that be a solution? Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: python without OO

2005-01-26 Thread Thomas Bartkus
ery foundation upon which it is built. > ... anyhow, I guess > I'll have to constrain what can be included in the code through > different policies rather than language limitations... It would be reasonable to decide that Python is not what you are looking for. I'm not sure that castrating it in this manner would be quite so reasonable. Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: Help With Python

2005-01-26 Thread Thomas Guettler
> Spam, … Spam"). > > Can anybody help me get started? I am completely new to programming! Hi, # This way, there is a comma after the last: import sys for i in range(511): sys.stdout.write("Spam, ") # No comma at the end: mylist=[] for i in range(511): myl

Re: py2exe problem

2005-01-26 Thread Thomas Heller
Harald Massa <[EMAIL PROTECTED]> writes: > Thomas Heller <[EMAIL PROTECTED]> wrote in > news:[EMAIL PROTECTED]: > >>> >>> A software development system which REALLY solves the encodings >>> problem WITHOUT creating a swarm of new ones could w

Re: variable declaration

2005-01-31 Thread Thomas Bartkus
y legal! This seemingly demolishes all the good reasons one has for wanting strict type checking. That second example is just bad programming practice and easy to avoid. The problem you point out in your code, however, hurts! Was that an I, an l or a 1 in the variable name? Hey! - I like Python a lot. But nothings perfect Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: Forcing interactive interpreter without (-i)

2005-02-01 Thread Thomas Heller
newer Python versions, you can set the PYTHONINSPECT env var inside your script. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: variable declaration

2005-02-01 Thread Thomas Bartkus
e. I had to take a good long stare before I saw it even though the code is short, sweet, and otherwise correct. *Is* there a reason why the interpreter couldn't/shouldn't require formal variable declaration? It seems to me that lack of same may also be creating hellish barriers to wri

Re: variable declaration

2005-02-01 Thread Thomas Bartkus
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thomas Bartkus wrote: > > > "Carl Banks" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > > > >>How common is it for a

Re: The next Xah-lee post contest

2005-02-01 Thread Thomas Bartkus
pe he manages to find a babe! As human conditions go, normalcy is *highly* overrated.. Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: Where are list methods documented?

2005-02-01 Thread Thomas Heller
ence type". > > -- > Grant Edwards grante Yow! I think my CAREER > at is RUINED!! >visi.com You could also have typed 'sort' in the box here: http://starshi

How do you do arrays

2005-02-01 Thread Thomas Bunce
I am new at Pyton and I am learning from book not classes so please forgive my being slow The below does not work I get an Error of File "Matrix[index] = k NameError: name 'iMatrix' is not defined" while index < majorlop1: index = index + 1 k = random.choice(listvalues) + 1 iMatrix[in

Re: How do you do arrays

2005-02-01 Thread Thomas Bunce
Thanks all Tom -- http://mail.python.org/mailman/listinfo/python-list

Re: How do you do arrays

2005-02-01 Thread Thomas Bunce
Tryed it and this is what I got (I did go to the web sight) tom(h=500)$ /tmp/501/Cleanup\ At\ Startup/ptesting-128981347.87.py.command; exit Input the maximu number of tvalue: 114 Traceback (most recent call last): File "/Users/tom/Desktop/ptesting.py", line 20, in ? iMatrix[index] = k Index

Re: variable declaration

2005-02-01 Thread Thomas Bartkus
ot completely convinced of that. > As has been pointed out, it's not a big deal for a programmer who's been there, done that. But the original posters example is a beginners trap for certain. *If* Python were a "beginners language", then it would be missing one of it's t

Re: How do you do arrays

2005-02-01 Thread Thomas Bunce
Learning Python O'Reilly book and Python In A Nut Shell and about 2 inchs printed of Web information Tom In article <[EMAIL PROTECTED]>, "Kartic" <[EMAIL PROTECTED]> wrote: > Tom, > > It has to be iMatrix.append(k), not iMatrix[index] = k. Python will > give an error - list assignment in

Re: How do you do arrays

2005-02-01 Thread Thomas Bunce
It was when I saw a use of complex numbers as a usable statement I became interested in Python Tom In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > If you want do numerical calculations with vectors and matrices, you > should probably use the Numarray module. Python's built-i

Re: How do you do arrays

2005-02-01 Thread Thomas Bunce
an array anymore. But, > depending on your application, a dictionary may be perfectly suitable. > > Hope this helps. > > Dan > > "Thomas Bunce" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >I am new at Pyton and I am l

Re: Python for S60 mentioned in a mainstream Finnish e-news website

2005-02-02 Thread Thomas Heller
> we just need ctypes or Symbianic Swig and world domination will be > ours ;-). > > (Yeah, ctypes will probably be a problem because of the way Symbian > handles DLLs) How *does* symbian handle DLLs? Curious, Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Prepending to traceback

2005-02-02 Thread Thomas Guettler
tion, e: e.msg="Textbefore %s" % e.msg raise e (code is not tested) Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: pyFMOD problem

2005-02-03 Thread Thomas Heller
which indicates an api change (the number of the '@' sign indicates how many bytes are needed as parameters). Probably pyFMOD needs an older version of fmod.dll, or pyFMOD should be updated? Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Popularizing SimpleHTTPServer and CGIHTTPServer

2005-02-03 Thread Thomas Guettler
is problem, too? I got no response. Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Where is WSAEnumNetworkEvents???

2005-02-03 Thread Thomas Heller
p3) _WSANETWORKEVENTS._fields_ = [ # C:/PROGRA~1/MICROS~3.NET/Vc7/PLATFO~1/Include/winsock2.h 1041 ('lNetworkEvents', c_long), ('iErrorCode', c_int * 10), ] assert sizeof(_WSANETWORKEVENTS) == 44, sizeof(_WSANETWORKEVENTS) assert alignment(_WSANETWORKEVENTS) == 4, alignment(_WSANETWORKEVENTS) c:\sf\ctypes\sandbox\tools\codegen> Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: OO approach to decision sequence?

2005-06-20 Thread Thomas Lotze
that in this case it is best to go without special types and use those provided by Python, and live with an ugly decision chain or two at defined places in the library. -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: import via pathname

2005-06-20 Thread Thomas Guettler
sys.path at runtime. Example: libdir=os.path.join(os.environ["HOME"], "mylibs") assert(os.path.exists(libdir)) sys.path.insert(0, libdir) import mylibrary # $HOME/mylib/mylibrary.py HTH, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Database recommendations for Windows app

2005-06-22 Thread Thomas Bartkus
indows to Linux (all flavors!) to Unix to BSD without need to alter a single line of code. You were writing a Python app, weren't you :-) Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: Database recommendations for Windows app

2005-06-22 Thread Thomas Bartkus
nux (all flavors!) to Unix to BSD without need to alter a single line of code. You were writing a Python app, weren't you :-) Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: Database recommendations for Windows app

2005-06-22 Thread Thomas Bartkus
"Dan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 6/22/2005 11:38 AM, Thomas Bartkus wrote: > > Will McGugan" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > > And then XP Autoupdate executes, some of

Package organization

2005-06-22 Thread Thomas Lotze
nd IWritableFoo in foo.interfaces. However, in a large package foo with subpackages bar and baz, interface definitions might either sit in foo.bar.interfaces and foo.baz.interfaces, or in foo.interfaces.bar and foo.interfaces.baz. Which is preferable? Thanks for any thought on this.

Re: Package organization

2005-06-22 Thread Thomas Lotze
PI that models and operates on a PDF document's structures, but was designed to produce PDF files with a certain kind of content. It didn't seem to be of much easy use for anything wildly different from that. -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Python API to manipulate CAB files.

2005-06-23 Thread Thomas Heller
t; (SetupIterateCabinet) via ctypes, or with Microsoft Cabinet utilities > via subprocess module. Neither is what people call fun... > > - kv Probably not what you mean with 'manipulate CAB files', but it may give a start with ctypes and cab: http://starship.python.net/crew/thelle

Re: List of all installed applications (XP)?

2005-06-23 Thread Thomas Heller
a problem I get results that aren't actually apps, but it > is important I get all apps. > I think it's this registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall Maybe you should try HKEY_CURRENT_USER\.. or HKEY_USERS\..\.. as well. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Database recommendations for Windows app

2005-06-23 Thread Thomas Bartkus
ying that Python worsens that frustration, are you? > > I think Dan was commenting on flaws in Microsoft's products, > not in Python. As I understand it, he was suggesting to use > something else than Access with Python, not something else > than Python with Access. > The O.

Re: Database recommendations for Windows app

2005-06-23 Thread Thomas Bartkus
ying that Python worsens that frustration, are you? > > I think Dan was commenting on flaws in Microsoft's products, > not in Python. As I understand it, he was suggesting to use > something else than Access with Python, not something else > than Python with Access. The O.P. want

Re: Allowing only one instance of a script?

2005-06-23 Thread Thomas Guettler
PID which is in the file is sill alive. There is a small race condition between os.path.exists() and writing the file. If you want to be 100% sure you need to use file locking. HTH, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 304 - is anyone really interested?

2005-06-23 Thread Thomas Guettler
ebuglog ... if debuglog.search: print "Searching for " I don't want pyc files in the etc directory. Up to now I do it like this: import debuglog try: os.unlink("...debuglog.pyc") except: pass Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP ? os.listdir enhancement

2005-06-23 Thread Thomas Guettler
as you noticed, too, "join" would be better than "abs". Example: # mylistdir.py import os import sys def mylistdir(dir, join=False): for file in os.listdir(dir): yield os.path.join(dir, file) print list(mylistdir(sys.argv[1])) Thomas -- Thomas Güttler, h

Re: PEP 304 - is anyone really interested?

2005-06-23 Thread Thomas Heller
Thomas Guettler <[EMAIL PROTECTED]> writes: > Am Wed, 22 Jun 2005 18:01:51 -0500 schrieb Skip Montanaro: > >> >> I wrote PEP 304, "Controlling Generation of Bytecode Files": >> >> http://www.python.org/peps/pep-0304.html >> > > ..

Re: Database recommendations for Windows app

2005-06-23 Thread Thomas Bartkus
"Magnus Lycka" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thomas Bartkus wrote: > > "Magnus Lycka" <[EMAIL PROTECTED]> wrote in message > > > The O.P. wanted a database for his > > > Python app, and Thomas Bartku

Re: Favorite non-python language trick?

2005-06-24 Thread Thomas Guettler
ether or not code runs: I do it this way: if 0: # Just for testing print value . You only need to change "if 0" to "if 1" and the code gets executed. Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Help wanted in piping in Windows

2005-06-24 Thread Thomas Guettler
file" does work on windows. On Unix you can the module "select". HTH, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Office COM automatisation - calling python from VBA

2005-06-24 Thread Thomas Bartkus
ions you needed to work with. Do you think that might please a few of us here in this particular newsgroup? This is exactly what Microsoft has with Office/VBA. I don't particularly like VBA as a language either. And I don't like B. Gates And I may well be crazy. Just not *that* crazy! Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: Modules for inclusion in standard library?

2005-06-27 Thread Thomas Heller
nit, sys.getfilesystemencoding()) I would really appreciate if Python's unicode support would be better ;-), and maybe it's easier to add this to the path module than to os.path. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Boss wants me to program

2005-06-27 Thread Thomas Bartkus
shines in the MS Windows/Office realm. 2) Python shines everywhere else. Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: whois like functionality on Windows?

2005-06-28 Thread Thomas Heller
; the message "host not found" :-( > > Anyone suggestions? This? C:\>py23 Python 2.3.5 (#62, Feb 8 2005, 16:23:02) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>>

Re: Boss wants me to program

2005-06-28 Thread Thomas Bartkus
orrect to point out how much better it is to know what is going on behind the scenes. But heck, once you know how to extract square roots - you need to let the computer do it! GUI interfaces should be the same deal! Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: COM problem .py versus .exe

2005-06-29 Thread Thomas Heller
; | any thoughts on this error? Thanks again for the help. > > Well that's a real pain! Doesn't this look like the WMI service (or how it's called) is not installed? Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Modules for inclusion in standard library?

2005-06-29 Thread Thomas Heller
said that, I'd like to see ctypes in the standard library > anyway, with a suitably intimidating warning in the docs about the > trouble you can get yourself into with it. To me, this sounds that *at least* a PEP would be needed to convince Guido. Or, to record the reasoning why it cannot be included. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading output from a child process non-blockingly

2005-06-29 Thread Thomas Guettler
application is running. Remember the size of the file after each read and use fd.seek() to read only the new data after opening it again. This should work on windows, too. HTH, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Boss wants me to program

2005-06-29 Thread Thomas Bartkus
of trigonometry. It would be helpful of if your class was near the seashore. You would want a clear shot at the horizon. Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

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