Python packages for hydrology and DEM

2016-04-18 Thread Xristos Xristoou
I want to ask for hydrology python packages with complete function to calculate hydrology tasks like fill,flow direction,flow accumulator and more?or how can i find genetic algorithms for to do this tasks to finaly create a complete hydro model with python. can someone tell me some documentatio

Re: Convert input to upper case on screen as it is typed

2016-04-18 Thread Gregory Ewing
Ben Finney wrote: I am still looking for a solution (a Python-specific one would be fine). The only other way I can think of is to put the tty into raw mode and do your own line editing and echoing. You could wrap it all up in a file-like object for the rest of the code to use. -- Greg -- ht

Re: Guido sees the light: PEP 8 updated

2016-04-18 Thread Gregory Ewing
Ian Kelly wrote: What happens when another programmer reviews the code using a different font and finds that there is only 3.5em worth of space? Do we descend into Calibri / Verdana line-length edit wars? That's easy, we just decree that all Python source code is to be displayed in this font:

Re: error with tkinter, help

2016-04-18 Thread BlueRidiculous
On Sunday, April 17, 2016 at 10:24:32 AM UTC-7, BlueRidiculous wrote: > On Sunday, April 17, 2016 at 10:18:09 AM UTC-7, BlueRidiculous wrote: > > On Saturday, April 16, 2016 at 9:30:39 PM UTC-7, Terry Reedy wrote: > > > On 4/16/2016 9:31 PM, blueridicul...@gmail.com wrote: > > > > So I was reading

Re: Guido sees the light: PEP 8 updated

2016-04-18 Thread Random832
On Mon, Apr 18, 2016, at 23:54, Rustom Mody wrote: > Start no tabs: > if foo# comment that is aligned > do some stuff# across multiple indent levels > > Add tabs as leading indents with second line indented 1 tab more > (showing tabs as |) > |if foo# comment that is aligned > ||do some stuff# acr

Re: delete from pattern to pattern if it contains match

2016-04-18 Thread harirammanohar
On Monday, April 18, 2016 at 1:19:43 PM UTC+5:30, Joaquin Alzola wrote: > Hi, > > Try to use the xml module. > > import xml.etree.ElementTree as ET > > That might help. > > BR > > Joaquin > > -Original Message- > From: Python-list > [mailto:python-list-bounces+joaquin.alzola=lebara..

Re: Guido sees the light: PEP 8 updated

2016-04-18 Thread Rustom Mody
On Tuesday, April 19, 2016 at 9:00:12 AM UTC+5:30, Random832 wrote: > On Mon, Apr 18, 2016, at 23:04, Rustom Mody wrote: > > See elastic tabstops: http://nickgravgaard.com/elastic-tabstops/ > > >From there: > >A column block is a run of uninterrupted vertically adjacent cells. > > How's that goin

Re: Guido sees the light: PEP 8 updated

2016-04-18 Thread Random832
On Mon, Apr 18, 2016, at 23:04, Rustom Mody wrote: > See elastic tabstops: http://nickgravgaard.com/elastic-tabstops/ >From there: >A column block is a run of uninterrupted vertically adjacent cells. How's that going to handle this case: if foo: # comment that is aligned do some

Re: Guido sees the light: PEP 8 updated

2016-04-18 Thread Rustom Mody
On Tuesday, April 19, 2016 at 6:49:34 AM UTC+5:30, sohcatoa wrote: > On Monday, April 18, 2016 at 2:14:17 PM UTC-7, Pete Forman wrote: > > Why is it that Python continues to use a fixed width font and therefore > > specifies the maximum line width as a character count? > > > > An essential part of

Re: Guido sees the light: PEP 8 updated

2016-04-18 Thread sohcahtoa82
On Monday, April 18, 2016 at 2:14:17 PM UTC-7, Pete Forman wrote: > Why is it that Python continues to use a fixed width font and therefore > specifies the maximum line width as a character count? > > An essential part of the language is indentation which ought to continue > to mandate that lines

Re: Why are my files in in my list - os module used with sys argv

2016-04-18 Thread MRAB
On 2016-04-19 00:44, Sayth Renshaw wrote: Hi Why would it be that my files are not being found in this script? from pyquery import PyQuery as pq import pandas as pd import os import sys if len(sys.argv) == 2: print("no params") sys.exit(1) dir = sys.argv[1] mask = sys.argv[2] files

Re: Why are my files in in my list - os module used with sys argv

2016-04-18 Thread Steven D'Aprano
On Tue, 19 Apr 2016 09:44 am, Sayth Renshaw wrote: > Hi > > Why would it be that my files are not being found in this script? You are calling the script with: python jqxml.py samples *.xml This does not do what you think it does: under Linux shells, the glob *.xml will be expanded by the shell

Why are my files in in my list - os module used with sys argv

2016-04-18 Thread Sayth Renshaw
Hi Why would it be that my files are not being found in this script? from pyquery import PyQuery as pq import pandas as pd import os import sys if len(sys.argv) == 2: print("no params") sys.exit(1) dir = sys.argv[1] mask = sys.argv[2] files = os.listdir(dir) fileResult = filter(lambda

Re: Guido sees the light: PEP 8 updated

2016-04-18 Thread Ben Finney
Pete Forman writes: > Why is it that Python continues to use a fixed width font I think you know this isn't true. > and therefore specifies the maximum line width as a character count? and that this “therefore” is not justified by that. You've seen elsewhere the justification for *having* a m

Re: Guido sees the light: PEP 8 updated

2016-04-18 Thread Pete Forman
Ian Kelly writes: > On Mon, Apr 18, 2016 at 3:14 PM, Pete Forman wrote: >> Why is it that Python continues to use a fixed width font and >> therefore specifies the maximum line width as a character count? >> >> An essential part of the language is indentation which ought to >> continue to mandat

Re: How to track files processed

2016-04-18 Thread Sayth Renshaw
Thank you Martin and Peter To clarify Peter at the moment only writing to csv but am wanting to set up an item pipeline to SQL db next. I will have a go at your examples Martin and see how i go. Thank you both for taking time to help. Sayth -- https://mail.python.org/mailman/listinfo/python-l

Re: I have been dealing with Python for a few weeks...

2016-04-18 Thread Fillmore
On 04/14/2016 10:12 PM, justin walters wrote: On Thu, Apr 14, 2016 at 1:50 PM, Fillmore wrote: ...and I'm loving it. Sooo much more elegant than Perl...and so much less going back to the manual to lookup the syntax of simple data structures and operations... REPL is so useful and you guys

Re: Guido sees the light: PEP 8 updated

2016-04-18 Thread Ian Kelly
On Mon, Apr 18, 2016 at 3:14 PM, Pete Forman wrote: > Why is it that Python continues to use a fixed width font and therefore > specifies the maximum line width as a character count? > > An essential part of the language is indentation which ought to continue > to mandate that lines start with a m

Re: Guido sees the light: PEP 8 updated

2016-04-18 Thread Pete Forman
Why is it that Python continues to use a fixed width font and therefore specifies the maximum line width as a character count? An essential part of the language is indentation which ought to continue to mandate that lines start with a multiple of 4 em worth of space (or some other size or encode w

Re: [Python-ideas] Changing the meaning of bool.__invert__

2016-04-18 Thread Ian Kelly
On Sun, Apr 17, 2016 at 12:24 PM, Pavol Lisy wrote: > 2016-04-09 17:43 GMT+02:00, Steven D'Aprano : >> flag ^ flag is useful since we don't have a boolean-xor operator and >> bitwise-xor does the right thing for bools. And I suppose some people >> might prefer & and | over boolean-and and boolean-

Re: Convert input to upper case on screen as it is typed

2016-04-18 Thread Ben Finney
Ben Finney writes: > Ben Finney writes: > > > Okay, ‘termios.tcgetattr’ will let me preserve the attributes, and > > with Dan Sommers's suggestion of which attribute to use, I may have > > a shot at setting the terminal attributes. > > This works! Except, it doesn't. As designed and documented

Re: How to track files processed

2016-04-18 Thread Martin A. Brown
Greetings, >If you are parsing files in a directory what is the best way to >record which files were actioned? > >So that if i re-parse the directory i only parse the new files in >the directory? How will you know that the files are new? If a file has exactly the same content as another file,

Re: Creating a hot vector (numpy)

2016-04-18 Thread Paulo da Silva
Às 05:05 de 18-04-2016, Reto Brunner escreveu: > Hi, > It is called broadcasting an array, have a look here: > http://docs.scipy.org/doc/numpy-1.10.1/user/basics.broadcasting.html > So, there are two broadcasts here. OK. Thanks. -- https://mail.python.org/mailman/listinfo/python-list

Re: Moderation and slight change of (de facto) policy

2016-04-18 Thread Grant Edwards
On 2016-04-18, Barry Warsaw wrote: > On Apr 17, 2016, at 06:08 PM, Matt Ruffalo wrote: > >>That seems like a reasonable approach, though I think there *really* >>needs to be an option along the lines of "subscribed to the list for the >>purposes of moderation, but not receiving list messages via e

Re: Moderation and slight change of (de facto) policy

2016-04-18 Thread Barry Warsaw
On Apr 17, 2016, at 06:08 PM, Matt Ruffalo wrote: >That seems like a reasonable approach, though I think there *really* >needs to be an option along the lines of "subscribed to the list for the >purposes of moderation, but not receiving list messages via email". We can do this effectively in Mail

Re: Guido sees the light: PEP 8 updated

2016-04-18 Thread Sivan Greenberg
On Sat, Apr 16, 2016 at 8:25 PM, Terry Reedy wrote: > On 4/16/2016 12:58 PM, Larry Martell wrote: > >> On Sat, Apr 16, 2016 at 12:51 PM, Marko Rauhamaa >> wrote: >> >>> Larry Martell : >>> >>> I have worked for many companies where you are required to get a clean run of pep8 on your code be

ANN: Wing IDE 5.1.11 released

2016-04-18 Thread Wingware
Hi, Wingware has released version 5.1.11 of Wing IDE, our cross-platform integrated development environment for the Python programming language. Wing IDE features a professional code editor with vi, emacs, visual studio, and other key bindings, auto-completion, call tips, context-sensitive a

Re: How to track files processed

2016-04-18 Thread Peter Otten
Sayth Renshaw wrote: > If you are parsing files in a directory what is the best way to record > which files were actioned? What do you do with the result of the parsing process? If you write it to another file you can just look if that file already exists. If you write it to a database there ma

Re: Guido sees the light: PEP 8 updated

2016-04-18 Thread David Palao
2016-04-18 5:19 GMT+02:00 Steven D'Aprano : > On Mon, 18 Apr 2016 11:39 am, Rustom Mody wrote: > >> yes we can agree on this -- arbitrary line lengths are almost certainly >> unreadable. >> The problem then becomes so what is optimal? > > I really don't think it is a problem. We have about 400 year

Re: [OT] Java generics (was: Guido sees the light: PEP 8 updated)

2016-04-18 Thread Tim Delaney
On 18 April 2016 at 09:30, Chris Angelico wrote: > On Mon, Apr 18, 2016 at 8:02 AM, Tim Delaney > wrote: > > I also wouldn't describe Java as a > > "perfectly good language" - it is at best a compromise language that just > > happened to be heavily promoted and accepted at the right time. > > >

Re: Guido sees the light: PEP 8 updated

2016-04-18 Thread Rustom Mody
On Monday, April 18, 2016 at 2:34:10 PM UTC+5:30, Gregory Ewing wrote: > Rustom Mody wrote: > > Come to think of it take an SQL DBMS browser. > > Should we say: Horizontal scrolls are BAD; just reformat the table after > > reaching 80 columns? > > I would say, yes, horizontal scrolling *is* bad i

How to track files processed

2016-04-18 Thread Sayth Renshaw
Hi If you are parsing files in a directory what is the best way to record which files were actioned? So that if i re-parse the directory i only parse the new files in the directory? Thanks Sayth -- https://mail.python.org/mailman/listinfo/python-list

Re: What iterable method should I use for Lists of Lists

2016-04-18 Thread Peter Otten
Sayth Renshaw wrote: > Think I have a solution of sorts, although my numpy array failed, zip > worked. > > from pyquery import PyQuery as pq > import numpy as np > > d = pq(filename='20160319RHIL0_edit.xml') > res = d('nomination') > # myAt = pq.each(res.attr('bbid')) > # print(repr(res)) > # my

Re: Python2.7 win64 --- cannot install the package of scipy

2016-04-18 Thread Oscar Benjamin
On 16 April 2016 at 22:53, wrote: > I failed to install the package of scipy on Python2.7(win64). > > 1. I tried the direct way that use cmd--pip install scripy. The result shows > that it failed with error code 1 in > c:\tyk\appdata\local\temp\pip-build-an9fye\scipy\. > > 2. I tried to install

Re: QWERTY was not designed to intentionally slow typists down

2016-04-18 Thread Gregory Ewing
Steven D'Aprano wrote: Even on a modern keyboard, out of the ten most common digraphs: th he in er an re nd at on nt only er/re use consecutive keys, Also keep in mind that E and R being adjacent on the keyboard does *not* mean they're adjacent in the type basket -- they're actually separated

Re: scipy install error,need help its important

2016-04-18 Thread Oscar Benjamin
On 18 April 2016 at 08:38, Xristos Xristoou wrote: > Τη Δευτέρα, 18 Απριλίου 2016 - 6:53:30 π.μ. UTC+3, ο χρήστης Xristos Xristoou > έγραψε: >> guys i have big proplem i want to install scipy >> but all time show me error >> i have python 2.7 and windows 10 >> i try to use pip install scipy and i

Re: Guido sees the light: PEP 8 updated

2016-04-18 Thread Marko Rauhamaa
Gregory Ewing : > Marko Rauhamaa wrote: >> Steven D'Aprano : >> >>>def Do_The_Thing(): >>>def internal_subpart_start(): ... >>>def internal_subpart_middle(): ... >>>def internal_subpart_end(): ... >>>... >> >> That really should be done more. C weaned us from the routine Pascal >>

Re: [OT] Java generics

2016-04-18 Thread Marko Rauhamaa
Gregory Ewing : > It's understandable that Java didn't originally have a typedef, > because all types had short enough names anyway. But generics changed > that in a big way, and it baffles me that some form of typedef wasn't > added soon afterwards. Java's opposition to typedef seems to be somet

Re: Guido sees the light: PEP 8 updated

2016-04-18 Thread Gregory Ewing
Rustom Mody wrote: Come to think of it take an SQL DBMS browser. Should we say: Horizontal scrolls are BAD; just reformat the table after reaching 80 columns? I would say, yes, horizontal scrolling *is* bad in a table -- probably even worse than it is for text or code. The reason is that tabl

Re: delete from pattern to pattern if it contains match

2016-04-18 Thread harirammanohar
On Monday, April 18, 2016 at 1:19:43 PM UTC+5:30, Joaquin Alzola wrote: > Hi, > > Try to use the xml module. > > import xml.etree.ElementTree as ET > > That might help. > > BR > > Joaquin > > -Original Message- > > > HI All, > > can you help me out in doing below. > > file: > >

Re: Guido sees the light: PEP 8 updated

2016-04-18 Thread Gregory Ewing
Marko Rauhamaa wrote: Steven D'Aprano : def Do_The_Thing(): def internal_subpart_start(): ... def internal_subpart_middle(): ... def internal_subpart_end(): ... ... That really should be done more. C weaned us from the routine Pascal mechanism, but there's no reason not to exploit

Re: [OT] Java generics

2016-04-18 Thread Gregory Ewing
On 17 April 2016 at 23:38, Ian Kelly wrote: The diamond operator in JDK 7 makes this a lot more tolerable, IMO: The diamond notation helps slightly, but not very much. What would help a lot more would be something like C's typedef for giving aliases to type expressions. It's understandable t

Re: Guido sees the light: PEP 8 updated

2016-04-18 Thread Marko Rauhamaa
Steven D'Aprano : > One technique which is common in Pascal, but less so in Python, is to get > the best of both worlds by using nested functions. In Python syntax: > > def Do_The_Thing(): > def internal_subpart_start(): ... > def internal_subpart_middle(): ... > def internal_subpart_e

Re: Python2.7 win64 --- cannot install the package of scipy

2016-04-18 Thread Hasan Diwan
On 2016-04-16, ykt2271707...@gmail.com wrote: > I failed to install the package of scipy on Python2.7(win64). Have you tried anaconda python -- https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda2-4.0.0-Windows-x86_64.exe -- https://mail.python.org/mailman

RE: delete from pattern to pattern if it contains match

2016-04-18 Thread Joaquin Alzola
Hi, Try to use the xml module. import xml.etree.ElementTree as ET That might help. BR Joaquin -Original Message- From: Python-list [mailto:python-list-bounces+joaquin.alzola=lebara@python.org] On Behalf Of harirammano...@gmail.com Sent: 18 April 2016 08:08 To: python-list@python

Re: scipy install error,need help its important

2016-04-18 Thread Xristos Xristoou
Τη Δευτέρα, 18 Απριλίου 2016 - 6:53:30 π.μ. UTC+3, ο χρήστης Xristos Xristoou έγραψε: > guys i have big proplem i want to install scipy > but all time show me error > i have python 2.7 and windows 10 > i try to use pip install scipy and i take that error > > raise NotFoundError('no lapack/blas re

Re: QWERTY was not designed to intentionally slow typists down (was: Unicode normalisation [was Re: [beginner] What's wrong?])

2016-04-18 Thread Steven D'Aprano
On Monday 18 April 2016 12:01, Random832 wrote: > On Sun, Apr 17, 2016, at 21:39, Steven D'Aprano wrote: >> Oh no, it's the thread that wouldn't die! *wink* >> >> Actually, yes it is. At least, according to this website: >> >> http://www.mit.edu/~jcb/Dvorak/history.html > > I'd really rather see

buy ambien online overnight shipping cheapest ambien with quick delivery

2016-04-18 Thread pssdo aood
Click here to buy ambien ! 100 % Highest Quality! Save Your Time and Money! http://ow.ly/101LRw Looking for ambien ? No problem! Click here to buy ambien online order ambien without prescription | overnight ambien without a prescription | buy cheap ambien no Prescription BIEN online purchase | che

Re: What iterable method should I use for Lists of Lists

2016-04-18 Thread Sayth Renshaw
> > You're getting very chatty with yourself, which is fine... but do you > need to quote your entire previous message every time? We really don't > need another copy of your XML file in every post. > > Thanks! > > ChrisA Oops sorry, everytime I posted I then thought of another resource and ke

delete from pattern to pattern if it contains match

2016-04-18 Thread harirammanohar
HI All, can you help me out in doing below. file: guava fruit mango fruit orange fruit need to delete from start to end if it contains mango in a file... output should be: guava fruit orange fruit Thank you -- https://mail.python.org/mailman/listinfo/