Re: Escaping confusion with Python 3 + MySQL

2017-03-27 Thread Johann Spies
Νίκος, I am glad that you solved the problem. I am not using mysql but postgresql. When I get a problem using python to communicate with the database, one of my first steps will be to determine whether the error is a python (maybe psycopg-related) related error or a database error. What I do th

EuroPython 2017: Call for Proposals is open

2017-03-27 Thread M.-A. Lemburg
We’re looking for proposals on every aspect of Python: programming from novice to advanced levels, applications and frameworks, or how you have been involved in introducing Python into your organization. EuroPython is a community conference and we are eager to hear about your experience. Please al

Re: Escaping confusion with Python 3 + MySQL

2017-03-27 Thread Νίκος Βέργος
Thank you very much Johann. i was using print(update wuery here) and i was seeing that print was able to parser the query and that consused me as to why execute wont do the same since with print all values was gettign substituted. of course pymysql doesnt behave the same with print but until i fu

Re: C-Python and Endianness

2017-03-27 Thread Antoon Pardon
Op 26-03-17 om 08:47 schreef Ganesh Pal: > Hello Team , > > > > > I want to write the hexadecimal string that is passed from python as it > is on disk in C , my problem is that the values are getting stored in > little endian and Are you sure you are passing a string? Or are you passing a

Using/compiling pyuno with Python 3.6

2017-03-27 Thread filtered
I am running CentOS 7.1 with LibreOffice 5.0.6.2. I have installed the official pyuno package from CentOS. I installed Python 3.6.1 from the sources and now I am trying to import pyuno which fails with aj...@dev.zopyx.com:~/src/docx> bin/python Python 3.6.1 (default, Mar 27 2017, 13:27:24) [GCC

Logging from different python scripts to different output files

2017-03-27 Thread James McMahon
I'm struggling with Python logging. Have tried to apply several examples I have found in the open source literature, but can't get it to work. What I need to do is this: I have two python scripts, a.py and b.py. Each is called by NiFi ExecuteScript processor repeatedly against many incoming flowfil

Program uses twice as much memory in Python 3.6 than in Python 3.5

2017-03-27 Thread Jan Gosmann
Hi, I have a program which uses twice as much memory when I run it in Python 3.6 than when I run it in Python 3.5 (about 60GB instead of 30GB). I tried to find the reason for that, but the cumulated size (measured with sys.getsizeof) of all objects returned by gc.get_objects accumulates only

Re: Program uses twice as much memory in Python 3.6 than in Python 3.5

2017-03-27 Thread Peter Otten
Jan Gosmann wrote: > Hi, > > I have a program which uses twice as much memory when I run it in Python > 3.6 than when I run it in Python 3.5 (about 60GB instead of 30GB). I > tried to find the reason for that, but the cumulated size (measured with > sys.getsizeof) of all objects returned by gc.ge

Re: Program uses twice as much memory in Python 3.6 than in Python 3.5

2017-03-27 Thread Jan Gosmann
On 27 Mar 2017, at 18:30, Peter Otten wrote: Are you perchance comparing 32-bit Python 3.5 with 64-bit Python 3.6? I don't think so. [sys.maxsize](https://docs.python.org/3/library/platform.html#cross-platform) indicates both to be 64-bit. -- https://mail.python.org/mailman/listinfo/python-

Re: Program uses twice as much memory in Python 3.6 than in Python 3.5

2017-03-27 Thread Chris Angelico
On Tue, Mar 28, 2017 at 8:57 AM, Jan Gosmann wrote: > I have a program which uses twice as much memory when I run it in Python 3.6 > than when I run it in Python 3.5 (about 60GB instead of 30GB). I tried to > find the reason for that, but the cumulated size (measured with > sys.getsizeof) of all o

Re: Program uses twice as much memory in Python 3.6 than in Python 3.5

2017-03-27 Thread Jan Gosmann
On 27 Mar 2017, at 18:42, Chris Angelico wrote: Are you able to share the program? I could try it on my system and see if the same thing happens. Yes, it is on GitHub (use the fixes branch): https://github.com/ctn-archive/gosmann-frontiers2017/tree/fixes Installation instructions are in the

Re: Program uses twice as much memory in Python 3.6 than in Python 3.5

2017-03-27 Thread Chris Angelico
On Tue, Mar 28, 2017 at 10:01 AM, Jan Gosmann wrote: > Yes, it is on GitHub (use the fixes branch): > https://github.com/ctn-archive/gosmann-frontiers2017/tree/fixes > Installation instructions are in the readme. > The command I'm running is python scripts/log_reduction.py spaun Working on it. B

Re: Program uses twice as much memory in Python 3.6 than in Python 3.5

2017-03-27 Thread Chris Angelico
On Tue, Mar 28, 2017 at 11:00 AM, Chris Angelico wrote: > In any case, I've installed nvidia-opencl-dev and it seems to be > happy. How long should I expect this to run for? > > Now testing under CPython 3.7. > It ran for about 14 minutes, then memory usage spiked and went into the page file. Use

Re: Escaping confusion with Python 3 + MySQL

2017-03-27 Thread Gregory Ewing
Νίκος Βέργος wrote: Its still a mystery to em whay this fails syntactically when at the same time INSERT works like that. I don't think *anyone* understands why SQL was designed with INSERT and UPDATE having completely different syntaxes. But it was, and we have to live with it. -- Greg -- ht

RE: Using/compiling pyuno with Python 3.6

2017-03-27 Thread Deborah Swanson
filtered wrote, on Monday, March 27, 2017 4:41 AM > > I am running CentOS 7.1 with LibreOffice 5.0.6.2. > > I have installed the official pyuno package from CentOS. > > I installed Python 3.6.1 from the sources and now I am trying > to import pyuno which fails with > > aj...@dev.zopyx.com:~/sr

Windows / ctypes issue with custom build

2017-03-27 Thread Eric Frederich
I built my own Python 2.7.13 for Windows because I'm using bindings to a 3rd party application which were built with Visual Studio 2012. I started to code up some stuff using the "click" module and found an error when using click.echo with any kind of unicode input. Python 2.7.13 (default, Mar

Re: Using/compiling pyuno with Python 3.6

2017-03-27 Thread Michael Torrie
On 03/27/2017 05:40 AM, filtered wrote: > I am running CentOS 7.1 with LibreOffice 5.0.6.2. > > I have installed the official pyuno package from CentOS. > > I installed Python 3.6.1 from the sources and now I am trying to import > pyuno which fails with > > aj...@dev.zopyx.com:~/src/docx> bin/py

Re: Using/compiling pyuno with Python 3.6

2017-03-27 Thread Jim
On 03/27/2017 09:36 PM, Michael Torrie wrote: On 03/27/2017 05:40 AM, filtered wrote: I am running CentOS 7.1 with LibreOffice 5.0.6.2. I have installed the official pyuno package from CentOS. I installed Python 3.6.1 from the sources and now I am trying to import pyuno which fails with aj...

Re: Program uses twice as much memory in Python 3.6 than in Python 3.5

2017-03-27 Thread Jan Gosmann
On 27 Mar 2017, at 20:00, Chris Angelico wrote: By the way, since you're aiming this at recent Python versions, you could skip the 'virtualenv' external dependency and use the built-in 'venv' package: $ python3 -m venv env Yeah, I know about venv. The last time I tried it, there was still som

Re: Program uses twice as much memory in Python 3.6 than in Python 3.5

2017-03-27 Thread Jan Gosmann
On 27 Mar 2017, at 20:12, Chris Angelico wrote: On Tue, Mar 28, 2017 at 11:00 AM, Chris Angelico wrote: In any case, I've installed nvidia-opencl-dev and it seems to be happy. How long should I expect this to run for? Now testing under CPython 3.7. It ran for about 14 minutes, then memory

Re: Using/compiling pyuno with Python 3.6

2017-03-27 Thread Michael Torrie
On 03/27/2017 09:13 PM, Jim wrote: > I don't know if this is of any help but I am running Mint 18 with Python > 3.5 and I have a package installed called python3-uno which is described > as "Python-UNO bridge". Maybe CentOS has a similarly name package. You're right. In fact it looks like LibreO

Re: Using/compiling pyuno with Python 3.6

2017-03-27 Thread filtered
Sorry but all your answers are pointless. I clearly asked about compiling PyUno MYSELF with a self-compiled Python 3.6.1 installation. Is this so hard to understand? Why do you give unrelated comments to a clear questions? Sometimes it is better to be quiet. -aj 2017-03-28 5:49 GMT+02:00 Michael

Re: Using/compiling pyuno with Python 3.6

2017-03-27 Thread Michael Torrie
On 03/27/2017 10:09 PM, filtered wrote: > Sorry but all your answers are pointless. Possibly. > I clearly asked about compiling PyUno MYSELF with a self-compiled > Python 3.6.1 installation. Is this so hard to understand? Why do you give > unrelated comments to a clear questions? Sometimes clea

Re: Using/compiling pyuno with Python 3.6

2017-03-27 Thread Michael Torrie
On 03/27/2017 10:09 PM, filtered wrote: > Sorry but all your answers are pointless. Possibly. > I clearly asked about compiling PyUno MYSELF with a self-compiled > Python 3.6.1 installation. Is this so hard to understand? Why do you give > unrelated comments to a clear questions? Sometimes clea

RE: Using/compiling pyuno with Python 3.6

2017-03-27 Thread Deborah Swanson
filtered wrote, on March 27, 2017 9:09 PM > > Sorry but all your answers are pointless. > > I clearly asked about compiling PyUno MYSELF with a > self-compiled Python 3.6.1 installation. Is this so hard to > understand? Why do you give unrelated comments to a clear > questions? Sometimes it is

Re: Escaping confusion with Python 3 + MySQL

2017-03-27 Thread Jussi Piitulainen
Gregory Ewing writes: > Νίκος Βέργος wrote: > >> Its still a mystery to em whay this fails syntactically when at the >> same time INSERT works like that. > > I don't think *anyone* understands why SQL was designed with > INSERT and UPDATE having completely different syntaxes. > But it was, and we