Re: What is a shortcut to the Default home directory in Windows

2008-01-18 Thread Christian Heimes
ll get an easier way to get a mapping of ids to shell folders: os.path.getshellfolders() -> dict Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: What is a shortcut to the Default home directory in Windows

2008-01-18 Thread Christian Heimes
e the win32 api. All shell folder names are localized and depend on the language version. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Bug in __init__?

2008-01-18 Thread Christian Heimes
ly *once* and shared across all instaces of A. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: finding memory leak in edgewall trac 0.11

2008-01-19 Thread Christian Heimes
gging. Check gc.garbage. It should be empty. http://docs.python.org/lib/module-gc.html Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: What is a shortcut to the Default home directory in Windows

2008-01-19 Thread Christian Heimes
't checked all the docs since I wrote it > to see what's been "deprecated" this week). A lot has been deprecated :( MS has deprecated all functions which are using CSIDL and introduced a new stack for Vista. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: finding memory leak in edgewall trac 0.11

2008-01-19 Thread Christian Heimes
Jeroen Ruigrok van der Werven wrote: > Hi Christian, > > -On [20080119 16:16], Christian Heimes ([EMAIL PROTECTED]) wrote: >> I forgot one important point in my reply. The GC module contains some >> useful methods for debugging. Check gc.garbage. It should be empty. >

Re: Python 3000 and import __hello__

2008-01-19 Thread Christian Heimes
sign? I changed the __hello__ frozen module a while ago. The print was unreliable for some new unit tests. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Linux/Win32 func. to get Python instdir (not exedir) + site-packages => extensions mgmt

2008-01-20 Thread Christian Heimes
= True Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: finding memory leak in edgewall trac 0.11

2008-01-20 Thread Christian Heimes
rupert.thurner wrote: > i forgot to mention that i cannot see any explicit sys._getframe(), or > __del__ in the genshi code, while the ones in trac-core seemed to be > there in 0.10.4. Does the code keep a reference to a traceback object or an attribute of a traceback object? Christian

Re: Memory errors with imaplib

2008-01-20 Thread Christian Heimes
Grant Edwards wrote: > The problem and the one-line soulution have been known for over > two years and it's still an open bug? Nobody was interested to provide a patch. I raised the level of the bug. It's going to be fixed soonish. Christian -- http://mail.python.org/mailman

Re: Memory errors with imaplib

2008-01-21 Thread Christian Heimes
Grant Edwards wrote: > If the solution shown in the bug report is correct, I'd be more > than happy to generate a patch. The solution seems fine but IMO it should be fixed in the ssl socket and not in imaplib. I like to get it *fixed* and not *worked around*. :) Christian

Re: isgenerator(...) - anywhere to be found?

2008-01-22 Thread Christian Heimes
>'''Check the bitmask of `func` for the magic generator flag.''' >return bool(func.func_code.co_flags & CO_GENERATOR) Can you please write a function for the inspect module + docs + a small unit tests and submit a patch? The inspect module is missing the isgenerator function. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: translating Python to Assembler

2008-01-22 Thread Christian Heimes
de a virtual machine just like Java or C#. It's even possible to write code with Python assembly and compile the Python assembly into byte code. You most certainly meant: Python code is not compiled into machine code. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: bags? 2.5.x?

2008-01-22 Thread Christian Heimes
or the broad mass? * Has the feature been implemented and contributed for Python? * Is the code well written, tested and documented? * Is the code mature and used by lots of people? Can you answer every question with yes? Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: python24 symbol file...pyhon24.pdb

2008-01-23 Thread Christian Heimes
, see http://en.wikipedia.org/wiki/Program_database. Python doesn't ship the files. You have to compile Python yourself to get the pdb files. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: translating Python to Assembler

2008-01-23 Thread Christian Heimes
://en.wikipedia.org/wiki/Interpreted_language#Languages_usually_compiled_to_a_virtual_machine_code IMHO .NET/C# is missing from the list. Christian -- http://mail.python.org/mailman/listinfo/python-list

math and numerical fixes (was: When is min(a, b) != min(b, a)?)

2008-01-23 Thread Christian Heimes
ead local or global flag for NaN support. Depending on a flag Python turns a NaN into an exception. The feature needs a proper PEP. Maybe Mark has time to write a PEP in time. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: When is min(a, b) != min(b, a)?

2008-01-23 Thread Christian Heimes
ewbies or developers without a numerical background. It's very easy to create an inf or nan in Python: inf = 1E+5000 ninf = -inf nan = inf * 0. 1E5000 creates a nan because it is *much* bigger than DBL_MAX (around 1E+308). In fact it is even larger than LDBL_MAX (around 1E+4932). Chris

Re: When is min(a, b) != min(b, a)?

2008-01-24 Thread Christian Heimes
Please report the problem. cmp(), min() and max() don't treat NaNs right. I don't think that x < nan == False is the correct answer, too. But I've to check the IEEE 754 specs. IMHO < nan and > nan should raise an exception. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and binary compatibility

2008-01-25 Thread Christian Heimes
GW32 to compile the extension, too. Or use the free toolchain as described at http://wiki.python.org/moin/Building_Python_with_the_free_MS_C_Toolkit Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Minimum Requirements for Python

2008-01-25 Thread Christian Heimes
memory consumption depends on the application. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: "just like Java" (was :Re: translating Python to Assembler)

2008-01-25 Thread Christian Heimes
er. While Java's JIT optimizes the code at run time Python executes the byte code without additional optimizations. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: del self?

2008-01-25 Thread Christian Heimes
self by one. A class ordinary doesn't implement a __del__ function. The C implementation of classes use different methods to remove a class from memory (tp_dealloc, tp_clear and more). Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: psyco on mac

2008-01-25 Thread Christian Heimes
Arash Arfaee wrote: > Hello, > > I have problem installing psyco on my mac. Can anybody help me? Psyco doesn't work on a PowerPC Mac. It requires a i4986 compatible CPU (aka x86 or IA32). Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Portably killing/signalling another process not supported?

2008-01-26 Thread Christian Heimes
John Nagle wrote: > There doesn't seem to be any way to portably kill another process > in Python. "os.kill" is Mac/Unix only. The "signal" module only lets > you send signals to the current process. And the "subprocess" module > doesn't have a "kill" function. > > Subprocess objects re

Re: Python and binary compatibility

2008-01-26 Thread Christian Heimes
Joshua Kugler wrote: > That page has a link to the Microsoft Visual C++ Toolkit 2003 page, which > then says it's been discontinued and to use Visual C++ 2005 Express > Edition. Sigh... You can still find some copies of the free toolkit on the internet. Christian -- http://m

Re: optional static typing for Python

2008-01-27 Thread Christian Heimes
André >> Thanks. If I read this correctly, this PEP is on track for Python 3.0. >> Wonderful! > > Note that annotations do not provide explicit typing, AFAIK: > > def f(x:int) -> int: return x*2 > > is stricly equivalent to > > def f(x): return x*2 > f

Re: py3k feature proposal: field auto-assignment in constructors

2008-01-27 Thread Christian Heimes
thon developer list. Several decorators are either already implemented (e.g. the first decorator is functools.wraps) and others are too special but some of the decorators including auto assignment seem useful. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: validate string is valid maths

2008-01-28 Thread Christian Heimes
Steven D'Aprano wrote: > def rationalise_signs(s): > while "++" in s or "+-" in s or "-+" in s or "--" in s: > s = s.replace("++", "+") > s = s.replace("--", "+") > s = s.replace("+-", "-") > s = s.replace("-+", "-") > return s I assume it's faster to check

Re: extending Python - passing nested lists

2008-01-28 Thread Christian Meesters
corresponding to a Python tuple. That's it. Thanks. Think I just need a different approach. I got completely on the wrong track here. Thanks Christian -- http://mail.python.org/mailman/listinfo/python-list

extending Python - passing nested lists

2008-01-28 Thread Christian Meesters
return NULL; dummy_list = PySequence_Fast(dummy_list, "argument must be iterable"); lenght = PyObject_Length(dummy_list); for (i=0; i < lenght; i++) { // part which does not work: ax = dummy_list[i][0]; ay = dummy_list[i][1]; az = dummy_list[i][2];

Re: Get Available Functions

2008-01-28 Thread Christian Heimes
in the right > dir-ection. :) dir(), inspect and help() can't retrieve the method signature from a C function (builtin_function_or_method type). Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: extending Python - passing nested lists

2008-01-29 Thread Christian Meesters
that I want to try to write a C-function myself. My goal is not to avoid PyObjects* and the corresponding reference handling - apart from the head and end of the function. (I could use ctypes instead, but that again would obfuscate the API of my package a bit.) Christian -- http://mail.pyth

Re: extending Python - passing nested lists

2008-01-29 Thread Christian Meesters
*self, PyObject *args) { double *v; if (!PyArg_Parse(args, "(d)", &v)) return NULL; to get a list as an array of doubles into 'v' (and back to Python)? I did read the API-description, but still am lost at this point. I presume, once I get to know the answer I'll b

Re: extending Python - passing nested lists

2008-01-29 Thread Christian Meesters
return *v return with something like PyBuildValue (but didn't get so far) } Can somebody give me a hint here, please? Passing simple arguments to and fro (e. g. single integer values) is no problem, but lists of unknown size? TIA Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: refcount

2008-01-29 Thread Christian Heimes
he reference count of object. The count returned is generally one higher than you might expect, because it includes the (temporary) reference as an argument to getrefcount(). Christian -- http://mail.python.org/mailman/listinfo/python-list

ImageFilter failing for mode = 1

2008-01-29 Thread Christian Hanemann
Hello, I'm trying to sharpen some JPEGs after resizing and am being given a valueError as per the below: File "getGraphicDetails.py", line 32, in main enhancer = ImageEnhance.Sharpness(img) File "/usr/local/lib/python2.3/site-packages/PIL/ImageEnhance.py", line 89, in __init__

Re: Dictionary Keys question

2008-01-30 Thread Christian Heimes
FireNWater wrote: > I'm curious why the different outputs of this code. If I make the > dictionary with letters as the keys, they are not listed in the > dictionary in alphabetical order, but if I use the integers then the > keys are in numerical order. > > I know that the order of the keys is no

Re: giving imp.load_module not a real file, HOW?

2008-02-01 Thread Christian Heimes
there a way around it that does not involve (say) tempfile? imp.load_module is implemented in C. The API expects a file object or a file descriptor number. Internally the code creates a file pointer *FILE from a file descriptor. You have to create a temporary file. Christian -- http://ma

Re: Python GUI toolkit

2008-02-03 Thread Christian Heimes
James Matthews wrote: > Just a side question! > > Does QT support Events from multiple threads without any special calls! > Example when i use WX i have to call wx.CallAfter() Yes, you can send signal across threads with some precaution. Christian -- http://mail.python.org/mail

Re: Python GUI toolkit

2008-02-03 Thread Christian Heimes
3 and Qt4 allow many more open source licenses but PyQt's license module doesn't. Christian PS: I also prefer Qt4 over wx and GTK. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Too many open files

2008-02-04 Thread Christian Heimes
e > done in other threads. I'm sorry, but you are totally wrong. Threads are a very bad idea for IO bound operation. Asynchronous event IO is the best answer for any IO bound problem. That is select, poll, epoll, kqueue or IOCP. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: type, object hierarchy?

2008-02-04 Thread Christian Heimes
ect or indirect instance of type. o = someobject while o is not type: o = type(o) print o The code will eventually print "type". Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: [2.4.2/Linux] Getting Python to fork?

2008-02-04 Thread Christian Heimes
os.close(fd) > # do stuff > > Although bear in mind it's pretty UNIX-y. IIRC you have to fork a second time after you have changed the working dir and created a new session group. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: [2.4.2/Linux] Getting Python to fork?

2008-02-04 Thread Christian Heimes
Jon Ribbens wrote: > Why? I don't think you do. > Neither does BSD daemon.c or glibc daemon.c The problem is well documented at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66012 """ The second fork _is_ necessary, Jonathan Bartlett, 2003/10/31 The first fork accomplishes two things -

Re: Getting Python to fork?

2008-02-04 Thread Christian Heimes
s.stdin is more magic > than I'm aware of. Jon is correct here. You must close or redirect the underlying C file descriptor. Python's sys.std streams don't magically do this for you because Python keeps a backup of the standard streams for internal purpose in sys.__std*__.

Re: Unexpected timing results with file I/O

2008-02-04 Thread Christian Heimes
new data to disk. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: polling for output from a subprocess module

2008-02-04 Thread Christian Heimes
than one stream and the buffer of the other stream is full. You can find some insight at http://bugs.python.org/issue1606. I discussed the matter with Guido a while ago. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: future multi-threading for-loops

2008-02-05 Thread Christian Heimes
[EMAIL PROTECTED] wrote: > Multi-threaded control flow is a worthwhile priority. It is? That's totally new to me. Given the fact that threads don't scale I highly doubt your claim, too. -- http://mail.python.org/mailman/listinfo/python-list

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-05 Thread Christian Heimes
e IronPython in Linux? IronPython implements only a limited subset of Python. [1] All extension that depend on a C code don't work under IronPython. Christian [1] http://www.codeplex.com/IronPython/Wiki/View.aspx?title=Differences&referringTitle=Home -- http://mail.python.org/mailman/listinfo/python-list

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-05 Thread Christian Heimes
o(i) by i*i and see how much function calls affect the speed. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a way to use .NET DLL from Python

2008-02-06 Thread Christian Heimes
Huayang Xia wrote: > Is there anyway to import class (to generate objects) from .NET DLL? You can use PythonDotNET if you want to access .NET assemblies in CPython (the standard Python implementation written in C). Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a way to use .NET DLL from Python

2008-02-07 Thread Christian Heimes
You can see the DLL as a container for the CIL code. clr.AddReference('ClassLibrary1') makes the namespaces of the ClassLibrary1 assembly available to IronPython and PythonDotNET. import ClassLibrary1 imports the name space. You must import the assembly before you can use its name spaces. Chr

Re: Is there a way to use .NET DLL from Python

2008-02-07 Thread Christian Heimes
e('ClassLibrary1') loads the assembly 'ClassLibrary1' and makes all namespaces available to Python. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: which one is more efficient

2008-02-09 Thread Christian Heimes
y function call. type_set=frozenset(('D', 'E')) def yourfunction(self, ..., type_set=type_set): ... if type in type_set: ... ... Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: python 3.0 memory leaking?

2008-02-10 Thread Christian Heimes
orithm. The code predates Python's pymalloc code. I'm working on replacing the code with pymalloc because pymalloc-ed memory is given back to the OS. The int and float free lists keep their sizes until the Python process ends. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: python 3.0 memory leaking?

2008-02-10 Thread Christian Heimes
for a while now. I've limited some free lists and I've a patch that gives allocated memory back to the OS earlier. Have you followed my advice and checked all places that deal with frames, tracebacks, exception objects and __del__ methods? Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Christian Heimes
n does the right thing, too. 1/0 is not defined, only the lim(1/x) for x -> 0 is +INF. From the PoV of a numerics guy it's surprising. Do you suggest that 1./0. results into +INF [1]? What should be the result of 1/0? Christian [1] http://en.wikipedia.org/wiki/Division_by_zero#Divisi

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Christian Heimes
all platforms. Simply removing those lines and praying that it works won't do it. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Christian Heimes
ross platforms. So far we have fixed a lot of problems but we haven't discussed the a/0 matter. The best we could give you is an option that makes Python's floats more IEEE 754 like: >>> from somemodule import ieee754 >>> with ieee754: ...r = a/0 ...print r inf Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Christian Heimes
Grant Edwards wrote: > That would be great. I'm looking forward to review your patch anytime soon. :) Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Christian Heimes
self.old_state = math.set_ieee754(self.new_state) def __exit__(self, *args): math.set_ieee754(self.old_state) usage: with contextlib.ieee754(): ... Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Christian Heimes
Ben Finney wrote: > Or, better, as a property, 'math.ieee754'. No, it won't work. It's not possible to have a module property. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Christian Heimes
Christian Heimes wrote: > Mark Dickinson wrote: >> Any suggestions about how to achieve the above-described state of >> affairs are welcome! > > I have worked out a suggestion in three parts. [snip] I've implemented my proposal and submitted it to the expe

Re: idiom to ask if you are on 32 or 64 bit linux platform?

2008-02-12 Thread Christian Heimes
Jon wrote: > Can someone tell me an idiom to choose the right one? You can check the size of a void pointer with ctypes: >>> import ctypes >>> ctypes.sizeof(ctypes.c_void_p) * 8 32 Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Double underscore names

2008-02-12 Thread Christian Heimes
core claims all rights for __magic__ methods with a leading and trailing double underscore. Of course Python won't stop you from introducing your own magic names but you are on your own. Future versions of Python may introduce a magic hook with the same name. Be warned and don&#x

Re: Floating point bug?

2008-02-14 Thread Christian Heimes
special handler for print. The tp_print slot is not available from Python code and most people don't know about it. :] Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Floating point bug?

2008-02-14 Thread Christian Heimes
. Search for float_print and tp_print in http://svn.python.org/view/python/trunk/Objects/floatobject.c?rev=60567&view=auto Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: InstanceType tests in Python-3.0

2008-02-14 Thread Christian Heimes
Robin Becker wrote: > except that unfortunately python 3.0 doesn't have type.InstanceType and > module > types doesn't have those old style ones any more :( Old style classes and hence InstanceType are gone in py3k. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: File object wrapper for a String?

2008-02-14 Thread Christian Heimes
feed that in but > that is pretty hacky. You don't need a file like object: popen = subprocess.Popen(..., stdin=subprocess.PIPE) popen.stdin.write("yourstring") Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: File object wrapper for a String?

2008-02-14 Thread Christian Heimes
Diez B. Roggisch wrote: > Christian told you how to work with popen. Just for the record thogh: > there are the StringIO and cStringIO-modules. IIRC subprocess requires a real file with a file descriptor for the standard streams. An object with a write or read method isn't enough.

Re: Regarding Python.h

2008-02-15 Thread Christian Heimes
on.h: No such file or directory > I feel gcc is unable to get the path for Python.h > What should i do to get rid of this problem. If i have to add any path pls > give me details of how to do that. Most distributions don't install the Python development files. You have to install a pack

Re: Error messages when using the Console Module

2008-02-15 Thread Christian Heimes
I guess you have to connect the streams manually when you create a console window. C code can use freopen() but I don't know how to properly redirect the streams from Python. MSDN has probably some docs for you. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: linux disc space

2008-02-15 Thread Christian Heimes
Jeff Schwab wrote: > I'm not sure how superuser-only space would be reserved in the first > place. I don't see anything relevant in the fdisk man page. man mkfs :) Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Sys.exit() does not fully exit

2008-02-17 Thread Christian Heimes
Harlin Seritt wrote: > When x is typed, everything does shut down but the main script never > fully ends. Is there any way to get it to quit? You don't need threads. Please use the subprocess module instead of threads + os.system. Christian -- http://mail.python.org/mailman/list

Re: Sys.exit() does not fully exit

2008-02-17 Thread Christian Heimes
don't mix well and you can get in all sorts of trouble. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Memory Manager

2008-02-17 Thread Christian Heimes
sure how to deal with updating all > program pointers to objects on the heap, and thought perhaps an answer > to this question would give me some ideas. (Also, if you know any > resources for things like this, I'd be grateful for links/names) I don't think it's possi

Re: Seemingly odd 'is' comparison.

2008-02-18 Thread Christian Heimes
Tobiah wrote: >>>> print float(3.0) is float(3.0) > True >>>> print float(3.0 * 1.0) is float(3.0) > False >>>> Thumb rule: Never compare strings, numbers or tuples with "is". Only compare an object with a singleton like a type or None. &qu

Re: File.write() not working in a sleepy loop

2008-02-19 Thread Christian Heimes
27;%over = (njobs => '+str(answer)+');\n') > o.close > ### sleep now ##### > sleep(refresh) Try o.close() ;) Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Seemingly odd 'is' comparison.

2008-02-19 Thread Christian Heimes
a huge speed impact. Therefor Python uses free lists to keep some empty objects around for recycling. Small integers are cached, too. Compare >>> id(0) 135689168 >>> id(1) 135689184 >>> id(2) 135689200 with >>> id(2000) 3084440752 >>> id(2001) 3084440752

Re: Seemingly odd 'is' comparison.

2008-02-19 Thread Christian Heimes
t at all. Even in CPython the interning and free lists are an implementation detail that may chance between releases. In a matter of fact I'm messing around with free lists to speed up Python 2.6/3.0 and to give back memory earlier. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: threaded http server

2008-02-20 Thread Christian Heimes
with IO bound applications like select(), poll(), epoll(), kqueue() or IOCP. Use Twisted :) Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: threaded http server

2008-02-20 Thread Christian Heimes
es from a remote site (IO). Your application is most certainly not using the CPU much. All you do is serving data or reading data - input and output - IO. :) Christian -- http://mail.python.org/mailman/listinfo/python-list

Backup Script over ssh

2008-02-21 Thread Christian Kortenhorst
every day new files at midnight are uploaded. Can anyone help? Thanks -- Christian Kortenhorst -- http://mail.python.org/mailman/listinfo/python-list

Re: advanced usage of python threads

2008-02-22 Thread Christian Heimes
t century and not the early 90ties of the last century. Java favors threads because back in the 90ties it was design for dumb set-top boxes which neither supported separate process spaces nor threads. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: PHP Developer highly interested in Python (web development) with some open questions...

2008-02-24 Thread Christian Heimes
Customers who would > purchase my End-Sollution like with: Source code encryption can't stop people from reading or stealing your code. Microsoft tries it, Apple tries it and even the RIAA tries it. None of them had success in the past. :] A proper service contract is more important. Chr

Re: Developing Techniques (and naming conventions)

2008-02-24 Thread Christian Heimes
script instead of from the > package. How can I fix this? Move the code from food.py to food/__init__.py. You can't have a package and a module with the same name. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: os.fork() not working on windows (help)

2008-02-25 Thread Christian Heimes
l. It's only available on UNIX. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: How to pass shell variable to shell script from python

2008-02-27 Thread Christian Heimes
argument). I try to use os.environ to do this, as follows: Don't use os.system or the popen functions. They have been substituted with the subprocess module. It has a way to pass a new environment to a process. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Documentation - which format

2008-02-27 Thread Christian Heimes
Ben Finney wrote: > Yes, TTBOMK. The site hasn't been updated for a while, but I follow > the mailing list and activity continues on the code itself. Python 2.6 and newer are using reST for documentation, see http://docs.python.org/dev/ Christian -- http://mail.python.org/mailm

Re: Backup Script over ssh

2008-02-27 Thread Christian Kortenhorst
But there is no rsync for windows without using cygwin On 2/26/08, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > > En Thu, 21 Feb 2008 09:32:23 -0200, Christian Kortenhorst > <[EMAIL PROTECTED]> escribió: > > > > I am new to python and the list. > > >

cron popen xen-create-image

2008-03-03 Thread Christian Kortenhorst
bbing Jobs running create Jobs runnning Creating environment ckortenhorst1 /usr/bin/xen-create-image --hostname=ckortenhorst1 --ip=192.168.0.111 DONE Can anyone help -- Christian Kortenhorst +353-(0)87-6183349 +353-(0)1-4966287 -- http://mail.python.org/mailman/listinfo/python-list

Re: Improving datetime

2008-03-19 Thread Christian Heimes
d commit it. Yes, the datetime module is written in C. But we may move the C code to _datetime and create a facade module in Python. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Improving datetime

2008-03-19 Thread Christian Heimes
tings like: In the year 2008 after the birth of Christ I, the son of Jone, son of James ... Do you get my point? :] I suggest you start with a short introduction of yourself and your proposal. Short paragraphs and short sentences are easier to read than long. You'll do fine ;) Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Improving datetime

2008-03-21 Thread Christian Heimes
ivide. Yes, the Julian date family is very useful when dealing with dates before 1900. I'm +1 for adding JDT and MJD. TAI64 is another time format used for high precision and real time measurement. http://cr.yp.to/libtai/tai64.html Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: implementing tab completion using python

2008-03-22 Thread Christian Heimes
Siddhant schrieb: > Hi. > How can I implement a tab-completing code using Python? > Like for example, I want to design a simple shell (using Python, of > course), which could support tab completion as well. How do I go about > it? http://docs.python.org/lib/module-rlcompleter.

Re: Problem with complex numbers

2008-03-22 Thread Christian Heimes
Matthias Götz schrieb: > So if somebody can help me, it would be nice. Thanks. The complex type is implemented in C. It's totally unrelated to Complex.py. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with complex numbers

2008-03-22 Thread Christian Heimes
complex to a complex is not defined? Raising a complex to a complex power is well defined, although the mathematical proof isn't trivial. You have to use the Euler form. Ask Google for some examples Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: PyTuple_Check and other type check functions didn't check the NULL pointer

2008-03-23 Thread Christian Heimes
f I think this problem > right. I don't know if there are some python core developers around > but I would like to hear all opinions towards this. Unless stated otherwise no Py* or PY* function is NULL safe. You have to check for NULL unless the docs *explicitly* say it's safe to ca

Re: Circular references not being cleaned up by Py_Finalize()

2008-03-25 Thread Christian Heimes
he cycle GC or circular referneces aren't broken. Have you tried calling PyGC_Collect() multiple times? Christian -- http://mail.python.org/mailman/listinfo/python-list

<    7   8   9   10   11   12   13   14   15   16   >