Re: UserDict deprecated

2005-01-03 Thread Wolfgang
should not be used in the std lib. Some weeks ago I had ten minutes of spare time and rewrote the 'os' module to use dict and there was no problem with it. But due to lack of time I was not able to run tests and submitted no patch. I will try this next week. bye by Wolfgang -- ht

Linking problems under irix6 with embedded Python2.4

2005-03-16 Thread Wolfgang
find no realy solution. Are there some ideas. thank's alot. Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Constructor class problem

2005-03-21 Thread Wolfgang
= {} self.labelfiles=[] etc. call: try: gx=gXconv.gXconv(gXconfPath) except gXconv.gXconvertError, msg: print msg sys.exit(1) Hoping for hints. Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: extend methods of decimal module

2014-02-27 Thread Wolfgang
imal('0.31415926535897932384626433832795') see? Decimal(.1) gives the exact representation of the float, but Decimal('.1') is the way to get your D()'s default behavior. > You see? All of my functions make certain that when the Decimal objects are > created that the string constructor gets called so that, in this case, > .1 really is 0.1 precisely, not floating format. Yes, just that this is almost never what your users will want to happen ... The Decimal constructor is really well designed, so stick to it ! Best, Wolfgang -- https://mail.python.org/mailman/listinfo/python-list

Re: extend methods of decimal module

2014-02-28 Thread Wolfgang
Uhh, the curse of not copy-pasting everything: > >>> exp(20) should, of course, read >>> epx(19) > Traceback (most recent call last): > File "", line 1, in > epx(19) > File "C:\Python34\dmath_rev.py", line 27, in epx > n *= q > decimal.Overflow: [] > -- https://mail.py

NB question on global/local variables in functions

2006-07-15 Thread Wolfgang
Hi all, I've started to write some functions but I have some problems with common variables in that functions. So I have some variables which should be accessible by all my functions but not accessible by the rest of my code. How can I do this? Thanks Wolfgang ###function.py: c1=123

Re: NB question on global/local variables in functions

2006-07-15 Thread Wolfgang
of "c1"). > the _ before the variable did the trick! Thanks a lot! > Third, one of Python's key concepts is "we're all adults here". You can't > really and truly hide c1 and c2, so just act responsibly and don't mess with > them from outside the function module. It is more to prevent myself from my own stupidness by changing global variables incidentally. Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: NB question on global/local variables in functions

2006-07-15 Thread Wolfgang
Wolfgang schrieb: >> First, avoid "from function import *" as it pollutes your namespace. Either >> import specific symbols or just the module: >> >> from function import fun, fun1 >> import function > > thanks for the hint! But what

Re: NB question on global/local variables in functions

2006-07-15 Thread Wolfgang
Thanks! I've learned a lot today! Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

subprocess problem on WinXP

2006-07-26 Thread Wolfgang
Hi, I want to compress all files (also in subfolder). The code is working more or less, but I get a black popup window (command line window) for every file to compress. How do I cave to change my system call that nothing pops up? Wolfgang import os import subprocess dir="g:\\messtech&

Re: subprocess problem on WinXP

2006-07-26 Thread Wolfgang
into memory? And what about performance? Thanks Wolfgang Simon Forman schrieb: > Wolfgang wrote: >> Hi, >> >> I want to compress all files (also in subfolder). The code is working >> more or less, but I get a black popup window (command line window) for >> every fil

Re: subprocess problem on WinXP

2006-07-26 Thread Wolfgang
Simon Forman schrieb: > Wolfgang wrote: >> Hi Simon, >> >> I did not know that library! I'm still new to python and I still have >> problems to find the right commands. > > Welcome. : ) Python comes with "batteries included". I'm always >

Re: embedding Python: how to avoid memory leaks?

2006-03-10 Thread Wolfgang
Hallo, > >>> I couldn't get the PyRun_*File* calls to work on Windows, > >>> presumably because of the FILE* problem mentioned in the docs. > >> > >> Which compiler do you use? > > > > MSVC++ (version 6 from memory -- I do most of my development on > > the Mac and fire up Virtual PC occasionally t

Re: Future standard GUI library

2013-05-22 Thread Wolfgang Keller
y old. > > http://pyfltk.sourceforge.net/ And it's imho definitely not "native" (in terms of "look and feel") on *any* operating system, not even on Linux. In fact it's SGI's Irix Forms re-implemented, afaik. Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Future standard GUI library

2013-05-22 Thread Wolfgang Keller
t other open-source cross-platform programming language choices do yo have. Java? For GUIs? Excuse me while I vomit. C++? As a language for human beings? Oops, I have to throw up again. Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Future standard GUI library

2013-05-23 Thread Wolfgang Keller
rms may be at best useful for "web shops", but for actual screenwork, HTML is not a valid GUI, no matter how much javascript you add to it. Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Future standard GUI library

2013-05-26 Thread Wolfgang Keller
er to implement and to deploy and a *lot* more functional with any of the RAD frameworks available for Python. And just like HTML never was a valid GUI framework and never will be one, HTTP will never be a suitable transport layer for a RPC protocol. Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Future standard GUI library

2013-05-27 Thread Wolfgang Keller
uot;. > suppose I now want the app natively on my phone (because that's all > the rage). It's an iPhone. Oh. Apple doesn't support Python. > Okay, rewrite the works, including business logic, in Objective C. > Now I want it on my android phone. Those are gadgets, not

Re: Future standard GUI library

2013-05-27 Thread Wolfgang Keller
> HTTP handles that just fine, with your choice of XML, And XML is definitely not suitable as a marshalling format for a RPC protocol. XML-over-HTTP is a true cerebral flatulance of some hopelessly clueless moron. Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

usage of os.posix_fadvise

2013-05-28 Thread Wolfgang Maier
ack of effect I'm observing is something Ubuntu-specific, or if I'm just using it in a wrong way. Any help is greatly appreciated! Best, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Future standard GUI library

2013-05-28 Thread Wolfgang Keller
maximise throughput), it's just obvious to *de*-centralise as much as possible. In fact, if Postgres-R was available for production, you could even distribute the persistence and run an entirely "serverless" application. Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Future standard GUI library

2013-05-28 Thread Wolfgang Keller
> What is "screenwork"? Actually productive work of significant intensity at a computer screen. As opposed to leisurely "clicking around" like managers, administrators or home users (gaming, "webbing",...) do. Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Can anyone please help me in understanding the following python code

2013-05-30 Thread Wolfgang Maier
on through mergeSort is not started only once as you say, but twice (after finishing the recursion through mergeSort(lefthand), another recursion is kicked off by calling mergeSort(righthand). Best, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Can anyone please help me in understanding the following python code

2013-05-30 Thread Wolfgang Maier
gmail.com> writes: > > Thanks for the reply Chris. > > I am newbie to python, so please excuse me if I am asking chilly questions. > > Can you please explain more about the following sentence. > "When it says "Splitting" with a single-element list, it then > immediately prints "Merging" and

Re: Future standard GUI library

2013-05-30 Thread Wolfgang Keller
ngers off the keyboard is indeed entirely unusable for any half-proficient screenworker. And anyone doing actual productive screenwork every day for more than just a few months will inevitably (have to) get proficient (unless completely braindead). Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

usage of os.posix_fadvise

2013-05-30 Thread Wolfgang Maier
Antoine Pitrou wrote: >Hi, >Wolfgang Maier biologie.uni-freiburg.de> writes: >> >> Dear all, >> I was just experimenting for the first time with os.posix_fadvise(), which >> is new in Python3.3 . I'm reading from a really huge file (several GB) and I &

Re: Future standard GUI library

2013-06-01 Thread Wolfgang Keller
n ever" is an absolute "must have" requirement for productivity applications. > THIS is a professional programmer's workspace. :) And by "screenworkers" I didn't refer to programmers. Those people rarely have to use the stuff that they implement. Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Future standard GUI library

2013-06-12 Thread Wolfgang Keller
gt; As is the "response time" behaviour of "web applications". > > On a LAN, with a proper back-end, I can get instant response from a > web app. I have been involved as "domain specialist" (and my input has always been consistently conveniently ignore

Re: Future standard GUI library

2013-06-14 Thread Wolfgang Keller
production use, then even the persistence could run locally on the client with asynchronous replication of all clients ("peer to peer"). Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Future standard GUI library

2013-06-15 Thread Wolfgang Keller
ge to the user, Forget that. 25ms for client-server (pgsql) network protocol, client-side application logic *and* GUI. With a "web" application that would have to include "application server"-side application logic, *and* generation of HTML (and javascript), *and* HTTP protocol *and* HTML "rendering" *and* client-side javascript. Won't work. Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: decorator to fetch arguments from global objects

2013-06-18 Thread Wolfgang Maier
>     return _with_optional_db > I'm not sure, whether your code would work. I get the logic for the db in kwargs case, but why are you checking whether db is in func_args? Isn't the real question whether it's in args ?? In general, I don't understand why you want to use .func_code.co_varnames here. You know how you defined your function (or rather method): class Entity: def save_doc(db): ... Maybe I misunderstood the problem? Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: decorator to fetch arguments from global objects

2013-06-18 Thread Wolfgang Maier
andrea crotti gmail.com> writes: > > 2013/6/18 Wolfgang Maier biologie.uni-freiburg.de> > > > andrea crotti gmail.com> writes: > > > > > > Using a CouchDB server we have a different database object potentially for > every request. > > >

Re: decorator to fetch arguments from global objects

2013-06-19 Thread Wolfgang Maier
s): raise TypeError('need dbobject') return db Then use it as a simple one-liner like this: def save_doc(self, db=None): db = guarantee_dbobject(db) ... It's as much effort to use this as decorating the method, but I think it's clearer and it avoids

Re: decorator to fetch arguments from global objects

2013-06-19 Thread Wolfgang Maier
Wolfgang Maier biologie.uni-freiburg.de> writes: > > andrea crotti gmail.com> writes: > > > 2013/6/18 Terry Reedy udel.edu> > > > > Decorators are only worthwhile if used repeatedly. What you specified can > easily be written, for instance, as > &g

Re: Python development tools

2013-06-24 Thread Wolfgang Keller
> Also, I will use GUI interface for Python. What kind of widget > toolkits do you recommend? I know there are GTK+ and Qt. wxPython, PyGUI... Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-19 Thread Wolfgang Keller
all those proprietary 4GL IDEs/frameworks/GUI builders (just check the success that Realbasic has) proves imho that the Python community has totally missed to address the vast crowd of potential users who are domain experts in other domains than software development. Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

QVariant.toPyObject()

2012-07-20 Thread Wolfgang Rohdewald
. -- Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: The way to develope a graphical application to manage a Postgres database

2012-08-05 Thread Wolfgang Keller
Python & SQLalchemy), Russian only - Kiwi (PyGTK) Not sure whether these are still active: - Gnuenterprise (wxPython) - Pythoncard (wxPython) Sincerely, Wolfgang Keller -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for a good introduction to object oriented programming with Python

2012-08-05 Thread Wolfgang Strobl
Dennis Lee Bieber : > Don't look for Object-Oriented Programming -- since the first widely >popular OOP language was C++ (Smalltalk was earlier, but rather >specialized, whereas C++ started as a preprocessor for C). Well, C++ did to C what Simula 67 did to Algol 60, much earlier. Simula was

Re: Looking for an IPC solution

2012-09-01 Thread Wolfgang Keller
/receive messages using these channels. But > I don't remember its name and now I cannot find it. Can somebody > please help? If it's just for "messaging", Spread should be interesting: http://www.spread.org/ Also cross-platform & language-independent. Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: simple client data base

2012-09-03 Thread Wolfgang Keller
se it do so for historic reasons, because the corresponding project started before Sqlalchemy became known. If you want to rely on not losing your data, you might want to use PostgreSQL (www.postgresql.org) as a storage backend with any of these. Sincerely, Wolfgang P.S.: If anyone k

Re: simple client data base

2012-09-04 Thread Wolfgang Keller
latest version), implementing an entire CRUD application is as simple as declaring your domain object model and laying out your GUI with Qt Designer. In Sqlkit, you don't have to do much more, you just don't use a designer for the GUI, but also a declarative approach. Sincerely, Wolf

Re: Can somebody give me an advice about what to learn?

2012-10-03 Thread Wolfgang Keller
deficit of orthogonality) and that make reading and understanding code difficult, besides introducing sources for potential bugs. Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Can somebody give me an advice about what to learn?

2012-10-04 Thread Wolfgang Keller
h Python, since I've learned programming with Pascal anyway. >;-> I just wanted to point out that given the state of Python today, no one would probably consider starting Ruby any more. Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Migrate from Access 2010 / VBA

2012-11-25 Thread Wolfgang Keller
use the > data (mdb/accede format), Don't. Put your data into an *actually* transaction-safe RDBMS (which "Jet" is *not*), such as e.g. PostgreSQL. > design a variety of reports with multi-level groupings, and deliver > them to many individual recipients via email. Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Migrate from Access 2010 / VBA

2012-11-27 Thread Wolfgang Keller
ttp://kexi-project.org/about.html Unfortunately, Kexi doesn't support composite keys yet, so it's essentially useless for real-world databases so far. :-( Rekall appears to be dead and so does Knoda. Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Migrate from Access 2010 / VBA

2012-11-27 Thread Wolfgang Keller
amelot include report builders. And, again; Libreoffice Base comes with a reporting framework, although the latest version afaik has a currently unresolved bug, so you'll have to retrograde to an older version if you want to use it. Sincerely, Wolfgang -- http://mail.python.org/mailman/list

Re: What are the minimum requirements to get a job in?

2012-12-15 Thread Wolfgang Strobl
Christian Heimes : >To be fair, memcpy() is a pretty simple function. This, of course, depends on the target architecture. See for example or >It can be implemented >in just about

Re: New in Python , Need a Mentor

2013-01-02 Thread Wolfgang Strobl
Chris Angelico : >On Thu, Jan 3, 2013 at 1:04 AM, NewbiePythonic wrote: >> Hello Friends, >> >> I am very new to python and loved the easiness with which we can deal with >> problems. I would like to take things seriously and develop some good web >> applications. But right now I am stuck and l

iterating over the lines of a file - difference between Python 2.7 and 3?

2013-01-17 Thread Wolfgang Maier
I just came across an unexpected behavior in Python 3.3, which has to do with file iterators and their interplay with other methods of file/IO class methods, like readline() and tell(): Basically, I got used to the fact that it is a bad idea to mix them because the iterator would use that hidden re

RE: iterating over the lines of a file - difference between Python 2.7 and 3?

2013-01-17 Thread Wolfgang Maier
on in Python in _pyio.py: def tell(self): return _BufferedIOMixin.tell(self) - len(self._read_buf) + self._read_pos Wolfgang Maier wrote: > I just came across an unexpected behavior in Python 3.3, which has to > do with file iterators and their interplay with other methods of

Re: The best, friendly and easy use Python Editor.

2013-01-25 Thread Wolfgang Keller
or Python. If you're used to IDEs, WingIDE is one long-standing competitor. The "101" version is free. There are also editors implemented *in* Python, which can be used for programming Python, such as Editra, which features quite a few useful plugins. Sincerely, Wolfgang -- h

RE: Reading data from 2 different files and writing to a single file

2013-01-28 Thread Wolfgang Maier
as an in-memory list. itertools.izip and the built-in python 3 zip return iterators. Hope that helps, Wolfgang From: inshu chauhan [mailto:[email protected]] Sent: Monday, January 28, 2013 2:32 PM To: [email protected] Subject: Reading data from 2 different files and writing to a single

Re: Software tool for stochastic simulation as well as for the stochastic optimization

2012-02-09 Thread Wolfgang Keller
something else? I have no clue whether it does stochastic simulation and optimisation, but R is THE free open-source statistic analysis tool. It does have a Python interface, RPy. And there's a free open-source replacement for Matlab, Scilab. Which has a Python interface as well. Sincerely, Wo

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-25 Thread Wolfgang Meiners
t; type and that constant will ALWAYS be larger! > > > If there is no limit for len(string), why not simply use # get_limit() returns None if there is no limit maxlength = get_limit() if maxlength and (len(string) <= maxlength): allow_passage() else: deny_passage() Wolfgang -

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-26 Thread Wolfgang Meiners
All other values are considered true — so objects of many types are always true. == That means: if maxlength and (len(string) <= maxlength): is equivalent to if (maxlength is not None) and (len(string) <= maxlength): which is more complicated to type and -in my opinion- not so intuitive. B

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-26 Thread Wolfgang Meiners
ue for infinity since there is no infinitely large number. But as i see it, you must have two comparisons then. Maybe someone has a better idea? Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-26 Thread Wolfgang Meiners
Am 26.02.12 13:52, schrieb Chris Angelico: > On Sun, Feb 26, 2012 at 10:56 PM, Wolfgang Meiners > wrote: >> That means: >> if maxlength and (len(string) <= maxlength): >> >> is equivalent to >> if (maxlength is not None) and (len(string) <= maxlength

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-26 Thread Wolfgang Meiners
Am 26.02.12 14:16, schrieb Wolfgang Meiners: > > I just had a closer look at it. It seems to be more complicated than i > thougth: You will have to write Obviously not close enough, as i just learned. > > def confine_length(string, maxlength=None): > if maxlength:

sqlalchemy: delete() on m:n-relationship

2012-05-19 Thread Wolfgang Meiners
utf-8 -*- > > ''' > Created on 19.05.2012 > > @author: wolfgang > > ''' > > from sqlalchemy import * > > from sqlalchemy.orm.session import sessionmaker > from sqlalchemy.orm import relationship, backref > from sqlalch

Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-08 Thread Wolfgang Keller
and make it available "live" in an IDE? This whole cycle of "design GUI"->"generate code"->add own code to generated code"->"run application with GUI" has always seemed very un-pythonic to me. A dynamic, interpreted language should allow to wo

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-11 Thread Wolfgang Keller
"casual" Python scripting dilettants who are not full-time software developers but domain experts who just use Python to help get their main work done. ** In my case of database applications, something like this: http://www.nakedobjects.org/book/ http://www.nakedobjects.org/downloads/Pawson%20thesis.pdf Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-11 Thread Wolfgang Keller
to use Python due to the very lack of such tools (and corresponding frameworks). * Domain experts in fact who would need to implement loads of software to help them get their work done but can't. And since there's no budget for external developers, nothing get's ever done about this. Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-13 Thread Wolfgang Keller
get over that pretty huge step in the learning curve of those frameworks and tools. Please note that this is not meant as criticism to open-source developers, but as a hint that there might be a business opportunity for someone here to develop and sell something for money. ;-) Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-13 Thread Wolfgang Keller
andling" and the domain-specific code. "Event handling" - that term already raises my hair because it stinks like bulkloads of clumsy, error-prone diligence work that has nothing to do with the problem I need to get solved. Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-13 Thread Wolfgang Keller
Sincerely, Wolfgang *I moved not from Wugh, but from other software to LyX/LaTeX for all my document processing. -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-14 Thread Wolfgang Keller
er would prevent anyone to add customised code by hand. No tool/framework can cover 100%, no doubt. My point is that there are currently no frameworks/tools available for Python that cover the 90/95/98% of use cases where they would help a L-O-T. Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-14 Thread Wolfgang Keller
lasses - setting values of attributes instances of domain model classes - calling methods of instances of domain model classes Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-14 Thread Wolfgang Keller
ions" are in no way a solution to the mentioned problem, but they make this problem worse by piling up other problems on top of it. End of flame. Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-16 Thread Wolfgang Keller
On Thu, 14 Jun 2012 12:59:23 -0700 (PDT) CM wrote: > On Jun 14, 2:25 pm, Wolfgang Keller wrote: > > > > What is needed for domain specialists are frameworks and related > > tools such as GUI builders that allow them to write exclusively the > > domain-specific c

Re: Python Card alternatives?

2011-06-12 Thread Wolfgang Keller
> Are there any other, better solutions? Others are e.g.: - Pypapi - Camelot - Kiwi - Sqlkit - Gnuenterprise etc... Sincerely, Wolfgang -- Führungskräfte leisten keine Arbeit(D'Alembert) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Card alternatives?

2011-06-13 Thread Wolfgang Keller
> > Are there any other, better solutions? > > Others are e.g.: > - Pypapi > - Camelot > - Kiwi > - Sqlkit > - Gnuenterprise And I've just learned of another one: - QtAlchemy Sincerely, Wolfgang -- Führungskräfte leisten keine Arbeit

Re: Fun and games with lambda

2011-06-17 Thread Wolfgang Rohdewald
On Freitag 17 Juni 2011, Steven D'Aprano wrote: > run this one- > liner and wonder no more... looks like something dangerous to me. What does it do? rm -rf ? -- Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: PyGUI 2.5

2011-06-17 Thread Wolfgang Keller
tView anytime soon? Sincerely, Wolfgang -- Führungskräfte leisten keine Arbeit(D'Alembert) -- http://mail.python.org/mailman/listinfo/python-list

tkinter problem with treeview

2011-06-27 Thread Wolfgang Meiners
self.tv.focus(top) self.tv.selection_set(top) TestMixin().mainloop() There are some things i dont understand: 1) resizing of the field widths does work in principle, but the resulting field is exactly one charakter to small. 2) I think, resizing should be clearer, but i have no idea, how. 3) The horizontal scrollbar does not work as expected. It does not react on resizing the application window but only on resizing the headers of the fields. Maybe someone can give me some hints. Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

treeviewcontrol in tkinter.ttk

2011-06-30 Thread Wolfgang Meiners
column options {'minwidth': 20, 'width': 200, 'id': 'ad1', 'anchor': 'e', 'stretch': 1} column #2 heading options: {'tate': '', 'text': 'additional info 2', 'image': '', 'command': '', 'anchor': 'e'} column options {'minwidth': 20, 'width': 200, 'id': 'ad2', 'anchor': 'e', 'stretch': 1} showing that all elements should be right aligned (anchor:'e'). Nevertheless, all headings are centered, the tree label is left aligned while the rest is right aligned. This is not what i would expect. Additional, the column width of the tree label is to small, one charakter is missing. Can someone explain to me, how to do this the right way? Thank you for any hints Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Validating Entry in tkinter

2011-07-25 Thread Wolfgang Meiners
think you can find the answer using the following link: http://stackoverflow.com/questions/4140437/python-tkinter-interactively-validating-entry-widget-content Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: removing nested iffs

2011-07-29 Thread Wolfgang Rohdewald
On Freitag 29 Juli 2011, Josh Benner wrote: > if args.build not None: which python version understands this? -- Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: strang thing:

2011-09-06 Thread Wolfgang Rohdewald
name,'r') > TypeError: 'str' object is not callable you reassigned "open" to be a string -- Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: getpass and IDEs

2011-02-25 Thread Wolfgang Rohdewald
ppress > output on them, and if there's anything that might be done > about this. I'd say your IDE redirects stdout/stderr so it can show output within the IDE http://docs.python.org/library/getpass.html reading python docs lets me believe you are using python pre 2.6 if so, you coul

Re: value of pi and 22/7

2011-03-17 Thread Wolfgang Rohdewald
On Donnerstag 17 März 2011, kracekumar ramaraju wrote: > >>> 22/7.0 > > 3.1428571428571428 > > >>> import math > >>> math.pi > > 3.1415926535897931 > > Why is the difference is so much ?is pi =22/7 or something ? https://secure.

Make Python "portable" by default! (Re: Python IDE/text-editor)

2011-04-17 Thread Wolfgang Keller
> You can't run Python programs without a Python interpreter installed. Wrong. See e.g. http://www.portablepython.com/ BTW: Imho, the Python interpreter should be made "portable" ("zero-install") _by default_. "Installing" it should be purely optional.

Re: Make Python "portable" by default! (Re: Python IDE/text-editor)

2011-04-18 Thread Wolfgang Keller
ou understand while actually using it? >;-> > Whatever language you distributed code > is in, you need something on the computer that can read it. The point is that you don't need to _install_ it. If the developer has a brain. Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: installing setuptools on Windows custom python install

2011-04-18 Thread Wolfgang Rohdewald
_socket should find do you have that? -- Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Argument count mismatch

2011-04-21 Thread Wolfgang Rohdewald
On Donnerstag 21 April 2011, RVince wrote: > When I make the following call: > > http://localhost/eligibility/cmseditorlinemethod/474724434 broken link - I have no /eligilibity on my localhost -- Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Closing generators

2011-04-22 Thread Wolfgang Rohdewald
n makes no guarantees as for when an object is destroyed - CPython counts references and destroys when no reference is left, but that is implementation specific -- Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: suggestions, comments on an "is_subdict" test

2011-04-22 Thread Wolfgang Rohdewald
nce.items()) should be equivalent to your code if you only want to check for presence of all keys in the reference dict: set(subdict.keys()) <= set(reference.keys()) -- Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: GIL in alternative implementations

2011-05-28 Thread Wolfgang Rohdewald
000 i5:/pub/src/gitgames/kajongg/src$ python3.2 test.py 98 i5:/pub/src/gitgames/kajongg/src$ python3.2 test.py 100 -- Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: float("nan") in set or as key

2011-05-29 Thread Wolfgang Rohdewald
s. On Sonntag 29 Mai 2011, Grant Edwards wrote: > Even if they are the same nan, it's still not equal to itself. if I understand this thread correctly, they are not equal to itself as specified by IEEE but Python treats them equal in sets and dictionaries for performance reaso

Re: scope of function parameters

2011-05-29 Thread Wolfgang Rohdewald
c2(c): c = c[:] c[1] = 'having' return c -- Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

sqlalchemy and Unicode strings: errormessage

2011-05-30 Thread Wolfgang Meiners
UES (?, ?)' ('BUM', 'B\xc3\xa4umer') but where can i switch my application to Unicode strings? Thank you for all hints Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: scope of function parameters (take two)

2011-05-30 Thread Wolfgang Rohdewald
//mail.python.org/pipermail/tutor/2010-December/080505.html -- Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: scope of function parameters (take two)

2011-05-31 Thread Wolfgang Rohdewald
ed in as parameters. It is up to the passed object (a list in your case) to allow or disallow manipulations no matter how they are invocated, and the object is the same in the calling code and in the called function. -- Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlalchemy and Unicode strings: errormessage

2011-05-31 Thread Wolfgang Meiners
Am 31.05.11 13:32, schrieb Daniel Kluev: > On Tue, May 31, 2011 at 8:40 AM, Wolfgang Meiners > wrote: >> metadata = MetaData('sqlite://') >> a_table = Table('tf_lehrer', metadata, >>Column('id', Integer, primary_key=True), >>C

Re: sqlalchemy and Unicode strings: errormessage

2011-05-31 Thread Wolfgang Meiners
Am 31.05.11 11:55, schrieb Chris Withers: > Hi Wolfgang, > > On 30/05/2011 22:40, Wolfgang Meiners wrote: >> I am trying to build an application using sqlalchemy. > > You're likely to get much better help here: > > http://www.sqlalchemy.org/support.html#mail

Re: sqlalchemy and Unicode strings: errormessage

2011-05-31 Thread Wolfgang Meiners
I just found a second method on http://docs.python.org/howto/unicode you can use tho module codecs and then simply write import codecs f = codecs.open('unicode.rst', encoding='utf-8') for line in f: print repr(line) Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Thanks for all responses

2011-05-31 Thread Wolfgang Meiners
if __name__ == '__main__': a = EncTest('Müller') # this does work print a.__repr__() # throws an error if default encoding is ascii # but works if default encoding is utf8 print a # throws an error because a is not a string print unicode(a, e

Re: Thanks for all responses

2011-06-01 Thread Wolfgang Meiners
Am 31.05.11 23:56, schrieb Chris Angelico: > On Wed, Jun 1, 2011 at 5:52 AM, Wolfgang Meiners > wrote: >> Whenever i 'cross the border' of my program, i have to encode the 'list >> of bytes' to an unicode string or decode the unicode string to a 'list &g

Re: Simple board game GUI framework

2017-09-12 Thread Wolfgang Maier
this experiment to next year's class), but I think it may be a lot of fun, especially if you've played Minecraft before. Here's a link to get you started: http://www.instructables.com/id/Python-coding-for-Minecraft/ Best, Wolfgang -- https://mail.python.org/mailman/listinfo/python-list

Re: Textwrap doesn't honour NO-BREAK SPACE

2017-09-29 Thread Wolfgang Maier
guess it depends which minor version you are running. I'm pretty sure that explains why people report different outcomes. Best, Wolfgang -- https://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   6   >