Re: Everything good about Python except GUI IDE?

2016-02-27 Thread Rustom Mody
On Sunday, February 28, 2016 at 12:04:52 PM UTC+5:30, Steven D'Aprano wrote: > On Sat, 27 Feb 2016 11:07 pm, Chris Angelico wrote: > > >> Isn't there any good GUI IDE like Visual Basic? I hope there are some > >> less well known GUI IDEs which I did not come across. Thanks. > > > > Sounds like th

Re: Everything good about Python except GUI IDE?

2016-02-27 Thread Steven D'Aprano
On Sat, 27 Feb 2016 11:07 pm, Chris Angelico wrote: >> Isn't there any good GUI IDE like Visual Basic? I hope there are some >> less well known GUI IDEs which I did not come across. Thanks. > > Sounds like the advantage lies with Python here... > > Don't make a UI by dragging and dropping that m

Re: Everything good about Python except GUI IDE?

2016-02-27 Thread Gordon Levi
wrong.addres...@gmail.com wrote: >On Saturday, 27 February 2016 18:08:36 UTC+2, Dietmar Schwertberger wrote: >> On 27.02.2016 12:18, wrong.addres...@gmail.com wrote: >> > Isn't there any good GUI IDE like Visual Basic? I hope there are some less >> > well known GUI IDEs which I did not come acro

Re: [Off-topic] Requests author discusses MentalHealthError exception

2016-02-27 Thread Jason Friedman
Yes, thank you for sharing. Stories from people we know, or know of, leads to normalization: mental illness is a routine illness like Type I diabetes or appendicitis. On Sat, Feb 27, 2016 at 2:37 AM, Steven D'Aprano wrote: > The author of Requests, Kenneth Reitz, discusses his recent recovery fr

Re: Everything good about Python except GUI IDE?

2016-02-27 Thread Dietmar Schwertberger
On 27.02.2016 19:51, Dietmar Schwertberger wrote: You will find many "Getting started with..." for both PyQt and wxPython. P.S.: I forgot to mention that both toolkits have very helpful mailing lists. The toolkits have different licenses. With wxPython you don't need to worry. For PyQt you sh

Re: [Off-topic] Requests author discusses MentalHealthError exception

2016-02-27 Thread Ethan Furman
On 02/27/2016 01:37 AM, Steven D'Aprano wrote: Although the connection to Python is only quite slim, I found it fascinating to read. Thanks to you and Kenneth for sharing that. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Everything good about Python except GUI IDE?

2016-02-27 Thread MRAB
On 2016-02-27 20:52, Mark Lawrence wrote: On 27/02/2016 17:57, Marco Kaulea wrote: Hi, Haven't tried it myself, but pyforms[1] might suit your needs. - Marco [1] http://pyforms.readthedocs.org/en/latest/ PyForms 0.1.3 last updated on pypi 2016-01-17 and it's 2.7 only, just awesome, not. I

Re: Everything good about Python except GUI IDE?

2016-02-27 Thread Mark Lawrence
On 27/02/2016 17:57, Marco Kaulea wrote: Hi, Haven't tried it myself, but pyforms[1] might suit your needs. - Marco [1] http://pyforms.readthedocs.org/en/latest/ PyForms 0.1.3 last updated on pypi 2016-01-17 and it's 2.7 only, just awesome, not. -- My fellow Pythonistas, ask not what our

Re: How to read from a file to an arbitrary delimiter efficiently?

2016-02-27 Thread BartC
On 27/02/2016 20:03, BartC wrote: On 27/02/2016 16:35, BartC wrote: Any faster solutions would need to read more than one byte at a time. I've done some more test using Python 3.4, with the same 200,000 line 6MB test file: 0.25 seconds Scan the file with 'for line in f' 2.25 seconds

Re: How to read from a file to an arbitrary delimiter efficiently?

2016-02-27 Thread BartC
On 27/02/2016 16:35, BartC wrote: On 25/02/2016 06:50, Steven D'Aprano wrote: I have a need to read to an arbitrary delimiter, which might be any of a (small) set of characters. For the sake of the exercise, lets say it is either ! or ? (for example). However those aren't the main reasons for

Re: Everything good about Python except GUI IDE?

2016-02-27 Thread Anthony Papillion
I would absolutely recommend you take a look at the Qt stuff. Very modern, easy to use, and free for non-commercial products. Anthony On February 27, 2016 5:18:57 AM CST, wrong.addres...@gmail.com wrote: >I have some VB forms with more than a hundred objects. If I cannot drag >and drop text

Re: How to optimize operations

2016-02-27 Thread Joel Goldstick
On Sat, Feb 27, 2016 at 10:32 AM, II DK projektai wrote: > Hello, > > Do you ever question how effectively you can use your video surveillance > system in search of "uninvited guests", "unpaid client", "person damaged > the vehicle" or simply to get information about the guest arriving in real >

Re: Everything good about Python except GUI IDE?

2016-02-27 Thread Dietmar Schwertberger
On 27.02.2016 19:13, wrong.addres...@gmail.com wrote: I am starting to wonder if VB.net would be a better solution for the time being. I have learnt enough VB.net to manage my work but it is bloated and Microsoft dependent. I would recommend the Python option... I will check it. I got the im

Re: Everything good about Python except GUI IDE?

2016-02-27 Thread Marco Kaulea
Hi, Haven't tried it myself, but pyforms[1] might suit your needs. - Marco [1] http://pyforms.readthedocs.org/en/latest/ On Sat, Feb 27, 2016 at 12:18 PM, wrote: > I have some VB forms with more than a hundred objects. If I cannot drag > and drop text boxes, list boxes, labels, etc., it will

Re: The Real-Time Use of Python in Data Science World!

2016-02-27 Thread Marco Buttu
On 27/02/2016 10:13, Steven D'Aprano wrote: I think it would be more acceptable to me if the sender labelled the subject line as "Advertising". +1 -- Marco Buttu INAF-Osservatorio Astronomico di Cagliari Via della Scienza n. 5, 09047 Selargius (CA) Phone: 070 711 80 217 Email: mbu...@oa-cagl

How to optimize operations

2016-02-27 Thread II DK projektai
Hello, Do you ever question how effectively you can use your video surveillance system in search of "uninvited guests", "unpaid client", "person damaged the vehicle" or simply to get information about the guest arriving in real time? Or maybe your company needs the number plate recognition syst

Re: Everything good about Python except GUI IDE?

2016-02-27 Thread Marko Rauhamaa
wrong.addres...@gmail.com: > In the 1980s everyone was happy with inputs from the command line on a > line editor, but today people expect GUIs with graphics and often even > animations. I don't know who these "people" are, but GUIs certainly have their uses. If you are doing your work profession

Re: Everything good about Python except GUI IDE?

2016-02-27 Thread Chris Angelico
On Sun, Feb 28, 2016 at 5:13 AM, wrote: > In the 1980s everyone was happy with inputs from the command line on a line > editor, but today people expect GUIs with graphics and often even animations. > > It is surprising that a language which seems very popular does not have GUI > development inf

Re: Everything good about Python except GUI IDE?

2016-02-27 Thread wrong . address . 1
On Saturday, 27 February 2016 18:08:36 UTC+2, Dietmar Schwertberger wrote: > On 27.02.2016 12:18, wrong.addres...@gmail.com wrote: > > Isn't there any good GUI IDE like Visual Basic? I hope there are some less > > well known GUI IDEs which I did not come across. Thanks. > > As of today, there's

Re: How to read from a file to an arbitrary delimiter efficiently?

2016-02-27 Thread Marko Rauhamaa
Dennis Lee Bieber : > On Sat, 27 Feb 2016 21:40:17 +1100, Steven D'Aprano > declaimed the following: >>Thanks for finding the issue, but the solutions given don't suit my >>use case. I don't want an iterator that operates on pre-read blocks, I >>want something that will read a record from a file,

Re: list index out of range Error , need to fix it or ignore it

2016-02-27 Thread Joel Goldstick
On Sat, Feb 27, 2016 at 12:01 PM, Ganesh Pal wrote: > changed baddr="" to file ="" in the example program , sorry for the typo > > > filename='/tmp2/2.txt' > > > > def check_file(): > don't use global filename. just pass filename into check_file def check_file(filename): > > """ > > R

Re: list index out of range Error , need to fix it or ignore it

2016-02-27 Thread Ganesh Pal
changed baddr="" to file ="" in the example program , sorry for the typo > filename='/tmp2/2.txt' > > def check_file(): > """ > Run the command parallel on all the machines , if there is a > file named /tmp/file2.txt extract file2.txt > > """ > global filename > file = '' >

list index out of range Error , need to fix it or ignore it

2016-02-27 Thread Ganesh Pal
Iam on python 2.6 and Linux , I need input on the below program , here is the spinet of my program filename='/tmp2/2.txt' def check_file(): """ Run the command parallel on all the machines , if there is a file named /tmp/file2.txt extract file2.txt """ global filename bad

Re: How to read from a file to an arbitrary delimiter efficiently?

2016-02-27 Thread BartC
On 25/02/2016 06:50, Steven D'Aprano wrote: I have a need to read to an arbitrary delimiter, which might be any of a (small) set of characters. For the sake of the exercise, lets say it is either ! or ? (for example). # Read a chunk of bytes/characters from an open file. def chunkiter(f, deli

Re: How to remove the line numbers from the file in python

2016-02-27 Thread Ganesh Pal
Thanks it works fine :) On Fri, Feb 26, 2016 at 5:01 PM, Peter Heitzer wrote: > Ganesh Pal wrote: >>what would be the easiest way to remove the lines in the leading >>numbers 1.e 1 ,2, 19 from this file using python ? > import sys,re > for line in sys.stdin: > print re.sub('^\d+',

Re: Error in Tree Structure

2016-02-27 Thread Rustom Mody
On Saturday, February 27, 2016 at 2:47:53 PM UTC+5:30, subhaba...@gmail.com wrote: > I was trying to implement the code, > > import nltk > import nltk.tag, nltk.chunk, itertools > def ieertree2conlltags(tree, tag=nltk.tag.pos_tag): > words, ents = zip(*tree.pos()) > iobs = [] > prev

Re: Everything good about Python except GUI IDE?

2016-02-27 Thread Dietmar Schwertberger
On 27.02.2016 12:18, wrong.addres...@gmail.com wrote: Isn't there any good GUI IDE like Visual Basic? I hope there are some less well known GUI IDEs which I did not come across. Thanks. As of today, there's no Python GUI builder comparable to VB 6. There are some like QtDesigner or wxGlade, b

Re: How to read from a file to an arbitrary delimiter efficiently?

2016-02-27 Thread Serhiy Storchaka
On 27.02.16 11:49, Steven D'Aprano wrote: On Thu, 25 Feb 2016 06:30 pm, Chris Angelico wrote: How bad is it if you over-read? Pretty bad :-) Ideally, I'd rather not over-read at all. I'd like the user to be able to swap from "read N bytes" to "read to the next delimiter" (and possibly even "r

Re: How to read from a file to an arbitrary delimiter efficiently?

2016-02-27 Thread Dan Sommers
On Sat, 27 Feb 2016 21:40:17 +1100, Steven D'Aprano wrote: > Thanks for finding the issue, but the solutions given don't suit my > use case. I don't want an iterator that operates on pre-read blocks, I > want something that will read a record from a file, and leave the file > pointer one entry pas

Re: Everything good about Python except GUI IDE?

2016-02-27 Thread MWS
On Saturday 27 February 2016 04:48 PM, wrong.addres...@gmail.com wrote: I have some VB forms with more than a hundred objects. If I cannot drag and drop text boxes, list boxes, labels, etc., it will be too much work to create that with several lines of code for each object. Isn't there any g

Re: Everything good about Python except GUI IDE?

2016-02-27 Thread BartC
On 27/02/2016 11:18, wrong.addres...@gmail.com wrote: I have some VB forms with more than a hundred objects. If I cannot drag and drop text boxes, list boxes, labels, etc., it will be too much work to create that with several lines of code for each object. Isn't there any good GUI IDE like Vis

Re: How to read from a file to an arbitrary delimiter efficiently?

2016-02-27 Thread Chris Angelico
On Sat, Feb 27, 2016 at 11:17 PM, Chris Angelico wrote: >> Ideally, I'd rather not over-read at all. I'd like the user to be able to >> swap from "read N bytes" to "read to the next delimiter" (and possibly >> even "read the next line") without losing anything. > > If those are the *only* two oper

Re: How to read from a file to an arbitrary delimiter efficiently?

2016-02-27 Thread Chris Angelico
On Sat, Feb 27, 2016 at 8:49 PM, Steven D'Aprano wrote: > On Thu, 25 Feb 2016 06:30 pm, Chris Angelico wrote: > >> On Thu, Feb 25, 2016 at 5:50 PM, Steven D'Aprano >> wrote: >>> >>> # Read a chunk of bytes/characters from an open file. >>> def chunkiter(f, delim): >>> buffer = [] >>> b =

Re: Everything good about Python except GUI IDE?

2016-02-27 Thread Chris Angelico
On Sat, Feb 27, 2016 at 10:18 PM, wrote: > I have some VB forms with more than a hundred objects. If I cannot drag and > drop text boxes, list boxes, labels, etc., it will be too much work to create > that with several lines of code for each object. > > Isn't there any good GUI IDE like Visual

Re: Everything good about Python except GUI IDE?

2016-02-27 Thread Rustom Mody
On Saturday, February 27, 2016 at 4:49:21 PM UTC+5:30, wrong.a...@gmail.com wrote: > I have some VB forms with more than a hundred objects. If I cannot drag and > drop text boxes, list boxes, labels, etc., it will be too much work to create > that with several lines of code for each object. >

Re: Bug in Python?

2016-02-27 Thread Terry Reedy
On 2/27/2016 4:44 AM, Steven D'Aprano wrote: On Sat, 27 Feb 2016 07:55 pm, Terry Reedy wrote: In other words, when that doc says *list*, it means a *list*. "To create a heap, use a list initialized to [], or you can transform a populated list into a heap via function heapify()." [...] "A hea

Re: Lookahead while doing: for line in fh.readlines():

2016-02-27 Thread Terry Reedy
On 2/27/2016 4:39 AM, Veek. M wrote: I want to do something like: #!/usr/bin/env python3 fh = open('/etc/motd') for line in fh.readlines(): print(fh.tell()) why doesn't this work as expected.. fh.readlines() should return a generator object and fh.tell() ought to start at 0 first. Not a

Re: Everything good about Python except GUI IDE?

2016-02-27 Thread Steven D'Aprano
On Sat, 27 Feb 2016 10:18 pm, wrong.addres...@gmail.com wrote: > I have some VB forms with more than a hundred objects. https://www.appnovation.com/sites/default/files/attachments/yourproduct.jpg Your users probably hate you... *wink* -- Steven -- https://mail.python.org/mailman/listinf

Re: Error in Tree Structure

2016-02-27 Thread Steven D'Aprano
On Sat, 27 Feb 2016 08:17 pm, subhabangal...@gmail.com wrote: > Is it any error in Python part or in NLTK part? Neither. Any time you think there is an error in Python, it is 99.9% sure that the error is in your code, not Python. If the error is a SyntaxError, that is 99.9%. > If any one m

Everything good about Python except GUI IDE?

2016-02-27 Thread wrong . address . 1
I have some VB forms with more than a hundred objects. If I cannot drag and drop text boxes, list boxes, labels, etc., it will be too much work to create that with several lines of code for each object. Isn't there any good GUI IDE like Visual Basic? I hope there are some less well known GUI I

Re: How to read from a file to an arbitrary delimiter efficiently?

2016-02-27 Thread Steven D'Aprano
On Thu, 25 Feb 2016 06:37 pm, Wolfgang Maier wrote: > On 25.02.2016 07:50, Steven D'Aprano wrote: >> I have a need to read to an arbitrary delimiter, which might be any of a >> (small) set of characters. For the sake of the exercise, lets say it is >> either ! or ? (for example). >> > > You are n

Re: [Off-topic] Requests author discusses MentalHealthError exception

2016-02-27 Thread Mark Lawrence
On 27/02/2016 09:37, Steven D'Aprano wrote: The author of Requests, Kenneth Reitz, discusses his recent recovery from a MentalHealthError exception. http://www.kennethreitz.org/essays/mentalhealtherror-an-exception-occurred Although the connection to Python is only quite slim, I found it fascin

Re: How to read from a file to an arbitrary delimiter efficiently?

2016-02-27 Thread Steven D'Aprano
On Thu, 25 Feb 2016 06:30 pm, Chris Angelico wrote: > On Thu, Feb 25, 2016 at 5:50 PM, Steven D'Aprano > wrote: >> >> # Read a chunk of bytes/characters from an open file. >> def chunkiter(f, delim): >> buffer = [] >> b = f.read(1) >> while b: >> buffer.append(b) >> if

Re: Bug in Python?

2016-02-27 Thread Steven D'Aprano
On Sat, 27 Feb 2016 07:55 pm, Terry Reedy wrote: > In other words, when that doc says *list*, it means a *list*. > > "To create a heap, use a list initialized to [], or you can transform a > populated list into a heap via function heapify()." [...] > "A heap must be an instance of *list* (and not

Lookahead while doing: for line in fh.readlines():

2016-02-27 Thread Veek. M
I want to do something like: #!/usr/bin/env python3 fh = open('/etc/motd') for line in fh.readlines(): print(fh.tell()) why doesn't this work as expected.. fh.readlines() should return a generator object and fh.tell() ought to start at 0 first. Instead i get the final count repeated for th

[Off-topic] Requests author discusses MentalHealthError exception

2016-02-27 Thread Steven D'Aprano
The author of Requests, Kenneth Reitz, discusses his recent recovery from a MentalHealthError exception. http://www.kennethreitz.org/essays/mentalhealtherror-an-exception-occurred Although the connection to Python is only quite slim, I found it fascinating to read. -- Steven -- https://mail

Redmonk popularity rankings place Python at #4

2016-02-27 Thread Steven D'Aprano
The latest popularity rankings from Redmonk are available, based on the number of projects on Github and posts on Stackoverflow, and Python comes in at #4, just behind Javascript, Java and PHP, and just ahead of C#, C++ and Ruby. http://redmonk.com/sogrady/2016/02/19/language-rankings-1-16/ --

Error in Tree Structure

2016-02-27 Thread subhabangalore
I was trying to implement the code, import nltk import nltk.tag, nltk.chunk, itertools def ieertree2conlltags(tree, tag=nltk.tag.pos_tag): words, ents = zip(*tree.pos()) iobs = [] prev = None for ent in ents: if ent == tree.node: iobs.append('O') pr

Re: The Real-Time Use of Python in Data Science World!

2016-02-27 Thread Steven D'Aprano
On Sat, 27 Feb 2016 06:47 am, Joel Goldstick wrote: > On Fri, Feb 26, 2016 at 2:35 PM, Anita Goyal > wrote: > >> This course will help you to expertise the usage of Python in Data >> Science world. [...] > Second post by this person. Both advertising classes for a fee. Is this > proper postin

{off topic] Re: Bug in Python?

2016-02-27 Thread Terry Reedy
On 2/26/2016 9:21 PM, mentific...@gmail.com wrote: On Friday, February 26, 2016 at 2:09:07 PM UTC-8, Sven R. Kunze wrote: Hi everybody, I recognized the following oddity (background story: http://srkunze.blogspot.com/2016/02/lets-go-down-rabbit-hole.html). Python sometimes seems not to hop bac

Re: Bug in Python?

2016-02-27 Thread Terry Reedy
On 2/26/2016 6:07 PM, eryk sun wrote: On Fri, Feb 26, 2016 at 4:08 PM, Sven R. Kunze wrote: Python sometimes seems not to hop back and forth between C and Python code. Can somebody explain this? Normally a C extension would call PySequence_SetItem, which would call the type's sq_ass_item, w

Re: subprocess startup error

2016-02-27 Thread Terry Reedy
On 2/26/2016 10:08 AM, Wolfgang Maier wrote: On 26.02.2016 15:57, Emile van Sebille wrote: On 2/26/2016 6:49 AM, Oscar Benjamin wrote: On 26 February 2016 at 13:30, Peter Otten <__pete...@web.de> wrote: Shweta Dinnimani wrote: i saved my file as string.py since than i'm facing this error Re

Re: subprocess startup error

2016-02-27 Thread Terry Reedy
On 2/26/2016 9:49 AM, Oscar Benjamin wrote: On 26 February 2016 at 13:30, Peter Otten <__pete...@web.de> wrote: Shweta Dinnimani wrote: hello, I'm begineer to python programming.. I had installed python 3.5.1 version on my windows 7 system. I was fine earlier and now when i was trying the prog