List performance and CSV

2005-10-08 Thread Stephan
etter Python synax to use? Thanks, -Stephan -- http://mail.python.org/mailman/listinfo/python-list

Python's CSV reader

2005-08-03 Thread Stephan
der record and a corresponding detail record on the next line. Each line type has a different number of fields.) Can the CSV module be coerced to read two line formats at once or am I better off using read and split? Thanks for your insight, Stephan -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's CSV reader

2005-08-04 Thread Stephan
r way? -- Stephan -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's CSV reader

2005-08-07 Thread Stephan
) # Print the parsed data print '-' * 40 print "Header (%d fields): %s" % (len(header), header) print "Detail (%d fields): %s" % (len(detail), detail) except StopIteration: break Regards, -Stephan -- http://mail.python.org/mailman/listinfo/python-list

Interrupting execution of PyRun_SimpleScript()

2005-04-26 Thread stephan
Hi, Im am using PyRun_SimpleString() inside a BCB 5.0 GUI app on win32. All works fine. The PyRun_SimpleStript() runs a piece of python code which calls often a callback function to refresh my gui App so my Form still can react to user input. Now, I would like to implement a possibility to inte

Problem installing pip

2015-09-21 Thread Stephan
Good Morning, I've tried ten times to install pip with no success in windows 10 using python 64bit version. Is there a solution available? I'm looking forward hearing you soon. -- https://mail.python.org/mailman/listinfo/python-list

Re: A question on modification of a list via a function invocation

2017-09-03 Thread Stephan Houben
of proto-Python was already an "old question". In this paper, Plotkin introduces the λV-calculus, the call-by-value lambda-calculus, to formalize what it is what ISWIM (and Python) are actually doing. This paper is, to the best of my knowledge, the closest thing to an "official&q

asyncio.gather cancellation behaviour

2017-09-08 Thread Stephan Houben
except asyncio.CancelledError: print("got CancelledError") print("f1 cancelled: ", f1.cancelled()) # prints False print("f2 cancelled: ", f2.cancelled()) # prints True So cancellation "normally" proceeds from inner future -> outer future. It

Re: Run Windows commands from Python console

2017-09-08 Thread Stephan Houben
Tk also supported tear-off menus under Windows (but not under macOS). However, many applications apparently explicitly suppress this functionality by doing Menu(..., tearoff=0) Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: Best way to insert sorted in a list

2017-09-08 Thread Stephan Houben
Timsort ( https://en.wikipedia.org/wiki/Timsort ) algorithm. Timsort is O(N) in the special case of a list of N elements where the first N-1 are already sorted and the last one is arbitrary. So appending the value and then calling sort() is in fact O(N) in Python (hence asymptotically optimal),

Re: Using Python 2

2017-09-08 Thread Stephan Houben
ge contains *precisely enough* parentheses. ;-) (Fortunate that I commented out the unbalanced closing parenthesis.) Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: The Incredible Growth of Python (stackoverflow.blog)

2017-09-10 Thread Stephan Houben
al-world situations where that's the case. Would we not eventually want a file object to deliver its lines asynchronously (with non-blocking reads under the hood) if iterated over with "async for", while preserving the current blocking behavior in the "for" case? Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: People choosing Python 3

2017-09-10 Thread Stephan Houben
Op 2017-09-10, Marko Rauhamaa schreef : > As an application developer, I can't make the customers depend on EPEL. > It's Python2 until the distro comes with Python3. Why not bundle the Python interpreter with your application? It seems to work for Windows developers... S

Re: People choosing Python 3

2017-09-11 Thread Stephan Houben
Op 2017-09-10, Marko Rauhamaa schreef : > Stephan Houben : >> >> Why not bundle the Python interpreter with your application? >> It seems to work for Windows developers... > > I've seen that done for Python and other technologies. It is an > expensive route to t

Re: Run Windows commands from Python console

2017-09-11 Thread Stephan Houben
gt; application would be inefficient from an enduser > perspective. You mean, like the existing .Xdefaults mechanism (yes Tk also supports that on Windows), and the "option" mechanism? https://www.tcl.tk/man/tcl8.6/TkCmd/option.htm Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: The Incredible Growth of Python (stackoverflow.blog)

2017-09-11 Thread Stephan Houben
Op 2017-09-10, Marko Rauhamaa schreef : > Stephan Houben : > >> Would we not eventually want a file object to deliver its lines >> asynchronously (with non-blocking reads under the hood) if >> iterated over with "async for", while preserving the current >

Re: mutiprocessing gui

2017-09-11 Thread Stephan Houben
handing network connections. https://github.com/harvimt/quamash Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: array.array()'s memory shared with multiprocessing.Process()

2017-09-12 Thread Stephan Houben
27;s supposed to work on all platforms (including Windows). Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: array.array()'s memory shared with multiprocessing.Process()

2017-09-12 Thread Stephan Houben
name. 2. On Posix platforms, it creates a file which is opened and immediately unlink()-ed, and the file descriptor is communicated to the child process using a UNIX-domain socket. Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: Fw: Problems Installing Python36

2017-09-12 Thread Stephan Houben
of installing things on Windows... is there anything that can be done? I just added issue 31427 on the Python bug tracker proposing adding this to the Windows FAQ. Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: The Incredible Growth of Python (stackoverflow.blog)

2017-09-12 Thread Stephan Houben
on for my own development and just install a recent version of my choice locally. It saves a lot of headaches. The system Python is there to run system programs. Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: Python dress

2017-09-12 Thread Stephan Houben
Op 2017-09-12, Jona Azizaj schreef : > It looks very nice, thanks for sharing :) print(insertionSort) It's even Python3-compliant! Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: Research paper "Energy Efficiency across Programming Languages: How does energy, time, and memory relate?"

2017-09-19 Thread Stephan Houben
in the standard library, provided you download the correct version of Python, namely the one from: https://python-xy.github.io/ Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: Fw: Problems Installing Python36

2017-09-22 Thread Stephan Houben
ssue. But I suppose that is not really the newbie-friendly solution the OP was looking for... Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: Even Older Man Yells at Whippersnappers

2017-09-22 Thread Stephan Houben
Op 2017-09-21, Thomas Jollans schreef : > On 2017-09-19 20:21, Stefan Ram wrote: >> I do not use UTF-8 >> > > Why on earth not?! Even *More* Older Man Yells at UTF-8? -- https://mail.python.org/mailman/listinfo/python-list

Re: Assertions

2017-09-22 Thread Stephan Houben
Op 2017-09-22, Thomas Jollans schreef : > Just to make the implication explicit: > >>>> from math import nan >>>> nan is nan > True >>>> nan == nan > False >>>> nan != nan > True >>>> To add to the fun: >>> nan is nan True Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: Fw: Problems Installing Python36

2017-09-22 Thread Stephan Houben
Op 2017-09-22, Irmen de Jong schreef : > On 09/22/2017 08:34 PM, Stephan Houben wrote: > >> I was vaguely tempted to offer the Mingw-w64 (GCC) Python as an >> alternative, since it doesn't rely on any optionally-installed Microsoft >> DLLs and so avoids this issue. But

Re: How to share class relationship representations?

2017-09-22 Thread Stephan Houben
arge images or attachments? >> >> Thanks! >> >> Leam > > https://stackoverflow.com/questions/29586520/can-one-get-hierarchical-graphs-from-networkx-with-python-3#29597209 For direct inclusion in source code, what about plain text with Unicode box drawing characters? ┏━━┓ ┃ob

Re: [Tutor] beginning to code

2017-09-23 Thread Stephan Houben
by value" is almost always contrasted with "call by name" (nobody seems to have ever published a paper discussing "call by reference"). Typically, this comparison is done in calculi which even lack assignment so that the difference between call by value and call by reference would be unobservable anyway. Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: Calling methods without objects?

2017-09-26 Thread Stephan Houben
ses on an instance. Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: Parentheses (as after "print")

2017-09-26 Thread Stephan Houben
Help on _Helper in module _sitebuiltins object: class _Helper(builtins.object) Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2017-09-30 Thread Stephan Houben
Op 2017-09-27, Robert L. schreef : > (sequence-fold + 0 #(2 3 4)) > ===> > 9 > > In Python? >>> sum([2, 3, 4]) 9 -- https://mail.python.org/mailman/listinfo/python-list

Re: LOOP with fixed final index value

2017-09-30 Thread Stephan Houben
Op 2017-09-27, Robert L. schreef : >> > (defun myloop (initial final increment) >> > (loop for i = initial then (+ i increment) >> > while (< i final) >> > do (print i) >> > finally (let ((i final)) (print i >> > > In Python? myloop = lambda *args: print("{}{}".forma

Re: merits of Lisp vs Python

2017-09-30 Thread Stephan Houben
Op 2017-09-30, Marko Rauhamaa schreef : > Robert L. is only trolling. He uses fake technical comments to spread > white supremacy in his signatures. My apologies. Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: newb question about @property

2017-10-01 Thread Stephan Houben
ly an official type, but loosely speaking these are any functions which can be applied meaningfully with a single function or class as argument. Some very mundane functions can be (ab)used as decorators. In [1]: @repr ...: def hello(): ...: pass ...: In [2]: hello Out[2]: &#

Re: newb question about @property

2017-10-01 Thread Stephan Houben
te that the remark from Steve is on the topic of descriptors. I suppose the first advice to anybody wanting to learn about either descriptors or decorators is to not confuse them with the other thing. Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: How to determine lowest version of Python 3 to run?

2017-10-04 Thread Stephan Houben
the moment I wouldn't bother to support anything lower than 3.4. That means testing 3.4, 3.5 and 3.6 (and 3.7 prerelease if you want to be thorough). Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: Multithreaded compression/decompression library with python bindings?

2017-10-04 Thread Stephan Houben
p",), stdin=subprocess.PIPE, stdout=f) sp.stdin.write(b"Hello, world\n") sp.stdin.close() Does compression in a separate process ;-) Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: Multithreaded compression/decompression library with python bindings?

2017-10-05 Thread Stephan Houben
e for reading, the input file may be the concatenation of multiple separate compressed streams. These are transparently decoded as a single logical stream." This seems to open the possibility to simply divide your input into, say, 100 MB blocks, compress each of them in a separate thread

Re: How to determine lowest version of Python 3 to run?

2017-10-06 Thread Stephan Houben
o installed and Docker started working. I've read that > all the cool programming kids are using Docker these days. I certainly > hope it was worth the cost. O_o You could have just used a Linux VM in Virtualbox for $0, and run Docker in that. Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: Installing tkinter on FreeBSD

2017-10-24 Thread Stephan Houben
the Tk widget set (Python 3.5) py36-tkinter-3.6.2_6 Python bindings to the Tk widget set (Python 3.6) pypy-tkinter-5.8.0 PyPy bindings to the Tk widget set and for sure installing py36-tkinter-3.6.2_6 works fine. Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: Windows alternative: multiprocessing.connection.wait on Pipe, Tkinter File Handlers

2017-10-26 Thread Stephan Houben
I have used a strategy of starting with 10 ms and then, on no event, slowly back off to polling every 200ms). It is by far the simplest solution, and AFAIK the only one which will work with the standard Python distribution + Tkinter. Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: doubling the number of tests, but not taking twice as long

2018-07-16 Thread Stephan Houben
of 1000's of files, and it runs > often, so it needs to run very fast. Needless to say, my change has > made it take 2x as long. It's not at all obvious to me. Did you actually measure it? Seems to depend strongly on what stuff1a and stuff2a are doing. > Can anyone see a way t

Re: Can pip install packages for all users (on a Linux system)?

2018-07-25 Thread Stephan Houben
icts. An alternative is to install Python yourself (from source, without the package manager) in, say, /opt/python. You are then in splendid isolation from the package manager and can install any version of Python and tensorflow you desire. Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: Checking whether type is None

2018-07-25 Thread Stephan Houben
actual code I have: @singledispatch def as_color(color): """Convert object to QColor.""" return QtGui.QColor(color) as_color.register(type(None), lambda x: QtGui.QColor(0, 0, 0, 0)) Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: Checking whether type is None

2018-07-26 Thread Stephan Houben
Op 2018-07-25, Ian Kelly schreef : > Is there a reason for using singledispatch here rather than a simpler and > more readable "if color is None" check? Yes, the other 20 cases I didn't show. And extensibility. Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: Using Python on a fork-less POSIX-like OS

2018-07-31 Thread Stephan Houben
(The same reason is also why most shells such as bash, zsh, don't bother with posix_spawn.) Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: os.system vs subrocess.call

2019-11-28 Thread Stephan Lukits
l you call ’.Test.py’ In the second call you call ’test.py’ “supprocess” doesn’t exist How about subprocess.call(‘\.Test.py’) Or subprocess.call([‘\.Test.py’]) Whereas the later makes more sense if you want to pass arguments to Test.py Greetings Stephan -- https://mail.python.org/mailman/listinfo/python-list

Re: Sandboxing eval() (was: Calculator)

2020-01-20 Thread Stephan Lukits
ps://github.com/danthedeckie/simpleeval Might be a good starting point. Greetings Stephan -- https://mail.python.org/mailman/listinfo/python-list

dynamic import of dynamically created modules failes

2020-03-31 Thread Stephan Lukits
Hello, background: - a daemon creates package p1 (e.g. directory with __init__.py-file) and in p1 a module m1 is created. - Then the daemon wants to import from m1, which functions (so far all the time). - Then a module m2 is created in p1 and the daemon wants to import from m2 which fail

Re: dynamic import of dynamically created modules failes

2020-03-31 Thread Stephan Lukits
On 3/31/20 9:01 PM, Pieter van Oostrum wrote: "Dieter Maurer" writes: Stephan Lukits wrote at 2020-3-31 17:44 +0300: background: - a daemon creates package p1 (e.g. directory with __init__.py-file) and in p1 a module m1 is created. - Then the daemon wants to import from

[Solved] Re: dynamic import of dynamically created modules failes

2020-03-31 Thread Stephan Lukits
On 3/31/20 8:00 PM, Dieter Maurer wrote: Stephan Lukits wrote at 2020-3-31 17:44 +0300: background: - a daemon creates package p1 (e.g. directory with __init__.py-file) and in p1 a module m1 is created. - Then the daemon wants to import from m1, which functions (so far all the time

Re: Typing modules

2020-07-20 Thread Stephan Lukits
> On 20 Jul 2020, at 16:31, Jonathan Gossage wrote: > > I have the following code and I would like to type the variable *contents*: > > contents: something = importlib._import_module(name) > > > I have been unable to find out what *something* should be. types.ModuleType > > -- > Jonatha

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

2005-01-04 Thread Stephan Diehl
On Tue, 04 Jan 2005 05:43:32 -0800, michele.simionato wrote: > Holger: > >> FWIW, i added the recipe back to the online cookbook. It's not > perfectly >> formatted but still useful, i hope. > >> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/361742 > > Uhm... on my system I get: > >

Problem with threads

2005-07-18 Thread Stephan Popp
r one, and have no idea how to do it. I hope it has become clear what I want to do, if not feel free to ask. I'm running python 2.4 Thanks in advance, Stephan -- http://mail.python.org/mailman/listinfo/python-list

Re: python and ajax

2005-08-30 Thread Stephan Diehl
ript. You might want to check out MochiKit (http://mochikit.com), a lightweight JavaScript library written by Bob Ippolito. Bob did a very good job in turning programming JS into a more python like experience. - stephan -- http://mail.python.org/mailman/listinfo/python-list

curious about slice behaviour

2005-09-05 Thread Stephan Diehl
I just found out by accident, that slice indices can be larger than the length of the object. For example >>> 'test'[:50] 'test' >>> 'test'[40:50] '' I'd rather expected to be confronted with an IndexError. (This is actually described in http://docs.python.org/lib/typesseq.html, so my expectation

Re: curious about slice behaviour

2005-09-05 Thread Stephan Diehl
On Mon, 05 Sep 2005 14:26:14 -0400, Terry Reedy wrote: > > "Stephan Diehl" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >>I just found out by accident, that slice indices can be larger than >> the length of the object. For example >

Re: Python CGI and Firefox vs IE

2005-09-07 Thread Stephan Diehl
rvers > type='submit'>WKPEA1 > type='submit'>WKNHA2 > > > > And the code that's messing things up: > No, here you are wrong. IE doesn't work as expected with buttons. See http://www.solanosystems.com/blog/archives/2005/04/12/the-submi

Re: Alternatives to Stackless Python?

2005-09-20 Thread Stephan Diehl
, Christian Tismer, is one of the main developers of the PyPy project. (http://codespeak.net/pypy) For this reason, there is an extremely good chance that the ideas behind stackless will survive :-) . Visit www.stackless.com for further info. --- Stephan -- http://mail.python.org/mailman/listinfo/python-list

Imported or executed?

2005-02-16 Thread Stephan Schulz
program is executed. That is not, of course, intended (or working). Is there a (portable, standard) way for the program/module to find out if it is imported or executed stand-alone? You can find the code at http://www.eprover.org/SOFTWARE/utilities.html Bye, Stephan --

Re: Imported or executed?

2005-02-16 Thread Stephan Schulz
In article <[EMAIL PROTECTED]>, Fredrik Lundh wrote: >Stephan Schulz wrote: > >> Is there a (portable, standard) way for the program/module to find out >> if it is imported or executed stand-alone? > >if a module is executed, it's name is set to "__main

Wing IDE 2.0.2 Released

2005-03-14 Thread Stephan Deibel
ating systems. A complete list of changes is available here: http://wingware.com/pub/wingide/2.0.2/CHANGELOG.txt For more information see: Product Info: http://wingware.com/products Sales: http://wingware.com/store/purchase Upgrades: http://wingware.com/store/upgrade Sincerely, St

Re: variable arguments question

2005-03-15 Thread Stephan Diehl
On Tue, 15 Mar 2005 03:48:40 -0400, vegetax wrote: > if i have a dictionary: > d = {'a':2,'b':3 } > l = (1,2) > > how can i pass it to a generic function that takes variable keywords as > arguments? same thing with variable arguments, i need to pass a list of > arguments to the function > > def

ANN: Wing IDE 2.0.1 released

2004-12-06 Thread Stephan Deibel
rades: http://wingware.com/store/upgrade Sincerely, Stephan Deibel -- Wingware Wing IDE for Python Advancing Software Development www.wingware.com -- http://mail.python.org/mailman/listinfo/python-list

ANN: PSF Licensing FAQ

2004-12-11 Thread Stephan Deibel
lso covers contribution of code to the PSF, which is only an issue if your code will become part of the Python distribution. The contribution process is still being set up, so this part of the document is subject to change. Please cc me on any replies, as I can't currently keep up with CLP. Thanks!

Please Donate to the PSF

2004-12-25 Thread Stephan Deibel
is a registered 501(c)(3) charity so donations are tax-deductible for US tax payers. There is still time to make a donation that can be deducted in the 2004 tax year. If you would like to learn more about the PSF, please visit: http://www.python.org/psf/ Happy New Year! Sincerely, Stephan D

PSF donations update

2004-12-30 Thread Stephan Deibel
g/psf/donations.html I hope you will consider including the PSF in your year-end giving. In addition to funding grants, your donation will help the PSF to run PyCon annually (http://www.python.org/pycon) and to protect the intellectual property rights behind Python. Thanks very much, and Happy New Year! St

Wanted: New Python Success Stories

2005-03-29 Thread Stephan Deibel
e is usually getting approval from the company to write about Python. It may require some educating about open source to get past rules against endorsing commercial products (which Python obviously isn't). If you have any questions, please let me know. Thanks, Stephan Deibel Pythonology.com -

ANN: Wing IDE 4.1.12 released

2013-03-08 Thread Stephan Deibel
? Don't hesitate to email us at sa...@wingware.com. Thanks, -- Stephan Deibel Wingware | Python IDE Advancing Software Development www.wingware.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Behavior on non definded name in Cheetah

2006-08-02 Thread Stephan Diehl
Paolo Pantaleo wrote: > [I hope I am posting to the right place] > > I have a cheetah template something like this: > > x is: $x > y is: $y > z is: $z > > [Actually more complicated] > > If for example $y is not defined I get an exception and the parsing > of the template stops. Is there any

Re: #!/usr/bin/python or #!/usr/bin/env python?

2006-08-08 Thread Stephan Kuhagen
g like that for python, but I did not find a way to achieve that, yet. Regards Stephan -- http://mail.python.org/mailman/listinfo/python-list

Re: #!/usr/bin/python or #!/usr/bin/env python?

2006-08-09 Thread Stephan Kuhagen
Michał Bartoszkiewicz wrote: > #!/bin/sh > """exec" python "$0" "$@""" Wow, cool... I like that! Stephan -- http://mail.python.org/mailman/listinfo/python-list

Re: #!/usr/bin/python or #!/usr/bin/env python?

2006-08-09 Thread Stephan Kuhagen
I really love Python too for many reasons. But I miss features and tricks in both languages that I have in the other... Interleaving the script-language with shell-scripting was one of them. So I'm a little bit happier with Python now... ;-) Stephan -- http://mail.python.org/mailman/listinfo/python-list

Re: #!/usr/bin/python or #!/usr/bin/env python?

2006-08-09 Thread Stephan Kuhagen
ZeD wrote: > print "Hello, world" > $ file test.py > test.py: Bourne shell script text executable Yes, the same happens with all Tcl-Scripts. I like to see this as a bug in "file", not in the scripting... Stephan -- http://mail.python.org/mailman/listinfo/python-list

Re: #!/usr/bin/python or #!/usr/bin/env python?

2006-08-09 Thread Stephan Kuhagen
But file should recognize this for Tcl, because it is common there. And if it needs to work for Tcl only, one can construct a simple mechanism for "file" to check this. Stephan -- http://mail.python.org/mailman/listinfo/python-list

Re: #!/usr/bin/python or #!/usr/bin/env python?

2006-08-09 Thread Stephan Kuhagen
reasoning. But if you accept, that file can not be perfect anyway and want it to be as good as possible, then it is some kind of bug or missing feature in "file" that it recognizes (or tries to) some morphing file formats but not another (which is fairly wide spread, even if Tcl is not

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

2006-10-10 Thread Stephan Diehl
Cameron Laird wrote: > goon summarizes WSGI resources: > http://groups.google.com/group/comp.lang.python/msg/f7d67bc039748792 > THE wsgi resource at the moment is http://wsgi.org . (sorry, I've missed the original thread) Stephan -- http://mail.python.org/mailman/l

Re: Where is Python in the scheme of things?

2006-10-12 Thread Stephan Kuhagen
d in the comparison of these different types of thinking and (how Stephenson says) cultures, find a very good essay about it in this small book. Regards Stephan -- http://mail.python.org/mailman/listinfo/python-list

Re: Tracing the execution of scripts?

2006-10-26 Thread Stephan Kuhagen
happens and what it means. Additionally, if it should work with threads, you must take care that every thread gets its own output file. But as a first step to get a trace of execution, this should do it. HTH, Regards Stephan -- http://mail.python.org/mailman/listinfo/python-list

Searching for a module to generate GUI events

2006-11-08 Thread Stephan Kuhagen
erate Mouse events (move, click etc.) and keyboard events and inject them directly into the event-queue of the underlying window system. Does somebody know such a module or do I have to utilize platform specific tools from within Python? Regards and Thanks Stephan -- http://mail.python.org/ma

Re: Cactching Stdout

2006-11-08 Thread Stephan Kuhagen
se you should put all that into defs and create own write/print functions to encapsulate the whole buffering/processing/cleanup. This works great for scripting, but I'm pretty sure, that it does not work for C Libraries in Python. But I do not know, how Python handles its strea

Re: Searching for a module to generate GUI events

2006-11-09 Thread Stephan Kuhagen
utabintarbo wrote: > http://pywinauto.pbwiki.com/ for Win32 Thanks for the hint, looks usable. But it seems, there's nothing for X11 and MacOSX. I didn't thought, that the problem would be so unusual... Stephan -- http://mail.python.org/mailman/listinfo/python-list

Re: Searching for a module to generate GUI events

2006-11-13 Thread Stephan Kuhagen
rn that some day... ;-) Stephan -- http://mail.python.org/mailman/listinfo/python-list

Re: Secure Python

2006-11-16 Thread Stephan Kuhagen
pecially with this kind of problem, such as having no keywords, which makes it possible to change the semantics of even the most basic constructs in the language from the scripting level), but I think it would be a really useful feature for Python to have a sandbox mechanism to run untruste

Re: Secure Python

2006-11-16 Thread Stephan Kuhagen
g a sandbox really secure is a hard job, and may need some serious changes in the Python interpreter, but AFAIK from Tcl, it is possible - and would be nice to have. Regards Stephan -- http://mail.python.org/mailman/listinfo/python-list

Re: Secure Python

2006-11-16 Thread Stephan Kuhagen
ions for untrusted code in a platform independent manner at the OS level. - Managing all this in the interpreter would solve the problem, at the cost of implementing lots of resource management code. A good sandbox seems to be a real adventure with few survivors, as can be seen in the JavaScript-wor

Re: Secure Python

2006-11-16 Thread Stephan Kuhagen
xecute some hundreds of them in parallel on a game server (or CGI) which itself runs on a virtual host at your webhoster, and of course none of them should be able to kill it's neighbours, so all of them need their own VM... phiu, that would need a really big iron. So the the idea of VMs _is_ a good one for certain situations, but the need for secure execution environments inside an interpreter remains. Regards Stephan -- http://mail.python.org/mailman/listinfo/python-list

Re: Secure Python

2006-11-17 Thread Stephan Kuhagen
Hendrik van Rooyen wrote: > I seem to recall previous discussion on this group about a thing called > the bastion module, > and that it was deprecated. Not sure if it has any relevance. Never heard about it, maybe it's worth a look for the OP. Stephan -- http://mail.pyth

Re: Registry of Methods via Decorators

2006-06-22 Thread Stephan Diehl
bayerj schrieb: > I want to make a registry of methods of a class during creation. My > attempt was this > > """ classdecorators.py > > Author: Justin Bayer > Creation Date: 2006-06-22 > Copyright (c) 2006 Chess Pattern Soft, > All rights reserved. """ > > class decorated(object): > > meth

Re: print shell output in a file

2006-06-30 Thread Stephan Wassipaul
f = file('output.txt','w') print >>f, '%-30s | %-12d | %-12d |%-12d ' % (typename, size / count, count, size) f.close() > hello, > > one more question i will

Re: XMLLIB

2006-06-30 Thread Stephan Wassipaul
Gnosis (http://gnosis.cx/download/) is able to do this if you mean something like pickling, but with an XML-like ouput. -- http://mail.python.org/mailman/listinfo/python-list

Re: Issues with Installer written in Python for Linux

2006-08-29 Thread Stephan Kuhagen
the scripts, that create such a installer. They are a little bit confused written, since they had to be finished yesterday, as ever (and laying around since, annoying me, when I look at the code). But may be they help or at least inspire you, doing the same thing but better. Regards Stephan -- http:

Re: Trying to run an external program

2006-09-20 Thread Stephan Kuhagen
return value of close is the return value of the command run. If you need to read stdout and stderr of your command or write to its stdin, use popen2, popen3, popen4 from the os-module. Regards Stephan -- http://mail.python.org/mailman/listinfo/python-list

Re: Making sure script only runs once instance at a time.

2006-09-28 Thread Stephan Kuhagen
): other=linecache.getline(os.path.join('/proc', str(pid), 'cmdline'), 1).split('\0')[0:2] if script[0] == other[0] and os.path.basename(script[-1]) == os.path.basename(other[-1]): raise "already running!" - HTH Stephan -- http://mail.python.org/mailman/listinfo/python-list

Re: Secure Python

2006-11-18 Thread Stephan Kuhagen
Steve Holden wrote: > Anyone with an interest in secure Python should take a look at what > Brett Cannon is doing in his postgraduate work. There have been some > discussions on the python-dev list. Can you some links to his work, the discussions or some other starting point? Stephan

Re: Ruby/Python/REXX as a MUCK scripting language

2006-11-25 Thread Stephan Kuhagen
eters: http://www.tcl.tk/man/tcl8.4/TclCmd/interp.htm (See in the lower third of the page at "Safe Interpreters") http://www.tcl.tk/man/tcl8.4/TclCmd/safe.htm Regards Stephan -- http://mail.python.org/mailman/listinfo/python-list

Re: Coding standards without control?

2006-12-05 Thread Stephan Kuhagen
comes in for general coding standards. Many rules of coding standards can be tested automatically and Python is a good choice for text processing and checking source code against the rules of a coding standard. I wrote a Python package for a subset of our coding standards and that is a

Re: What am I supposed to do with an egg?!

2006-12-21 Thread Stephan Kuhagen
Sebastian 'lunar' Wiesner wrote: > Morpheus <[EMAIL PROTECTED]> wrote > >> So, what am I supposed to do here now? > > That's easy: Breed it... Since two days I'm fighting with myself not to make this joke. Thanks for relieving me... Regards Stephan

Wing IDE 3.0 beta2 released

2007-08-31 Thread Stephan Deibel
Hi, I'm happy to announce the release of Wing IDE 3.0 beta 2. It is available from http://wingware.com/wingide/beta Changes since the previous beta release include: * Stackless Python 2.4 and 2.5 are now supported * Python 2.5 for 64-bit Windows is now supported * Fixed Zope WingDBG so it will

  1   2   >