Re: Emacs + python.

2007-08-06 Thread Thomas Jollans
ail-archive.com/python-list%40python.org/ http://groups.google.com/group/comp.lang.python/topics I assume you already asked and got an answer, so you should now be able to find it. -- Regards, Thomas Jollans GPG key: 0xF421434B may be found on various keyservers,

Re: webbrowser.open question force Firefox

2007-08-06 Thread Thomas Jollans
IT, where_firefox_is, "http://localhost:8080";) -- Regards, Thomas Jollans GPG key: 0xF421434B may be found on various keyservers, eg pgp.mit.edu Hacker key <http://hackerkey.com/>: v4sw6+8Yhw4/5ln3pr5Ock2ma2u7Lw2Nl7Di2e2t3/4TMb6HOPTen5/6g5OPa1XsMr9

Re: boolean operations on sets

2007-08-06 Thread Thomas Jollans
adable, but works for all y -- Regards, Thomas Jollans GPG key: 0xF421434B may be found on various keyservers, eg pgp.mit.edu Hacker key <http://hackerkey.com/>: v4sw6+8Yhw4/5ln3pr5Ock2ma2u7Lw2Nl7Di2e2t3/4TMb6HOPTen5/6g5OPa1XsMr9p-7/-6 signature.asc Description: Th

Re: udp, datagram sockets

2007-08-06 Thread Thomas Jollans
On Monday 06 August 2007, 7stud wrote: > I'm trying to understand datagrams. My client program sends a message > to the server, and then the server infinitely loops over the recv() to > make sure all the data was received. I'm trying to use an * to signal > the end of the message, so that the ser

Re: LRU cache?

2007-08-11 Thread Thomas Wittek
from the source and) add it on top and remove the last one, if the list exceeds N entries. So you need to do two things: 1) Maintain a list: Use a (linked) list. 2) Random access to that list: Use a dict (hash), that also has to be updated on removal/addition of objects. -- Thom

Re: Dictionary viewer and editor

2007-08-13 Thread Thomas Jollans
On Monday 13 August 2007, Ariel Balter wrote: > http://mail.python.org/pipermail/python-list/2001-August/100288.html > > Did you ever finish writing this? YAML (without flow style) could qualify as "tree format". example: yaml.dump ( {"alpha": 1, "beta": 2, "otherstuff": {"bug": None, "cool": T

Re: buggie in else syntax ?

2007-08-14 Thread Thomas Jollans
SM(229) > else: JSM(230) ; > \<=== SYNTAX ERROR is there a newline before the backslash ? Or a space after the backslash but before the newline ? -- Regards, Thomas Jollans GPG key: 0xF421434B

Re: Combinatorial of elements in Python?

2007-08-15 Thread Thomas Nelson
On Aug 15, 8:39 am, "Sebastian Bassi" <[EMAIL PROTECTED]> wrote: > That was easy :) > What about extending it for N elements inside the dictionary? Sounds > like a work for a recursive function. Here's my attempt: [code] def backtrack(groups,position=0, answer=''): if position==len(groups)

Re: ming on win32 anyone ? [help a noob]

2007-08-15 Thread Thomas Heller
daz.diamond schrieb: > hoping someone can help ... > > how do I install ming (with python) on win32? have downloaded the > tar.gz of ming-0.3.0 which doesn't have a handy self-installer, and > I'm absolutely foxed as to what to do next ... the install > instructions in the package seem to be linux

Re: Move files/directories to Recycle Bin using standard Python libs

2007-08-15 Thread Thomas Heller
ndows only thing to me, so you'll probably have to use > the win32 package regardless. See the following links: > > http://mail.python.org/pipermail/python-list/2004-October/287638.html > http://tgolden.sc.sabren.com/python/win32_how_do_i/copy-a-file.html Or access the win32 api

Changing button preferences after beeing pressed

2007-08-16 Thread thomas . lidebrandt
e. Is there a better solution to this problem? /Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: ctypes and C99 complex numbers

2007-08-16 Thread Thomas Heller
et(self): def _set(self, value): value = property(_get, _set) but I'm afraid this is not really portable to other platforms. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Pass by reference or by value?

2007-08-16 Thread Thomas Jollans
that a method of the passed object is called instead of of the local namespace dict. (please note that I'm throwing around abstract concepts without caring about an implementation). -- Regards, Thomas Jollans GPG key: 0xF421434B may be found on various keyservers

Re: clarification

2007-08-17 Thread Thomas Jollans
lt.append(k) > print result > fh.close() > > can you tell me problem with my script and what should is do for this No, I have not tested it. You tell us the problem, and we might understand the situation better than you. -- Regards,

Re: best GUI library for vector drawing program

2007-08-17 Thread Thomas Kellerer
ious other programs in Windows OS, and > Linux OS, and the Mac OS. The NetBeans Platform offers a nice module for this. NetBeans itself uses it for UML, BPEL and ERD modelling and other features (such as the visual XSD editor) http://platform.netbeans.org/ http://graph.netbeans.org/

Re: Syntax Question - list multiplication

2007-08-19 Thread Thomas Jollans
u want three copies of the list, you need to copy it thrice (well, twice) Thus: >>> row = [0] * 3 >>> grid = [] >>> for n in xrange(3): grid.append(row[:]) ... >>> grid [[0, 0, 0], [0, 0, 0], [0, 0, 0]] >>> grid[0][0] =1 >>> grid [[1, 0,

Re: best GUI library for vector drawing program

2007-08-20 Thread Thomas Kellerer
ht want to add NetBeans' Graph library to the list. It is very similar to Eclipse's GEF http://graph.netbeans.org/ Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: How to decompress .Z file?

2007-08-20 Thread Thomas Jollans
ubt you'll see it in python, but http://en.wikipedia.org/wiki/LZW seams to sport a python implementation. -- Regards, Thomas Jollans GPG key: 0xF421434B may be found on various keyservers, eg pgp.mit.edu Hacker key <http://hackerkey.com/>: v4sw6+8Yhw4/5ln3pr5Ock2m

Re: IDE for Python

2007-08-21 Thread Thomas Wittek
Joel Andres Granados schrieb: > I have tried various times to use an IDE for python put have always been > disapointed. > I haven't revisited the idea in about a year and was wondering what the > python people > use. Did you try Eclipse + PyDev? I'm quite happy with tha

Re: Simple Python Spider

2007-08-23 Thread Thomas Wittek
luca bertini schrieb: > 1) ask google a query http://code.google.com/apis/ http://code.google.com/apis/ajaxsearch/ But you probably have to reverse engineer the JavaScript lib. > 2) parse the data http://blog.hill-street.net/?p=7 -- Thomas Wittek Web: http://gedankenkonstrukt.de/

win32com problem: more than one instance

2007-08-31 Thread Thomas Rademacher
, Thomas convert.py import pythoncom pythoncom.CoInitializeEx(pythoncom.COINIT_MULTITHREADED) sldworks = gencache.EnsureModule('{83A33D31-27C5-11CE- BFD4-00400513BB57}', 0x0, 13, 0) sw = sldworks.ISldWorks(DispatchEx('SldWorks.Application')) swmodel, errors, wa

Re: Fatal Python error using ctypes & python exceptions

2007-08-31 Thread Thomas Heller
on call returns PyErr_Occurred() is called and an exception raised in the calling code - exactly what you want. The 'Python calling convention' is used when you load the library with pydll.MyDll or PyDLL("MyDll"). Additional remark: You can have functions with different calling conventions in the same dll, just load it with different library loaders and you're fine. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Looping through File Question

2007-09-05 Thread Thomas Nelson
> > > On Sep 5, 8:58 pm, planetmatt <[EMAIL PROTECTED]> wrote: > > > > > I am a Python beginner. I am trying to loop through a CSV file which > > > > I can do. What I want to change though is for the loop to start at > > > > row 2 in the file thus excluding column headers. The DictReader object

Re: py2exe - change name of exe created

2007-09-07 Thread Thomas Heller
t all possible ? Yes. Use a 'dest_base' key in the dictionary, like so: > setup(windows = [{"script":"myprogram.py", >"icon_resources":[(0,"nabbitt.ico")], "dest_base": "MyBestProgram", > "other_resources": [(24,1,manifest)]} ... 'dest_base' is the basename of the destination program that py2exe creates. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: debugging program that uses ctypes

2007-09-07 Thread Thomas Heller
e to reproduce the crash in a script that doesn't use these extensions. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: py2exe - change name of exe created

2007-09-07 Thread Thomas Heller
t;)], >> >> "dest_base": "MyBestProgram",> >> "other_resources": [(24,1,manifest)]} >> >> ... >> >> 'dest_base' is the basename of the destination program that py2exe crea

Re: Get the complete command line as-is

2007-09-13 Thread Thomas Heller
eed to write a wrapper >> with ctypes). >> >> Seehttp://msdn2.microsoft.com/en-us/library/ms683156.aspx >> >> A+ >> >> Laurent. > > Thank you for the tip. It works: > > import ctypes > > p = ctypes.windll.kernel32.GetCommandLineA() > print ctypes.c_char_p(p).value > Better would be this code: import ctypes ctypes.windll.kernel32.GetCommandLineA.restype = ctypes.c_char_p print ctypes.windll.kernel32.GetCommandLineA() Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: py2exe: LoadLibrary(pythondll) failed

2007-03-03 Thread Thomas Heller
it up correctly for this test.exe to > run? Thanks. > > Ouyang > > The test.exe created by py2exe relies on everything else in the dist directory, so you must copy these files as well. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Device Drivers in python(kernel modules)

2007-03-06 Thread Thomas Ploch
> code then it can be done. > Can some one suggest something..anything http://wiki.python.org/moin/elmer This tool is able to run Python Code as if it was written in C. Perhaps this might help you, but I am not pretty sure since it had to be included in the kernel tree. Thomas -- http

Re: C++ and Python

2007-03-10 Thread Thomas Heller
ome large libraries and also smaller ones that are already wrapped with ctypes. PyOpenGL is probably the most promiment example, comtypes (although still in heavy development) another one. As the ctypes author I'm of course biased. Thomas -- http://mail.python.org/mailman/listinfo/python-list

os.path.basename() - only Windows OR *nix?

2007-03-14 Thread Thomas Ploch
happens for 'C:\\text\\text.txt'. I think its the escapes that makes python not splitting it. All Unix style paths get converted the right way. Is there an easy way around this, or do I really have to write a parser including _all_ Python escapes? Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: os.path.basename() - only Windows OR *nix?

2007-03-14 Thread Thomas Ploch
directories? Otherwise it's not always a good idea > to use filenames provided by the user for files on the server anyway. Yes, each User has his own directory. Files get timestamped and then put into the corresponding directory. It is just that having 'C:\a\very\long\path\file.ext'

Re: os.path.basename() - only Windows OR *nix?

2007-03-14 Thread Thomas Ploch
# XXX > ... raise SomeException('could not do the job') > ... > >>> for f in fnames: > ... print f, basename(f) > ... > C:\dir\data.ext data.ext > /dir/data.txt data.txt > dir:data data > >>> > Thnaks a lot. :) Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: ActivePython 2.5.0.0 is now available

2007-03-15 Thread Thomas Heller
liest. I intend to release a separate Win x64 ctypes version soon (my plan is to release this when Python 2.5.1 will be released, but this is totally arbitrary); I still have to run more tests with it. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Technical Answer - Protecting code in python

2007-03-22 Thread Thomas Heller
ce - more likely to run Windows > than it is to run unix/linux/etc. > > Who has a similar solution for windows? python -m py_compile script.py del script.py Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Create new processes over telnet in XP

2007-03-24 Thread Thomas Heller
tall. > Google for it, I don't know what the command line switch(es) are, but they're > there. > > --Irmen > Even the Wise installer that was used to build the 2.3 and earlier versions had command line switches to do silent installs. THomas -- http://mail.python.org/mailman/listinfo/python-list

Can't use class variable with private nested class

2007-03-27 Thread tron . thomas
The following code will print a message only once: class PrintOnce: printOnce = True def __init__(self): if PrintOnce.printOnce: print 'Printing once.' PrintOnce.printOnce = False first = PrintOnce() second = PrintOnc

Re: XML Parsing

2007-03-28 Thread harvey . thomas
On Mar 28, 10:51 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > I want to parse this XML file: > > > > > > > > > > > filename > > > > Hello > > > > > > > > > filename2 > > > > Hello2 > > > > > > > > > > This XML will be in a file called filecreate.xml >

Re: Can't use class variable with private nested class

2007-03-28 Thread tron . thomas
On Mar 27, 10:08 pm, [EMAIL PROTECTED] (Alex Martelli) wrote: > > Forget all the naming silliness and use self.__class__.printOnce > instead. > > Alex I tried self.__class__.printOnce and that worked. Thanks for your help. -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with class variables

2007-03-29 Thread Thomas Krüger
How to > I get it to return > [4,2,3,1] > [1,2,3,4] > > Dag Use a copy of self.a: self.b = self.a[:] Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Indentation for code readability

2007-03-30 Thread Thomas Krüger
e cause many discussions between developers. Python has one convention (defined in PEP 8) and the deeper you dive into the language the more you will like it. BTW: having one way to do it is one of the main ideas of Python's philosophy. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: os.system questions

2007-03-31 Thread Thomas Krüger
exitcode of the given command. To get the output try os.popen to os.popen4 or the commands lib. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Sorting a multidimensional array by multiple keys

2007-03-31 Thread Thomas Krüger
ke the cmp function. This will objects in list obj_lst by their id attributes: def sorter(a, b): return cmp(a.id, b.id) obj_lst.sort(sorter) Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Sorting a multidimensional array by multiple keys

2007-04-01 Thread Thomas Krüger
Alex Martelli schrieb: > Thomas Krüger <[EMAIL PROTECTED]> wrote: >> def sorter(a, b): >> return cmp(a.id, b.id) >> >> obj_lst.sort(sorter) > > A MUCH better way to obtain exactly the same semantics would be: > > def getid(a): > return a.id

Re: Web App Framework with PostgreSQL + fast + easy

2007-04-02 Thread Thomas Krüger
Ben schrieb: > I'm looking for a web application framework with a good interface to > PostgreSQL. You may check out Django: http://www.djangoproject.com/ Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about text in Python

2007-04-02 Thread Thomas Krüger
has had > enough and enters a blank line which would then end the program. You can do this with a while loop. If the user enters a blank line you can break out of the loop: while true: (some code) if not line: break Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: how to remove multiple occurrences of a string within a list?

2007-04-03 Thread Thomas Nelson
bahoo wrote: > Hi, > > I have a list like ['0024', 'haha', '0024'] > and as output I want ['haha'] > > If I > myList.remove('0024') > > then only the first instance of '0024' is removed. > > It seems like regular expressions is the rescue, but I couldn't find > the right tool. > > Thanks! > bahoo

Re: how to remove multiple occurrences of a string within a list?

2007-04-03 Thread Thomas Nelson
On Apr 3, 1:49 pm, [EMAIL PROTECTED] wrote: > On Apr 3, 1:31 pm, "Matimus" <[EMAIL PROTECTED]> wrote: > > > It depends on your application, but a 'set' might really be what you > > want, as opposed to a list. > > > >>> s = set(["0024","haha","0024"]) > > >>> s > > > set(["0024","haha"])>>> s.remove

Re: Why NOT only one class per file?

2007-04-04 Thread Thomas Krüger
.djangoproject.com/documentation/tutorial02/#make-the-poll-app-modifiable-in-the-admin See also: http://mail.python.org/pipermail/python-list/2006-December/418363.html Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Prevent Modification of Script?

2007-04-05 Thread Thomas Bellman
(Don't feel too bad about it. I have made similar mistakes myself, but after many years working with computer security I have managed to learn not to do *that* particular error again; I hope...) -- Thomas Bellman, Lysator Computer Club, Linköping University, Sweden "Life IS pai

Re: Python on MIPS

2007-04-06 Thread Thomas Krüger
Lorenzo Mainardi schrieb: > I bought a very small embedded card, with a MIPS processor, running > Linux. So, I would to use Python on that; I checked on python.org, but I > did'nt find any release for this architecture. Could you help me? How about compiling it from source? T

Re: Using os.popen3() to get binary data

2007-04-06 Thread Thomas Krüger
When I interrupt the script, > I get the following error message: > Traceback (most recent call last): > File "/home/tiger/stock-spam/scripts/all_in_one.py", line 46, in ? > frames = so.readlines() > KeyboardInterrupt > close failed: [Errno 32] Broken pipe Ju

Re: Why does not my wx.html.HtmlWindow work?

2007-04-07 Thread Thomas Krüger
[EMAIL PROTECTED] schrieb: > html.LoadPage(" > http://www.pythonthreads.com/articles/python/incorporating-into-wxpython-part-1.html";) Quickshot: There's a space at the start of your URI. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Crypto Suggestion/Help

2007-04-08 Thread Thomas Krüger
r similar, please let me know. You don't need encryption, cryptographic hashes or Python. What you need are just the basic UNIX/Linux permissions. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a simple function to generate a list like ['a', 'b', 'c', ... 'z']?

2007-04-09 Thread Thomas Krüger
人言落日是天涯,望极天涯不见家 schrieb: > Is there a simple function to generate a list like ['a', 'b', 'c', ... > 'z']? The range() just can generate the numeric list. There is: [ chr(i) for i in range(97, 123) ] Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Queue get timeout parameter question

2007-04-10 Thread Thomas Krüger
system clocks drifts (see output of "hwclock; date") you may have a timer related kernel problem. This may help: * deactivate ACPI via kernel boot parameter * change timer frequency * try different setting for all timer related stuff like CONFIG_HPET_TIMER or CONFIG_X86_PM_T

Re: Broken pipe with os.popen3()

2007-04-10 Thread Thomas Guettler
ocrad') > si.write(frame) > si.close() > messagetext += so.read() If you use popen you should use *one* filehandle. The app hangs because the buffer is full. See http://docs.python.org/lib/popen2-flow-control.html -- Thomas Güttler, http://www.thomas-guettler.de/ http://www.tbz-pariv.de/

Re: THREADS use 100 % CPU all the time

2007-04-11 Thread Thomas Krüger
[EMAIL PROTECTED] schrieb: > while (True): > pass > Does anyone know how to run this without consuming all CPU. Your while loop is taking all the CPU time. Thomas -- sinature: http://nospam.nowire.org/signature_usenet.png -- http://mail.python.org/mailman/listinfo/python-list

Re: Get Shift + TAB in ncurses.

2007-04-12 Thread Thomas Bellman
but that will only apply to your terminal, not to anyone else's. -- Thomas Bellman, Lysator Computer Club, Linköping University, Sweden "Don't tell me I'm burning the candle at both ! bellman @ lysator.liu.se ends -- tell me where to get more wax!!" ! Make Lo

Re: Authenticating clients and servers

2007-04-15 Thread Thomas Krüger
d be nice if your tell us something about the protocol you are planning to use. Many protocols support an additional SSL/TLS-Layers (e.g. HTTP -> HTTPS). There you can use SSL certificate authentication. It may berequired to set up a small CA, but done right it is pretty secure. Thomas -- si

Re: Authenticating clients and servers

2007-04-15 Thread Thomas Krüger
Thomas Krüger schrieb: > Many protocols support an additional SSL/TLS-Layers (e.g. HTTP -> > HTTPS). There you can use SSL certificate authentication. It may > berequired to set up a small CA, but done right it is pretty secure. I missed the best: The Twisted framework has SSL au

Re: python - dll access (ctypes or swig)

2007-04-18 Thread Thomas Heller
I think that the latter problem (incompatible threading models in the same process) are solved by COM apartments - aren't they? Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess "handle is invalid" error

2007-04-18 Thread Thomas Heller
script can be made to work correctly even with pythonW.exe (and also as py2exe'd windows program, I just checked it out) when the 4 commented out lines are uncommented. subprocess cannot inherit the standard handles when the process has no console, you have to create pipes for all 3 channels,

Re: Processing drag & drop on the desktop

2007-09-16 Thread Thomas Jollans
On Sunday 16 September 2007, Pierre Quentel wrote: > Hi all, > > I would like to create an application on a Windows machine, such that > when a document is dragged and dropped on the application icon on the > desktop, the document is processed by the application > > For instance, if I drag & drop a

Using python to create windows apps that everyone can use?

2007-09-18 Thread Thomas Harding
Hi guys, sorry to post another topic on this, as I am aware that it has already been posted a few times, but not with specifically what I am looking for. I want an app that makes a gui interface for python (similar to Microsoft visual studio or qt designer, not a code based one) and/or an app t

AttributeError: How to list existing attributes?

2007-09-19 Thread Thomas Guettler
g the stacktrace? Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ http://www.tbz-pariv.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

stdout and embedding into Windows apps

2007-09-19 Thread Thomas Schreiner
; std::endl; only prints start printing... done printing. Does anybody know how to fix this issue? Basically I want to get an ipython console running in the background of my Windows app, so that I can process its data. Cheers, Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: AttributeError: How to list existing attributes?

2007-09-19 Thread Thomas Guettler
Diez B. Roggisch wrote: > Thomas Guettler wrote: > >> Hi, >> >> how can you list the attributes of an object if you catch an >> AttributeError? >> >> I couldn't find a reference in the exception object, which >> points to the object. >&

Re: RE Help

2007-09-21 Thread Thomas Jollans
On Friday 21 September 2007, [EMAIL PROTECTED] wrote: > Not specific to Python, but it will be implemented in it... how do I > compile a RE to catch everything between two know values? Here's what > I've tried (but failed) to accomplish... the knowns here are START and > END: > > data = "asdfasgSTA

Re: can I run pythons IDLE from a command line??

2007-09-22 Thread Thomas Jollans
command line or a telnet program. The Python interpreter should do fine. If your PATH environment variable is set up correctly, just run "python", otherwise it's somewhere in your Python installation directory. -- Regards, Thomas Jollans GPG key: 0

Re: stdout and embedding into Windows apps

2007-09-26 Thread Thomas Schreiner
> I can process its data. for the files: I got close to what I wanted using WConio: http://newcenturycomputers.net/projects/wconio.html I basically wrote my own class that I used for overwriting stdin and stdout and that internally used WConio. This still doesn't allow readline functiona

Re: True of False

2007-09-27 Thread Richard Thomas
On 27/09/2007, Casey <[EMAIL PROTECTED]> wrote: > On Sep 27, 12:48 pm, "Simon Brunning" <[EMAIL PROTECTED]> > wrote: > > On 9/27/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > I tried writing a true and false If statement and didn't get > > > anything? I read some previous posts, but I

Re: How popular is Django ?

2007-10-01 Thread Thomas Guettler
of comp.lang.python users can only be guessed. BTW: I think django is popular. There is a lot of traffic on the list. I like django, too. Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ http://www.tbz-pariv.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] --

Re: Where's the Starship's crew?

2007-10-05 Thread Thomas Heller
Dick Moores schrieb: > > > I didn't check on all of them, but the only one I found was Mark > Hammond . > > Dick Moores > There are more. Think of it as a game you have to solve. -- http://mail.python.or

Re: Yet another comparison of Python Web Frameworks

2007-10-06 Thread Thomas Wittek
Michele Simionato: > At work we are shopping for a Web framework, so I have been looking at > the available options > on the current market. At least, you missed Turbo Gears :) http://turbogears.org/ For me, it feels more integrated than Pylons. -- Thomas Wittek Web: http://gedankenkon

Virtual filesystem in python ( Fuse or WebDav ? )

2007-10-09 Thread Thomas W
I want to create a virtual filesystem based on a relational database. It might run as a server on a different machine, but it has to be available like a normal filesystem, either shared using SAMBA or windows filesharing or thru something else like WebDav. The idea is that I scan a local filesyst

pyxml package not working? No xml.dom.ext.reader module available after install.

2007-10-10 Thread Thomas W
I've tried to install the pyxml-package, available at http://pyxml.sourceforge.net/, both from source and using some hack on the win32-binary package available for python2.4, but without luck. After install the module xml.dom.ext.reader is not available, eventhough the folder, __init__py and every

Re: pyxml package not working? No xml.dom.ext.reader module available after install.

2007-10-10 Thread Thomas W
On 10 Okt, 11:13, Stefan Behnel <[EMAIL PROTECTED]> wrote: > Thomas W wrote: > > I've tried to install the pyxml-package, available > > athttp://pyxml.sourceforge.net/, > > both from source and using some hack on the win32-binary package > > available

Re: Keeping track of subclasses and instances?

2007-10-10 Thread Thomas Heller
: Python 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> object.__subclasses__() [, , , , , , ... >>> No builtin mechanism for instances exists, afaik. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Library for crawling forums

2007-10-11 Thread Thomas Wittek
mbination of mechanize [1] and BeautifulSoup [2]? [1] http://wwwsearch.sourceforge.net/mechanize/ [2] http://www.crummy.com/software/BeautifulSoup/ -- Thomas Wittek Web: http://gedankenkonstrukt.de/ Jabber: [EMAIL PROTECTED] GPG: 0xF534E231 -- http://mail.python.org/mailman/listinfo/python-list

Announcement: Project to get some CPython C extensions running under IronPython

2007-10-12 Thread Giles Thomas
xtension, and a thin Python wrapper on top. The module's existing C extension and Python code would "sandwich" this layer. Let us know if this is a silly idea :-) * Is there anything else we should be thinking about to get this started? Any thoughts much a

Automatically organize module imports

2007-10-15 Thread Thomas Wittek
a tool that can organize my import section? Shall I fall back to ambiguous imports like *? Shall I write out the module name for every class/function that I use (quite unhandy)? Thank you! -- Thomas Wittek Web: http://gedankenkonstrukt.de/ Jabber: [EMAIL PROTECTED] GPG: 0xF534E231 -- http://mail

Re: Automatically organize module imports

2007-10-15 Thread Thomas Wittek
Jean-Paul Calderone: > On Mon, 15 Oct 2007 20:52:11 +0200, Thomas Wittek > <[EMAIL PROTECTED]> wrote: >> Is there a tool that can organize my import section? > > Pyflakes will tell you which imports aren't being used (among other > things). I don'

Re: Automatically organize module imports

2007-10-16 Thread Thomas Wittek
pendencies right on Win XP) Thank you! -- Thomas Wittek Web: http://gedankenkonstrukt.de/ Jabber: [EMAIL PROTECTED] GPG: 0xF534E231 -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting error message/trace over the C API

2007-10-16 Thread Thomas Heller
mat_exc()' from your C code; it returns a string (a 'PyObject *' that contains a string). Thomas -- http://mail.python.org/mailman/listinfo/python-list

Inheriting automatic attributes initializer considered harmful?

2007-10-17 Thread Thomas Wittek
I feel very unsafe about that, because I've not seen this (in the few lines from some tutorials) before. Regards -- Thomas Wittek Web: http://gedankenkonstrukt.de/ Jabber: [EMAIL PROTECTED] GPG: 0xF534E231 -- http://mail.python.org/mailman/listinfo/python-list

Re: Inheriting automatic attributes initializer considered harmful?

2007-10-17 Thread Thomas Wittek
ames? Generellay, it does. But it also generates some additional attributes dynamically that are not directly defined as columns. So, restricting the attributes to the columns would be too strict. Thanks! -- Thomas Wittek Web: http://gedankenkonstrukt.de/ Jabber: [EMAIL PROTECTED] GPG: 0xF534E231

Re: ANN: magnitude 0.9.2

2007-10-18 Thread Thomas Heller
cPython from Konrad Hinsen also contains a somewhat similar module. IIRC, it is named PhysicalQuantities. You might look into that and mention it on the homepage. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a way to tell if a script has been run by Pythonw.exe instead of Python.exe?

2007-10-19 Thread Thomas Heller
xe you might be interested in the variable sys.frozen; they are set to the string 'console' or 'windows', IIRC. Thomas -- http://mail.python.org/mailman/listinfo/python-list

CGI Server that supports redirects

2007-10-19 Thread Thomas Guettler
-CGIHTTPServer.html [2]http://trac.saddi.com/flup -- Thomas Güttler, http://www.thomas-guettler.de/ http://www.tbz-pariv.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: what is the difference between the two kinds of brackets?

2007-10-20 Thread Thomas Jollans
1 >>> l[0] = 12 >>> t[0] = 12 Traceback (most recent call last): File "", line 1, in ? TypeError: object does not support item assignment >>> Also, parentheses can be skipped (as in t = 1,2,3), the comma is the maker for a tuple (exception: empty tuple == ()

Re: A Python 3000 Question

2007-10-30 Thread Thomas Wittek
be a *property*, say `object.len`. It doesn't do something on the object, but rather gives some information about its "state". -- Thomas Wittek Web: http://gedankenkonstrukt.de/ Jabber: [EMAIL PROTECTED] GPG: 0xF534E231 -- http://mail.python.org/mailman/listinfo/python-list

Re: Help ctypes on arm linux not compile

2007-10-30 Thread Thomas Heller
rent Python 2.5 sources, from SVN, should work. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: trapping DLL import issues without blocking pop up window

2007-11-02 Thread Thomas Heller
cle' should help: import ctypes; ctypes.windll.kernel32.SetErrorMode(1) See also http://msdn2.microsoft.com/en-us/library/ms680621.aspx Thomas -- http://mail.python.org/mailman/listinfo/python-list

Question: Best Practice? (module 'shelve')

2007-01-09 Thread Thomas Ploch
Hello fellows, I just wanted to know, if there is any best practice concerning following code: import re, shelve class TextMatcher: def __init__(self, patterns, email=False, dbName='textmatch.db'): self._initPatterns(patterns) self.email = email self.dbName = dbName

Re: Question: Best Practice? (module 'shelve')

2007-01-09 Thread Thomas Ploch
Thomas Ploch schrieb: > Hello fellows, > > I just wanted to know, if there is any best practice concerning > following code: > > import re, shelve > > class TextMatcher: > def __init__(self, patterns, email=False, dbName='textmatch.db'):

Re: py2exe: zipfile=None raised ImportError

2007-01-11 Thread Thomas Heller
> Does anybody know what's happening and how to fix it? I have don't know if this helps or not, but you should better clean everything (remove the build and the dist subdirectories) when you are changing the options in the setup script and 'recompile'. Another tip: You

Re: Rational Numbers

2007-01-12 Thread Thomas Ploch
al. >> >> That is dubious, but let's not start that one again. > > Decimals are good for holding financial values. There's a whole lot of > software out there that deals with money. > Do not forget: - Time - Personal Data (like birthdays, age) Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: re.sub and empty groups

2007-01-16 Thread harvey . thomas
Hugo Ferreira wrote: > Hi! > > I'm trying to do a search-replace in places where some groups are > optional... Here's an example: > > >> re.match(r"Image:([^\|]+)(?:\|(.*))?", "Image:ola").groups() > ('ola', None) > > >> re.match(r"Image:([^\|]+)(?:\|(.*))?", "Image:ola|").groups() > ('ola', '')

Re: re.sub and empty groups

2007-01-16 Thread harvey . thomas
Hugo Ferreira wrote: > Hi! > > I'm trying to do a search-replace in places where some groups are > optional... Here's an example: > > >> re.match(r"Image:([^\|]+)(?:\|(.*))?", "Image:ola").groups() > ('ola', None) > > >> re.match(r"Image:([^\|]+)(?:\|(.*))?", "Image:ola|").groups() > ('ola', '')

<    18   19   20   21   22   23   24   25   26   27   >