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
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
et':{'profile':value}
},upsert=True)
Thanks in advance
Christian
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
>
>
>
>
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
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 .
>
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
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
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),
> >
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
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
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
>
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
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
"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
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
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
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
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
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
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.
Thanks Jeff and the crazy 88.
--
http://mail.python.org/mailman/listinfo/python-list
>
> 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.
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
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
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
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
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
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
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
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
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
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
> "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
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
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
find anything.
Have a look at StyledTextControl (wx.stc) in the demo.
Christian
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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 by definition on topic.
Christian
--
http://mail.python.org/mailman/listinfo/python-list
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
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
gest that you mention the context API in your blog post, too.
Christian
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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
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
p. Other users will
probably find your work very helpful.
Christian
--
http://mail.python.org/mailman/listinfo/python-list
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.
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
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
..?
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
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
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
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
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
.. 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
hat
seems to be more involved.
Christian
--
http://mail.python.org/mailman/listinfo/python-list
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
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
ink() (uses os.lstat) and resolve the
link with os.readlink().
Christian
--
http://mail.python.org/mailman/listinfo/python-list
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/
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
. 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
.
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
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
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
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
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
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 :^
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
...
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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,
>
, 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
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
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
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
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 - 100 of 1986 matches
Mail list logo