win32com early binding problem

2006-01-25 Thread Roland
ating early binding interface? There is possibility to download trial version on considered program on www.sparxsystems.com. Thank you Roland Divin [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Ideal way to separate GUI and logic?

2013-07-13 Thread Roland Koebler
-RPC over TCP-sockets and calls functions on the RPi). regards, Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: OAuth 2.0 implementation

2012-03-27 Thread Roland Hedberg
And then to complicate the picture you have OpenID Connect which is an attempt at bringing OpenID and OAuth2.0 together. By the way I have an implementation of OpenID Connect here: https://github.com/rohe/pyoidc -- Roland 27 mar 2012 kl. 11:59 skrev Stuart Bishop: > On Tue, Mar 27, 2012

Slow termination of process

2012-03-27 Thread Roland Hedberg
g up a new server fails. Is there anything I can do to get the port released immediately when the tcpserver is terminated. Or is there another way of doing this that will work better ? Roland --- With anchovies there is no common ground --

Re: Slow termination of process

2012-03-27 Thread Roland Hedberg
, RequestHandlerClass) and then httpd = MyTCPServer((hostname, port), Handler) httpd.serve_forever() and this solved my problem! So, thanks again Chris! 27 mar 2012 kl. 15:55 skrev Chris Angelico: > On Wed, Mar 28, 2012 at 12:03 AM, Roland Hedberg wrote: >>

Python Tools for Visual Studio from Microsoft - Free & Open Source

2011-03-09 Thread roland garros
FYI... http://pytools.codeplex.com Enjoy! -- http://mail.python.org/mailman/listinfo/python-list

Re: English Idiom in Unix: Directory Recursively

2011-05-17 Thread Roland Hutchinson
ggestion: Function to Copy/Delete a Directory > Recursively > How to rsync, unison, wget, curl > Hunspell Tutorial > Mac OS X Resource Fork and Command Line Tips ImageMagick Tutorial > Making System Calls in Perl and Python Unix And Literary Correlation > The U

Re: English Idiom in Unix: Directory Recursively

2011-05-20 Thread Roland Hutchinson
On Wed, 18 May 2011 07:19:08 +0200, Pascal J. Bourguignon wrote: > Roland Hutchinson writes: > >> Sorry to have to contradict you, > > Don't be sorry. > > >> but it really is a textbook example of recursion. Try this psuedo-code >> on for size: >&

Re: [Bulk] Re: Alternatives to XML?

2016-08-26 Thread Roland Koebler
t; than some "XML-like" file structure. So, please: - Don't try to write your own (not-quite-)XML-parser. - Read how XML-files work. - Read https://docs.python.org/3/library/xml.html and https://pypi.python.org/pypi/defusedxml/ - Think what you have done. - Use a sensible XML-parser/dumper. This should escape most special- characters for you (at least: < > & " '). Roland -- https://mail.python.org/mailman/listinfo/python-list

Re: Alternatives to XML?

2016-08-26 Thread Roland Koebler
ing some kind of XML-like-fileformat with many non-intuitive assumptions.) Roland PS: On Wed, Aug 24, 2016 at 04:58:54PM +0200, Frank Millman wrote: > Here is a JSON version - > > { > "case": { >"compare": { > "-src": "_par

Any available SAML 2.0 tools in Python ?

2005-11-09 Thread Roland Hedberg
Hi! The subject says it all. If there isn't anything already available, does anyone know about anyone working on something ? -- Roland -- http://mail.python.org/mailman/listinfo/python-list

Problem build python bindings to lasso with swig on mac os x

2005-12-04 Thread Roland Hedberg
's the 0.6.3 version of lasso I'm trying to build. Comments ? -- Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: here document

2005-01-11 Thread Roland Heiber
harold fellermann wrote: f = open("/bin/exe.x","w") print >>f , """CategoryY = GRIB etc. """ This would overwrite the existing /bin/exe.x ... HtH, Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating text on images

2005-01-13 Thread Roland Heiber
port Image, ImageFont, ImageDraw import sys im = Image.open(YOUR_IMAGE_HERE) idraw = ImageDraw.Draw(im) idraw.text((1,1),"Hello", fill=128) im.save(YOUR_NEW_IMAGE_HERE, IMAGE_TYPE) ### HtH, Roland -- http://mail.python.org/mailman/listinfo/python-list

Best python postgres module?

2005-01-28 Thread Roland Heiber
environment, so any advice which one to use for different usecases would be nice. Thanks, Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: Generating .pyc/.pyo from a make file

2005-02-02 Thread Roland Heiber
ot;' it creates the pyo file, but myprog starts up and keeps running. IOW, I need a batch method for generating compiled python. I know it exists, but I can't find it for some reason ... TIA, Hi, take a look at http://docs.python.org/lib/module-compileall.html HtH, Roland -- http://mail.py

Re: Generating .pyc/.pyo from a make file

2005-02-02 Thread Roland Heiber
e that was portable across implementations, but it looks to not be the case... Hi, .pyc's should be, cause it's standard python-bytecode, if you use massive optimizations it depends not on the os but on the underlying cpu/architecture ... So long, Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: Generating .pyc/.pyo from a make file

2005-02-03 Thread Roland Heiber
Roland Heiber wrote: Tim Daneliuk wrote: under the impression that "compiled" meant optimized byte code that You where right, i was totally mislead by "optimized" ... ;) Greetings, Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: python nested class

2005-07-08 Thread Roland Heiber
mother.x=1 def show(self): print mother.x class child: def increase(self,num): mother.x=num o = mother() o.show() y=mother.child() y.increase(20) # this should print 20 o.show() --- >pythonw -u "test.py&q

Re: Frankenstring

2005-07-13 Thread Roland Heiber
Thomas Lotze wrote: > It's definitely no help that file-like objects are iterable; I do want > to get a character, not a complete line, at a time. Hi, if i did understand what you mean, what about using mmap? Iterating over characters in a file like this: # -*- coding: iso-8859-1 -*- import os

Re: Frankenstring

2005-07-13 Thread Roland Heiber
os + offset) < self._size: self._pos += offset elif whence == 2 and 0<= (self._size - offset) < self._size: self._pos = self._size - offset def tell(self): return self._pos HtH, Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: Frankenstring

2005-07-13 Thread Roland Heiber
Roland Heiber wrote: > class MmapWithSeekAndTell(object): > def __init__(self, m, size): .. where m is a mmap-object and size the filesize ... sorry. -- http://mail.python.org/mailman/listinfo/python-list

Re: Building a function call?

2005-07-13 Thread Roland Heiber
locals().get("dothat")(*c) Called with: 1 2 HtH, Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: **kwargs?

2005-07-13 Thread Roland Heiber
her > practical use cases for ** (common enough please, I wish I was, but I'm > not a scientist). > > TIA, > Francois Assume d = { 'arg1':'value1','arg2':'value2' }. Then func(**d) is the same as: func(arg1='value1', arg2='value2') HtH, Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: Building a function call?

2005-07-13 Thread Roland Heiber
Peter Hansen wrote: >> locals().get("dothat")(*c) This was just meant as a quick example, not as production-level code ;) Even with globals(), I think its a bit odd ..., but safer than using eval() ... HtH, Roland -- http://mail.python.org/mailman/listinfo/python-list

Network performance

2005-08-23 Thread Roland Hedberg
tting the client open the connection and sending a number of sets I was surprised to find that the performance was equal to what Twisted/ XMLRPC did. Around 200 ms per set, not significantly less. So what can be done to speed up things or is Python incapable of supporting fast networking (just

Re: Network performance

2005-08-23 Thread Roland Hedberg
23 aug 2005 kl. 10.14 skrev Michael Sparks: > Roland Hedberg wrote: > >> I was surprised to find that the performance was equal to what >> Twisted/XMLRPC did. Around 200 ms per set, not significantly less. >> > > That should tell you two things: >* Twisted/

Re: Network performance

2005-08-23 Thread Roland Hedberg
23 aug 2005 kl. 15.14 skrev Sion Arrowsmith: > Roland Hedberg <[EMAIL PROTECTED]> wrote: > > > The easy solutions are to either change: > > >> def send( self, rdf ): >> self.s.send( rdf ) >> self.s.send( "\n" ) >> &

Re: how to control a USB DISK?

2005-03-02 Thread Roland Heiber
Hi, when you're under linux and a 2.6er kernel, take a look at hotplug, you can configure it the way that your script gets executed whenever a specific device is plugged in/out ... HtH, Roland [EMAIL PROTECTED] wrote: when a new usb disk is plugged into the usb socket, the program will c

Re: Linux Multimedia System

2005-03-13 Thread Roland Heiber
Marek Franke wrote: too. The whole project is just for fun. Afaik Freevo and/or MythTV are written in C/C++ and don't have any support for joysticks (afaik!). And the Freevo is pure python already ;) Greetings, Roland -- http://mail.python.org/mailman/listinfo/python-list

DB problem while trying to use Shelve

2004-11-30 Thread Roland Hedberg
bsddb.hashopen(file, flag, mode) File "/sw/lib/python2.3/bsddb/__init__.py", line 186, in hashopen d.set_flags(hflags) bsddb._db.DBInvalidArgError: (22, 'Invalid argument') Illegal instruction This is on a MacOSX machine with python 2.3.3 and db 4.2 What's going on ?

Re: KeyError

2004-12-16 Thread Roland Heiber
Code to handle the fact tht REMOT_ADDR does not exist. ... or just replace os.environ['REMOTE_ADDR'] with os.environ.get('REMOTE_ADDR', 'enter_default_here') to use a default in case of missing REMOTE_ADDR ... HtH, Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: Python IDE

2004-12-16 Thread Roland Heiber
limodou wrote: http://wiki.wookpecker.org.cn/moin.cgi/NewEdit Try this instead: http://wiki.woodpecker.org.cn/moin.cgi/NewEdit ^ SCNR, Roland ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Snakelets 1.38 (simple-to-use web app server with dynamic pages)

2005-03-23 Thread Roland Heiber
#x27;ve to place a key-pair in your server-dir (localhost.crt/localhost.private.key in the path). You can generate a self-signed certificate easily with openssl. HtH, Roland - SNIP AND SAVE BELOW - 961d 927a def handshake(self, tlsConnection): try: tlsConnection.hands

Snakelets via SSL

2005-03-23 Thread Roland Heiber
eed a key-pair in your serverdir, easily generetad with openssl. Just snip the patch below and use it against snakeserver/server.py (with standard *nix patch). HtH, Roland SNIP BELOW, SAVE AS ssl.patch 961d 927a def handshake(self, tlsConnection):

Re: Snakelets via SSL

2005-03-23 Thread Roland Heiber
rth trying. HtH, Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: Python instances

2005-04-20 Thread Roland Heiber
Hi, class MyClass: list = [] you have "list" defined as a classmember, not an instancemember. So "list" ist defined ONCE for all instances. Try this instead: class MyClass: def __init__(self): self.list = [] [...] and use self.list ... HtH, Roland -- ht

Weird connection problem

2014-10-25 Thread Roland Hedberg
104. What gives ? Oh, by the way it’s a HTTPS url. — Roland ”Being able to think like a child is an important attribute of being an adult” - Eddie Izzard -- https://mail.python.org/mailman/listinfo/python-list

Re: Weird connection problem

2014-10-25 Thread Roland Hedberg
Oh, by the way! To make this more interesting :-/ I saw this behavior on a Linux machine (Ubuntu 14.04 LTS) using Python 2.7.6 if I do the same exercise on a Mac OS X machine also with Python 2.7.6 - no problem what so ever. > 25 okt 2014 kl. 08:40 skrev Roland Hedberg : > > When

Re: Weird connection problem

2014-10-25 Thread Roland Hedberg
It’s a special HTTPS url and searching further it seems to be a SNI problem talked about here: http://stackoverflow.com/questions/18578439/using-requests-with-tls-doesnt-give-sni-support > 25 okt 2014 kl. 08:48 skrev Joel Goldstick : > > On Sat, Oct 25, 2014 at 9:40 AM, Roland Hedbe

Loading modules from files through C++

2014-05-16 Thread Roland Plüss
te a module from an in-memory c-string when called from within load_module (or anywhere)? -- Yours sincerely Plüss Roland Leader and Head Programmer - Game: Epsylon ( http://www.indiedb.com/games/epsylon ) - Game Engine: Drag[en]gine ( http://www.indiedb.com/engines/dragengine , http://dragengine.rp

Re: Loading modules from files through C++

2014-05-17 Thread Roland Plüss
That doesn't work in 2.x, doesn't it? On 05/17/2014 01:58 PM, Stefan Behnel wrote: > Roland Plüss, 17.05.2014 02:27: >> I'm using Python in an embedded situation. In particular I have to load >> python scripts through a memory interface so regular python module >

Re: Loading modules from files through C++

2014-05-17 Thread Roland Plüss
tally different? On 05/17/2014 03:26 PM, Stefan Behnel wrote: > Roland Plüss, 17.05.2014 15:00: >> On 05/17/2014 01:58 PM, Stefan Behnel wrote: >>> Roland Plüss, 17.05.2014 02:27: >>>> I'm using Python in an embedded situation. In particular I have to load >&g

Re: Loading modules from files through C++

2014-05-17 Thread Roland Plüss
On 05/17/2014 04:01 PM, Stefan Behnel wrote: > Hi, > > please avoid top-posting. > > > Roland Plüss, 17.05.2014 15:49: >> On 05/17/2014 03:26 PM, Stefan Behnel wrote: >>> Roland Plüss, 17.05.2014 15:00: >>>> On 05/17/2014 01:58 PM, Stefan Behne

Re: Loading modules from files through C++

2014-05-17 Thread Roland Plüss
On 05/17/2014 05:49 PM, Stefan Behnel wrote: > Roland Plüss, 17.05.2014 17:28: >> On 05/17/2014 04:01 PM, Stefan Behnel wrote: >>> Roland Plüss, 17.05.2014 15:49: >>>> On 05/17/2014 03:26 PM, Stefan Behnel wrote: >>>>> Roland Plüss, 17.05.2014 15:00:

Re: Loading modules from files through C++

2014-05-18 Thread Roland Plüss
On 05/17/2014 07:05 PM, Stefan Behnel wrote: > Roland Plüss, 17.05.2014 18:28: >> On 05/17/2014 05:49 PM, Stefan Behnel wrote: >>> Roland Plüss, 17.05.2014 17:28: >>>> On 05/17/2014 04:01 PM, Stefan Behnel wrote: >>>>> Roland Plüss, 17.05.2014 15:49:

Re: Loading modules from files through C++

2014-05-19 Thread Roland Plüss
On 05/19/2014 03:40 AM, Chris Angelico wrote: > On Mon, May 19, 2014 at 5:41 AM, Roland Plüss wrote: >> This exec source_code in module.__dict__ , should this not also be doable >> with PyEval_EvalCode? > General principle: The more code you write in Python and the less in &g

Re: Loading modules from files through C++

2014-05-20 Thread Roland Plüss
On 05/19/2014 03:40 AM, Chris Angelico wrote: > On Mon, May 19, 2014 at 5:41 AM, Roland Plüss wrote: >> This exec source_code in module.__dict__ , should this not also be doable >> with PyEval_EvalCode? > General principle: The more code you write in Python and the less in &g

Re: Loading modules from files through C++

2014-05-21 Thread Roland Plüss
On 05/20/2014 07:55 PM, Chris Angelico wrote: > On Wed, May 21, 2014 at 3:17 AM, Roland Plüss wrote: >> The important part are the last two lines. An important module is >> lacking the __builtins__ dictionary member so I had to add it. >> >> Hopefully this works also

Re: Loading modules from files through C++

2014-05-24 Thread Roland Plüss
_doc__': None, '__loader__': '_frozen_importlib.BuiltinImporter'>, '__package__': None} > Traceback (most recent call last): > File "", line 1, in > ImportError: No module named 'MyModule' > Anybody got an idea? Somebody ha

Re: Loading modules from files through C++

2014-06-03 Thread Roland Plüss
ll. METH_OLDARGS is no longer supported! This happenes whenever I try to import something. I never used METH_OLDARGS anywhere so I assume something is broken inside python. Maybe wrong error code for not finding some method or wrong arguments? I can't find any useful documentation on what co

Re: pyflakes best practices?

2014-06-04 Thread Roland Koebler
Hi, I would recommend to use Pylint (http://www.pylint.org/) in addition to pyflakes. Pylint is much more powerful than pyflakes, and largely configurable. Regards Roland -- https://mail.python.org/mailman/listinfo/python-list

Re: What's the best way to extract 2 values from a CSV file from each row systematically?

2013-09-27 Thread Roland Mueller
. > a better way to provide column headers is to use the fieldname parameter when creating the CSV reader. fieldnames is a string array that should match the number of columns in the csv file: *class *csv.DictReader(*csvfile*, *fieldnames=None*, *restkey=None*, * restval=None*, *dialect=&#

module_traverse segfault

2014-06-16 Thread Roland Plüss
-- Yours sincerely Plüss Roland Leader and Head Programmer - Game: Epsylon ( http://www.indiedb.com/games/epsylon ) - Game Engine: Drag[en]gine ( http://www.indiedb.com/engines/dragengine , http://dragengine.rptd.ch/wiki ) - Normal Map Generator: DENormGen ( http://epsylon.rptd.ch/denormgen.php ) - A

Re: module_traverse segfault

2014-06-16 Thread Roland Plüss
ere sObject is: @@ struct sObjectType : public PyTypeObject{ spModuleGraphics *ownerClass; }; @@ but maybe the documentation is missing something there? > > In any case, switch to 3.4.1 or later for improved gc and finalization. > Not in GenToo yet as far as I know

Re: Loading modules from files through C++

2014-07-08 Thread Roland Plüss
> On Wed, May 21, 2014 at 3:17 AM, Roland Plüss wrote: >> The important part are the last two lines. An important module is >> lacking the __builtins__ dictionary member so I had to add it. >> >> Hopefully this works also in Py3 should I switch some time later. But

Re: Which OAuth library?

2014-09-02 Thread Roland Hedberg
ct is a profile of OAuth2 it will work in an OAuth2 context too. This implementation is special in that it’s the de facto reference implementation for OpenID Connect. It’s that, due to the fact that I’ve built the OpenID Connect test suit which most today available OpenID Provider implem

Weird SSL problem

2014-09-29 Thread Roland Hedberg
", line 305, in do_handshake self._sslobj.do_handshake() IOError: [Errno socket error] [Errno 54] Connection reset by peer >>> import ssl >>> ssl.OPENSSL_VERSION ’OpenSSL 0.9.8za 5 Jun 2014' Now, using Safari, or curl for that matter, from the same machine works wi

Re: Weird SSL problem

2014-10-01 Thread Roland Hedberg
30 sep 2014 kl. 00:55 skrev Ned Deily : > In article , > Roland Hedberg wrote: > >> Hi! >> >> I¹m trying to access >> https://stsadweb.one.microsoft.com/adfs/.well-known/openid-configuration >> >> Doing it the simplest way I get t

Support for Galois/Counter Mode (GCM) ?

2011-11-01 Thread Roland Hedberg
Hi ! Is there a crypto library for Python that has support for GCM ?? -- Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a graphical GUI builder?

2013-02-19 Thread Roland Koebler
on to build GUIs. yes, there are several, depending on the GUI-toolkit (GTK+, Qt, ...) you want to use. But I would recommend Glade and the GTK+-Toolkit. Simply search for Glade, GTK and Python in your favourite search engine, and you will find several tutorials. regards, Roland -- http://mail.py

Re: Is there a graphical GUI builder?

2013-02-20 Thread Roland Koebler
hink about what > you're putting where, rather than going visually "that looks about > right" - but the reward is that it'll look right no matter where you > run your app. Yes, that's also true for GTK+/Glade. But you have the choice to either build you GU

Re: Is there a graphical GUI builder?

2013-02-20 Thread Roland Koebler
hout a fixed layout. It even seems that the QtDesigner doesn't even provide standard- icons (e.g. for open, close, exit etc.) or a file dialog. Am I doing something fundamentally wrong in QtDesigner, or is QtDesigner really that bad? regards Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: working with csv module in python

2013-02-20 Thread Roland Koebler
ng csv module , directly in > python ? If you don't need to parse/mangle the contents, you don't need the csv module. Simple open the resulting file for writing, and then read out the source files and write their contents into the resulting file. regards Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a graphical GUI builder?

2013-02-20 Thread Roland Koebler
e than having a base widget where all widgets are derived from, or having layout boxes. It means that most widgets are containers, like buttons, notebook labels, checkboxes, radio buttons, scrollbar-windows etc. And I haven't seen anything like this in Qt (or: in Qt Designer). regards Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a graphical GUI builder?

2013-02-20 Thread Roland Koebler
most developers who use Qt use this feature, since the fixed layout is the default in Qt designer and it's not really obvious how to change this for beginners... regards Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a graphical GUI builder?

2013-02-21 Thread Roland Koebler
uple of years... regards Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a graphical GUI builder?

2013-02-21 Thread Roland Koebler
gainst > user-supplied versions of Qt. The free license is the LGPL, that's not quite correct; things have changed 2009 and Qt now has three different licenses: - commercial licence - GPL (+GPL exceptions) - LGPL + Qt LGPL Exception (because of inline-functions/templates) since Qt 4.5

Re: Can't catch CTRL-C when SimpleXMLRPCServer running ?

2013-02-22 Thread Roland Koebler
Hi, > I would like to stop the script running in response to a CTRL-C. how about "KeyboardInterrupt"? try: ... except KeyboardInterrupt: print "You pressed Ctrl+C" Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: Embedding a for inside an html template for substitution

2013-03-05 Thread Roland Koebler
. If you need Django-like templates without Django, you can use Jinja. And if you need a real sandbox (so that you can use untrusted templates), I would recommend Jinja. Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: Inserting-embedding some html data at the end of a .py file

2013-03-06 Thread Roland Koebler
the > .py files. > > Do you have an idea? as someone said: You're doing it the wrong way. I would recommend to use a template-engine; then you can put the complete html-design (and some design-control-structures) into the template (and *not* into the cgi) and fill data into the template with a python-script. Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: Inserting-embedding some html data at the end of a .py file

2013-03-07 Thread Roland Koebler
ni...@superhost.gr [~/www/cgi-bin]# > > which used to work ok in v2.6.6 > > can you help? Python 3 introduced some Python 2-incompatible changes. So, please read: http://docs.python.org/release/3.0.1/whatsnew/3.0.html Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: round off to two decimal & return float

2013-03-30 Thread Roland Mueller
numeric value a and want to have a float with 2 decimals. This can be achieved with the function round(): >>> a = 10 >>> type(a) >>> a = round(10,2) >>> type (a) >>> a 10.0 BR, Roland > I am trying to assign the value to a cell of a s

Re: round off to two decimal & return float

2013-03-30 Thread Roland Mueller
2013/3/30 Roland Mueller > Hello, > > 2013/3/30 ஆமாச்சு > >> Consider the scenario, >> >> >> a = 10 >> >> "{0:.2f}".format(a) >> '10.00' >> >> This returns a string 10.00. But what is the preferred method to

Re: I hate you all

2013-04-07 Thread Roland Koebler
option, that will make tab stops be 8 > columns apart, and allow any number of spaces like in python 2, > makes the code I write dependent on that option. There's no need to add this to Python 3, since you already have what you want. Simply use: expand yourscript.py | python3 regards Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: Encoding NaN in JSON

2013-04-17 Thread Roland Koebler
f default(self, obj): if some-check-if-obj-is-NaN: return 'NaN' return json.JSONEncoder.default(self, obj) Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: Encoding NaN in JSON

2013-04-17 Thread Roland Koebler
a ValueError to encode such floats. >>> import json >>> json.dumps(float('NaN')) 'NaN' >>> json.dumps(float('inf')) 'Infinity' Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: Encoding NaN in JSON

2013-04-18 Thread Roland Koebler
n code. So, better replace the complete encoder.py or use your own patched version of the complete json-module. Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: How to set my gui?

2013-04-19 Thread Roland Koebler
nd threads, and threading in Python. > Otherwise you'll make your life unnecessarily hard. :) For simple tasks, you don't need threads, but can use the glib-functions timeout_add(), idle_add() etc. Roland -- http://mail.python.org/mailman/listinfo/python-list

ANN: template-engine pyratemp 0.3.0/0.2.3

2013-04-23 Thread Roland Koebler
imple-is-better.org/template/pyratemp-0.2.3.tgz on PyPI: - https://pypi.python.org/pypi/pyratemp/0.3.0 - https://pypi.python.org/pypi/pyratemp/0.2.3 --- Roland -- http://mail.python.org/mailman/listinfo/python-list

Porting python to a TI Processor (C64xx)

2006-06-21 Thread Roland Geibel
Dear all. We want to make python run on DSP processors (C64xx family of TI). I've already tried to ask [EMAIL PROTECTED] (about his "Python for arm-Linux"), but didn't get an answer so far. Neither could I find it in the Python tree at sourceforge. Any hints welcome R

Feed wxComboBox with dictionary/hash

2006-06-22 Thread Roland Rickborn
ombobox with a dictionary (which itself is fed by a database query). My first question: how can a wx.ComboBox be fed by a dictionary? For further help, Stano says: > read manual for more details... Ok, I'd like to. But which one? I was reading http://www.wxpython.org/docs/api/wx.ComboBo

wxPython: Icon aus base64 decoded Image

2006-12-11 Thread Roland Rickborn
TMAP_TYPE_ICO)) --> Fehler beim Start der Anwendung: "Failed to load icom from the file" Wo ist der Fehler und was muss ich machen, damit das Icon angezeigt wird? Besten Dank und schöne Grüsse, Roland -- E-Mail-Adresse ist reply-fähig, wird aber nicht gelesen. Besser: r_2 bei Ge Em Ix oder hier in der NG -- http://mail.python.org/mailman/listinfo/python-list

Re: array, a better shell

2006-12-20 Thread Roland Puntaier
>I have also used the shell of Mathematica. It's quite powerful and it >can show graphics too inlined, but globally I don't like it fully >because it makes editing small programs a pain (for me)... I use Vim to edit python code and can execute any selection (F3) or single lines (F2) whenever I w

import order or cross import

2007-01-03 Thread Roland Hedberg
it can be ? To join ONE.py and TWO.py into one file could be a solution if there where no other conditions (non-language based) that prevented it. -- Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: import order or cross import

2007-01-03 Thread Roland Hedberg
ever, you really should try to separate scripts from modules otherwise > the double use as both __main__ and a named module is going to come back > and bite you. Oh, that was only there as an example, so you could see the intent usage. Thanks Duncan! -- Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: import order or cross import

2007-01-03 Thread Roland Hedberg
Jussi Salmela wrote: > Roland Hedberg kirjoitti: >> I'm having a bit of a problem with import. >> >> I'm writing a marshalling system that based on a specification will >> create one or more files containing mostly class definitions. > Maybe I'm miss

Re: Testing for the presence of input from stdin.

2006-01-24 Thread Roland Heiber
an alternative list of filenames, pass it as the first argument to input(). A single file name is also allowed." HtH, Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: A __getattr__ for class methods?

2006-02-08 Thread Roland Heiber
ibute name. This method should return the (computed) attribute value or raise an AttributeError exception. HtH, Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: Serving binary data from a cgi-script

2005-05-11 Thread Roland Heiber
Thomas W wrote: > print d Hi, use sys.stdout.write instead, print is adding linebreaks ... HtH, Roland -- http://mail.python.org/mailman/listinfo/python-list

RE: c[:]()

2007-06-04 Thread Roland Puntaier
rameters in a tree ("tree" in the informatics sense). (end of my guess) I think somehow it should be possible to convey an idea so that others can grasp it. If it does not work the first time, it is good to clarify the points that one found others to misunderstand. Otherwise one risks to be regarded as esoteric. Thanks, Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: Python IDE

2007-06-20 Thread Roland Puntaier
Hi, With a python-enabled VIM it's possible to execute and thus test the python code. I have the following lines in my vimrc. F2 prints the result of a line evaluation on the bottom or in a window named pyout if there. I open pyout with ":vert rightb new pyout" mapped to F1. F4 does the same on

Antwort: How to calculate definite integral with python

2007-05-15 Thread Roland Puntaier
Searching the web I have found: from numpy import * def simple_integral(func,a,b,dx = 0.001): return sum(map(lambda x:dx*x, func(arange(a,b,dx simple_integral(sin,0,2*pi) Or in http://pylab.sourceforge.net/ quadrature.py Cheers. [EMAIL PROTECTED] schrieb am 15.05.2007 04:23:00:

strange list comprehension on generator

2007-08-29 Thread Roland Puntaier
() ... #this works as expected def ty(): yield 1 yield 2 yield 3 tg=ty() list(tg) cheers, Roland -- http://mail.python.org/mailman/listinfo/python-list

Other classes in a module

2007-03-25 Thread Roland Hedberg
Hi! Can an instance of a class in a module, in any simple way find out which other classes that exists in said module ? -- Roland -- http://mail.python.org/mailman/listinfo/python-list

call graph using python and cscope

2007-01-10 Thread Roland Puntaier
""" Sometimes it is nice to have the data used by cscope accessible in a programatic way. The following python script extract the "functions called" information from cscope (function: callGraph) and produced an html file from them. from csCallGraph import * acg=callGraph(entryFun,workingDir

SubProcess _make_inheritable

2007-01-10 Thread Roland Puntaier
SubProcess.py needs to be patched - at least in 2.4 - to work from windows GUIs: def _make_inheritable(self, handle): """Return a duplicate of handle, which is inheritable""" if handle==None: handle=-1 return DuplicateHandle(GetCurrentProcess(), handle

Antwort: Re: SubProcess _make_inheritable

2007-01-11 Thread Roland Puntaier
Thanks for pointing me to the tracker. I've seen there is already an entry for this: [ 1603907 ] subprocess: error redirecting i/o from non-console process Roland Gabriel Genellina <[EMAIL PROTECTED]> schrieb am 11.01.2007 05:24:03: > At Wednesday 10/1/2007 13:10, Roland

Re: how to mimik a main() function to start a program with entry point?

2007-01-19 Thread Roland Puntaier
ELF for Linux) Whether it is possible from python to make an import of a python module in a python package gone through py2exe, I cannot answer. But I think you mean how to tell py2exe, where the entry point is. Read: http://www.py2exe.org/index.cgi/Tutorial Roland [EMAIL PROTECTED] schrieb

Re: Introspection Class/Instance Name

2006-04-25 Thread Roland Heiber
y simple > > thx in advance > > ** Hi, take a look at self.__class__.__name__ for the Class-name. HtH, Roland -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >