soap library for python-3.x

2014-04-25 Thread Deepika Nagpal
Hi, We have to start a project of developing a soap server in python-3.x for which I am looking for a soap server side library. Please let me know what are the options available and which of these libraries are actively maintained. Thanks. Regards, Deepika Nagpal -

RE: Executing pl/sql script File in python without sqlclient

2014-04-25 Thread Joseph L. Casale
> Is there a way to execute pl/sql Script files through Python without > sqlclient. https://code.google.com/p/pypyodbc/ might work for you... > i have checked cx_oracle and i guess it requires oracle client, so is there a > way to execute without oracle client. Right, as the name implies it us

how to split this kind of text into sections

2014-04-25 Thread oyster
I have a long text, which should be splitted into some sections, where all sections have a pattern like following with different KEY. And the /n/r can not be used to split I don't know whether this can be done easily, for example by using RE module [demo text starts] a line we do not need I am se

Re: how to split this kind of text into sections

2014-04-25 Thread Roy Smith
In article , oyster wrote: > I have a long text, which should be splitted into some sections, where > all sections have a pattern like following with different KEY. And the /n/r > can not be used to split > > I don't know whether this can be done easily, for example by using RE module > > [dem

Re: how to split this kind of text into sections

2014-04-25 Thread Chris Angelico
On Fri, Apr 25, 2014 at 11:07 PM, oyster wrote: > the above text should be splitted as a LIST with 3 items, and I also need to > know the KEY for LIST is ['I am section', 'let's continue', 'I am using']: It's not perfectly clear, but I think I have some idea of what you're trying to do. Let me re

MacOS 10.9.2: threading error using python.org 2.7.6 distribution

2014-04-25 Thread Matthew Pounsett
I've run into a threading error in some code when I run it on MacOS that works flawlessly on a *BSD system running the same version of python. I'm running the python 2.7.6 for MacOS distribution from python.org's downloads page. I have tried to reproduce the error with a simple example, but so

Re: soap library for python-3.x

2014-04-25 Thread Ben Finney
"Deepika Nagpal" writes: > We have to start a project of developing a soap server in python-3.x > for which I am looking for a soap server side library. Please let me > know what are the options available and which of these libraries are > actively maintained. Thanks. You can start with https://

Re: MacOS 10.9.2: threading error using python.org 2.7.6 distribution

2014-04-25 Thread Chris Angelico
On Fri, Apr 25, 2014 at 11:43 PM, Matthew Pounsett wrote: > If I insert that object into the test code and run it instead of MyThread(), > I get the error. I can't see anything in there that should cause problems > for the threading module though... especially since this runs fine on another >

len() of unsized object - ks test

2014-04-25 Thread Jamie Mitchell
Hello all, I am trying to perform a Kolmogorov-Smirnov test in Python but I'm having a few difficulties. # My files are netCDF so I import them as follows: control=netCDF4.Dataset('/data/cr1/jmitchel/Q0/swh/controlperiod/south_west/swhcontrol_swest_concatannavg_1D.nc','r') # The string is simp

Re: how to split this kind of text into sections

2014-04-25 Thread Tim Chase
On 2014-04-25 23:31, Chris Angelico wrote: > On Fri, Apr 25, 2014 at 11:07 PM, oyster > wrote: > > the above text should be splitted as a LIST with 3 items, and I > > also need to know the KEY for LIST is ['I am section', 'let's > > continue', 'I am using']: > > It's not perfectly clear, but I th

Re: len() of unsized object - ks test

2014-04-25 Thread MRAB
On 2014-04-25 15:07, Jamie Mitchell wrote: Hello all, I am trying to perform a Kolmogorov-Smirnov test in Python but I'm having a few difficulties. # My files are netCDF so I import them as follows: control=netCDF4.Dataset('/data/cr1/jmitchel/Q0/swh/controlperiod/south_west/swhcontrol_swest_c

Re: how to split this kind of text into sections

2014-04-25 Thread Jussi Piitulainen
oyster writes: > I have a long text, which should be splitted into some sections, where > all sections have a pattern like following with different KEY. itertools.groupby, if you know how to extract a key from a given line. > And the /n/r can not be used to split Yet you seem to want to have ea

Re: how to split this kind of text into sections

2014-04-25 Thread Steven D'Aprano
On Fri, 25 Apr 2014 21:07:53 +0800, oyster wrote: > I have a long text, which should be splitted into some sections, where > all sections have a pattern like following with different KEY. And the > /n/r can not be used to split > > I don't know whether this can be done easily, for example by usin

Re: len() of unsized object - ks test

2014-04-25 Thread Steven D'Aprano
On Fri, 25 Apr 2014 07:07:54 -0700, Jamie Mitchell wrote: > Hello all, > > I am trying to perform a Kolmogorov-Smirnov test in Python but I'm > having a few difficulties. > > # My files are netCDF so I import them as follows: > > control=netCDF4.Dataset('/data/cr1/jmitchel/Q0/swh/controlperiod/

Re: how to split this kind of text into sections

2014-04-25 Thread Steven D'Aprano
On Fri, 25 Apr 2014 09:18:22 -0400, Roy Smith wrote: > In article , > oyster wrote: >> [demo text starts] >> a line we do not need >> I am section axax >> I am section bbb, we can find that the first 2 lines of this section >> all startswith 'I am section' >> .(and here goes many other text

Re: len() of unsized object - ks test

2014-04-25 Thread Jamie Mitchell
On Friday, April 25, 2014 3:07:54 PM UTC+1, Jamie Mitchell wrote: > Hello all, > > > > I am trying to perform a Kolmogorov-Smirnov test in Python but I'm having a > few difficulties. > > > > # My files are netCDF so I import them as follows: > > > > control=netCDF4.Dataset('/data/cr1/jmit

possible bug in re expression?

2014-04-25 Thread Robin Becker
Whilst translating some javascript code I find that this A=re.compile('.{1,+3}').findall(p) doesn't give any error, but doesn't manage to find the strings in p that I want len(A)==>0, the correct translation should have been A=re.compile('.{1,3}').findall(p) which works fine. should re.com

Re: possible bug in re expression?

2014-04-25 Thread Chris Angelico
On Sat, Apr 26, 2014 at 2:30 AM, Robin Becker wrote: > Whilst translating some javascript code I find that this > > A=re.compile('.{1,+3}').findall(p) > > doesn't give any error, but doesn't manage to find the strings in p that I > want len(A)==>0, the correct translation should have been > > A=re

Re: Moving to an OOP model from an classically imperitive one

2014-04-25 Thread Amirouche Boubekki
Héllo, I have no definitive answer regarding the OOP/functional mismatch. 2014-04-24 18:53 GMT+02:00 : > > A reasonable compromise might be to keep the *data* assocated > > > > with a SubuserProgram in a class, maybe together with a few > > > > methods that are tightly coupled to it, but have th

Re: retrieve source code from code object as returned by compile()

2014-04-25 Thread Amirouche Boubekki
in python3, I do inspect.getsource(object) [doc], I don't know the limitations. On Python 2, there is meta . My interest is different, I use to retrieve the definition of function to submit it to

Re: how to split this kind of text into sections

2014-04-25 Thread Terry Reedy
On 4/25/2014 9:07 AM, oyster wrote: I have a long text, which should be splitted into some sections, where all sections have a pattern like following with different KEY. Computers are worse at reading your mind than humans. If you can write rules that another person could follow, THEN we could

Proper deletion of selected items during map iteration in for loop

2014-04-25 Thread Charles Hixson
What is the proper way to delete selected items during iteration of a map? What I want to do is: for (k, v) in m.items(): if f(k): # do some processing of v and save result elsewhere del m[k] But this gives (as should be expected): RuntimeError: dictionary changed size

Re: possible bug in re expression?

2014-04-25 Thread MRAB
On 2014-04-25 17:55, Chris Angelico wrote: On Sat, Apr 26, 2014 at 2:30 AM, Robin Becker wrote: Whilst translating some javascript code I find that this A=re.compile('.{1,+3}').findall(p) doesn't give any error, but doesn't manage to find the strings in p that I want len(A)==>0, the correct t

Re: Proper deletion of selected items during map iteration in for loop

2014-04-25 Thread Chris Angelico
On Sat, Apr 26, 2014 at 3:53 AM, Charles Hixson wrote: > What is the proper way to delete selected items during iteration of a map? > What I want to do is: > > for (k, v) in m.items(): >if f(k): > # do some processing of v and save result elsewhere > del m[k] > > But this gives (a

Re: Proper deletion of selected items during map iteration in for loop

2014-04-25 Thread Matthew Barnett
On 2014-04-25 18:53, Charles Hixson wrote: What is the proper way to delete selected items during iteration of a map? What I want to do is: for (k, v) in m.items(): if f(k): # do some processing of v and save result elsewhere del m[k] But this gives (as should be expected

Re: possible bug in re expression?

2014-04-25 Thread Terry Reedy
On 4/25/2014 12:30 PM, Robin Becker wrote: Whilst translating some javascript code I find that this A=re.compile('.{1,+3}').findall(p) doesn't give any error, but doesn't manage to find the strings in p that I want len(A)==>0, the correct translation should have been A=re.compile('.{1,3}').fin

Re: xlutils 1.7.1 released!

2014-04-25 Thread Chris Withers
*sigh* subject line fail... On 25/04/2014 19:48, Chris Withers wrote: Hi All, I'm pleased to announce the release of xlutils 1.7.1: http://pypi.python.org/pypi/xlutils/1.7.1 This release has a couple of small changes: - Add support for time cells in when using View classes. - Add support fo

Re: Proper deletion of selected items during map iteration in for loop

2014-04-25 Thread Terry Reedy
On 4/25/2014 2:04 PM, Matthew Barnett wrote: On 2014-04-25 18:53, Charles Hixson wrote: What is the proper way to delete selected items during iteration of a map? What I want to do is: for (k, v) in m.items(): if f(k): # do some processing of v and save result elsewhere d

xlutils 1.7.0 released!

2014-04-25 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlutils 1.7.1: http://pypi.python.org/pypi/xlutils/1.7.1 This release has a couple of small changes: - Add support for time cells in when using View classes. - Add support for ``.xlsx`` files when using View classes, at the expense of formattin

Re: MacOS 10.9.2: threading error using python.org 2.7.6 distribution

2014-04-25 Thread Ned Deily
In article , Chris Angelico wrote: > On Fri, Apr 25, 2014 at 11:43 PM, Matthew Pounsett > wrote: > > If I insert that object into the test code and run it instead of > > MyThread(), I get the error. I can't see anything in there that should > > cause problems for the threading module though

Re: Proper deletion of selected items during map iteration in for loop

2014-04-25 Thread Tim Chase
On 2014-04-25 14:50, Terry Reedy wrote: > If you expect to delete more than half the keys *and* if there are > no other references to the dict, such that you need the particular > object mutated, this might be better. If that's your precondition, then it might be better to do something like kee

Re: Installing PyGame?

2014-04-25 Thread Gregory Ewing
Ned Deily wrote: I disagree that installing a bunch of disparate software from various sources via binary installers and/or source is to be preferred to a modern third-party package manager on OS X like MacPorts or Homebrew. That's just setting yourself up for a long-term maintenance headache

Re: Installing PyGame?

2014-04-25 Thread Gregory Ewing
Ryan Hiebert wrote: > I've chosen to use MacPorts because it keeps things separate, because when things get hosed using the system libraries, I don't have to erase my whole system to get back to a "vanilla" OS X install. I don't know what you're doing to hose your system that badly. I've neve

Re: retrieve source code from code object as returned by compile()

2014-04-25 Thread Gregory Ewing
Amirouche Boubekki wrote: in python3, I do inspect.getsource(object) [doc ], I don't know the limitations. The limitation relevant here is that it requires the original source file to be present. :-) -- Greg -- https://mail.pyt

feedparser error

2014-04-25 Thread tad na
python 2.7.2 The following code has an error and I can not figure out why: import feedparser d = feedparser.parse('http://bl.ocks.org/mbostock.rss') numb = len(d['entries']) for post in d.entries: print post.pubDate+"\n" --- the error is : print post.pubD

Using Python to get push notifications from an RSS feed?

2014-04-25 Thread John Salerno
As a little project for myself (and to help get immediate player notes for my fantasy baseball team), I'm wondering what modules I might need to do this. Basically, I'd like to get immediate notification when a new player note has been added to an RSS feed. Since it will only be for specified p

Play back and record sound *at the same time* for n seconds

2014-04-25 Thread tfischer . ncku
Hello, to program an art project that involves sound feedback I need a way to get a python script to to play back and to record sound *at the same time* for n seconds. Which strategy/sound module would you recommend, and could you post dummy code that shows how to get it to play and record simult

Re: Play back and record sound *at the same time* for n seconds

2014-04-25 Thread Ben Finney
tfischer.n...@gmail.com writes: > to program an art project that involves sound feedback I need a way to > get a python script to to play back and to record sound *at the same > time* for n seconds. This is largely unrelated to whether you use Python. Rather, you need to know what operating syste

Help with changes in traceback stack from Python 2.7 to Python 3.x

2014-04-25 Thread Andrew Konstantaras
I wrote the following code that works in Python 2.7 that takes the variables passed to the function into a dictionary. The following call: strA = 'a' intA = 1 dctA = makeDict(strA, intA) produces the following dictionary: {'strA':'a', 'intA':1} To access the names passed int