@staticmethods called more than once

2013-05-21 Thread Christian
Hi, i'm somewhat confused working with @staticmethods. My logger and configuration methods are called n times, but I have only one call. n is number of classes which import the loger and configuration class in the subfolder mymodule. What might be my mistake mistake? Many thanks Chri

Re: @staticmethods called more than once

2013-05-21 Thread Christian
Am Dienstag, 21. Mai 2013 18:48:07 UTC+2 schrieb John Gordon: > In John Gordon writes: > > > > > You should only call addHandler() once. > > > > ...for each intended logging output destination, of course. If you want > > logging output to appear in a file and on-screen, then you would cal

Pool.map mongodb cursor

2013-06-14 Thread Christian
et':{'profile':value} },upsert=True) Thanks in advance Christian -- http://mail.python.org/mailman/listinfo/python-list

re.finditer with lookahead and lookbehind

2012-06-20 Thread Christian
Hi, i have some trouble to split a pattern like s. Even have this problems with the first and last match. Some greedy problems? Thanks in advance Christian import re s='v1=pattern1&v2=pattern2&v3=pattern3&v4=pattern4&v5=pattern5&x1=patternx' pattern =r&#x

OrderedDict / DIctComprehension

2012-10-29 Thread Christian
Hi, is there a way building an OrderedDict faster? Thanks in advance Christian @timeit def ordered(n=10): d = OrderedDict() for i in xrange(n): d['key'+str(i)] = i return d @timeit def comprehension(n=10): d = { 'key'+str(i):i for i in xran

Re: SSH Connection with Python

2012-10-29 Thread Christian
ample-code.com/python/ssh_exec.asp Don't know if it is worth the money, never used it. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: OrderedDict / DIctComprehension

2012-10-29 Thread Christian
Too bad that's not (using python2.7) 'ordered_dict_generator' ((), {}) 1.089588 sec Anyway thanks for your hint! > Hi, > > > > is there a way building an OrderedDict faster? > > > > Thanks in advance > > Christian > > > >

mysql insert with tuple

2012-11-21 Thread Christian
UES %r; """.format(table) , (tuple(ilist),)) #This produce (1054, "Unknown column 'None' in 'field list'"), #but without None values it works. con.execute(""" INSERT INTO {} VALUES %r; """.format(table) % (tuple(ilist),)) Many thanks, Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: mysql insert with tuple

2012-11-22 Thread Christian
Am Mittwoch, 21. November 2012 20:49:14 UTC+1 schrieb Hans Mulder: > On 21/11/12 18:19:15, Christian wrote: > > > Hi , > > > > > > my purpose is a generic insert via tuple , because the number of fields > > and can differ. But I'm stucking . >

python-list@python.org

2012-03-07 Thread Christian
ess. Even the follow snippet didn't work, beacause bitset[0] isn't approriate. bitset = r.get('bytestringFromRedis') x = "{0:b}".format(ord(bitset[0])) Thanks in advance Christian -- http://mail.python.org/mailman/listinfo/python-list

filter max from iterable for grouped element

2012-03-19 Thread Christian
Hi, as beginner in python , I struggle somewhat to filter out only the maximum in the values for and get hmax. Maybe it easier when i change the structure of h? Many thanks in advance Christian h = {'abvjv': ('asyak', 0.9014230420411024), 'afqes': ('j

Re: filter max from iterable for grouped element

2012-03-19 Thread Christian
On 19 Mrz., 09:45, Peter Otten <__pete...@web.de> wrote: > Christian wrote: > > as beginner in python , I struggle  somewhat to filter out only the > > maximum in the values for  and get hmax. > > h = {'abvjv': ('asyak', 0.9014230420411024), > >

multiprocessing & itertools.product Iterator

2012-03-24 Thread Christian
Hey, I struggle to "extend" a multiprocessing example to my problem with a itertools.product result iterator. How I have to assign the combos.next() elements approriate to Pool.imap/calc functions? Thanks in advance Christian from multiprocessing import Process,Queue,Pool import C

String formatting - mysql insert

2011-07-14 Thread Christian
Hi, I get some problem when i like to set the table name dynamic. I'm appreciate for any help. Christian ### works newcur.execute ( """ INSERT INTO events (id1,id2) VALUES (%s,%s); """ , (rs[1],rs[2])) ### works not newcur.execute ( ""&q

Re: String formatting - mysql insert

2011-07-14 Thread Christian
On 14 Jul., 17:31, Billy Mays wrote: > On 07/14/2011 11:00 AM, Christian wrote: > > > > > > > > > > > Hi, > > > I get some problem  when i like to set the table name dynamic. > > I'm appreciate for any help. > > > Christian >

Approximate comparison of two lists of floats

2011-07-28 Thread Christian
t; have you an idea how i can change my code, that i can compare many lists of floats with a tolerance in percentage very fast? (sorry for my bad englisch ;-) ) thanks christian -- http://mail.python.org/mailman/listinfo/python-list

memory usage multi value hash

2011-04-14 Thread christian
3,4 C,9,10,11,12,90,34,322,21 Thanks for advance & regards, Christian import csv import random import sys from itertools import groupby from operator import itemgetter f=csv.reader(open(sys.argv[1]),delimiter=';') z=[[i[0],i[1]] for i in f] z.sort(key=itemgetter(0)) mydict = d

build the "sql where cause" dynamic

2011-05-02 Thread christian
"p2 in ('1','2') and p1 in ('3','1','5') and pc in ('1') and py in ('1')" Many thanks for any starting point Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: build the "sql where cause" dynamic

2011-05-02 Thread christian
On 2 Mai, 10:13, Chris Angelico wrote: > On Mon, May 2, 2011 at 5:48 PM, christian wrote: > > Hi, > > > from some radio buttons in a django app i concat  string like that: > > But have no idea how i get the or when there different values > > for a specified p colu

memory utilization blow up with dict structure

2016-09-23 Thread Christian
Hi, I'm wondering why python blow up a dictionary structure so much. The ids and cat substructure could have 0..n entries but in the most cases they are <= 10,t is limited by <= 6. Thanks for any advice to save memory. Christian Example: {'0a0f7a3a0e09826caef1bff7

Re: memory utilization blow up with dict structure

2016-09-23 Thread Christian
Am Freitag, 23. September 2016 12:02:47 UTC+2 schrieb Chris Angelico: > On Fri, Sep 23, 2016 at 7:05 PM, Christian wrote: > > I'm wondering why python blow up a dictionary structure so much. > > > > The ids and cat substructure could have 0..n entries but in the most c

How to call a script from another?

2005-10-13 Thread Christian
From a not even newbie: Without knowing much about Python (yet) I'm trying to install the CMS Zope via FTP (with the well documented changes to make it work on an Apache server). By birth Zope is started from a shell script. And not having the permissions to execute such ones I'll try writing

Re: How to call a script from another?

2005-10-13 Thread Christian
Thanks guy's, you have opened my eyes and made my next step a whole lot easier. Chris -- http://mail.python.org/mailman/listinfo/python-list

Set an environment variable

2005-10-19 Thread Christian
Another question from a not even newbie: In Unix you can set an environment variable with the command export PYTHONPATH but I would like to set the variable from at .py script. So my question is: How do I export an environment variable in a .py script? Thanks Chris -- http://mail.python.

Re: Set an environment variable

2005-10-20 Thread Christian
Thanks Jeff and the crazy 88. -- http://mail.python.org/mailman/listinfo/python-list

Re: Set an environment variable

2005-10-21 Thread Christian
> > The closest thing you can do is that: > > -myScript.py-- > print 'export MY_VARIABLE=value' > -- > > -myScript.sh-- > python myScript.py > /tmp/chgvars.sh > . /tmp/chgvars.

Re: Set an environment variable

2005-10-21 Thread Christian
Erik Max Francis wrote: > Christian wrote: > >> Can I write a .py script that calls a .sh script that executes the >> export command and then calls another .py script (and how would the >> first .py script look)? > > No, the shell script that the Python p

Re: Set an environment variable

2005-10-21 Thread Christian
Steve Holden wrote: > :: > one.py > :: > import os > os.environ['STEVE'] = "You are the man" > os.system("python two.py") > print "Ran one" > :: > two.py > :: > import os > print "STEVE is", os.environ['STEVE'] > print "Ran two" > [EMAIL PROTECTED] t

Re: Set an environment variable

2005-10-21 Thread Christian
Steve Holden wrote: > Time you answered your own questions by trying things at the interactive > interpreter prompt! > > regards > Steve Right again, Steve. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Apache & Python 500 Error

2005-02-02 Thread Christian
allow,deny Allow from all #PythonDebug On the script is in this directory /var/www/python but i get an 500 error everytime, with "every" script - why that - i´m newbie - sorry for that :) greetings from germany to newsgroup christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Apache & Python 500 Error

2005-02-03 Thread Christian
Jeremy Bowers schrieb: But first, check your apache error log. Then you will know what your error is, too. Thanks for help, here is my error log: [Thu Feb 3 13:52:49 2005] [error] PythonHandler python: Traceback (most recent call last): [Thu Feb 3 13:52:49 2005] [error] PythonHandler python: F

Python CGI

2014-05-19 Thread Christian
Hi, I'd like to use Python for CGI-Scripts. Is there a manual how to setup Python with Fast-CGI? I'd like to make sure that Python scripts aren't executed by www-user, but the user who wrote the script. -- Gruß, Christian -- https://mail.python.org/mailman/listinfo/python-list

WSGI (was: Re: Python CGI)

2014-05-25 Thread Christian
On 05/20/2014 03:52 AM, Tim Chase wrote: > While Burak addressed your (Fast-)CGI issues, once you have a > test-script successfully giving you output, you can use the > standard-library's getpass.getuser() function to tell who your script > is running as. LoadModule wsgi_module modules/mod_wsgi.so

Daemon with n subscriber

2013-02-04 Thread Christian
Hi, experimenting with zmq. I like to start/stop/restart n independent subscriber with one deamon service in Python. How I should adapt a common daemon class in python? Thanks for a starting point Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: does anybody earn a living programming in python?

2006-09-25 Thread Christian
walterbyrd wrote: > If so, I doubt there are many. > > I wonder why that is? Previously I used Python while earning a living working in IT at a college. Currently it is putting food on the table via contract jobs. I imagine there are "many" out there like me, doing just th

Re: does anybody earn a living programming in python?

2006-09-26 Thread Christian
ot;contract jobs", if you don't mind my asking? Both of my current contracts came by way of my involvement with the CherryPy open source project. Christian http://www.dowski.com -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: CherryPy 3.0 RC1

2006-11-29 Thread Christian
> "Christian Wyglendowski" <[EMAIL PROTECTED]> writes: > > > I'm happy to announce the first release candidate for CherryPy 3.0. Ben Finney wrote: > > Congratulations, I'm glad to see an announcement for CherryPy. > > Please, in future, don&#x

build python on Celeron D

2007-03-26 Thread Christian
re/__init__.py", line 5, in ? import multiarray ImportError: /media/hda6/home/ck/prog/scipy/numpy-1.0.1/numpy/core/multiarray.so: undefined symbol: Py_InitModule4 which is related to 32<->64 issues, right? So my question is how do I force python to be built with 32bit? Christian

Re: build python on Celeron D

2007-03-26 Thread Christian
Chris Lasher wrote: > On Mar 26, 10:48 pm, Christian <[EMAIL PROTECTED]> wrote: >> Traceback (most recent call last): >> File "setup.py", line 89, in ? >> setup_package() >> File "setup.py", line 59, in setup_package >> fro

Re: wxPython, Syntax highlighting

2007-03-28 Thread Christian
find anything. Have a look at StyledTextControl (wx.stc) in the demo. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: XML Parsing

2007-03-28 Thread Christian
e who helps me. > And yes I have used Google but I am unsure what to use. > Try this: http://www.python.org/doc/2.4.1/lib/expat-example.html Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Kill thread

2007-04-09 Thread Christian
not apply. Perhaps you would have better luck asking on the python-win32 list: http://mail.python.org/mailman/listinfo/python-win32 Christian http://www.dowski.com -- http://mail.python.org/mailman/listinfo/python-list

Re: database wrapper ?

2009-02-06 Thread Christian
e system, Shelve and in-memory storage. The 2.0 alpha code in trunk also has a memcached storage implementation. HTH, Christian http://www.dowski.com -- http://mail.python.org/mailman/listinfo/python-list

Re: database wrapper ?

2009-02-06 Thread Christian
On Feb 6, 10:17 am, Christian wrote: > One of its distinctives is that ... Not sure how I forgot this, but Dejavu also lets you write your datastore queries in a LINQ-like syntax. Robert Brewer, the author, is giving a talk [1] about it at this year's PyCon in the US. Christ

Re: Ban Xah Lee

2009-03-09 Thread Christian
re by definition on topic. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Ban Xah Lee

2009-03-10 Thread Christian
Xah Lee schrieb: Christian wrote: On Mar 9, 1:22 pm, Christian wrote: XahLeeschrieb:> Of interest: • Why Can't You Be Normal? http://xahlee.org/Netiquette_dir/why_cant_you_be_normal.html IMHO the point that you never reply to responds is what makes it problematic. I have se

Re: Feeding differeent data types to a class instance?

2010-03-18 Thread Christian
ess.com/2010/03/17/multiple-constructors-in-a-python-class/ http://blog.dowski.com/2010/03/17/my-take-on-multiple-constructors/ That second one is my response. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: object.enable() anti-pattern

2013-05-08 Thread Christian Heimes
gest that you mention the context API in your blog post, too. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode humor

2013-05-08 Thread Christian Gollwitzer
Am 08.05.13 15:19, schrieb Roy Smith: Apropos to any of the myriad unicode threads that have been going on recently: http://xkcd.com/1209/ http://xkcd.com/1137/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Differences of "!=" operator behavior in python3 and python2 [ bug? ]

2013-05-12 Thread Christian Heimes
Am 13.05.2013 01:23, schrieb Mr. Joe: > I seem to stumble upon a situation where "!=" operator misbehaves in > python2.x. Not sure if it's my misunderstanding or a bug in python > implementation. Here's a demo code to reproduce the behavior - > """ Python 2.7 doesn't use the negation of __eq__ whe

PDF generator decision

2013-05-14 Thread Christian Jurk
Hi folks, This questions may be asked several times already, but the development of relevant software continues day-for-day. For some time now I've been using xhtml2pdf [1] to generate PDF documents from HTML templates (which are rendered through my Django-based web application. This have been

Re: Harmonic distortion of a input signal

2013-05-20 Thread Christian Gollwitzer
eywords to the problem: apodization, zero filling, convolution product, ... Not for a periodic signal of integer length. eg. http://en.wikipedia.org/wiki/Convolution How long do you read this group? Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Harmonic distortion of a input signal

2013-05-20 Thread Christian Gollwitzer
Oops, I thought we were posting to comp.dsp. Nevertheless, I think numpy.fft does mixed-radix (can't check it now) Am 20.05.13 19:50, schrieb Christian Gollwitzer: Am 20.05.13 19:23, schrieb jmfauth: Non sense. Dito. The discrete fft algorithm is valid only if the number of data p

Re: Utility to locate errors in regular expressions

2013-05-24 Thread Christian Gollwitzer
subexpressions which cause the match by coloring the parts. Not exacty what you want, but very intuitive and powerful. Beware this is Tcl and there might be subtle differences in RE syntax, but largely it's the same. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner Question: 3D Models

2013-06-18 Thread Christian Gollwitzer
here, you could try BRL-CAD or OpenCascade. The latter also has python bindings. http://www.pythonocc.org/ Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: tkinter

2013-06-23 Thread Christian Gollwitzer
p. Other users will probably find your work very helpful. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: io module and pdf question

2013-06-25 Thread Christian Gollwitzer
ever, to correctly find all objects, the xref-table indexes offsets into the PDF. It must be treated binary in any case, and that's the funny reason for the first 3 characters of the PDF - they must include characters with the 8th bit set, such that FTP applications treat it as binary.

Re: Best Scripting Language for Embedded Work?

2013-07-10 Thread Christian Gollwitzer
ndows it seems alien and you'd need something like MobaXTerm to get it into a single file. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Casting classes WAS: Documenting builtin methods

2013-07-11 Thread Christian Heimes
t want that. Heap types (classes defined with Python code) are not shared. The same goes to modules, even the sys module. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I get the OS System Font Directory(Cross-Platform) in python?

2013-07-11 Thread Christian Heimes
..? That's the wrong way to do it. You have to use the proper Windows API to get to the font directory. It's SHGetKnownFolderPath() with FOLDERID_Font or SHGetFolderPath() with CSIDL_FONTS. See http://bugs.python.org/issue1763 Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Best Scripting Language for Embedded Work?

2013-07-11 Thread Christian Gollwitzer
Hi David, Am 12.07.13 03:18, schrieb David T. Ashley: On Wed, 10 Jul 2013 09:03:54 +0200, Christian Gollwitzer wrote: > Robert's answer made me hesitate - what exactly is your platform? Are you writing the scripts for the embedded platform, or for Windows, or does the embedded contro

Re: Bluetooth Sockets

2013-07-16 Thread Christian Heimes
Am 13.07.2013 10:53, schrieb Simfake Fake: > Hi. I'm trying to connect to a bluetooth serial adaptor using python > 3.x. However, in python 3.3.2 win x32, I get "AttributeError: module has > no attribute AF_..." when trying to use socket.AF_BLUETOOTH, despite the > docs http://docs.python.org/3.3/l

Re: Floating point minimum and maximum exponent values

2013-07-16 Thread Christian Heimes
Am 16.07.2013 14:04, schrieb Chris Angelico: > Piece of extreme oddity, this. > help(sys.float_info) > lots of other info ... > | max_exp > | DBL_MAX_EXP -- maximum int e such that radix**(e-1) is representable > | > | min_exp > | DBL_MIN_EXP -- minimum int e such that r

Re: tkinter redraw rates

2013-07-18 Thread Christian Gollwitzer
gnal(sig, data=''): tclinterp.eval('thread::send -async $mainthread {event generate . <<%s>> -data {%s}'%sig%data) and in the main thread bind() to the virtual events. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I make this piece of code even faster?

2013-07-21 Thread Christian Gollwitzer
.. but of course you should use this only to check whether you get the correct result. You don't want to do that in the loop, instead, store the weights always in matrix form. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: tkinter progress bar

2013-07-23 Thread Christian Gollwitzer
hat seems to be more involved. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3: dict & dict.keys()

2013-07-24 Thread Christian Heimes
nged now, even if .items() were the better > choice, but I'm curious as to the reason for the decision. Consider this: if key in dict: ... for key in dict: ... It would be rather surprising if "in" as containment checks operates on keys and "in" as iterator retur

Re: Read STDIN as bytes rather than a string

2012-06-18 Thread Christian Heimes
redReader name=''> >>> sys.stdin.buffer.raw <_io.FileIO name='' mode='rb'> You should read from sys.stdin.buffer unless you really need the bare metal. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding absolute path of imported module?

2012-06-19 Thread Christian Heimes
ink() (uses os.lstat) and resolve the link with os.readlink(). Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Py3.3 unicode literal and input()

2012-06-20 Thread Christian Heimes
Am 18.06.2012 20:45, schrieb Terry Reedy: > The simultaneous reintroduction of 'ur', but with a different meaning > than in 2.7, *was* a problem and it should be removed in the next release. FYI: http://hg.python.org/cpython/rev/8e47e9af826e Christian -- http://mail.python.org/

Re: Is that safe to use ramdom.random() for key to encrypt?

2012-06-20 Thread Christian Heimes
Am 20.06.2012 17:25, schrieb D'Arcy Cain: > As "they" say, random number generation is too important to be left > to chance. :-) Hilarious! You made my day! :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Introspect imports from module

2012-06-21 Thread Christian Heimes
. The approach has the nice side effect that you don't have to import a module to inspect its imports. This script may serve as an example for you: http://svn.zope.org/Zope3/trunk/utilities/importchecker.py?rev=113742&view=auto Christian -- http://mail.python.org/mailman/listinfo/python-list

tiffany 0.5 released

2012-06-24 Thread Christian Tismer
. Please let me know if this stuff works for you, and send requests to or use the links in the bitbucket website: https://bitbucket.org/didoca/tiffany cheers -- Chris -- Christian Tismer :^)<mailto:tis...@stackless.com> tismerysoft GmbH : Have a break! Take a r

tiffany 0.5 released

2012-06-24 Thread Christian Tismer
s are most welcome. Please let me know if this stuff works for you, and send requests to or use the links in the bitbucket website: https://bitbucket.org/didoca/tiffany cheers -- Chris -- Christian Tismer :^)<mailto:tis...@stackless.com> tismerysoft GmbH : H

tiffany 0.6 released

2012-06-24 Thread Christian Tismer
s are most welcome. Please let me know if this stuff works for you, and send requests to or use the links in the bitbucket website: https://bitbucket.org/didoca/tiffany cheers -- Chris -- Christian Tismer :^)<mailto:tis...@stackless.com> tismerysoft GmbH : H

Re: tiffany 0.6 released

2012-06-25 Thread Christian Tismer
Abour tiffany... On 6/25/12 3:46 AM, Christian Tismer wrote: Tiffany - Read/Write Multipage-Tiff with PIL without PIL Tiffany stands for any tiff. The tiny module solves a large set of problems, has no dependencies and just works

Re: tiffany 0.6 released

2012-06-26 Thread Christian Tismer
Hi Steven, On 26.06.12 04:18, Steven D'Aprano wrote: On Mon, 25 Jun 2012 23:36:59 +0200, Christian Tismer wrote: I saw quite a lot of downloads of this package now, but not a single reaction or any feedback. Feel fortunate that you are getting any downloads at all :) In my experienc

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread Christian Tismer
have at least my acceptance much quicker, because the necessity of modifying stuff would reduce to the few changes which are important in a few modules. So right now, I try to use python 3, but the flexibility is right now in python2.7 . cheers - Chris -- Christian Tismer :^

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread Christian Tismer
On 27.06.12 13:02, Chris Angelico wrote: On Wed, Jun 27, 2012 at 8:25 PM, Christian Tismer wrote: I think, for the small importance of the print statement in code, it would have made the transition easier, if python 3 was as flexible as python 2.7, with a symmetric "from __past__ i

Re: tiffany 0.6 released

2012-06-27 Thread Christian Tismer
... Thanks for the adjustment. Now I'm feeling fine and will move on to other targets ;-) By the way: Our conversation seems to have a real effect on downloads. :-) It has been quite a boost since 20 hours from some 25-40 to now over 200. cheers -- chris -- Christian T

Re: tiffany 0.6 released

2012-06-27 Thread Christian Tismer
On 27.06.12 15:24, Christian Tismer wrote: ... Thanks for the adjustment. Now I'm feeling fine and will move on to other targets ;-) By the way: Our conversation seems to have a real effect on downloads. :-) It has been quite a boost since 20 hours from some 25-40 to now over 200. b

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread Christian Tismer
On 27.06.12 15:44, Stefan Behnel wrote: Christian Tismer, 27.06.2012 15:15: print, function or not, is not important enough to enforce a rewrite everywhere because of syntax error. That hides the real semantic changes which _are_ important. So what I would have done is to let it work in an

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread Christian Tismer
On 6/27/12 8:58 PM, Serhiy Storchaka wrote: On 27.06.12 17:34, Christian Tismer wrote: That's why I was unhappy with py3's missing flexibility. Excessive flexibility is amorphism. Random notes without context and reasoning are no better than spam. My answer as well, of course

Re: how can I implement "cd" like shell in Python?

2012-06-28 Thread Christian Heimes
king directory of another process. Your snipplet won't alter the current working directory of the shell. "cd" is a builtin shell command, not a binary. Christian -- http://mail.python.org/mailman/listinfo/python-list

tiffany 0.6.1 released

2012-06-30 Thread Christian Tismer
ow if this stuff works for you, and send requests to or use the links in the bitbucket website: https://bitbucket.org/didoca/tiffany cheers -- Chris -- Christian Tismer :^)<mailto:tis...@stackless.com> tismerysoft GmbH : Have a break! Take a ride on Python's

Re: tiffany 0.6.1 released

2012-06-30 Thread Christian Heimes
Am 30.06.2012 18:25, schrieb Paul Rubin: > Christian Tismer writes: >> Tiffany stands for any tiff. The tiny module solves a large set of >> problems, has no dependencies and just works wherever Python works. >> Tiffany was developed in the course of the *DiDoCa* project and

Re: locals().update(...)

2012-07-04 Thread Christian Heimes
Am 04.07.2012 13:56, schrieb eis...@gmail.com: > I expected this to work: It doesn't work and that's documented: http://docs.python.org/library/functions.html?highlight=locals#locals -- http://mail.python.org/mailman/listinfo/python-list

Re: How to safely maintain a status file

2012-07-08 Thread Christian Heimes
b) except OSError, e: if e.errno != 183: raise os.unlink(b) os.rename(a, b) Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: How to safely maintain a status file

2012-07-08 Thread Christian Heimes
locks file when a program opens a file. Other programs can't rename or overwrite the file. (You can get around the issue with some extra work, though.) Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: How to safely maintain a status file

2012-07-09 Thread Christian Heimes
Am 09.07.2012 07:50, schrieb Plumo: >> Windows doesn't suppport atomic renames if the right side exists. I >> suggest that you implement two code paths: > > Problem is if the process is stopped between unlink and rename there > would no status file. Yeah, you have to suffer all of Windows' design

Re: tiffany 0.6.1 released

2012-07-09 Thread Christian Tismer
On 30.06.12 18:25, Paul Rubin wrote: Christian Tismer writes: Tiffany stands for any tiff. The tiny module solves a large set of problems, has no dependencies and just works wherever Python works. Tiffany was developed in the course of the *DiDoCa* project and will always appear on PyPi. This

Re: Python Interview Questions

2012-07-09 Thread Christian Heimes
t off mentally. Gardening is great hobbies for a developer. You need to be patient, reliable and provide constantly good work to grow your own vegetables. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: How to safely maintain a status file

2012-07-09 Thread Christian Heimes
That's because you're using the wrong approach. See how to use > ReplaceFile under Win32: > > http://msdn.microsoft.com/en-us/library/aa365512%28VS.85%29.aspx The page doesn't say that ReplaceFile is an atomic op. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Interview Questions

2012-07-09 Thread Christian Heimes
Am 10.07.2012 01:40, schrieb Roy Smith: > Do you really want to make hire/no-hire decisions based on somebody's > ability to second-guess what you probably wanted to hear when you asked > a pointless question? I don't want her/him to second-guess at all. I expect a straight and honest answer. Se

Re: tiffany 0.6.1 released

2012-07-10 Thread Christian Heimes
Am 09.07.2012 17:51, schrieb Christian Tismer: > It turns out to be a problem with multiple strips in a tiff file. > PIL does not support that. Maybe I can find an easy solution, > maybe I'm better off using > > smc.freeimage > > as suggested by Christian Heimes, >

Re: Python Interview Questions

2012-07-10 Thread Christian Heimes
, tomatoes, chillies and flowers on a small balcony in the middle of the city. This year I'm going to harvest at least 200 tomatoes from two plants in a 1m * 40cm * 40cm box of soil. I even have a calabash plant that grows like crazy. See? :) Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: How to safely maintain a status file

2012-07-12 Thread Christian Heimes
into the IO layer of the operating system. With POSIX semantics the reading process will either see the full content before the rename op or the full content after the rename op. The writing process can replace the name (rename op) while the reading process reads the status file because its file desc

Re: How to safely maintain a status file

2012-07-12 Thread Christian Heimes
while it is opened by a process. Lot's of small things work slightly differently on Windows or not at all. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python] RE: How to safely maintain a status file

2012-07-13 Thread Christian Heimes
Am 13.07.2012 21:57, schrieb MRAB: > It's possible to create a temporary file even in Windows. Windows has a open() flag named O_TEMPORARY for temporary files. With O_TEMPORARY the file is removed from disk as soon as the file handle is closed. On POSIX OS it's common practice to unlink temporary

Re: How to safely maintain a status file

2012-07-14 Thread Christian Heimes
h IO fiber channel links and external backup solution to keep our data reasonable safe. Christian -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   6   7   8   9   10   >