Re: identifying 64-bit Windows from 2.3.5?

2005-06-09 Thread Thomas Heller
do different things (in this case, invoke a different > compiler with a different set of compiler options) based on whether or > not I'm building on a 32-bit or 64-bit system. Use ctypes (sic!), or write a binary extension, and call IsWow64Process. http://msdn.microsoft.com/library/en-us

Re: anygui,anydb, any opinions?

2005-06-09 Thread Thomas Bartkus
"Renato Ramonda" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thomas Bartkus ha scritto: > > The attractiveness of wxPython here is that it extends the platform > > neutrality of Python to GUI interfaces. On a Windows platform, the work > >

Re: Generating HTML from python

2005-06-09 Thread Thomas Guettler
' % i) cols=[] for j in range(1, 11): cols.append('%s' % (i*j)) row='%s%s' % (i, ''.join(cols)) rows.append(row) html=""" Multiplication Table   %s %s """ % (''.j

cx_freeze error : LookupError: no codec search functions registered: can't find encoding

2005-06-09 Thread Thomas W
I get this error when I try to run a freezed exe on my ubuntu 5.04 running Python 2.4 : LookupError: no codec search functions registered: can't find encoding I've tried to use --include-modules encodings,codecs when freezing without luck. Any hints? Regards, Thomas -- http://mail.

Re: cx_freeze error : LookupError: no codec search functions registered:can't find encoding

2005-06-09 Thread Thomas W
gards, Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: os.system

2005-06-10 Thread Thomas Guettler
How do i remove the command window? Hi, You can remove the command window which comes from python if you use ".pyw" as extension. This is not an answer why the system method opens a second window, but maybe it helps, too. Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: anygui,anydb, any opinions?

2005-06-10 Thread Thomas Bartkus
"Renato Ramonda" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thomas Bartkus ha scritto: > > >>Then download gtk2.6 and glade for windows and then install pygtk and > >>code away to your satisfaction! :-D > >> > > &g

Re: Dealing with marketing types...

2005-06-10 Thread Thomas Bartkus
ould like to reduce the cost and increase the reliability of the labor force available to develop and maintain the system. If *thats* what's bothering you bunky - I'm sorry to tell you that I am short on solutions. BUT understanding the problem is the first step on the path to a solution :-) Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: Dealing with marketing types...

2005-06-10 Thread Thomas Bartkus
"fuzzylollipop" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > get your resume in order and start looking . . . I *hate* the fact that I agree with this post. I, for one, am hoping for serious discussion to address the problem. Thomas Bartkus -- http://mail

Controlling a generator the pythonic way

2005-06-11 Thread Thomas Lotze
Otherwise, which ugliness is the more pythonic one? Thanks a lot for any ideas. -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Controlling a generator the pythonic way

2005-06-11 Thread Thomas Lotze
Peter Hansen wrote: > Thomas Lotze wrote: >> I can see two possibilities to do this: either the current file position >> has to be read from somewhere (say, a mutable object passed to the >> generator) after each yield, [...] > > The third approach, which is cert

Re: Controlling a generator the pythonic way

2005-06-11 Thread Thomas Lotze
What makes you state that that behaviour isn't pythonic? Is it because Python happens to do it differently, because of a gut feeling, or because of some design principle behind Python I fail to see right now? -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Controlling a generator the pythonic way

2005-06-11 Thread Thomas Lotze
really often. Still, I'm going to focus on cleaner code and, first and foremost, a clean API if it comes to a decision between these goals and optimization - at least as long as I'm talking about pure Python code. -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Controlling a generator the pythonic way

2005-06-12 Thread Thomas Lotze
Thomas Lotze wrote: > Does anybody here have a third way of dealing with this? Sleeping a night sometimes is an insightful exercise *g* I realized that there is a reason why fiddling with the pointer from outside the generator defeats much of the purpose of using one. The implementation usin

Re: Controlling a generator the pythonic way

2005-06-12 Thread Thomas Lotze
Thomas Lotze wrote: > A related problem is skipping whitespace. Sometimes you don't care about > whitespace tokens, sometimes you do. Using generators, you can either set > a state variable, say on the object the generator is an attribute of, > before each call that requires a d

Re: why python on debian without the module profile?

2005-06-13 Thread Thomas Lotze
kyo guan wrote: > ImportError: No module named profile They moved it to non-free because the module's license isn't DFSG compliant. -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Dealing with marketing types...

2005-06-13 Thread Thomas Bartkus
time. AND there is a very > >high possibility that they will *need* you at a later date for which you > >can charge them dearly. > > > >That last item #3 has actually worked for me with (2) prior employers. > >I did have to eat my indignation and keep it friendly but it

Re: Dealing with marketing types...

2005-06-13 Thread Thomas Bartkus
at's the way it is. However - I certainly sympathize with the desire to fight thievery with thievery. Unfortunately, you can't win that way. Unless, of course, you can do it without being caught :-) But that only gets you revenge - not payment. Thomas Barkus -- http://mail.python.org/mailman/listinfo/python-list

Re: Controlling a generator the pythonic way

2005-06-13 Thread Thomas Lotze
Thomas Lotze wrote: > I'm trying to figure out what is the most pythonic way to interact with a > generator. JFTR, so you don't think I'd suddenly lost interest: I won't be able to respond for a couple of days because I've just incurred a nice little hospital se

Re: ZCatalog for standalone Zodb?

2005-06-14 Thread Thomas Guettler
unusable for cms, imo. Hi, There was someone who said that he has ported ZCatalog to "standalone" ZODB. Look in the archive of zodb-dev.AFAIK IndexedCatalog is still in development. Maybe the mailing list is calm, but I think it is not orphaned. HTH, Thomas -- Thomas Güttler

Re: PEP 304 "Controlling Generation of Bytecode Files" - patch updated

2005-06-17 Thread Thomas Heller
Skip Montanaro <[EMAIL PROTECTED]> writes: > I updated the patch that supports PEP 304, "Controlling Generation of > Bytecode Files" to apply cleanly against current CVS. I've tested it on Mac > OS X (straight Unix build only). I'd appreciate it if some Linux, Windows > and Mac framework folks c

What makes an object uncopyable?

2005-06-17 Thread tron . thomas
I am trying to make a copy of a certain Python object using the copy.copy() function. When I try to perform this operation I get an error like the following: copy.Error: un(shallow)copyable object of type ... What factors determine whether an object can be copied? -- http://mail.python.org/mai

Re: FAQ: how to vary the byte offset of a field of a ctypes.Structure

2007-05-31 Thread Thomas Heller
tains. Often it helps to ask yourself the question: How would I do this in C? IMO, the answer to this question, applied to your problem, would be: *Not* by using a structure. A structure is fine if the definition is fixed, or at most has *one* variable sized field at the very end. Nothing is true for your problem. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Trouble killing a process on windows

2007-06-02 Thread Thomas Nelson
Hi, I'd like to start a program, run it for a while, then terminate it. I can do this on linux, but I'm new to working with windows. Here's my script: from subprocess import Popen from time import sleep import win32api war3game = Popen(["C:\Program Files\Warcraft III\Frozen Throne.exe"]) sleep(30

Re: Trouble killing a process on windows

2007-06-02 Thread Thomas Nelson
On Jun 2, 11:43 am, Tim Golden <[EMAIL PROTECTED]> wrote: > Thomas Nelson wrote: > > from subprocess import Popen > > from time import sleep > > import win32api > > war3game = Popen(["C:\Program Files\Warcraft III\Frozen Throne.exe"]) >

Re: How do you htmlentities in Python

2007-06-04 Thread Thomas Jollans
e semicolon after the entity if it's followed by a white space (IIRC). Should this be respected, it looks more like this: r'&(%s)([;\s]|$)' Also, this completely ignores non-name entities as also found in XML. (eg %x20; for ' ' or so) Maybe some part of the HTMLPar

Re: Who uses Python?

2007-06-04 Thread Thomas Jollans
e and as such used for loads of things, like any other language. Thomas Jollans -- http://mail.python.org/mailman/listinfo/python-list

Re: html 2 image script or library

2007-06-05 Thread Thomas Jollans
cko. You might also want to reveal your name (rather common on USENET and mailing lists, I gather) and use, to the best of your ability, proper English. Thomas Jollans -- http://mail.python.org/mailman/listinfo/python-list

Feature request: New string conversion type to ignore list item

2007-06-05 Thread thomas . pohl
Hi, let's assume you want to nicely print the content of a list except for one (or some) individual item. You could do it like this: t = ["foo", "skip me", 1, 2, 3] print("text: %s\nvalues: %i %i %i" % (t[0], t[2], t[3], t[4])) If there was a conversion type which simply ignores the corresponding

Re: Feature request: New string conversion type to ignore list item

2007-06-05 Thread thomas . pohl
On 5 Jun., 13:12, Peter Otten <[EMAIL PROTECTED]> wrote: > or like this: > > >>> "%s %.s %s" % ("first", "second", "third") > > 'first third' Hey, that's great, thanks Peter! Tom -- http://mail.python.org/mailman/listinfo/python-list

Re: *args and **kwargs

2007-06-05 Thread Thomas Jollans
"JonathanB" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Ok, this is probably definitely a newbie question, but I have looked > all over the Python library reference material and tutorials which I > can find online and I cannot find a clear definition of what these are > and more

Re: Optimizing constants in loops

2007-06-13 Thread Thomas Heller
x27; if run with the '-O' or '-OO' command line flag. The optimizer works in the way you describe above (which it will not if you use a custom variable). Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: for web application development

2007-06-14 Thread Thomas Wittek
ary/l-turbogears/ > I am avoiding to learn > template language as much as possible. You will need a templating language to put out your HTML. Of course that will not be a full programming language like PHP. -- Thomas Wittek http://gedankenkonstrukt.de/ Jabber: [EMAIL PROTECTED] -- http://m

[no subject]

2007-06-15 Thread Wiley Thomas
I'm trying to write a script to open a file on our (windows) network. The file is located on a machine that is not part of the domain and requires a separate user id and password to access. I tried using urllib2 and the password_manager to authenticate but as some point urllib2 sees I'm trying to

Re: Installing manpage in setup.py

2007-06-16 Thread Thomas Jollans
re/man/man? since that is the path specified in the FHS [1]. setup.py being a python program, you could just as well check for the existence or /use/share/man and /usr/man. Thomas Jollans signature.asc Description: OpenPGP digital signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Matrix Multiplication

2007-06-17 Thread Thomas Wittek
[EMAIL PROTECTED]: > Is there any direct function for matrix multiplication in Python or > any of its packages? or do we have to multiply element by element? First hit on google for "python matrix": http://matpy.sourceforge.net/ -- Thomas Wittek http://gedankenkonstrukt.de

Re: very simple shared dll with ctypes

2007-06-19 Thread Thomas Heller
gt; #if defined(_MSC_VER) > #define DLL extern "C" __declspec(dllexport) > #else > #define DLL > #endif > > DLL double adder(double a, double b){ > double c; > c=a+b; > return c; > } > from ctypes import * adder = cdll.small_dll.adder adder.restype = c_doub

Re: ctypes pointer

2007-06-19 Thread Thomas Heller
File "", line 0, in __main__ > WindowsError: exception: access violation reading 0x7EF9DB23 > > I cant figure out what is causing this. That should work (and works for me, of course). Do you have a typo in the above code? libd instead of libx? Thomas -- http://mail.python.org/mailman/listinfo/python-list

Python live environment on web-site?

2007-06-20 Thread Thomas Lenarz
produced output of the script. I searched using google but didn't come across such a site. However, I imagine there must be at least one Thanks for any hint, Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: "assert" annoyance

2007-06-22 Thread Thomas Heller
scope > where the failure happened, so I can examine the local frame. That > just seems natural, but I don't see an obvious way to do it. Am I > missing something? I guess I could replace all the assertions with > function calls that launch pdb, but why bother havi

Re: Python live environment on web-site?

2007-06-23 Thread Thomas Lenarz
On Wed, 20 Jun 2007 15:18:26 GMT, [EMAIL PROTECTED] (Thomas Lenarz) wrote: >Hi all, > >I was wondering if there was a python-live-environment available on a >public web-site similar to the ruby-live-tutorial on Thanks a lot for all your replies. I looked at the "TryPython-Sites

Re: 16bit hash

2007-06-27 Thread Thomas Heller
> distributes the bits evenly. Particularly since it seems to treat integers > etc > as special cases > > >>> hash(1) > 1 > >>> hash(2) > 2 > >>> hash('1234') > 1723328704 > >>> I'm not sure if it helps in

Re: Capturing and sending keys {Esperanto}

2007-06-27 Thread Thomas Jollans
end them too... I'm not quite sure what you want to do. Is this in a Tkinter application or somthing like that ? Do you want this to be hooked into some layer of some operating system to work universally ? Which operating system ? Thomas Jollans signature.asc Description: OpenPGP digital

Re: Capturing stdout from a class method

2007-06-27 Thread Thomas Jollans
Falcolas wrote: > I have a rather strange situation, and I'm not sure my brief > experience of Python will let me handle it properly. > > The situation is this: I have a Java class "X" which I need to call in > a Jython script. The output of "X" is sent to stdout using the java > call System.out.

Re: listing the type of an object

2007-06-27 Thread Thomas Jollans
load of WTF?, which new-style classes make sense and behave like you (that is "one" in general and you, Stef, in particular) expect. As I'm too lazy to explain what all this is about, I'll point you to a page with a promising title: http://wiki.python.org/moin/N

Re: Evolution of a pythonistas!

2007-06-28 Thread Thomas Jollans
swordofrue wrote: > Hello everyone, > > I just started reading the python documentation and then I got to > thinking. How does a pythonistas evolve? What kind of natural > evolution does a pythonistas endure? The reason why I wonder is > simply because I have no idea of where I should be going. W

Re: 16bit hash

2007-06-28 Thread Thomas Jollans
Robin Becker wrote: > Martin v. Löwis wrote: > > 0 the ideal hash > > :) > > can't be argued with > >> ... >> So: what are your input data, and what is the >> distribution among them? >> >> Regards, >> Martin >> > I'm trying to create UniqueID's for dynamic postscript fonts. According > to

Re: problem with hack using multiple inheritance for plugins

2007-06-28 Thread Thomas Jollans
und in Section 9 of the tutorial, > and Python code I've seen uses the same syntax. > > Where can I find the syntax of new-style classes? syntax is the same. A class is new-style if it inherits from at least one new-style class and zero or more old-style classes. If you're

Re: appending file

2007-06-29 Thread Thomas Jollans
t; > Note that if I don't do "ucf.write(pin.read())", everything is ok. > > Thanks for any help. -- Regards, Thomas Jollans GPG key: 0xF421434B may be found on various keyservers, eg pgp.mit.edu Hacker key <http://hackerkey.com/>: v4sw

Re: HTML Render Support in PyGTK

2007-06-29 Thread Thomas Jollans
ature or not. I believe GTK+2 has an HTML renderer, I don't know whether it's included in PyGTK by default etc. -- Regards, Thomas Jollans GPG key: 0xF421434B may be found on various keyservers, eg pgp.mit.edu Hacker key <http://hac

Re: Portable general timestamp format, not 2038-limited

2007-07-01 Thread Thomas Jollans
On Sunday 01 July 2007, Roedy Green wrote: > On 25 Jun 2007 18:46:25 -0700, Paul Rubin > wrote, quoted or indirectly quoted > > someone who said : > >You cannot accurately compute > >the number of seconds between Nixon's resignation and 1800 UTC today, > >unless you take

Re: How to uninstall packages

2007-07-01 Thread Thomas Jollans
On Sunday 01 July 2007, Rustom Mody wrote: > I first installed the debian package python-pysqlite1.1 using > synaptic. Since this seemed too old for other packages (sqlalchemy) I > downloaded the sources pysqlite-2.3.4.tar.gz and ran setup install. I wonder why you chose not to use python-pysqli

Re: How does py2exe work?

2007-07-01 Thread Thomas Jollans
essentially, that's what it does. -- 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

Re: Reading stdout and stderr of an external program

2007-07-02 Thread Thomas Jollans
err.log and to display > its contents. Is this the best way to do this? No. The best way to do this is with Popen, as it is portable and avoids the extranous file. -- Regards, Thomas Jollans GPG key: 0xF421434B may be found on various keyservers, eg pgp.mit.edu Ha

Re: Proposal: s1.intersects(s2)

2007-07-04 Thread Thomas Jollans
query should be available > as a method of set itself. >>> s1 = set(xrange(5)) >>> s2 = set(xrange(3,9)) >>> s1 set([0, 1, 2, 3, 4]) >>> s2 set([3, 4, 5, 6, 7, 8]) >>> s1 | s2 set([0, 1, 2, 3, 4, 5, 6, 7, 8]) >>> s1 & s2 set([3, 4]) >

Re: Interest in a one-day business conference for Python, Zope and Plone companies ?

2007-07-04 Thread Thomas Heller
ed city, with good > airport connections world-wide and specifically to all major > European cities, so it's easy getting there and ideal for a one > day event. I would be interested in such an event. But: Am I the only one? Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: The best platform and editor for Python

2007-07-05 Thread Thomas Heller
QOTW? Gregor Horvath schrieb: > That's a property of open source projects. > Features nobody really needs are not implemented. > > Gregor -- http://mail.python.org/mailman/listinfo/python-list

Re: Re-raising exceptions with modified message

2007-07-05 Thread Thomas Heller
back in a customized way. But I may be wrong... Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Chat programs

2007-07-05 Thread Thomas Jollans
e, but (remember: this is a python list) I think python is a brilliant language for many things, including building chat programs [1] ;-) [1]: http://zombiehq.xyzplanet.net/zhq/projects/chat this really needs an update... like automatic client discovery etc... -- Regards,

Re: Where is the syntax for the dict() constructor ?!

2007-07-05 Thread Thomas Jollans
are not quoted in the .csv > file)? "rb" is read, in binary mode. On DOS and derivatives this prevents intentional file corruption when reading. (for ASCII files, omitting the b might be desirable...) Think of csv.reader as a fancy variant of the following: (fancy in that it supp

Re: Pretty Printing Like Tidy for HTML

2007-07-07 Thread Thomas Wittek
t's relatively common that you have some "legacy" code (e.g. from (ex-)colleages) that doesn't conform to your style preferences/your companys coding guidelines. In such a case those tools can be very helpful. -- Thomas Wittek http://gedankenkonstrukt.de/ Jabber: [EMAIL PROT

Re: Distributing python apps

2007-07-09 Thread Thomas Wittek
requiring a Python installation." -- Thomas Wittek http://gedankenkonstrukt.de/ Jabber: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

condor_compiled python interpreter

2007-07-11 Thread Thomas Nelson
Does anyone know where I could find help on condor_compiling a python interpreter? My own attempts have failed, and I can't find anything on google. Here's the condor page: http://www.cs.wisc.edu/condor/ Thanks, Tom -- http://mail.python.org/mailman/listinfo/python-list

Re: renaming an open file in nt like unix?

2007-07-13 Thread Thomas Heller
th the old name (newly started processes will use the new one then), and delete the renamed one at the next possible occasion (usually at the next reboot). I'm not so sure on which NT versions it works this way, at least in w2000 and newer. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: [SQLite] Recommended wrapper?

2007-04-23 Thread Thomas Krüger
It's all there: http://docs.python.org/lib/module-sqlite3.html Thomas -- sinature: http://nospam.nowire.org/signature_usenet.png -- http://mail.python.org/mailman/listinfo/python-list

Re: Catching a specific IO error

2007-04-24 Thread Thomas Krüger
Tina I schrieb: > Now, this works but of course it catches every IOError, and I can not > figure out how to restrict it to only catch the "[Errno 2]"? There's an example that uses the error number: http://docs.python.org/tut/node10.html#SECTION001030 Thomas

Feedback on Until recipe

2007-04-24 Thread Thomas Nelson
Occasionally someone posts to this group complaining about the lack of "repeat ... until" in python. I too have occasionally wished for such a construct, and after some thinking, I came up with the class below. I'm hoping to get some feedback here, and if people besides me think they might use it

feedback on Until recipe

2007-04-24 Thread Thomas Nelson
Occasionally people post complaining about the lack of a "repeat...until" structure in python. I thought about it and came up with this recipe that I like. The only ugly thing is having to use lambdas, otherwise it's very terse and readable. Tell me what you think, and if anyone besides me think

Re: When are immutable tuples *essential*? Why can't you just use lists *everywhere* instead?

2007-04-24 Thread Thomas Nelson
On Apr 23, 10:38 pm, Mel Wilson <[EMAIL PROTECTED]> wrote: > Neil Cerutti wrote: > > The interpreter explains it: "A list is not a hashable object." > > Choosing a hash table instead of some kind of balanced tree seems > > to be just an optimization. ;) > > Even with a balanced tree, if a key in a

Re: os.system('tar -c * | tar -C dst') ##Any other suggestions...

2007-04-24 Thread Thomas Krüger
on's tarfile lib. Thomas -- sinature: http://nospam.nowire.org/signature_usenet.png -- http://mail.python.org/mailman/listinfo/python-list

Re: bitwise shift?

2007-04-25 Thread Thomas Krüger
ot;1 shift > left by k" which is the same as multiplying with k. 1 << n is a more efficient replacement for 2**n Thomas -- sinature: http://nospam.nowire.org/signature_usenet.png -- http://mail.python.org/mailman/listinfo/python-list

Re: str() and repr() question

2007-04-26 Thread Thomas Krüger
here? > Thanks in advance. > You have overwritten the built-in str function some lines above. Thomas -- sinature: http://nospam.nowire.org/signature_usenet.png -- http://mail.python.org/mailman/listinfo/python-list

Re: editing scripts on a mac

2007-04-27 Thread Thomas Nelson
On Apr 27, 11:37 am, Tommy Grav <[EMAIL PROTECTED]> wrote: > > him> I do not have a text editor, but here are the answers to > > him> questions 1-5. > > > Now, frankly, I don't think this answer is correct, since I know OS > > X is > > a UNIX derivative, but I am loathe to involve a programming n

How safe is a set of floats?

2007-05-04 Thread Thomas Nelson
I want to generate all the fractions between 1 and limit (with limit>1) in an orderly fashion, without duplicates. def all_ratios(limit): s = set() hi = 1.0 lo = 1.0 while True: if hi/lo not in s: s.add(hi/lo) yield (hi,lo) hi += 1 if

Re: How do I get type methods?

2007-05-04 Thread Thomas Nelson
On May 4, 7:59 am, [EMAIL PROTECTED] wrote: > On 4 ÍÁÊ, 09:08, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > > En Fri, 04 May 2007 01:34:20 -0300, <[EMAIL PROTECTED]> escribio: > > > I'm not against 'dir(MyClass)'; the question is, what should I 'dir()' > > > to get methods of 'pyuno' type ins

Re: ctypes: Problems using Windows-DLL from VB example code

2007-05-09 Thread Thomas Heller
06 > > Any suggestions? > Have you tried to pass the structure by reference? dso_lib.port_init(byref(init_data)) Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: ctypes: Problems using Windows-DLL from VB example code

2007-05-09 Thread Thomas Heller
gt; wrong calling convention Please try using 'windll' instead of 'cdll' to load the library; then call 'dso_lib.port_init(byref(init_data))'. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Problems with grid() layout under tkinter

2007-05-11 Thread Thomas Jansson
strange. I hope you can help me. A example of the program http://tjansson.dyndns.dk/apache2-default/strange-grid.jpg and the code http://tjansson.dyndns.dk/tjansson/gui.py Kind regards Thomas Jansson -- http://mail.python.org/mailman/listinfo/python-list

Re: stealth screen scraping with python?

2007-05-12 Thread Thomas Wittek
ear that > they probably monitor for this type of activity, and will soon ban my > IP. Use anonymizing proxies: http://www.google.com/search?q=proxies+OR+proxy+anonymous+OR+anonymizing -- Thomas Wittek http://gedankenkonstrukt.de/ Jabber: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems with grid() layout under tkinter

2007-05-12 Thread Thomas Jansson
I found the error - some of the widgets belonged to "master" and some to "frame". So glad I found that Error - that took forever! :D Kind regards Thomas Jansson On 11 Maj, 23:06, Thomas Jansson <[EMAIL PROTECTED]> wrote: > Dear all > > I am trying to make a

Creating a function to make checkbutton with information from a list?

2007-05-12 Thread Thomas Jansson
t;, "LERR", "LCOMP"] for item in self.checkbutton: self.+'item'+Checkbutton = Chekcbutton(frame, onvalue='t', offvalue='f', variable=self.+'item'+) self.+'item'+Checkbutton.grid() How should I do this? Kind regards Thomas Jansson -- http://mail.python.org/mailman/listinfo/python-list

Re: Sorting troubles

2007-05-14 Thread Thomas Nelson
On May 14, 11:05 am, [EMAIL PROTECTED] wrote: > I have the following implementations of quicksort and insertion sort: > > def qSort(List): > if List == []: return [] > return qSort([x for x in List[1:] if x< List[0]]) + List[0:1] + \ >qSort([x for x in List[1:] if x>=List[0]]) >

Re: Creating a function to make checkbutton with information from a list?

2007-05-14 Thread Thomas Jansson
On 13 Maj, 08:45, Peter Otten <[EMAIL PROTECTED]> wrote: > Thomas Jansson wrote: > > Dear all > > > I am writing a program with tkinter where I have to create a lot of > > checkbuttons. They should have the same format but should have > > different names. My i

ANN: ctypes 1.0.2 released

2007-05-15 Thread Thomas Heller
on version you are using. Homepage <http://starship.python.net/crew/theller/ctypes/> Enjoy, Thomas -- http://mail.python.org/mailman/listinfo/python-list

ctypes-1.0.2 for 64-bit Windows

2007-05-15 Thread Thomas Heller
es for dll-functions; integers (which ctypes assumes by default) and pointers have different sizes on 64-bit Windows. Apart from that, enjoy. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: calldll for Python 2.5

2007-05-16 Thread Thomas Heller
pes, but I > have thousands of lines of library code that are dependent on > calldll. Anyone out there have a version that works with Python > 2.5 so I don't have to a massive rewrite? Can't you write a calldll replacement with ctypes? Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-18 Thread Thomas Bellman
erently that for example a Japanese person will not be able to recognize a character rendered in the Taiwanese or mainland Chinese way. -- Thomas Bellman, Lysator Computer Club, Linköping University, Sweden "Adde parvum parvo magnus acervus erit" ! bellman @ lysator.liu

Re: An expression that rebinds a variable?

2007-05-18 Thread Thomas Bellman
x27; is the expression List comprehensions: >>> c Traceback (most recent call last): File "", line 1, in NameError: name 'c' is not defined >>> eval('[ord(c) for c in "parrot"]') [112, 97, 114, 114, 111, 116] >&g

doctest environment question

2007-05-21 Thread thomas . guest
I'm not making progress with the following and would appreciate any help. Here's an interpreted Python session. >>> import sys >>> def f(): pass ... >>> this_module = sys.modules[__name__] >>> delattr(this_module, 'f') >>> f() Traceback (most recent call last): File "", line 1, in NameError: n

Re: Python and GUI

2007-05-21 Thread Thomas Lenarz
ds and Tabular-Lists right out of the box. Best wishes, Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: xml.dom.minidom: how to preserve CRLF's inside CDATA?

2007-05-22 Thread harvey . thomas
On May 22, 2:45 pm, "sim.sim" <[EMAIL PROTECTED]> wrote: > Hi all. > i'm faced to trouble using minidom: > > #i have a string (xml) within CDATA section, and the section includes > "\r\n": > iInStr = '\n\n' > > #After i create DOM-object, i get the value of "Data" without "\r\n" > > from xml.dom im

Re: Windows Debugging w/o MS

2007-05-23 Thread Thomas Lenarz
ue different from 0. 7. You should be able to single step now. I am not sure if this will work. But it might be worth a try. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: just a bug (was: xml.dom.minidom: how to preserve CRLF's inside CDATA?)

2007-05-25 Thread harvey . thomas
On May 25, 12:03 pm, "sim.sim" <[EMAIL PROTECTED]> wrote: > On 25 ÍÁÊ, 12:45, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > > > In <[EMAIL PROTECTED]>, sim.sim wrote: > > > Below the code that tryes to parse an well-formed xml, but it fails > > > with error message: > > > "not well-formed (

FTP not Returning (Python on Series 60 Nokia)

2007-05-28 Thread Eisl Thomas
Hi! Do you already have found a solution for the FTP.storbinary hang-up-problem? I am writing a program who connects himself a lot of times to a FTP-Server, but in about 1 of 100 cases, it gets stuck in the storbinary command although the connection seems to work. I have already tried to set a

Re: with ctypes, how to parse a multi-string

2007-05-31 Thread Thomas Heller
ate_unicode_buffer("first\0second\0third\0") # The pointer you will pass to the function call ptr = cast(buf, POINTER(c_wchar)) # function call omitted # Print the raw result print ptr[:len(buf)] # Print a list of strings print ptr[:len(buf)].split("\0") """ Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: web page text extractor

2007-07-22 Thread Thomas Dickey
Miki <[EMAIL PROTECTED]> wrote: > (You can find lynx at http://lynx.browser.org/) not exactly - The current version of lynx is 2.8.6 It's available at http://lynx.isc.org/lynx2.8.6/ 2.8.7 Development & patches: http://lynx.isc.org/current/index.html -- Tho

force unicode strings

2007-08-01 Thread Thomas Guettler
le to loop over all strings the interpreter has parsed? Pure ascii strings are OK. 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

Re: sending very large packets over the network

2007-08-01 Thread Thomas Jollans
een sent or an error occurs. None is returned on success. On > error, an exception is raised, and there is no way to determine how much > data, if any, was successfully sent. [1]: http://docs.python.org/lib/socket-objects.html -- Regards, Thomas Joll

Re: Is shelve/dbm supposed to be this inefficient?

2007-08-01 Thread Thomas Jollans
key] = val self.flush() def flush(self): for k, v in self.__repl_dict.iteritems(): cPickle.dump(v, file(os.path.join(self.dir, k), 'wb'), protocol=2) def __del__(self): self.flush() -- Regards,

Re: Determining if file is valid image file

2007-08-02 Thread Thomas Jollans
On Thursday 02 August 2007, André wrote: > On Aug 2, 11:14 am, André <[EMAIL PROTECTED]> wrote: > > Other than installing PIL, is there a "simple" way using Python only > > to determine if a file is a valid image file? > > > > I'd be happy if I could at least identify valid images files for gif, >

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