Re: Problem with Dynamically unloading a module

2009-12-23 Thread Steve Holden
lordofcode wrote: > Hi All > > Not an expert in Python, so sorry if this sounds like a silly > question. > I went through other few threads in the mailing list but they are not > helping me much. > I have run into a problem related to dynamically loading and unloading > a module. > I need to dynam

Re: Threading with queues

2009-12-23 Thread Gib Bogle
Lie Ryan wrote: On 12/22/2009 10:47 AM, Gib Bogle wrote: This is indented over one indentation level too much. You want it to be at the same level as the for above. Here, its at the same level with "t" -- meaning this entire loop gets repeated five times. I sorta really recommend a tab width of

Re: Object Relational Mappers are evil (a meditation)

2009-12-23 Thread Steven D'Aprano
On Wed, 23 Dec 2009 20:11:25 -0500, Terry Reedy wrote: >>> Instead the accepted, idiomatic Python way of writing this was to use >>> short-circuit booleans: >>> >>> result = condition and x or y >>> >>> However this idiom is buggy! If x is a false-value (say, 0) then >>> result gets set to y no ma

wave robot notes

2009-12-23 Thread Aaron Watters
I implemented a Google Wave Robot which annotates BNF syntax rules using railroad diagram images. I put notes about the implementation process here for the benefit of posterity. http://listtree.appspot.com/firstWaveRobot The robot Id is whiff-gae-tutor...@appspot.com -- if you are using

Re: Problem with Dynamically unloading a module

2009-12-23 Thread Steven D'Aprano
On Wed, 23 Dec 2009 15:18:10 -0800, Carl Banks wrote: >> > # will unload mod1 assuming mod1 was the only reference to that >> > module. >> >> Which is highly unlikely. Any classes or functions from the module will >> keep the module alive. > > Actually, they won't. Neither classes nor functions

Re: Problem with Dynamically unloading a module

2009-12-23 Thread lordofcode
Hi All, Thanks you all for your replies ,cleared quiet a few doubts about importing modules and namespace references . Currently am going with static importing of all modules. But it may not be efficient in future as the number of interchangeable modules that I have to import may run in 30-40's.(B

Re: Object Relational Mappers are evil (a meditation)

2009-12-23 Thread Terry Reedy
Instead the accepted, idiomatic Python way of writing this was to use short-circuit booleans: result = condition and x or y However this idiom is buggy! If x is a false-value (say, 0) then result gets set to y no matter what the value of condition. This is only a bug if one expects otherwise

Re: creating ZIP files on the cheap

2009-12-23 Thread Emile van Sebille
On 12/23/2009 3:47 PM John Machin said... Is it maintainable? I.e. pretend that the next person to maintain your code knows where you live and owns a chainsaw. Oooh... that's much better than the finger guillotine and annual holiday-party finger count I normally threaten with... Emile -- h

Re: creating ZIP files on the cheap

2009-12-23 Thread John Machin
On Dec 24, 7:34 am, samwyse wrote: > I've got an app that's creating Open Office docs; if you don't know, > these are actually ZIP files with a different extension.  In my case, > like many other people, I generating from boilerplate, so only one > component (content.xml) of my ZIP file will ever

RE: Ironpython experience

2009-12-23 Thread Dino Viehland
Lev wrote: > I'm an on and off Python developer and use it as one of the tools. > Never for writing "full-blown" applications, but rather small, "one-of- > a-kind" utilities. This time I needed some sort of backup and > reporting utility, which is to be used by the members of our team > once or twi

Re: Problem with Dynamically unloading a module

2009-12-23 Thread Carl Banks
On Dec 23, 7:40 am, Steven D'Aprano wrote: > On Wed, 23 Dec 2009 13:37:06 +0100, Jean-Michel Pichavant wrote: > > 3/ if you really need to unload the previous module, it's a little bit > > tedious. > > > import mod1 > > del mod1 > > sys.modules['mod1'] = None > > Assigning sys.modules[name] to Non

Re: python 2.x and running shell command

2009-12-23 Thread Sean DiZazzo
On Dec 23, 1:57 pm, tekion wrote: > All, > some of the servers I have run python 2.2, which is a drag because I > can't use subprocess module.  My options that I know of is popen2 > module.  However, it seems it does not have io blocking > capabilities.   So every time run a command I have open an

strange geometry problem

2009-12-23 Thread Nick Buchholz
Hi all, I'm doing a GUI for describing connectors and the signals attached. the system runs on CentOS release 5.2 (FINAL) using python 2.5 and tcl/tk 8.4 I have a class Pin that contains two class attributes that are dialogs. They are built by a helper routine as follows: if type(Pi

Re: Problem with Dynamically unloading a module

2009-12-23 Thread Steven D'Aprano
On Wed, 23 Dec 2009 15:31:53 +0100, Jean-Michel Pichavant wrote: > Steven D'Aprano wrote: >> On Wed, 23 Dec 2009 13:37:06 +0100, Jean-Michel Pichavant wrote: >> >> >>> But believe me, you don't want to mess up with the python import >>> mechanism. >>> >>> >> Unless you understand how it

Re: Object Relational Mappers are evil (a meditation)

2009-12-23 Thread Steven D'Aprano
On Wed, 23 Dec 2009 10:55:19 -0500, J Kenneth King wrote: > Steven D'Aprano writes: > >> On Mon, 21 Dec 2009 11:44:29 -0500, J Kenneth King wrote: >> >>> A programmer that >>> lacks critical thinking is a bad programmer. The language they use >>> has no bearing on such human facilities. >> >> T

python 2.x and running shell command

2009-12-23 Thread tekion
All, some of the servers I have run python 2.2, which is a drag because I can't use subprocess module. My options that I know of is popen2 module. However, it seems it does not have io blocking capabilities. So every time run a command I have open and close a file handle. I have command that r

Re: More On the Strange Problem

2009-12-23 Thread Steven D'Aprano
On Wed, 23 Dec 2009 19:03:36 +, MRAB wrote: >> if whatDo == 'insert': >> theVal = defaultVal >> val = defaultVal >> > What's the difference between theVal and val? The names don't help me! Oh MRAB! Isn't it obvious? theVal has a leading definite article while val doesn't! R

Re: ISO all functions+methods+classes without docstring

2009-12-23 Thread Steven D'Aprano
On Wed, 23 Dec 2009 21:08:02 +, kj wrote: > I'm looking for a good way to get a listing of all the undocumented > (i.e. docstring-less) functions, classes, and methods as defined in a > (largish) library of files. > > What's a good way to get this information? list_of_modules = [] for modul

Re: creating ZIP files on the cheap

2009-12-23 Thread Lie Ryan
On 12/24/2009 7:34 AM, samwyse wrote: I've got an app that's creating Open Office docs; if you don't know, these are actually ZIP files with a different extension. In my case, like many other people, I generating from boilerplate, so only one component (content.xml) of my ZIP file will ever chan

Re: More On the Strange Problem

2009-12-23 Thread Lie Ryan
On 12/24/2009 8:00 AM, MRAB wrote: >>> print first_twin == second_twin True err... I don't think there is any situation where first_twin == second_twin wouldn't be considered a bug. They look similar, they act similar, and they quack the same; though you can almost always treat them the sa

ISO all functions+methods+classes without docstring

2009-12-23 Thread kj
I'm looking for a good way to get a listing of all the undocumented (i.e. docstring-less) functions, classes, and methods as defined in a (largish) library of files. What's a good way to get this information? TIA! -Kynn -- http://mail.python.org/mailman/listinfo/python-list

Re: force non-exponential representation for Decimal?

2009-12-23 Thread Mensanator
On Dec 23, 4:03 am, jh...@gmx.de wrote: > (cc-ing the list) > > > > Is there a convenient way to force a decimal.Decimal representation to > > not use exponential representation? > > > Which Python version are you using?  For Python 2.6 (and 3.1), the > > answer's yes.  For earlier Python verions,

Re: More On the Strange Problem

2009-12-23 Thread MRAB
Victor Subervi wrote: On Wed, Dec 23, 2009 at 3:03 PM, MRAB > wrote: Victor Subervi wrote: I've isolated the problem in the print-out at the bottom of this post. It occurs when these values are passed: ['LastDatePrice', 'date', '10

Re: creating ZIP files on the cheap

2009-12-23 Thread uticdmarceau2...@yahoo.ca
samwyse wrote: > I've got an app that's creating Open Office docs; if you don't know, > these are actually ZIP files with a different extension. In my case, > like many other people, I generating from boilerplate, so only one > component (content.xml) of my ZIP file will ever change. Instead of >

Re: Python-list Digest, Vol 75, Issue 226

2009-12-23 Thread r0g
Gabriel Genellina wrote: > En Tue, 22 Dec 2009 16:30:58 -0300, r0g > escribió: >> Gabriel Genellina wrote: >>> En Mon, 21 Dec 2009 16:30:13 -0300, Pulkit Agrawal >>> escribió: >>> I am writing a script wherein I need to merge files into existing tar.gz files. Currently, I am using

Re: [pygtk] cannot import glib in python shell

2009-12-23 Thread John Stowers
> > I think ideally what I'm requesting is to have the mingw/python/gtk > environments to be harmonized. I'm close. I can do the following: > python > import sys > import gtk > blah = gtk.Window(0) > blah.show() > , but when I do > import glib > ERROR!!! > if I cd to a certain dir in glib sourc

creating ZIP files on the cheap

2009-12-23 Thread samwyse
I've got an app that's creating Open Office docs; if you don't know, these are actually ZIP files with a different extension. In my case, like many other people, I generating from boilerplate, so only one component (content.xml) of my ZIP file will ever change. Instead of creating the entire ZIP

Re: More On the Strange Problem

2009-12-23 Thread uticdmarceau2...@yahoo.ca
Victor Subervi wrote: > On Wed, Dec 23, 2009 at 2:21 PM, Victor Subervi > wrote: > >> I've isolated the problem in the print-out at the bottom of this post. It >> occurs when these values are passed: >> >> ['LastDatePrice', 'date', '10', '/mm/dd', None], >> >> Since this is the first datetime

Re: [gtk-win32] cannot import glib in python shell

2009-12-23 Thread Tor Lillqvist
> , but when I do > import glib > ERROR!!! My Python knowledge is next to nil. You might get more help on some Python-specific list. Or even a pygtk-specific list. > if I cd to a certain dir in glib sources, there were two .py files, Wrong approach. And anyway, I find four .py files in current G

Re: More On the Strange Problem

2009-12-23 Thread Victor Subervi
On Wed, Dec 23, 2009 at 3:03 PM, MRAB wrote: > Victor Subervi wrote: > >> I've isolated the problem in the print-out at the bottom of this post. It >> occurs when these values are passed: >> >> ['LastDatePrice', 'date', '10', '/mm/dd', None], >> >> Since this is the first datetime that is pas

Re: More On the Strange Problem

2009-12-23 Thread Emile van Sebille
On 12/23/2009 10:21 AM Victor Subervi said... printed out. This is the code: print 'printTheForm: ', descrProds, '' for value in descrProds: print 'value: ', value, '' Why not try this in a fashion more likely to succeed... import cgi for value in descrProds: print 'value: %s '

Re: More On the Strange Problem

2009-12-23 Thread Carsten Haese
Victor Subervi wrote: > [...] > If in fact the problem has to do with the None value, how can I easily > substitute a different value? I tried: > > if theVal == None: > theVal = '' > > but that didn't capture it. That indicates one of two things: * Your problem is not caused by the None value.

Re: More On the Strange Problem

2009-12-23 Thread MRAB
Victor Subervi wrote: I've isolated the problem in the print-out at the bottom of this post. It occurs when these values are passed: ['LastDatePrice', 'date', '10', '/mm/dd', None], Since this is the first datetime that is passed, it would appear to be associated with such values, which a

Re: More On the Strange Problem

2009-12-23 Thread Victor Subervi
On Wed, Dec 23, 2009 at 2:21 PM, Victor Subervi wrote: > I've isolated the problem in the print-out at the bottom of this post. It > occurs when these values are passed: > > ['LastDatePrice', 'date', '10', '/mm/dd', None], > > Since this is the first datetime that is passed, it would appear to

cannot import glib in python shell

2009-12-23 Thread uticdmarceau2...@yahoo.ca
Hello everyone, I'm trying to document a recipe to get the anomos python sources running on winxp Pentium3 laptop. I've installed the latest 2.6 python/mingw/msys/gtk and related binaries(glib, etc...) This link has all the information about running anomos python sources on a linux box: http://a

More On the Strange Problem

2009-12-23 Thread Victor Subervi
I've isolated the problem in the print-out at the bottom of this post. It occurs when these values are passed: ['LastDatePrice', 'date', '10', '/mm/dd', None], Since this is the first datetime that is passed, it would appear to be associated with such values, which are processed thus: el

Re: Object Relational Mappers are evil (a meditation)

2009-12-23 Thread J Kenneth King
Steven D'Aprano writes: > On Mon, 21 Dec 2009 11:44:29 -0500, J Kenneth King wrote: > >> A programmer that >> lacks critical thinking is a bad programmer. The language they use has >> no bearing on such human facilities. > > That's nonsense, and I can demonstrate it by reference to a single > p

Re: Problem with Dynamically unloading a module

2009-12-23 Thread Jean-Michel Pichavant
Steven D'Aprano wrote: On Wed, 23 Dec 2009 13:37:06 +0100, Jean-Michel Pichavant wrote: 3/ if you really need to unload the previous module, it's a little bit tedious. import mod1 del mod1 sys.modules['mod1'] = None Assigning sys.modules[name] to None is not the same as deleting the

Re: Clustering technique

2009-12-23 Thread Taliesin Nuin
Luca wrote: Dear all, excuse me if i post a simple question.. I am trying to find a software/algorythm that can "cluster" simple data on an excel sheet Example: Variable a Variable b Variable c Case 11 0 0 Case 20

Mechanize/ClientForm - How to select IgnoreControl button and submit form

2009-12-23 Thread Brian D
All, I'm hoping to implement a project that will be historically transformational by mapping inequalities in property assessments. I'm stuck at step one: Scrape data from http://www.opboa.org. The site uses a bunch of hidden controls. I can't find a way to get past the initial disclaimer page be

Re: Problem with Dynamically unloading a module

2009-12-23 Thread Jean-Michel Pichavant
Steven D'Aprano wrote: On Wed, 23 Dec 2009 13:37:06 +0100, Jean-Michel Pichavant wrote: But believe me, you don't want to mess up with the python import mechanism. Unless you understand how it works. Let me quote the OP: 'Not an expert in Python' I was just answering the OP ques

Re: code review

2009-12-23 Thread Lie Ryan
On 12/23/2009 11:02 PM, Zubin Mithra wrote: Hello, I`m pretty new to developing applications using python and i would like advance on this script i recently created which helps linux programmers on the linux terminal. The code is very simple to understand(i hope) and serves a simple purpose; how

Re: ImportError in eric4

2009-12-23 Thread rhill
Steven D'Aprano wrote: On Wed, 23 Dec 2009 11:02:25 -0200, rhill wrote: Why is the file ./ui/MainWindow.py not seen by the python interpreter? My wild guess is that you haven't set up a package correctly. You need to include a file __init__.py in the ui folder for Python to recognise it cor

ANNOUNCE: libmsgque-4.1, PLMK-1.2, NHI1-0.3

2009-12-23 Thread Andreas Otto
Dear User, ANNOUNCE: Christmas-Present-Release libmsgque: Application-Server-Toolkit for C, C++, JAVA, C#, TCL, PERL, PYTHON, VB.NET PLMK: Programming-Language-Microkernel NHI1: Non-Human-Intelligence #1 SUMMARY === libm

Re: ImportError in eric4

2009-12-23 Thread Steven D'Aprano
On Wed, 23 Dec 2009 11:02:25 -0200, rhill wrote: > Why is the file ./ui/MainWindow.py not seen by the python interpreter? My wild guess is that you haven't set up a package correctly. You need to include a file __init__.py in the ui folder for Python to recognise it correctly. Note that the fil

Re: Problem with Dynamically unloading a module

2009-12-23 Thread Steven D'Aprano
On Wed, 23 Dec 2009 01:41:27 -0800, lordofcode wrote: > I need to dynamically load a module and unload it and load another > module. Why bother unloading it? Unless you're programming for an embedded device, it's highly unlikely that you're so strapped for memory that a module will make any rea

Re: Problem with Dynamically unloading a module

2009-12-23 Thread Steven D'Aprano
On Wed, 23 Dec 2009 13:37:06 +0100, Jean-Michel Pichavant wrote: > 3/ if you really need to unload the previous module, it's a little bit > tedious. > > import mod1 > del mod1 > sys.modules['mod1'] = None Assigning sys.modules[name] to None is not the same as deleting the entry. None has speci

ImportError in eric4

2009-12-23 Thread rhill
I am new to Linux/Python/Eric4 (not in development though). So I am trying to start a small application as per tutorial found at eric-ide.python-projects.org: http://eric-ide.python-projects.org/tutorials/LogParser/chap1.html My application is similarly structured. Final step, I try to execut

Re: Problem with Dynamically unloading a module

2009-12-23 Thread Jean-Michel Pichavant
Jean-Michel Pichavant wrote: lordofcode wrote: Hi All Not an expert in Python, so sorry if this sounds like a silly question. I went through other few threads in the mailing list but they are not helping me much. I have run into a problem related to dynamically loading and unloading a module. I

Re: Re: force non-exponential representation for Decimal?

2009-12-23 Thread jholg
-- sorry if this comes out-of-thread-line but I forgot to enable mailing list delivery :-( -- > I can't help wondering what you're doing with numbers that small. > 2.34e-19 looks an awful lot like 0 for many practical purposes... Just an arbitrary example to show the behaviour. As I don't have

GZRBOT 0.1 released

2009-12-23 Thread Bart Thate
Hi world ! First of all happy christmas and a happy new year to all of you. I want to release GZRBOT to the world. This is a rename of the CMNDBOT bot, since this name matches the one of GOZERBOT the best and thats what this bot is best described .. GOZERBOT on the Google Application Engine. So

Re: Problem with Dynamically unloading a module

2009-12-23 Thread Jean-Michel Pichavant
lordofcode wrote: Hi All Not an expert in Python, so sorry if this sounds like a silly question. I went through other few threads in the mailing list but they are not helping me much. I have run into a problem related to dynamically loading and unloading a module. I need to dynamically load a mo

Re: code review

2009-12-23 Thread Jean-Michel Pichavant
Zubin Mithra wrote: Hello, I`m pretty new to developing applications using python and i would like advance on this script i recently created which helps linux programmers on the linux terminal. The code is very simple to understand(i hope) and serves a simple purpose; however i am not sure if my

code review

2009-12-23 Thread Zubin Mithra
Hello, I`m pretty new to developing applications using python and i would like advance on this script i recently created which helps linux programmers on the linux terminal. The code is very simple to understand(i hope) and serves a simple purpose; however i am not sure if my way of scripting is t

Re: syntax error : first python program

2009-12-23 Thread Ben Finney
Anssi Saari writes: > At least here with Python 2.5.2 I get "IndentationError: unexpected > indent". I'm just wondering why would the OP get a SyntaxError? $ python2.4 -c ' pass' File "", line 1 pass ^ SyntaxError: invalid syntax $ python2.5 -c ' pass' File "", line 1 pass ^

Re: python gtk: input box and "enter"

2009-12-23 Thread edgue
On Dec 23, 12:33 pm, Nobody wrote: > self.entry.connect("activate", self.click) Does the job. Thank you very much! -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with win32ui

2009-12-23 Thread Simon Hibbs
On 23 Dec, 11:10, Marc Grondin wrote: > On 22/12/2009 1:05 PM, Gabriel Genellina wrote: > > > En Tue, 22 Dec 2009 12:31:37 -0300, Marc Grondin > > escribi : > > >> Hello everyone, > >> So i have been building an app with python(and learning as i go along) my > >> knowledge of python is still kind

Re: python gtk: input box and "enter"

2009-12-23 Thread Nobody
On Tue, 22 Dec 2009 23:41:31 -0800, edgue wrote: > How do I use gtk to enter a (hidden) text press ENTER ... done? Connect the gtk.Entry's "activate" signal to the click() method: self.entry.connect("activate", self.click) -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with win32ui

2009-12-23 Thread Marc Grondin
On 22/12/2009 1:05 PM, Gabriel Genellina wrote: En Tue, 22 Dec 2009 12:31:37 -0300, Marc Grondin escribió: Hello everyone, So i have been building an app with python(and learning as i go along) my knowledge of python is still kinda limited but the app work on my pc. I have also compiled it to

Re: Problem with Dynamically unloading a module

2009-12-23 Thread Lie Ryan
On 12/23/2009 8:41 PM, lordofcode wrote: Hi All Not an expert in Python, so sorry if this sounds like a silly question. I went through other few threads in the mailing list but they are not helping me much. I have run into a problem related to dynamically loading and unloading a module. I need t

Re: numpy performance and random numbers

2009-12-23 Thread Peter Pearson
On Sun, 20 Dec 2009 21:02:02 -0800, Rami Chowdhury wrote: > > On Dec 20, 2009, at 17:41 , Peter Pearson wrote: > >> Why not use a good cipher, such as AES, to generate a pseudorandom >> bit stream by encrypting successive integers? > > Isn't the Fortuna PRNG based around that approximate concept?

Re: Ironpython

2009-12-23 Thread Propad
On Dec 23, 6:20 am, Lev wrote: > Is this a correct group to talk about Ironpython? If not, please tell > which is? The group for IronPython specific issues is: http://lists.ironpython.com/listinfo.cgi/users-ironpython.com It's quite active and helpfull. Cheers, Nenad -- http://mail.python.org

Re: force non-exponential representation for Decimal?

2009-12-23 Thread Mark Dickinson
On Dec 23, 10:03 am, jh...@gmx.de wrote: > (cc-ing the list) Thanks. Looks like I'm still having trouble distinguishing between 'Reply' and 'Reply to author'. I'll have to work on my reading abilities over the break... > > > Is there a convenient way to force a decimal.Decimal representation to

Re: Strange Problem

2009-12-23 Thread Victor Subervi
On Tue, Dec 22, 2009 at 5:14 PM, Dave Angel wrote: > Victor Subervi wrote: > >> Hi; >> I have the following code: >> >> print 'printTheForm: ', descrProds, '' >> for value in descrProds: >>print 'value: ', value, '' >> >> which prints this: >> >> printTheForm: [['ID', 'tinyint', '5', '0', N

Re: force non-exponential representation for Decimal?

2009-12-23 Thread jholg
(cc-ing the list) > > Is there a convenient way to force a decimal.Decimal representation to > not use exponential representation? > > Which Python version are you using? For Python 2.6 (and 3.1), the > answer's yes. For earlier Python verions, I don't think so. In > Python 2.6, use new-style

mayavi2 install win32

2009-12-23 Thread Paz
I have been using mayavi2 for a while on my linux box but I would like to install it on my laptop (win32) so I can work from home and I am having trouble with vtk or its bindings. Has anybody had the same problem and managed to get round that ? Thanks, Paz -- http://mail.python.org/mailman/listin

Re: syntax error : first python program

2009-12-23 Thread Anssi Saari
Ben Finney writes: >> bash# /usr/bin/python sample.py >> File "sample.py", line 2 >> name = "blah" >> ^ >> SyntaxError: invalid syntax > > Indentation is syntax in Python. At least here with Python 2.5.2 I get "IndentationError: unexpected indent". I'm just wondering why would the OP g

Problem with Dynamically unloading a module

2009-12-23 Thread lordofcode
Hi All Not an expert in Python, so sorry if this sounds like a silly question. I went through other few threads in the mailing list but they are not helping me much. I have run into a problem related to dynamically loading and unloading a module. I need to dynamically load a module and unload it a

Re: Retrieving exception value in C

2009-12-23 Thread Gabriel Genellina
En Wed, 23 Dec 2009 04:24:04 -0300, swapnil escribió: I am trying to retrieve the value of the exception (the message part) raised in python, in C. But if I run (actually import) the script from within a C code (embedding python in C), I am able to get the exception object but not the value.

Re: force non-exponential representation for Decimal?

2009-12-23 Thread Peter Otten
jh...@gmx.de wrote: > I need to convert Python decimal.Decimal data to the XMLSchema xs:decimal > datatype. This is reasonably straightforward, but there are some corner > cases. > > In particular, xs:decimal does not allow exponential notation like: > print Decimal('0.00234

Re: Python (and me) getting confused finding keys

2009-12-23 Thread John
> The lesson of this? Do not make mutable classes hashable. That could be it! I'll try. Thanks a lot! > The obvious follow-up is to ask how to make an immutable class. > > http://northernplanets.blogspot.com/2007/01/immutable-instances-in-python.h > tml > -- http://mail.python.org/mailman/lis

Re: syntax error : first python program

2009-12-23 Thread Bearophile
Ben Finney: > > bash# /usr/bin/python sample.py > >   File "sample.py", line 2 > >     name = "blah" > >     ^ > > SyntaxError: invalid syntax > > Indentation is syntax in Python. But I agree, a little better error message may help there, something that contains "indentation" in it :-) Bye, bear

Ironpython experience

2009-12-23 Thread Lev
I'm an on and off Python developer and use it as one of the tools. Never for writing "full-blown" applications, but rather small, "one-of- a-kind" utilities. This time I needed some sort of backup and reporting utility, which is to be used by the members of our team once or twice a day. Execution t

force non-exponential representation for Decimal?

2009-12-23 Thread jholg
(re-posting this because of missing subject - sorry for the hassle) Hi, I need to convert Python decimal.Decimal data to the XMLSchema xs:decimal datatype. This is reasonably straightforward, but there are some corner cases. In particular, xs:decimal does not allow exponential notation like: >