Re: algorithm for sorting functional expressions

2006-12-04 Thread Christian Stapfer
,['p','l']] > > But I'd like to find an algorithm that can handle the sorting problem. > > So I suspect that this is a common problem for those familiar with > partially ordered sets or directed graphs. Right. > I'm wondering if anyone else &g

Re: Over my head with descriptors

2006-12-16 Thread Christian Kastner
Sarcastic Zombie wrote: > Code included below. > > Basically, I've created a series of "question" descriptors, which each > hold a managed value. This is so I can implement validation, and render > each field into html automatically for forms. > > My problem is this: every instance of my "wizard"

Re: Over my head with descriptors

2006-12-16 Thread Christian Kastner
Tim Roberts wrote: > "Sarcastic Zombie" <[EMAIL PROTECTED]> wrote: >> Code included below. >> >> Basically, I've created a series of "question" descriptors, which each >> hold a managed value. This is so I can implement validation, and render >> each field into html automatically for forms. >> >> M

undefined symbol: libxml_xmlDocPtrWrap

2006-12-18 Thread Christian Wenz
Hello, I try to install "listen" on my amd64-gentoo-box. The programm tries to import the gst-package and throws the following trace: Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.4/site-packages/gst-0.10/gst/__init__.py", line 108, in ? from _gst

permutations - fast & with low memory consumption?

2006-12-19 Thread Christian Meesters
using generator expressions? All my attempts so far failed. Any help appreciated! TIA Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Is htmlGen still alive?

2006-12-19 Thread Christian Meesters
x27;m only using it for one internal site, where layout doesn't matter ...). Cheers Christian [EMAIL PROTECTED] wrote: > Does anybody know whether htmlGen, the Python-class library for > generating HTML, is still being maintained? Or from where it can be > downloaded? The Starship

Re: permutations - fast & with low memory consumption?

2006-12-19 Thread Christian Meesters
Thanks Simon & Gerard! I will check those exampels out. Christian PS Of course, I did google - but apparently not creative enough. -- http://mail.python.org/mailman/listinfo/python-list

Re: Superclass for Errors?

2006-12-27 Thread Christian Joergensen
ributeError, etc. See http://rgruet.free.fr/PQR25/PQR2.5.html#BuiltInExc I would guess you're looking for StandardError. -- Christian Joergensen | Linux, programming or web consultancy http://www.razor.dk | Visit us at: http://www.gmta.info -- http://mail.python.org/mailman/listinfo/python-list

Python 2.4/2.5 hang on bad reference?

2006-12-28 Thread Christian Convey
se there's an exception it will get printed to stdout, but as far as I can tell my exception handler is never getting invoked. (Perhaps I'm accidentally crafting my "except" statements too narrowly?) Any ideas? Thanks very much, Christian -- Christian Convey Computer Sci

How to tell the parent frame is a C module? (Lazy importing)

2006-02-15 Thread David Christian
Hello all, I've been working on a lazy import module to be found here: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/473888 The basic idea is that a module proxy for foo is returned from an 'import foo' statement. When an attribute of foo is accessed, or dir(foo) is called, or a from fo

Re: add an asynchronous exception class

2006-03-04 Thread Christian Stapfer
minated (or not terminated) here is not the program but merely the code that throws an exception. VAX/VMS had such a non-terminating exception handling mechanism, for example. Regards, Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: add an asynchronous exception class

2006-03-04 Thread Christian Stapfer
"Paul Rubin" <http://[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Christian Stapfer" <[EMAIL PROTECTED]> writes: >> I guess it means the following: >> >> "Terminating exceptions" are exceptions that >> t

Re: first release of PyPy

2005-05-20 Thread Christian Tismer
ompiler technology, but applying this in a consequent manner, that has no comparable prior example. I wish to repeat the congratulations to the team for the first release! --- ciao -- chris -- Christian Tismer

Re: first release of PyPy

2005-05-21 Thread Christian Tismer
Torsten Bronger wrote: ... > I've been told by so many books and on-line material that Python > cannot be compiled (unless you cheat). So how is this possible? Have a look at Psyco, that will be folded into and improved by PyPy. -- Christian Tismer :^) <mailto:[E

Re: first release of PyPy

2005-05-21 Thread Christian Tismer
iguring out the type of an object from > the context because there are no type declarations) to avoid dict > lookups in method dispatch. Type inference works fine for our implementation of Python, but it is in fact very limited for full-blown Python programs. Yoou cannot

Re: first release of PyPy

2005-05-23 Thread Christian Tismer
Ville Vainio wrote: >>>>>>"Christian" == Christian Tismer <[EMAIL PROTECTED]> writes: > > > >> PyPy is written in python, if it can be compiled then the programs > >> can > >> be as well. > > Christian>

Re: Is there a way to program a robot with python (ex, an electric motor, control it's speed, etc)

2007-07-09 Thread Christian Tismer
after EuroPython and the sprints are over. cheers - chris -- Christian Tismer :^) <mailto:[EMAIL PROTECTED]> tismerysoft GmbH : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9A :*Starship* http://starship.python.net/ 14109 Berlin

Re: 2**2**2**2**2 wrong? Bug?

2007-07-10 Thread Christian Tismer
x27;s wrong about it? ciao - chris -- Christian Tismer :^) <mailto:[EMAIL PROTECTED]> tismerysoft GmbH : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9A :*Starship* http://starship.python.net/ 14109 Berlin :

[no subject]

2007-08-10 Thread Christian Justo
Hi, I'm simply trying to get mod_python working on my apache server but when I create a .py file the output returned from the browser is the code in the file and not just the output from the script. I have read the manual and tried mptest.py with an .htaccess file both in /var/www/html/ and st

Re: [Crew] Four Years of Starship hosting come to an end

2007-09-03 Thread Christian Tismer
Stefan Drees wrote: > Dear Crew of the Python Starship, > > after a short email exchange of thoughts with Christian Tismer, that he > might take over again the hosting of the ship or silently give over some > of its remains to a museum, he encouraged me, to let go after four year

Re: Python FTP server down

2007-03-04 Thread Christian Joergensen
r workstation and scp/sftp it to the remote server. -- Christian Joergensen | Linux, programming or web consultancy http://www.razor.dk | Visit us at: http://www.gmta.info -- http://mail.python.org/mailman/listinfo/python-list

Re: PyPy 1.0: JIT compilers for free and more

2007-03-28 Thread Christian Tismer
On 28.03.2007, at 10:38, Carl Friedrich Bolz wrote: > Brain error on our side: the gc_pypy.dll is the dll of the Boehm > garbage > collector, which you would need to compile yourself (which makes > precompiled binaries a bit useless :-) ). We updated the zip file, > would > you mind checking

Re: PyPy 1.0: JIT compilers for free and more

2007-03-28 Thread Christian Tismer
On 28.03.2007, at 23:36, Jarek Zgoda wrote: > Carl Friedrich Bolz napisał(a): > >> Welcome to the PyPy 1.0 release - a milestone integrating the results >> of four years of research, engineering, management and sprinting >> efforts, concluding the 28 months phase of EU co-funding! > > So it took

Re: how can I clear a dictionary in python

2007-03-28 Thread Christian Tismer
On 29.03.2007, at 00:48, Larry Bates wrote: > [EMAIL PROTECTED] wrote: >> Hi, >> >> I create a dictionary like this >> myDict = {} >> >> and I add entry like this: >> myDict['a'] = 1 >> but how can I empty the whole dictionary? >> >> Thank you. >> > > just point myDict to an empty dictionary agai

Re: how can I clear a dictionary in python

2007-03-28 Thread Christian Tismer
On 29.03.2007, at 00:38, [EMAIL PROTECTED] wrote: > Hi, > > I create a dictionary like this > myDict = {} > > and I add entry like this: > myDict['a'] = 1 > but how can I empty the whole dictionary? Reading the Python docs might help. But before, I would try a dir(myDict). Maybe you will find an

Re: Can't import Stackless in Pythonwin

2007-09-20 Thread Christian Tismer
constructor. wxpython has a few problems, too, but they are easy to work around. Contact me privately or on the stackless list if you need support. > Also, is pythonwin needed for the win32 extensions and mfc? yes. cheers - chris -- Christian Tismer :^) <mailto:[EMAIL PROTECTE

strange behavious of the logging module?

2007-09-23 Thread Christian Meesters
16:56:35) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 TIA Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: strange behavious of the logging module?

2007-09-24 Thread Christian Meesters
: instead of the functions name the level in lower case gets >> inserted >> into the logfile. > > Looks like a bug... > Well, the documentation -- as far as I understand it ;-) -- says the behaviour should be different, you two basically agree ... think I should file

problem writing setup script

2007-09-24 Thread Christian Meesters
created in /usr/lib/python2.5/site-packages, but I would like to see it in /usr/lib/python2.5/site-packages/foo, since importing foo_ext.so only makes sense for foo. Does anybody know how I should change my file structure or the setup-script to achieve those two goals? TIA Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: strange behavious of the logging module?

2007-09-25 Thread Christian Meesters
er, does anybody know a suggestion for a work-around? Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: strange behavious of the logging module?

2007-09-27 Thread Christian Meesters
Thanks Peter and Vinay, I finally understood. And indeed, removing the pyc-file in questions solves the problem - at least temporarily. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Where's the Starship's crew?

2007-10-06 Thread Christian Tismer
pen to make this my goal of life, if there are enough people interested. But they will, I know it. I do believe in Python, Starship, PyPy and Stackless. Please help me to make this life-dream into reality. happily being back to the roots -- chris -- Christian Tismer :^) <

permuting over nested dicts?

2007-10-31 Thread Christian Meesters
e entities 'a' and 'b' have the parameters 'x' and 'y', each. And d['a']['x'] can be either 1 or 2 or 3. Does anybody know a convenient (and fast) way to permute over all possible nested dicts like {'a': {'x':1, '

Re: permuting over nested dicts?

2007-11-01 Thread Christian Meesters
Thanks everyone, I knew there must be a snippet somewhere, just couldn't find one! (Just for the sake of completeness: Order doesn't matter and I hope that with my data I won't reach the recursion depth limit.) Christian -- http://mail.python.org/mailman/listinfo/python-list

'LoadFile' not found when invoking Acrobat via wx.lib.pdfwin

2007-01-12 Thread Christian Stapfer
m/code/snippet618.html How could the ActiveX control PDFWindow possibly *not* find the 'LoadFile' method, I wonder. - Or am I misinterpreting the message? (I am running Enthought Python 2.4 on Windows XP.) Thank you in advance for any ideas as to what the problem might be, Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: can't find a way to display and print pdf through python.

2007-02-11 Thread Christian Stapfer
a raster image for display (eg. by using ImageMagick's convert) under Linux? Regards, Christian -- http://mail.python.org/mailman/listinfo/python-list

numpy, numarray, or numeric?

2007-02-15 Thread Christian Convey
ward, that would be my ideal. Thanks, Christian -- http://mail.python.org/mailman/listinfo/python-list

RegExp performance?

2007-02-25 Thread Christian Sonne
n as fast as I'd expect from the beginning... I'm sorry I cannot supply test data, in my case, it comes from copyrighted material - however if it proves needed, I can probably construct dummy data to illustrate the problem Any and all guidance would be greatly appreciated, kind regards

Re: RegExp performance?

2007-02-25 Thread Christian Sonne
John Machin wrote: > On Feb 25, 7:21 pm, Christian Sonne <[EMAIL PROTECTED]> wrote: >> Long story short, I'm trying to find all ISBN-10 numbers in a multiline >> string (approximately 10 pages of a normal book), and as far as I can >> tell, the *correct* thing to m

Re: [Python.NET] What can I do with DLL?

2007-11-06 Thread Christian Heimes
e knowledge about CPython and IronPython. I myself wouldn't do it and I've developed parts of PythonDotNet and Python 3000. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating the windows MSI of python

2007-11-28 Thread Christian Heimes
Floris Bruynooghe wrote: > It would be great if someone knows how Python builds it's MSI. The Tools/ directory contains a script in Tools/msi/msi.py. Martin von Löwis is using the script to generate the official MSI bundles. You need to run it from a development shell. Good luck! C

Re: Is os.lstat available on all platforms?

2007-11-29 Thread Christian Heimes
Giampaolo Rodola' wrote: > As far as I know where symlinks are not supported os.lstat should be > an alias for os.stat but I'm not 100% sure. You are right, it should be an alias. os.lstat is available on Windows, too. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHONPATH and PYTHON_PATH

2007-12-04 Thread Christian Heimes
loial wrote: > Is there any difference? > > Does it matter which I use? Yes, it does matter. The former is interpreted by Python, the latter isn't. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Why Python 3?

2007-12-05 Thread Christian Heimes
hon 3.0 are new and the majority of the rest is just cleaned up a bit. Some new features like the new immutable bytes type in 3.0a2 are mostly based on existing code. At http://www.joelonsoftware.com/articles/fog69.html Joel explains why rewriting from the scratch is often the worst strategy.

Re: An Object's Type

2007-12-05 Thread Christian Heimes
s(AnotherExample, object) True >>> issubclass(AnotherExample, Example) True >>> issubclass(Example, AnotherExample) False And finally >>> isinstance(Example, type) True This is true because type is the metaclass of object. Though you don't have to understand it. ;) Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Timezones in python

2007-12-05 Thread Christian Heimes
h happen with one week > difference. I am looking for something what can convert different > timezone to localtime. http://pytz.sourceforge.net/ http://labix.org/python-dateutil Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Any simpler way to do this

2007-12-07 Thread Christian Heimes
EN": > x = term.GREEN > elif color == "YELLOW": > x = term.YELLOW > elif color == "CYAN": > x = term.CYAN > elif color == "MAGENTA": > x = term.MAGENTA >

Re: Can I embed Windows Python in C# or VC++?

2007-12-07 Thread Christian Heimes
port("Python25.dll"), CallingConvention=CallingConvention.Cdecl] > public static void Py_Initialize(); There is no need for that. PythonDotNET wraps the P/Invokes and internal C API of CPython in a nice .NET API. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Erros when compiling a CPP program which uses CPython API functions

2007-12-07 Thread Christian Heimes
grbgooglefan wrote: > How do we resolve this error? The easiest way to solve all your problems is: make altinstall. It installs Python in PREFIX (usually /usr/local). Although it is possible to run Python in a build directory it is tricky and may not work for your own program. Christ

Re: Can I embed Windows Python in C# or VC++?

2007-12-07 Thread Christian Heimes
e support for unmanaged C++ is better than the support for managed .NET code. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Erros when compiling a CPP program which uses CPython API functions

2007-12-07 Thread Christian Heimes
tree. It creates a valid pyconfig.h for you. You may want to use the ./configure option --enable-shared. > So, I added "-I../../PC" to my cmd line to get pyconfig.h, like: PC/pyconfig.h is for Windows only! Christian -- http://mail.python.org/mailman/listinfo/python-list

Python 3.0a2 is out

2007-12-07 Thread Christian Heimes
A new alpha of Python 3000 was released a few minutes ago! http://www.python.org/download/releases/3.0/ Have fun and don't forget to report bugs at http://bugs.python.org/ Christian signature.asc Description: OpenPGP digital signature -- http://mail.python.org/mailman/listinfo/python-list

Re: distutils & OS X universal binaries

2007-12-08 Thread Christian Heimes
gmane web interface is slow and sluggish today. The macro WORDS_BIGENDIAN isn't mentioned in the docs. The docs sure need some extra information how to create universal binaries and how to write endian safe C code. I'm going to create a GHOP task. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: distutils & OS X universal binaries

2007-12-08 Thread Christian Heimes
c. Have you reported the problem at http://bugs.python.org/? A minimal example could help us to fix the problem. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: python from any command line?

2007-12-09 Thread Christian Heimes
le in c:\Windows, e.g. python25.bat @C:\Python25\python.exe %* I can start Python 2.5 with python25 from every directory. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Is a "real" C-Python possible?

2007-12-09 Thread Christian Heimes
Jack wrote: > I guess this is subjective :) - that's what I felt in my experience > with web applications developed in Python and PHP. I wasn't able to > find a direct comparison online. Please compare the number of serious bugs and vulnerabilities in PHP and Python. > I understand. Python module

Re: Python Exponent Question

2007-12-10 Thread Christian Heimes
databyss wrote: > I would expect 2**2**2**2 to be 256 I stumbled upon it, too. 2**2**2**2 == 2**(2**(2**2)) == 2**16 == 65536 Christian -- http://mail.python.org/mailman/listinfo/python-list

Improvements to the Python core (was: Is a "real" C-Python possible?)

2007-12-12 Thread Christian Heimes
must be written following the C89 standards. By the way core development is open for everybody. Any patch is appreciated, starting from fixing a typo in the docs over bug reports, bug fixes to new features. Read the PEPs! http://www.python.org/dev/peps/ Subscribe to the mailing lists (I s

Re: Is a "real" C-Python possible?

2007-12-12 Thread Christian Heimes
@property def foo(self): return self._foo @foo.setter def foo(self, value) self._foo = value @foo.deletter def foo(self) del self._foo class B(A): # one can even overwrite the getter in a subclass @foo.getter def foo(self): return self._

Re: Vista + Rails 2.0 upgrade => subprocess hangs

2007-12-12 Thread Christian Heimes
cp\\testing\\file07', > shell=True, > stdin=None, > stderr=PIPE, > stdout=PIPE, > creationflags=0x800 > ); > p.wait() > data = p.stdout.read() > print data Your usage of wait() is dangerous. The code can bloc

Re: Vista + Rails 2.0 upgrade => subprocess hangs

2007-12-12 Thread Christian Heimes
Eric Promislow wrote: >> Your usage of wait() is dangerous. The code can block indefinitely when >> the stdout or stderr buffer is full. >> >> Christian > > That's what it is. `rake -T` returns more data in Rails 2.0.1 > than it did in 1.2.6 -- cross

Re: Improvements to the Python core

2007-12-12 Thread Christian Heimes
out distutils. Please elaborate. (C)Python has a well known process to get new features or changes into the language: Write a PEP, convince enough core developers and/or Guido, implement the feature. I don't see a PEP about JIT in the list at abouthttp://www.python.org/dev/peps/, do you? :] B

Re: Is a "real" C-Python possible?

2007-12-13 Thread Christian Heimes
me, but this isn't what has been > implemented. Thanks for the information! I've talked to Guido and we both agree that it is a bug. I've a pending fix for it at my hands. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Is a "real" C-Python possible?

2007-12-13 Thread Christian Heimes
a new style class with __slots__ Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: More than one interpreter per process?

2007-12-18 Thread Christian Heimes
well, if at all). No, you can't. Sub-interpreters share a single GIL and other state. Why don't you run multiple processes? It's on of the oldest and best working ways use the full potential of your system. Lot's of Unix servers like postfix, qmail, apache (with some worke

Re: Changing intobject to use int rather than long

2007-12-19 Thread Christian Heimes
Terry Reedy wrote: > Good idea. I think people who moved to 64 bits to get 64 bits would be > upset if they did not ;-). Windows X64 users still get 32bit ints. The long datatype is 32bit even on the 64bit version of Windows. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: how to get string printed by PyErr_Print( )?

2007-12-19 Thread Christian Heimes
I suggest a different approach. A daemon must have a stdin, stdout and stderr connected to a terminal. You can use freopen() to redirect stderr and stdout to a log file and fclose() to close stdin. http://www.gnu.org/software/libc/manual/html_mono/libc.html#Opening-Streams Christian -- http://mail.python.org/mailman/listinfo/python-list

In an inherited class, "embedded" classes is referenced?

2007-12-19 Thread Christian Joergensen
"C", (object,), {'foobar': 60}) Instead of: >>> B.C.foobar = 60 Thanks, -- Christian Joergensen | Linux, programming or web consultancy http://www.razor.dk | Visit us at: http://www.gmta.info -- http://mail.python.org/mailman/listinfo/python-list

Re: In an inherited class, "embedded" classes is referenced?

2007-12-21 Thread Christian Joergensen
tion - but referenced it :) > Your workaround might be implementable using a metaclass in a more > conveinient way, but I'm not sure-footed enough with metaclasses to > provide a solution out of my head now. That would be fun ;-) -- Christian Joergensen | Linux, programming or web consult

Re: In an inherited class, "embedded" classes is referenced?

2007-12-21 Thread Christian Joergensen
in clsdict.iteritems(): > if isinstance(value,type): > clsdict[key] = type(value.__name__,(value,),{}) > type.__new__(cls,name,bases,clsdict) > > > class A(object): > __metaclasS__ = AutoSubclassMetaclass > class C(object): &

Re: Python DLL in Windows Folder

2007-12-23 Thread Christian Heimes
ython for 3rd party applications and COM. The DLL is removed by the Windows Installer when its usage counter drops to 0. There is no need to worry ;) Christian -- http://mail.python.org/mailman/listinfo/python-list

SQLite (with APSW) and transaction separate

2006-04-19 Thread Christian Stooker
Part one: == Hi ! I want to use SQLite database like the FireBird database: with big isolation level. What's that meaning ? I have an application that periodically check some input directory, process the elements in it, and copy them into a global database. It is like a daemon, working in th

Unicode to DOS filenames (to call FSUM.exe)

2006-05-15 Thread Christian Stooker
Hi ! Yesterday I got a very interesting bug. I don't understand, why I got it, because I thinking about this function: that is safe. But I was not. The code: import sys,os UFN=u'%s\\xA\xff'%os.getcwd() if os.path.exists(UFN): os.remove(UFN) f=open(UFN,'w') f.write('%s\n'%('='*80)) f.close

Re: Iterating generator from C

2006-05-15 Thread Christian Tismer
to handle returned generator > without hitting this bug? I found this bug as well, and I think the fix should be back-ported. This problem can only show up when you are comiling a C extension, anyway. Why don't you just apply the fix and compile your own? It is just a wron

Re: Iterating generator from C

2006-05-15 Thread Christian Tismer
ck around this. It would make the bug even more resistent :-) ciao - chris -- Christian Tismer :^) <mailto:[EMAIL PROTECTED]> tismerysoft GmbH : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9A :*Starship* http://starship.pyth

Re: dynamic drawing in web page

2006-05-21 Thread Christian Stapfer
' and > discovered this example: > > http://www.svgelves.com/svg/L_chrisa_02.svg > > Sadly, it only works in Opera amongst the browsers I have. It also works under IE6, using Adobe's SVG Viewer 3.0 Regards, Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Building Python statically on linux

2007-12-27 Thread Christian Heimes
"not a dynamic executable", but alas, it's presently: --disabled-shared is the default value. It does not mean that the Python interpreter is a static linked executable. --enable-shared builds a libpython??.so and --disable-shared links libpython into the python binary. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Python DLL in Windows Folder

2007-12-28 Thread Christian Heimes
make it impossible. I'm looking forward to your contribution to solve the problem. Our new tool chain for Python 2.6 and 3.0 on Windows is VS 2008. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: comparing dictionaries to find the identical keys

2007-12-28 Thread Christian Heimes
x27;d': 4} >>> d1.keys() ['a', 'c', 'b'] >>> d2.keys() ['c', 'b', 'd'] >>> s1 = set(d1) >>> s2 = set(d2) >>> s1 set(['a', 'c', 'b']) >>> s2 set(['c', 'b', 'd']) >>> s1.intersection(s2) set(['c', 'b']) >>> s1.union(s2) set(['a', 'c', 'b', 'd']) >>> s1.difference(s2) set(['a']) Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Building Python statically on linux

2007-12-28 Thread Christian Heimes
have done to get this to > work. (Hopefully a config weenie heard my plea for --enable-all- > static) Can you work on the topic and write a small howto for your wiki (http://wiki.python.org/moin/)? You have to modify Modules/Setup.local, too. Read Modules/Setup for more information. Christia

Re: parallel processing in standard library

2007-12-28 Thread Christian Heimes
or I/O bound concurrency? Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Compiler or stg. to get exe!

2007-12-28 Thread Christian Heimes
omething. > And what do i need to do to make program for linux. (stg. like .deb package) py2exe can bundle your files, the Python dll and all its dependencies into a distributable executable. It does *not* convert the Python code into an exe. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Redirecting STDOUT using C calls.

2007-12-30 Thread Christian Heimes
andard streams? freopen("filename", "w", stdout); See http://www.gnu.org/software/libc/manual/html_mono/libc.html#Standard-Streams Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: TK 8.5

2007-12-31 Thread Christian Heimes
of Python (2.5) ? No, not yet. It may be possible to back port Tcl Tk 8.5 support from 2.6 to 2.5 once we have finished the migration to 8.5. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: os.tmpfile()

2008-01-02 Thread Christian Heimes
;t use os.tmpfile(). It's not safe and exists only for legacy reasons. The tempfile module contains methods to create safe temporary files and directories. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: How do you pass compiler option to setup.py install?

2008-01-03 Thread Christian Heimes
setup.py build, > but it does not work for "setup.py install". python setup.py build -c mingw32 install You can also change the distutils.cfg file to set mingw32 as the default compiler. Please refer to the documentation for more information. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory Leaks and Heapy

2008-01-04 Thread Christian Heimes
for new developers and way to enhance Python. If you feel so strong about the memory management please provide patches and benchmarks. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Cost of "unicode(s)" where s is Unicode

2008-01-06 Thread Christian Heimes
John Nagle wrote: >Does > > text = unicode(text) > > make a copy of a Unicode string, or is that essentially a > free operation if the input is already Unicode? >>> u = u"some long unicode object" >>> unicode(u) is u True -- http://mail.python.org/mailman/listinfo/python-list

Re: How to refer to the current module?

2008-01-07 Thread Christian Heimes
Mike wrote: > Is there any way around this? Can I somehow scope the 'current > module' and give getattr(...) an object that will (at run time) have > the appropriate bindings? globals() for the current name space import sys sys.modules[__name__] gets you the module object

Re: Python too slow?

2008-01-09 Thread Christian Heimes
CPU bound? Have you considered rewriting the bottle necks in C? Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: virtualpython / workingenv / virtualenv ... shouldn't this be part of python

2008-01-11 Thread Christian Heimes
Damjan wrote: > My question is, shoudn't it be enough to set PYTHONPATH and everything > automagically to work then? Is there some work done on this for python 3.0 > or 2.6 perhaps? I'm working on a PEP for a per user site dir for 2.6 and 3.0 Christian -- http://mail

Re: virtualpython / workingenv / virtualenv ... shouldn't this be part of python

2008-01-11 Thread Christian Heimes
new feature doesn't add new attack vectors. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get user home directory on Windows

2008-01-12 Thread Christian Heimes
Giampaolo Rodola' wrote: > Is there a way to do that? home = os.path.expanduser("~") Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: no pass-values calling?

2008-01-15 Thread Christian Heimes
Dennis Lee Bieber wrote: > Since all "variable" names in Python are references to objects, > anything accessed using a name is accessed by reference. Anybody using the terms variable, reference or call-by-value is most likely explaining Python the wrong way. Sorry du

Re: no pass-values calling?

2008-01-15 Thread Christian Heimes
uch better chance to explain it right. Trust me :) Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: assigning values in python and perl

2008-01-16 Thread Christian Heimes
George Sakkis wrote: > Python's parameter passing is like passing a pointer in C/C++. [snip] It's not (I repeat NOT) like passing a pointer in C. Please read http://effbot.org/zone/call-by-object.htm Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: assigning values in python and perl

2008-01-16 Thread Christian Heimes
st me that the explanation on the site is right. It was written by somebody who designed and wrote parts of Python. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Extending the readline module?

2008-01-17 Thread Christian Heimes
nal features. Please join the Python developer list and tell us about your idea. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Using "pickle" for interprocess communication - some notes and things that ought to be documented.

2008-01-17 Thread Christian Heimes
John Nagle wrote: > It's possible to use "pickle" for interprocess communication over > pipes, but it's not straightforward. IIRC the processing module uses pickle for IPC. Maybe you can get some idea by reading its code? http://pypi.python.org/pypi/processing

Re: Unique thread ID

2008-01-18 Thread Christian Heimes
() but please use threading.local. Nobody is going to stop you if you use a list or dict in threading.local. Christian -- http://mail.python.org/mailman/listinfo/python-list

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