Re: SQLite

2016-02-21 Thread Chris Angelico
On Mon, Feb 22, 2016 at 8:37 AM, Albert-Jan Roskam wrote: > IIRC, you have to do > sudo apt-get install build-essential python-dev > ... then re-compile python That may well work, but it's probably easier to work this way: sudo apt-get build-dep python3 That should grab all the compilation depe

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-21 Thread BartC
On 21/02/2016 21:52, Jussi Piitulainen wrote: BartC writes: But this is not so much to do with VB6, but with a very fundamental capability that seems missing in modern languages. All that's missing is a minor convenience that turns out to be mainly awkward. Not at all fundamental. It /is/ f

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-21 Thread Jussi Piitulainen
BartC writes: > But this is not so much to do with VB6, but with a very fundamental > capability that seems missing in modern languages. All that's missing is a minor convenience that turns out to be mainly awkward. Not at all fundamental. The capability of parsing simple input formats is easily

RE: SQLite

2016-02-21 Thread Albert-Jan Roskam
(Sorry for top posting) IIRC, you have to do sudo apt-get install build-essential python-dev ... then re-compile python > To: python-list@python.org > From: k.d.jant...@mailbox.org > Subject: SQLite > Date: Sun, 21 Feb 2016 18:11:18 +0100 > >Hello, > >I have downloaded Python3.5.1 as .t

Re: Make a unique filesystem path, without creating the file

2016-02-21 Thread Cameron Simpson
On 16Feb2016 19:24, Alan Bawden wrote: Ben Finney writes: Cameron Simpson writes: I've been watching this for a few days, and am struggling to understand your use case. Yes, you're not alone. This surprises me, which is why I'm persisting. Can you elaborate with a concrete example and it

Re: can try expect have if else.

2016-02-21 Thread Ian Kelly
On Feb 21, 2016 9:13 AM, "Ganesh Pal" wrote: > > Hi Team, > > Iam on python 2.6 , need input on the below piece of code. Python 2.6 isn't supported and hasn't been since October 2013. Is there something preventing you from upgrading to 2.7? > EXIT_STATUS_ERROR=1 > > def create_dataset(): > "

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-21 Thread Tim Chase
On 2016-02-21 13:16, BartC wrote: > > No need for anyone to re-invent the > > wheel! ;-) > > I keep seeing this in the thread. Python has all this capability, > yet it still requires a lot of fiddly code to be added to get > anywhere near as simple as this: > >read f, a, b, c > > And this i

Re: Python unittest2.SkipTest and general suggestion

2016-02-21 Thread Ganesh Pal
On Sun, Feb 21, 2016 at 10:33 PM, Ben Finney wrote: > You are already supplying a custom message to ‘self.skipTest’:: > > except Exception as exc: > logging.error(exc) > raise unittest.SkipTest("Failure running Integrity Scan ") > > So you can change that message by including

SQLite

2016-02-21 Thread Klaus Jantzen
Hello, I have downloaded Python3.5.1 as .targz, compiled it(configure, make,...) and it works (under Debian Wheezy AMD64) up to the moment I wanted to use SQLite. I get the following message: === jantzen@PC4:~$ python Python 3.5.0 (default, Dec  2 2015, 14:16:16) [GCC 4

Re: show instant data on webpage

2016-02-21 Thread mustang
You need free and private? The price is low -- if this is a business why not pay? If not a business, why private? it's not business it's like a school project, so no money :D There is another charting library called pygal which is great. It can produce output to .svg file format or .png.

Re: can try expect have if else.

2016-02-21 Thread Ganesh Pal
On Sun, Feb 21, 2016 at 10:37 PM, Ben Finney wrote: > What result do you get when running that code? What empirical reason do > you have to think it would work or not work? I wanted to know was is it good to have if else with in a try expect block , I was checking more from the programming pers

Re: can try expect have if else.

2016-02-21 Thread Ben Finney
Ganesh Pal writes: > 1. Can we have if else with in a try except block What result do you get when running that code? What empirical reason do you have to think it would work or not work? > 2. How can the above code be improved The following sequence of statements:: raise Exception("/nfs_

Re: Python unittest2.SkipTest and general suggestion

2016-02-21 Thread Ben Finney
Ganesh Pal writes: > 1. unittest.SkipTest does not the display the exception message that > is caught. You are already supplying a custom message to ‘self.skipTest’:: except Exception as exc: logging.error(exc) raise unittest.SkipTest("Failure running Integrity Scan ") So y

Re: PyQt5 not found from Python

2016-02-21 Thread Mark Lawrence
On 21/02/2016 16:40, Arie van Wingerden wrote: Thx. Didn't realize that! Please provide some context when you reply, thanks. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/py

Re: PyQt5 not found from Python

2016-02-21 Thread Arie van Wingerden
Thx. Didn't realize that! -- https://mail.python.org/mailman/listinfo/python-list

Re: PyQt5 not found from Python

2016-02-21 Thread Phil Thompson
On 21/02/2016 3:43 pm, Arie van Wingerden wrote: Python 3.5.1 installed in default Windows folder here: C:\Users\Arie\AppData\Local\Programs\Python\Python35-32 PyQt5 installed - it creates a folder c:\Python34 In the Python REPL i try: from PyQt5 import QtCore Traceback (most recent call l

Re: PyQt5 not found from Python

2016-02-21 Thread Mark Lawrence
On 21/02/2016 15:43, Arie van Wingerden wrote: Python 3.5.1 installed in default Windows folder here: C:\Users\Arie\AppData\Local\Programs\Python\Python35-32 PyQt5 installed - it creates a folder c:\Python34 In the Python REPL i try: from PyQt5 import QtCore Traceback (most recent call l

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-21 Thread BartC
On 21/02/2016 15:08, Jussi Piitulainen wrote: BartC writes: In other words, it seems this particular wheel does require re-inventing! It's hardly Python's problem if an engineer is worried about some VB not being there in its current form in the future. The sample code upthread seemed gibber

can try expect have if else.

2016-02-21 Thread Ganesh Pal
Hi Team, Iam on python 2.6 , need input on the below piece of code. EXIT_STATUS_ERROR=1 def create_dataset(): """ """ logging.info("Dataset create.Started !!!") try: if os.path.ismount("/nfs_mount"): touch_file("inode_fixcrc.txt") logging.inf

Python unittest2.SkipTest and general suggestion

2016-02-21 Thread Ganesh Pal
Hello team, Please provide your guidance on how to proceed with the below test , Iam on python 2.6 and Linux. I have a linitation to use python 2.6 and unittest2 try: import unittest2 as unittest except ImportError: import unittest class isiCorruptTest(unittest.TestCase): corrupt_

Setting up/authenticating Google API?

2016-02-21 Thread Skip Montanaro
This isn't strictly a Python question, however... Once I get myself authenticated, I intend to use the Python Google API to pump archived mail messages from a few defunct mailing lists into Google Groups. I thought it would be pretty straightforward, but my attempts a few months ago were completely

PyQt5 not found from Python

2016-02-21 Thread Arie van Wingerden
Python 3.5.1 installed in default Windows folder here: C:\Users\Arie\AppData\Local\Programs\Python\Python35-32 PyQt5 installed - it creates a folder c:\Python34 In the Python REPL i try: from PyQt5 import QtCore Traceback (most recent call last): File "", line 1, in ImportError: No module

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-21 Thread Christian Gollwitzer
Am 21.02.16 um 14:16 schrieb BartC: Even accepting that syntax limitations might require this to be written as: readline(f, a, b, c) I can't see a straightforward way of making this possible while still keeping a, b and c simple integer, float or string types (because Python's reference para

Re: how to get the list form dictionary's values

2016-02-21 Thread Marko Rauhamaa
Chris Angelico : > On Mon, Feb 22, 2016 at 1:15 AM, Ho Yeung Lee > wrote: >> 0 ---> 2 --> 3--> 1 ---> 0 >> ---> 4 / > > So after task 2 completes, tasks 3 and 4 both become available (and > can run in parallel), but then task 1 must wait until both have > finished before it runs? I'm not

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-21 Thread Jussi Piitulainen
BartC writes: > On 21/02/2016 07:28, Larry Hudson wrote: >> On 02/20/2016 10:38 AM, wrong.addres...@gmail.com wrote: > >>> Or can I write my own reading subroutines which can then be called like >>> ReadVBstyle 8, ND, NIN, NT >>> to make the code more readable? > >> ABSOLUTELY!! Most Python progr

Re: how to get the list form dictionary's values

2016-02-21 Thread Chris Angelico
On Mon, Feb 22, 2016 at 1:15 AM, Ho Yeung Lee wrote: > Hi Chris, > > 0 ---> 2 --> 3--> 1 ---> 0 > ---> 4 / > > i am practicing task flow in this graph situation > > when current state is 2 , there are 3 and 4 to run parallel and wait list of > tasks finish before running to 1 , > > howeve

Re: how to get the list form dictionary's values

2016-02-21 Thread Ho Yeung Lee
Peter Otten於 2016年2月21日星期日 UTC+8下午10時07分18秒寫道: > davidbenny2...@gmail.com wrote: > > > File "mainpy.py", line 81 > > for functionlistelement in functionlist0 > >^ > > SyntaxError: invalid syntax > > > > > > import asyncio > > [snip] > > > mappe

Re: how to get the list form dictionary's values

2016-02-21 Thread Ho Yeung Lee
Hi Chris, 0 ---> 2 --> 3--> 1 ---> 0 ---> 4 / i am practicing task flow in this graph situation when current state is 2 , there are 3 and 4 to run parallel and wait list of tasks finish before running to 1 , however i feel that my code has been wrong because 3 and 4 can not combine to

Re: how to get the list form dictionary's values

2016-02-21 Thread Peter Otten
davidbenny2...@gmail.com wrote: > File "mainpy.py", line 81 > for functionlistelement in functionlist0 >^ > SyntaxError: invalid syntax > > > import asyncio [snip] > mappedfunc = {} > functionlist000 = [] > functionlist001 = [] > functionlist00

Re: how to get the list form dictionary's values

2016-02-21 Thread Chris Angelico
On Mon, Feb 22, 2016 at 12:34 AM, wrote: > File "mainpy.py", line 81 > for functionlistelement in functionlist0 >^ > SyntaxError: invalid syntax Your actual syntax problem here is simply a missing colon. That's easily fixed. But please, PLEASE, d

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-21 Thread Chris Angelico
On Mon, Feb 22, 2016 at 12:16 AM, BartC wrote: > On 21/02/2016 07:28, Larry Hudson wrote: >> >> On 02/20/2016 10:38 AM, wrong.addres...@gmail.com wrote: > > >>> Or can I write my own reading subroutines which can then be called like >>> ReadVBstyle 8, ND, NIN, NT >>> to make the code more readable

how to get the list form dictionary's values

2016-02-21 Thread davidbenny2000
File "mainpy.py", line 81 for functionlistelement in functionlist0 ^ SyntaxError: invalid syntax import asyncio def f000(): try: print "000" except: print "000 exception" def f001(): try: print "001" except: print "001 exception" def

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-21 Thread BartC
On 21/02/2016 07:28, Larry Hudson wrote: On 02/20/2016 10:38 AM, wrong.addres...@gmail.com wrote: Or can I write my own reading subroutines which can then be called like ReadVBstyle 8, ND, NIN, NT to make the code more readable? ABSOLUTELY!! Most Python programming consists of defining the

Re: PyPDF2 merge / out of memory

2016-02-21 Thread Mark Lawrence
On 21/02/2016 10:41, cpolin...@gmail.com wrote: Hello, There is an issue with PyPDF2 and merging file https://github.com/mstamy2/PyPDF2/issues/189 Does anybody know an alternate library to merge PDF and produce optimized pdf file ? Thanks a lot Clement I did a bit of searching and found

PyPDF2 merge / out of memory

2016-02-21 Thread cpoline95
Hello, There is an issue with PyPDF2 and merging file https://github.com/mstamy2/PyPDF2/issues/189 Does anybody know an alternate library to merge PDF and produce optimized pdf file ? Thanks a lot Clement -- https://mail.python.org/mailman/listinfo/python-list