Re: how to create a soap enveloppe with python suds for consume a bssv web service

2015-01-07 Thread dieter
brice DORA writes: > Hi all I am working on a app in python and I have to call a web service > deployed on JDE (bssv). I use it for the suds lib which seems pretty > friendly. but the problem is the JDE web service that uses bssv technology > necessarily requires sending a soap envelope. as fa

Re: Announce: PyPrimes 0.2.1a

2015-01-07 Thread Christian Gollwitzer
Hi Steve, Am 08.01.15 um 05:35 schrieb Steven D'Aprano: At long last, I am pleased to announce the latest version of PyPrimes, a pure Python package for working with prime numbers. Nice. PyPrimes is compatible with Python 2 and 3, and includes multiple algorithms for the generating and testi

Re: PyGILState API and Py_Main

2015-01-07 Thread dieter
Adrien Bruneton writes: > I am having a hard time understanding what is the proper use of > PyGILState_Ensure/Release. > My understanding is that one should always be matched with the other, > and that this high level API auto-magically deals with the ThreadState > creation. > > However the follo

Re: Announce: PyPrimes 0.2.1a

2015-01-07 Thread Ben Finney
Steven D'Aprano writes: > (Note: pip may have problems downloading the right version if you > don't specify a version number.) > > Or you can access the latest development version: > > hg clone https://code.google.com/p/pyprimes/ The source has a ‘CHANGES.txt’ file which has no entry later t

Re: Comparisons and sorting of a numeric class....

2015-01-07 Thread Marko Rauhamaa
Steven D'Aprano : > Marko Rauhamaa wrote: >> I prefer the Scheme way: >>#f is a falsey object >>everything else is a truthy object > > The Scheme way has no underlying model of what truthiness represents, just > an arbitrary choice to make a single value have one truthiness, and > everythi

Announce: PyPrimes 0.2.1a

2015-01-07 Thread Steven D'Aprano
At long last, I am pleased to announce the latest version of PyPrimes, a pure Python package for working with prime numbers. PyPrimes is compatible with Python 2 and 3, and includes multiple algorithms for the generating and testing of prime numbers, including the Sieve of Eratosthenes, Croft S

Re: Playing with threads

2015-01-07 Thread Terry Reedy
On 1/7/2015 9:00 PM, Ganesh Pal wrote: Hi friends, I'm trying to use threads to achieve the below work flow 1. Start a process , while its running grep for a string 1 2. Apply the string 1 to the command in step 1 and exit step 2 3. Monitor the stdout of step1 and print success if the is patte

Re: application console with window

2015-01-07 Thread Emil Oppeln-Bronikowski
On Wed, Jan 07, 2015 at 10:17:09PM +0100, adam wrote: > Is in here maybe someone who speak Polish? Mówię, a raczej piszę. > I'm looking for some libs, tutorials, or other informations. This is terminal application using (n)curses or smilar library that helps you draw & interact with windows, fo

Re: Playing with threads

2015-01-07 Thread Chris Angelico
On Thu, Jan 8, 2015 at 1:00 PM, Ganesh Pal wrote: > I'm trying to use threads to achieve the below work flow > > 1. Start a process , while its running grep for a string 1 > 2. Apply the string 1 to the command in step 1 and exit step 2 > 3. Monitor the stdout of step1 and print success if the is

Re: Playing with threads

2015-01-07 Thread Dave Angel
On 01/07/2015 09:00 PM, Ganesh Pal wrote: Hi friends, I'm trying to use threads to achieve the below work flow 1. Start a process , while its running grep for a string 1 2. Apply the string 1 to the command in step 1 and exit step 2 3. Monitor the stdout of step1 and print success if the is pa

Re: Playing with threads

2015-01-07 Thread Devin Jeanpierre
I can't tell what you mean, but you can start a process via subprocess.Popen, do some work, and wait for it to finish. https://docs.python.org/2/library/subprocess.html Note that you don't need the stdout (or likely the stdin) of the process, you just need the return code -- whether or not grep su

Playing with threads

2015-01-07 Thread Ganesh Pal
Hi friends, I'm trying to use threads to achieve the below work flow 1. Start a process , while its running grep for a string 1 2. Apply the string 1 to the command in step 1 and exit step 2 3. Monitor the stdout of step1 and print success if the is pattern found Questions: 1. Can the above b

Re: pickle, modules, and ImportErrors

2015-01-07 Thread Chris Angelico
On Thu, Jan 8, 2015 at 11:23 AM, John Ladasky wrote: >> P.S. don't use pickle, it is a security vulnerability equivalent in >> severity to using exec in your code, and an unversioned opaque >> schemaless blob that is very difficult to work with when circumstances >> change. > > For all of its shor

Re: pickle, modules, and ImportErrors

2015-01-07 Thread John Ladasky
On Wednesday, January 7, 2015 12:56:29 PM UTC-8, Devin Jeanpierre wrote: [snip] > If you never run model directly, and only ever import it or run it as > my_svr.model, then you will be fine, and pickles will all serialize > and deserialize the same way. Thank you Devin... I re-ran TrainingSessio

Re: Comparisons and sorting of a numeric class....

2015-01-07 Thread Ethan Furman
On 01/06/2015 07:37 PM, Andrew Robinson wrote: > Explain; How does mere subclassing of bool break the contract that bool has? > eg: What method or data would the superclass have that my subclass would not? bool's contract is that there are only two values (True and False) and only one instance e

Re: Comparisons and sorting of a numeric class....

2015-01-07 Thread Steven D'Aprano
Marko Rauhamaa wrote: > Steven D'Aprano : > >> int 0 is a falsey object >> NoneType None is a falsey object >> str 'hello' is a truthy object >> float 23.0 is a truthy object > > I prefer the Scheme way: > >#f is a falsey object > >everything else is a truthy object The Scheme way ha

Re: application console with window

2015-01-07 Thread jacek pozniak
adam wrote: > Is in here maybe someone who speak Polish? > > I would like to write application witch looks like this > http://linuxiarze.pl/obrazy/internet1/ceni1.png Jeśli chodzi Ci o przeniesienie na wersję okienkową to na przykład: tkinter. jp > > I'm looking for some libs, tutorials, or ot

application console with window

2015-01-07 Thread adam
Is in here maybe someone who speak Polish? I would like to write application witch looks like this http://linuxiarze.pl/obrazy/internet1/ceni1.png I'm looking for some libs, tutorials, or other informations. I'm searching this informations for python3. adam -- https://mail.python.org/mailman/l

Re: pickle, modules, and ImportErrors

2015-01-07 Thread Ian Kelly
On Wed, Jan 7, 2015 at 1:12 PM, John Ladasky wrote: > Do I need to "import my_svr.model as model" then? Adding that line changes > nothing. I get the exact same "ImportError: No module named 'model'". > > Likewise for "import my_svr", "from my_svr import *", or even "from > my_svr.model import

Re: pickle, modules, and ImportErrors

2015-01-07 Thread Devin Jeanpierre
On Wed, Jan 7, 2015 at 2:12 PM, John Ladasky wrote: > If I execute "import my_svr" in an iPython interpreter, everything works as I > think that I should expect: -snip- > However, a nearly-identical program in the parent folder fails (note that all > I change is the relative path to the file): >

pickle, modules, and ImportErrors

2015-01-07 Thread John Ladasky
I am progressing towards organizing a recent project of mine as a proper Python package. It is not a huge package, about 700 lines of code so far. But it breaks into logical pieces, and I don't feel like scrolling back and forth through a 700-line file. I am running Python 3.4.0 on Ubuntu 14.

Re: include "icudt53.dll, icuin53.dll, icuuc53.dll" ?

2015-01-07 Thread Albert-Jan Roskam
On Wed, Jan 7, 2015 2:09 PM CET Timothy W. Grove wrote: >Does anyone have an idea of what the following .dll's are for? Cx_freeze >includes them in a Python3.4-PyQt5 deployment adding about 23 Mb to my >application. Removing them doesn't appear to make any differenc

Re: String character encoding when converting data from one type/format to another

2015-01-07 Thread Dave Angel
On 01/07/2015 08:38 AM, Jacob Kruger wrote: Thanks. Makes more sense now, and yes, using 2.7 here. Unfortunately, while could pass the binary values into blob fields well enough, using forms of parameterised statements, the actual generation of sql script text files is a step they want to work

Re: String character encoding when converting data from one type/format to another

2015-01-07 Thread Dave Angel
On 01/07/2015 08:32 AM, Jacob Kruger wrote: Thanks. Please don't top-post. Put your responses after each quoted part you're responding to. And if there are parts you're not responding to, please delete them. Issue with knowing encoding could just be that am pretty sure at least some of the

Re: String character encoding when converting data from one type/format to another

2015-01-07 Thread Jacob Kruger
Thanks. Yes, sorry didn't mention 2.7, and, unfortunately in this sense, all of this will be running on windows machines. Stay well Jacob Kruger Blind Biker Skype: BlindZA "Roger Wilco wants to welcome you...to the space janitor's closet..." - Original Message - From: "Dave Angel"

Re: String character encoding when converting data from one type/format to another

2015-01-07 Thread Jacob Kruger
Thanks. Makes more sense now, and yes, using 2.7 here. Unfortunately, while could pass the binary values into blob fields well enough, using forms of parameterised statements, the actual generation of sql script text files is a step they want to work with at times, if someone is handling this

Re: String character encoding when converting data from one type/format to another

2015-01-07 Thread Jacob Kruger
Thanks. Yes, using python 2.7, and all you said makes sense, so will check out the talk, and the byte'ing, etc. (yes, bad joke, I know) Issue with knowing encoding could just be that am pretty sure at least some of the data capture is done via copy/paste from one MS app to another, which cou

Re: include "icudt53.dll, icuin53.dll, icuuc53.dll" ?

2015-01-07 Thread Chris Angelico
On Thu, Jan 8, 2015 at 12:23 AM, Timothy W. Grove wrote: > I think my answer is probably "Yes!" Anyone else interested, see > http://qt-project.org/wiki/Deploying-Windows-Applications. This is one of the disadvantages to packaging Python code up into a monolithic executable. You end up needing qu

Re: include "icudt53.dll, icuin53.dll, icuuc53.dll" ?

2015-01-07 Thread Timothy W. Grove
I think my answer is probably "Yes!" Anyone else interested, see http://qt-project.org/wiki/Deploying-Windows-Applications. Tim On 07/01/2015 13:09, Timothy W. Grove wrote: Does anyone have an idea of what the following .dll's are for? Cx_freeze includes them in a Python3.4-PyQt5 deployment ad

include "icudt53.dll, icuin53.dll, icuuc53.dll" ?

2015-01-07 Thread Timothy W. Grove
Does anyone have an idea of what the following .dll's are for? Cx_freeze includes them in a Python3.4-PyQt5 deployment adding about 23 Mb to my application. Removing them doesn't appear to make any difference on my computer, but I hesitate to distribute the application to others without them. T

Re: String character encoding when converting data from one type/format to another

2015-01-07 Thread Chris Angelico
On Wed, Jan 7, 2015 at 11:02 PM, Ned Batchelder wrote: >> Any thoughts on a sort of generic method/means to handle any/all >> characters that might be out of range when having pulled them out of >> something like these MS access databases? > > > The best thing is to know what encoding was used to

how to create a soap enveloppe with python suds for consume a bssv web service

2015-01-07 Thread brice DORA
Hi all I am working on a app in python and I have to call a web service deployed on JDE (bssv). I use it for the suds lib which seems pretty friendly. but the problem is the JDE web service that uses bssv technology necessarily requires sending a soap envelope. as far as I spend my fesais parame

Re: String character encoding when converting data from one type/format to another

2015-01-07 Thread Dave Angel
On 01/07/2015 06:04 AM, Jacob Kruger wrote: I'm busy using something like pyodbc to pull data out of MS access .mdb files, and then generate .sql script files to execute against MySQL databases using MySQLdb module, but, issue is forms of characters in string values that don't fit inside

Re: String character encoding when converting data from one type/format to another

2015-01-07 Thread Peter Otten
Jacob Kruger wrote: > I'm busy using something like pyodbc to pull data out of MS access .mdb > files, and then generate .sql script files to execute against MySQL > databases using MySQLdb module, but, issue is forms of characters in > string values that don't fit inside the 0-127 range - current

Re: String character encoding when converting data from one type/format to another

2015-01-07 Thread Ned Batchelder
On 1/7/15 6:04 AM, Jacob Kruger wrote: I'm busy using something like pyodbc to pull data out of MS access .mdb files, and then generate .sql script files to execute against MySQL databases using MySQLdb module, but, issue is forms of characters in string values that don't fit inside the 0-127 ran

String character encoding when converting data from one type/format to another

2015-01-07 Thread Jacob Kruger
I'm busy using something like pyodbc to pull data out of MS access .mdb files, and then generate .sql script files to execute against MySQL databases using MySQLdb module, but, issue is forms of characters in string values that don't fit inside the 0-127 range - current one seems to be something

Re: Comparisons and sorting of a numeric class....

2015-01-07 Thread Marko Rauhamaa
Steven D'Aprano : > int 0 is a falsey object > NoneType None is a falsey object > str 'hello' is a truthy object > float 23.0 is a truthy object I prefer the Scheme way: #f is a falsey object everything else is a truthy object Marko -- https://mail.python.org/mailman/listinfo/python-li

Re: Comparisons and sorting of a numeric class....

2015-01-07 Thread Chris Angelico
On Wed, Jan 7, 2015 at 7:10 PM, Steven D'Aprano wrote: > ou can make an object which quacks like a bool > (or list, tuple, dict, bool, str...), swims like a bool... Huh. You mean like an Olympic swimming bool? ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Comparisons and sorting of a numeric class....

2015-01-07 Thread Steven D'Aprano
On Tue, 06 Jan 2015 18:01:48 -0800, Andrew Robinson wrote: > but if you can't subclass a built in type -- you can't duck type it -- > for I seem to recall that Python forbids duck typing any built in class > nut not subclasses. I fear that you have completely misunderstood the nature of duck-typi