Question about the 'code' module

2005-12-29 Thread Thomas Heller
Couldn't it be replaced with the (thread-safe) sys.exc_info()[2]? Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: python coding contest

2005-12-30 Thread Thomas Heller
t; My 120 byte solution is equivalent. Many others probably did the same > thing. Python's philosophy of one way to do it seems to be leading us > all down the same road. Here's a different way: it generates the output column-wise, then uses zip to assemble line-wise. The additio

Re: IRC sockets and queries

2006-01-03 Thread Thomas Wouters
ou kicked and banned for a while too, but you probably were AFK at the time. Since you obviously didn't get the message that way, let me try here: stop doing it, thanks. -- Thomas Wouters <[EMAIL PROTECTED]> Hi! I'm a .signature virus! copy me into your .signature file to

Re: Win32 Binary-only for 2.3.x?

2006-01-04 Thread Thomas Heller
so you should be able to open them in winzip or whatever archive utility you like. OTOH, you could also install/copy whatever you like/uninstall. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling foreign functions from Python? ctypes?

2006-01-08 Thread Thomas Heller
r. As the author, I would be happy to see ctypes included with the standard Python build. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Win32 Binary-only for 2.3.x?

2006-01-09 Thread Thomas Heller
ing is what determines that part of the registry lookup path > for: > HKLM/Software/Python/PythonCore/X.Y/PythonPath > - You could change the "Caption" value to "FuzzyWuzzyWuzzaBear" to > effectively disable usage of the registry for sys.path building by

Re: modifying DLL string table programatically (Was: Win32 Binary-only for 2.3.x?)

2006-01-09 Thread Thomas Heller
Trent Mick <[EMAIL PROTECTED]> writes: > [Thomas Heller wrote] >> py2exe also does something like this in the copy of pythonXY.dll that it >> creates, to avoid the resulting exe pulling in sys.path entries from the >> registry. > > Do you have a quick pointer to

Re: Calling foreign functions from Python? ctypes?

2006-01-10 Thread Thomas Heller
"Delaney, Timothy (Tim)" <[EMAIL PROTECTED]> writes: > Thomas Heller wrote: > >> As the author, I would be happy to see ctypes included with the >> standard Python build. > > I'm sure you know the magical incantation to get that to happen ... >

Re: AW: Calling foreign functions from Python? ctypes?

2006-01-10 Thread Thomas Heller
interpreted what he wrote myself. Ok, I'll propose on python-dev to include ctypes into core python. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling foreign functions from Python? ctypes?

2006-01-10 Thread Thomas Heller
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > Thomas Heller wrote: >> It has been proposed to include it in core Python, but Guido didn't >> accept it. The thread starts here: >> >> http://mail.python.org/pipermail/python-dev/2004-January/th

A bug for unicode strings in Python 2.4?

2006-01-10 Thread Thomas Moore
Hi: Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> u=u'\u9019\u662f\u4e2d\u6587\u5b57\u4e32' >>> u.split() [u'\u9019\u662f\u4e2d\u6587\u5b57\u4e32'] >>> I think u should get split. --Frank

A bug about unicode string in Python 2.4?

2006-01-10 Thread Thomas Moore
Hi: Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> u=u'\u9019\u662f\u4e2d\u6587\u5b57\u4e32' >>> u.split() [u'\u9019\u662f\u4e2d\u6587\u5b57\u4e32'] >>> I think u should get split. --Frank

Re: A bug for unicode strings in Python 2.4?

2006-01-10 Thread Thomas Moore
> Thomas Moore: > > >>>>u=u'\u9019\u662f\u4e2d\u6587\u5b57\u4e32' > >>>>u.split() > > > > [u'\u9019\u662f\u4e2d\u6587\u5b57\u4e32'] > > > > > > I think u should get split. > > Where do you thi

Re: ctypes & C++

2006-01-10 Thread Thomas Heller
[EMAIL PROTECTED] writes: > Thomas, > > Ctypes doesn't work to call arbitrary C++ code, is that correct? > > Skip Yes, that's correct. It doesn't do C++ name-(un)mangling, nor has it the C++ calling conventions. And so on... Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: A bug for unicode strings in Python 2.4?

2006-01-10 Thread Thomas Moore
Hi: Thanks. I'll write my own split(). Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: (Fucking) Unicode: console print statement and PythonWin: replacement for off-table chars HOWTO?

2006-01-11 Thread Thomas Heller
2? You could use ctypes to access and call the ...W functions directly. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode style in win32/PythonWin

2006-01-12 Thread Thomas Heller
unicode strings, and should work correctly. By default the conversion is done with ('msbc', 'ignore'), but this can also be changed, ctypes-wide, with a call to ctypes.set_conversion_mode(encoding,errors). You have to pass None for the third parameter (if not a string). Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode style in win32/PythonWin

2006-01-13 Thread Thomas Heller
"Robert" <[EMAIL PROTECTED]> writes: > Thomas Heller schrieb: >> So after these assignments: >> >> ctypes.windll.user32.MessageBoxW.argtypes = (c_int, c_wchar_p, >>c_wchar_p, c_int) >> c

XEmacs python-mode question

2006-01-13 Thread Thomas Heller
py-python-command: "py23" ## End: Execute "M-x set-variable py-python-command py23" - no effect. Can anyone help? Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: XEmacs python-mode question

2006-01-13 Thread Thomas Heller
[EMAIL PROTECTED] writes: > Thomas> I'm trying to customize the python interpreter that is used to > Thomas> execute my scripts from within WinXP, XEmacs, python-mode > Thomas> version $Revision4.70$, but cannot get it to work. > > Thomas>

Re: csv format to DBase III format

2006-01-15 Thread Thomas Ganss
a dbf, even via foxpro. Comparing file size / header info should point you to your error. Such a task (if targeted to run on a win machine) is probably better done in foxpro or another dbase clone / file handler: would take probably less a handful of lines and be much safer. my 0.02 EUR thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Is the Python binding for ncurses unicode capable?

2006-01-19 Thread Thomas Dickey
normal one. If it's linked with ncursesw, strings are interpreted according to the locale settings. -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Is the Python binding for ncurses unicode capable?

2006-01-20 Thread Thomas Dickey
"Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Thomas Dickey wrote: >>>ncurses expects byte strings (although I'm uncertain as to what >>>impact multi-byte encodings have in ncurses). >> >> >> It depends on whether python's curses

statistical analysis tools in python?

2006-07-12 Thread Thomas Nelson
Sorry if this is a FAQ, but I couldn't find a good summary through google. What kinds of statistical analysis tools exist in python? I really just need t-tests, chi-squared test, and other such tests of statistical significance. A few things point to numpy and scipy, but I was surprised to find

Re: How to convert arbitrary objects directly to base64 without initial string conversion?

2006-07-13 Thread Thomas Heller
seems also be the case for the base64.encodestring function. ctypes objects support the buffer interface. So, base64.b64encode(buffer(ctypes_instance)) should work efficiently. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: execute a shell script from a python script

2006-07-17 Thread Thomas Nelson
If your script is foo.sh and takes args: import subprocess subprocess.call(["foo.sh","args"],shell=True) Should work fine. check out http://www.python.org/dev/doc/maint24/lib/module-subprocess.html Enjoy, THN spec wrote: > Hi all, I know nothing about Python. What I need to do is to get a > Pyth

Re: execute a shell script from a python script

2006-07-18 Thread Thomas Nelson
As described in the docs I pointed to before: subprocess.call("foo.sh",shell=True) Is the way to do it without args. I think it is simplest to learn the subprocess module because (quoting from the docs) this module intends to replace several other, older modules and functions, such as: os.system o

Re: statistical analysis tools in python?

2006-07-18 Thread Thomas Nelson
Actually, after a little looking, the simple stats.py module at http://www.nmr.mgh.harvard.edu/Neural_Systems_Group/gary/python.html is exactly what I needed. It may not be as fast or as comprehensive as scipy or R, but installation simply involves downloading the module and importing into the cod

Re: No need to close file?

2006-07-18 Thread Thomas Bartkus
king if it is a good idea to not close it? Good programming practice says that if you open it - you close it. And stay out of trouble ;-) Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

How to use pdb?

2006-07-20 Thread tron . thomas
I am trying to figure out how to use the pdb module to debug Python programs, and I'm having difficulties. I am pretty familiar with GDB which seems to be similar, however I cannot even get the Python debugger to break into a program so I can step through it. I wrote a simple program and below is

Semantics of propagated exceptions

2006-07-21 Thread Thomas Lotze
Some gut feeling tells me the first option is preferrable, but I'ld like to read your opinions and maybe other alternatives. -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: How to use pdb?

2006-07-21 Thread tron . thomas
peter wrote: > I haven't tried to use pdb myself, but this looks fairly helpful ... > > http://www.ferg.org/papers/debugging_in_python.html > > good luck > > Peter That link was indeed helpful. I was finally able to debug the program -- http://mail.python.org/mailman/listinfo/python-list

Re: How to use pdb?

2006-07-21 Thread tron . thomas
R. Bernstein wrote: > Perhaps what you are looking for is: > python /usr/lib/python2.4/pdb.py Myprogram.py I tried this and it did not work. pdb did not load the file so it could be debugged. -- http://mail.python.org/mailman/listinfo/python-list

Re: looking for a regular expression

2006-08-01 Thread Thomas Nelson
How about my_string = "We the people of the United States, in order to form a more perfect union, establish justice, insure domestic tranquility,.." print (x for x in my_string.split(",") if "justice" in x).next() This isn't a regular expression, but it gives what you're looking for. THN --

Re: Semantics of propagated exceptions

2006-08-01 Thread Thomas Lotze
ch. Good to see that my "gut feeling" as to the most pythonic approach seems to coincide with the answers I've received ;o) -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming newbie coming from Ruby: a few Python questions

2006-08-03 Thread Thomas Nelson
I strongly recommend trying to come up with your own projects. Just pick small things that reflect something you actually want to do: maybe make a simple board game, or a few scripts to help you keep all your files organized, etc. Generally speaking I think it's easier to teach yourself a languag

Re: do people really complain about significant whitespace?

2006-08-08 Thread Thomas Guettler
use four spaces. That's one small argument against the current whitespace syntax in python. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: using python at the bash shell?

2006-08-08 Thread Thomas Bartkus
bother with BASH at all ;-) And with Python available everywhere, I've just reconsiled to pick up my BASH by osmosis and concentrate on (much!) cleaner scripting with Python. Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter module not found

2006-08-08 Thread Thomas Heller
ion if not all: sys.exit (0) else: if os.path.isfile (path + '\\' + arg): print path + '\\' + arg if not all: sys.exit (0) c:\> There may be better variants of which out there... Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie question: what's with "self"?

2006-08-08 Thread Thomas Bartkus
. If you have a method upper() that convert everything to uppercase, your class definition would need the "self" parameter in order to know which particular string to convert. Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Open file handles?

2006-08-08 Thread Thomas Bartkus
e an open write handle to that file. IOW - I need to decline the operation if something else hasn't finished writing to the file. How can I know? Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: Open file handles?

2006-08-09 Thread Thomas Bartkus
"Jon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Perhaps using os you could work with lsof > [http://www.linuxcommand.org/man_pages/lsof8.html] > > Jon > Of course! That's perfect. Thank you! How silly of me not to have noticed that &qu

Re: loop until keypress (Windows XP)

2006-08-10 Thread Thomas Guettler
Am Wed, 09 Aug 2006 22:19:24 -0700 schrieb placid: > Hi all, > > > Im using the cmd module and i have command that loops and keeps on > printing text, what i want to be able to do is loop until the user > presses a particular key, say Q/q ? I tried the following code; > There is a portable get

Re: Two Classes In Two Files

2006-08-10 Thread Thomas Nelson
Perhaps __init__.py has what you're looking for? THN [EMAIL PROTECTED] wrote: > I just started working with Python and ran into an annoyance. Is there > a way to avoid having to use the "from xxx import yyy" syntax from > files in the same directory? I'm sure it's been asked a million times, > b

Re: Memory problem

2006-08-14 Thread Thomas Nelson
Yi Xing wrote: > On a related question: how do I initialize a list or an array with a > pre-specified number of elements, something like > int p[100] in C? I can do append() for 100 times but this looks silly... > > Thanks. > > Yi Xing Use [0]*100 for a list. THN -- http://mail.python.org/ma

Read Picasa metadata using Python?

2006-08-17 Thread Thomas W
outside Picasa and I want to use python to do it. Thanks in advance, Thomas -- http://mail.python.org/mailman/listinfo/python-list

Py2Exe and sys.argv : The Lost Arguments

2006-08-17 Thread Thomas W
I've created a simple script like so : import sys import wx app = wx.PySimpleApp() dlg = wx.MessageDialog(None, "%s" % sys.argv, 'A Message Box', wx.YES_NO | wx.ICON_QUESTION) retCode = dlg.ShowModal() app.MainLoop() If I run this on the command line like python testcmd.py /somefile.ext /another

Python complaining about CherryPY?

2006-08-19 Thread Thomas McLean
Hi all, First post to the list, so first off, I'm new to Python and everything surrounding it so if you can please ignore my ignorance. I setup a cherryPY server so that I could use sabnzbd but once, I have installed/configured what I was told by the tutorials and everything else. I run ubuntu x8

Re: Where is Python in the scheme of things?

2006-10-04 Thread Thomas Jollans
ts natively everywhere, but is, as I have heard, not as "pythonic" as other frameworks. pyGUI looks promising. Reinforcement: Remember that python is a language, not a development environment. It shines as a language, and can be put into a friendly case if the programmer choses that. -- Thomas Jollans -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting a ValueError with comtypes

2006-10-05 Thread Thomas Heller
e first IDispatch method, which is GetTypeInfoCount(), which takes one argument ;-). I'm not 100% sure the following code will work for you because I'm using a comtypes version that's not yet committed to the repository, but it works for me: from comtypes.client import GetModule,

Re: Getting a ValueError with comtypes

2006-10-05 Thread Thomas Heller
[EMAIL PROTECTED] schrieb: > Thomas, > > Thanks a ton for the quick response. > > I called GetModule('quartz.dll'), and now I can at least call > IMediaControl::Run. I get another error, but that's my problem (I > don't have the graph set correctly ye

Re: Ctypes and freeing memory

2006-10-06 Thread Thomas Heller
tribute: class String(c_char_p): def __del__(self): MagickRelinquishMemory(self) The difference is that you will receive an instance of this class when you call the MagickGetException funcion. To access the 'char *' value, you can access the .value attribute (which is inherited from c_char_p), and to free the memory call MagickRelinquishMemory in the __del__ method. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: News on versions modules for Python-2.5?

2006-10-06 Thread Thomas Heller
ges are good that they work in Python 2.5 as well. AFAIK, venster still uses the no longer supported ctypes.com package, it should be updated to use comtypes instead. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Ctypes and freeing memory

2006-10-06 Thread Thomas Heller
Oliver Andrich schrieb: > On 10/6/06, Thomas Heller <[EMAIL PROTECTED]> wrote: >> Chris Mellon has already pointed out a possible solution, but there is also a >> different way. You could use a subclass of c_char_p as the restype >> attribute: >> >> class St

Re: ctypes and setjmp

2006-10-06 Thread Thomas Heller
will call setjmp() first internally before calling the libpng api function... Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: ctypes, arrays and pointers

2006-10-06 Thread Thomas Heller
in the ctypes or Python SF tracker). Unfortunately that was after the feature freeze for Python 2.5. > Sadly the docs don't seem to be finished :( > >http://docs.python.org/dev/lib/ctypes-arrays-pointers.html > > This problem wouldn't have been described in the docs anyway, but keep on bugging me about the docs: Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: curses problem reading cursor keys

2006-10-11 Thread Thomas Dickey
it sounded like a good idea ;-) -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net -- http://mail.python.org/mailman/listinfo/python-list

OT: What's up with the starship?

2006-10-13 Thread Thomas Heller
I cannot connect to starship.python.net: neither http, nor can I login interactively with ssl (and the host key seems to have changed as well). Does anyone know more? Thanks, Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Insert characters into string based on re ?

2006-10-13 Thread harvey . thomas
Matt wrote: > I am attempting to reformat a string, inserting newlines before certain > phrases. For example, in formatting SQL, I want to start a new line at > each JOIN condition. Noting that strings are immutable, I thought it > best to spllit the string at the key points, then join with '\n'.

Re: Need a Regular expression to remove a char for Unicode text

2006-10-13 Thread harvey . thomas
శ్రీనివాస wrote: > Hai friends, > Can any one tell me how can i remove a character from a unocode text. > కల్‌&హార is a Telugu word in Unicode. Here i want to > remove '&' but not replace with a zero width char. And one more thing, > if any whitespaces are there before and after '&' char, the text

Re: OT: What's up with the starship?

2006-10-15 Thread Thomas Heller
T. Bryan schrieb: > Thomas Heller wrote: > >> I cannot connect to starship.python.net: neither http, nor can I login >> interactively with ssl (and the host key seems to have changed as well). >> >> Does anyone know more? > > starship.python.net was compro

stdout not flushed before os.execvp()

2006-10-17 Thread Thomas Guettler
uot; os.execvp("/bin/true", ["/bin/true"]) """ ===> python tmp/testexec.py Messsage ===> python tmp/testexec.py > out ; cat out Is this a bug or feature? My version: Python 2.4.2 (#1, May 2 2006, 08:28:01) GCC 4.1.0 (SUSE Linux)] on linux2 -- T

Re: Problem: Python search path - module order

2006-10-17 Thread Thomas Guettler
packages. > I use ~/.bash_profile to set: > > export PYTHONPATH="$HOME/local/lib/python:$HOME/django_src" > you can use sys.path.insert(0, ...) in the python

Re: pywin32 COM sort in Excel (late binding fails, early binding works) (+py2exe)

2006-10-19 Thread Thomas Heller
2 54 > > Normally, this would not be an issue, but when I bundle my app using > py2exe it does not grab the gen_py stuff. > > Any help appreciated... > You must instruct py2exe to pick up the typelib wrappers, this does not happen automatically. IIRC, there's a sample in the distribution somewhere. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Python scripts in Windows Explorer

2006-10-20 Thread Thomas Heller
ipt. > > Are there any simple and workable solutions for this sort of thing? > I think you can create a shortcut to the Python script, and then drag files on it. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.5 ; Effbot console ; thank ; pb release.

2006-10-24 Thread Thomas Heller
it for that platform, and > make it available. All the other "ungrateful, unmotivated lazy > buggers" can then take advantage of that -- and reward the person with > whatever praise they require :-) > I wonder if it would be possible to setup a windows box which

Tutorial on setuptools

2006-10-24 Thread Thomas W
I'm might just be dumb, but I cannot get the hang of usting setuptools based on the docs at http://peak.telecommunity.com/DevCenter/setuptools. Is there a simple example available showing how to pack a few modules, a few scripts, some resources files ( images ) and list a few dependencies ? I've s

The status of Python and SOAP?

2006-10-24 Thread Thomas W
I'm going to give a presentation of python to my co-workers at a very pro-microsoft workplace. Almost everything we need is currently supported by the standard distro + the win32all package, but we also need support for SOAP. I've tried SOAPpy ( didn't get it to compile, needed a library from a dea

Re: Slightly OT: Is pyhelp.cgi documentation search broken?

2006-10-26 Thread Thomas Heller
lable > somewhere? The operating system on the starship.python.net machine was reinstalled from scratch; but the 'crew' pages still have to be restored. This will take some days, IMO. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Slightly OT: Is pyhelp.cgi documentation search broken?

2006-10-27 Thread Thomas Heller
27; only, and moved the code into an SVN repository. Note that you can also download the module and use it locally. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: can I import the module twice (under differnet names)

2006-11-01 Thread Thomas Nelson
alf wrote: > Hi, > > wonder if in the python I could treat modules imorts like classes > instances. It means I could import it twice or more times under > different names. > > -- > alfz1 You can always give any object as many names as you want: >>> import sys >>> s1 = sys >>> s2 = sys >>> s1.path

Re: is mod_python borked?

2006-11-02 Thread Thomas Guettler
#x27;t use it with a different webserver. I use quixote with plain old CGI. It is fast enough for my stuff. If there is heavy load, I would try SCGI. Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ http://www.tbz-pariv.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL

Re: Python in sci/tech applications

2006-11-03 Thread Thomas Nelson
How hard would it be to have numpy/ scipy part of the python standard library? Tom mattf wrote: > I've discovered Python and have been trying it out lately as a possible > replacement for computations that would ordinarily be done with a > commercial package like Matlab or IDL. I'd like to mentio

Re: py2exe questions

2006-11-03 Thread Thomas Heller
ile=None option), and deleting the w9xpopen.exe if you don't need win98 support. > I does not however go to great lengths to "hide" the code from > someone with time/expertise that wants to get to your code > (but then just about anything can be disassembled). The compiled &

Re: py2exe questions

2006-11-04 Thread Thomas Heller
g/old/ , and look at the section named "The bundle option". py2exe is able to load Python extensions (.pyd and .dll) from the zip-archive *without* extracting them to the file system at all. It doesn't work for the C runtime library msvcr71.dll though. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Unicode/ascii encoding nightmare

2006-11-06 Thread Thomas W
I'm getting really annoyed with python in regards to unicode/ascii-encoding problems. The string below is the encoding of the norwegian word "fødselsdag". >>> s = 'f\xc3\x83\xc2\xb8dselsdag' I stored the string as "fødselsdag" but somewhere in my code it got translated into the mess above and I

Re: Unicode/ascii encoding nightmare

2006-11-06 Thread Thomas W
ral of you also pointed out. Anyway, thanks for all your replies. I think I can get this thing up and running with a bit more code tinkering. And I'll read up on some unicode-docs as well. :-) Thanks again. Thomas John Machin wrote: > Thomas W wrote: > > I'm getting really

Re: ctypes, python 2.5, WinFunctionType and _as_parameter_

2006-11-07 Thread Thomas Heller
an implementation detail ;-) > Thanks in advance, > > Gerard > Thomas -- http://mail.python.org/mailman/listinfo/python-list

[Ann] ctypes wiki

2006-11-09 Thread Thomas Heller
resource. Currently there is no actual contents - so please contribute by adding tips, tricks, and whatever you have to share about ctypes. The wiki URL is: http://starship.python.net/crew/theller/wiki Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: announce: FAQs suggested

2006-11-10 Thread Thomas Heller
d also say: > > FAQ: How do I say returns void in ctypes? > A: restype = None > ctypes doesn't define c_void. This actually is doc'ed obscurely, it's > just irregular. I don't think that this is irregular, see comment about void not being a type. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: announce: FAQs suggested

2006-11-10 Thread Thomas Heller
Traceback (most recent call last): File "", line 1, in ? TypeError: 'NoneType' object is not callable >>> OTOH, void* is a type in C, also in ctypes, where it is spelled 'c_void_p'. I hope this makes sense to you. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: announce: FAQs suggested

2006-11-10 Thread Thomas Heller
for void a function not >> returning anything" at: >> http://starship.python.net/crew/theller/ctypes/reference.html This sentence: Use None for void a function not returning anything of course makes no sense. What I had in mind was: Use None for a void function not returning

Tkinter Problems on MAC OS 10.3.9 & python2.5

2006-11-16 Thread Thomas P.
Hello folks, my name is Thomas, and I am new to this newsgroup. So first I want to say hello. :-) ...done! Now, I have a problem concerning my new python2.5 install. With python2.3 and 2.4, Tkinter was no problem. Now, when I try to import it, the folowing happens: iPimpG4:~/Python-Dev

Tkinter & Python 2.5 Problems on MAC OS 10.3.9

2006-11-16 Thread Thomas Ploch
Hello folks, Since this is my first post on the list, a brief introduction of myself. My name is Thomas, I am 26 years old, I am a student of Computational Linguistics and I am a python user. :-) Now my problem: I have Tcl/Tk 8.4.4 installed: iPimpG4:~ profipimp$ tclsh % info patchlevel

Re: Tkinter & Python 2.5 Problems on MAC OS 10.3.9

2006-11-16 Thread Thomas Ploch
Kevin Walzer schrieb: > Thomas Ploch wrote: > > Hello folks, > > > > Since this is my first post on the list, a brief introduction of myself. > > > > My name is Thomas, I am 26 years old, I am a student of Computational > > Linguistics and I am a

Re: Large Dictionaries

2006-05-28 Thread Thomas Ganss
for query optimization and recreate them after batch insert. my 0.02 EUR thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: ideas for programs?

2006-05-31 Thread Thomas Bartkus
code? You can't sell a program because it's written in Python. But you can sell a Python program that solves a problem. Find a problem and beat it with software. The particular language you choose to use has nothing to do with it! But we do like Python ;-) Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: calling functions style question

2006-06-06 Thread Thomas Nelson
The difference becomes clear when you import your program into another program (or the command line python editor). __name__!='__main__' when you import, so the functions will not be called if they're inside the block. This is why you see this block so often at the end of scripts; so that the scr

Re: cgi and popen

2006-06-07 Thread Thomas Guettler
the subprocesses is finished. You can try to start the script like this: nohup nice mein-script >> $HOME/log/mein-script.log 2>&1 http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Need pixie dust for building Python 2.4 curses module on Solaris 8

2006-06-07 Thread Thomas Dickey
and installed ncurses 5.5, both using default > settings and using --with-shared. When the curses module is linked against for Solaris, you also should add --enable-rpath -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net -- http://mail.python.org/mailman/listinfo/python-list

Re: 10GB XML Blows out Memory, Suggestions?

2006-06-08 Thread Thomas Ganss
nding side would have shipped > something like CSV). Perhaps the previous poster meant "database file", which for some systems describes the "container" of the whole database. If the XML has redundancies represented in "linked" data, data normalization ca

Re: simplexmlrpcserver and allow_none

2006-06-08 Thread Thomas Bellman
gs, **kwargs): kwargs.setdefault('allow_none', 1) return self.__dumps[0](*args, **kwargs) xmlrpclib.dumps = _xmldumps(xmlrpclib.dumps) import SimpleXMLRPCServer -- Thomas Bellman, Lysator Computer Club, Linköping University, Sweden "

Re: import hook

2006-06-11 Thread Thomas Heller
as "draft" has in fact been > already mostly implemented, since it's used by the zipimport mechanism) > allows you to perform such feats. Study it at > <http://www.python.org/dev/peps/pep-0302/> ... There are also other ways. You could extend __path__ of foo, and the pkgutil module might also be useful. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: (pre)forking server framework?

2006-06-12 Thread Thomas Guettler
rker processes. http://www.mems-exchange.org/software/quixote/ 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

Re: VC++ types to ctypes

2006-06-12 Thread Thomas Heller
_char*128 > __int32 -> c_int > BS_BOOL -> c_byte > > TCHAR chBootImage[_MAX_PATH]; -> ??? > > But not work... > how to solve it? > > Thank's, Luca > _MAX_PATH is 260. TCHAR is normally a unicode (wide) or a ascii (ansi) character, dependi

Re: Python is fun (useless social thread) ;-)

2006-06-15 Thread Thomas Guettler
improve? There are some things in Python I don't know very well: Decorators and generators. But somehow I don't think that I really need them. Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http:

Re: pyfcp

2006-06-19 Thread Thomas Moore
> http://www.python.org/pyfcp > It gets me to Error 404. -- http://mail.python.org/mailman/listinfo/python-list

Problem Py2exe pygtk and Pil

2006-06-20 Thread thomas carpentier
doesn't work. I don't know how integrate library into my setup. Thank you for your help. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem Py2exe pygtk and Pil

2006-06-20 Thread thomas carpentier
they > .pyc or .pyd or .dll] that py2exe missed into dist. > i know for a fact that py2exe is intelligent with the gtk libraries, so > check if the PIL libraries are in the dist directory. > > thomas carpentier wrote: >> Hello, >> >> I have created a program wi

Re: need all python dialog equivalent

2006-06-22 Thread Thomas Dickey
"seems to require" if you're installing some package. dialog builds/works against either ncurses/ncursesw -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net -- http://mail.python.org/mailman/listinfo/python-list

<    14   15   16   17   18   19   20   21   22   23   >