EuroSciPy 2019 - CfP is open

2019-04-02 Thread Alexander CS Hendorf [EuroSciPy 2019]
= *** Apologise for multiple posting *** Dear Colleagues, We are delighted to invite you to join us for the 12th European Conference on Python in Science. The EuroSciPy 2019 Conference will take place from September 2 to September 6 in Bilba

PyConDE 2018 (Germany) & PyData Karlsruhe CfP extended.

2018-05-28 Thread Alexander CS Hendorf [PyConDE 2018]
The CfP has been extended for one more week until Sunday June 3 24:00 AoE (Anywhere on Earth). PyCon.DE is where Pythonistas in Germany can meet to learn about new and upcoming Python libraries, tools, software and data science. We welcome Python enthusiasts, programmers, data scientists and ev

Re: Python question

2017-03-25 Thread cs
On 26Mar2017 00:11, Erik wrote: On 25/03/17 20:26, MRAB wrote: On 2017-03-25 20:10, Terry Reedy wrote: On 3/25/2017 6:50 AM, Steve D'Aprano wrote: they BCC or CC me without a good excuse. As I was in this case: the OP BCCed me in his post. I'm not *that* special, so my guess is that he did a

Re: Using sudo with pip3?

2017-01-06 Thread cs
On 06Jan2017 15:44, jim wrote: Setting up a new computer to run Ubuntu 16.04. Started using pip3 to install all the python stuff I had on the old machine and got this message: jfb@jims-1604:~$ sudo pip3 install matplotlib [sudo] password for jfb: The directory '/home/jfb/.cache/pip/http' or i

Re: manually sorting images?

2016-09-04 Thread cs
On 05Sep2016 10:09, Greg Ewing wrote: Quivis wrote: 2. You want to sort them according to red houses, blue houses, green trees, yellow trees (that's autumn leaves), cats, dogs, children, elderly people, But... but... what if you have a picture of a child playing with a dog that's chasing an

Re: Is duck-typing misnamed?

2016-08-27 Thread cs
On 26Aug2016 19:58, ROGER GRAYDON CHRISTMAN wrote: "If it walks like a duck, quacks like a duck,... " so there is indeed precedence for this so-called 'duck typing' but wouldn't it be more Pythonic to call this 'witch typing'? "How do you know she is a witch?" "She looks like one." etc. I do g

Re: Two-Dimensional Expression Layout

2016-08-20 Thread cs
On 19Aug2016 16:11, Lawrence D’Oliveiro wrote: On Saturday, August 20, 2016 at 10:38:34 AM UTC+12, Chris Angelico wrote: On Sat, Aug 20, 2016 at 8:31 AM, Lawrence D’Oliveiro wrote: There is no short-cut evaluation when constructing tuples and lists. I'm not sure how that would make differenc

Re: Invalid Syntax

2016-08-09 Thread cs
On 09Aug2016 20:22, Rob Gaddi wrote: Ltc Hotspot wrote: What is the source of the following, 'error message: SyntaxError: invalid syntax (, line 2)' v. Python 3.3 Code reads: x=1 if x==1 # indent 4 spaces print "x = 1" A missing colon, the appropriate location of which is left as an

Re: Python text file fetch specific part of line

2016-07-29 Thread cs
On 29Jul2016 18:42, Gordon Levi wrote: c...@zip.com.au wrote: On 28Jul2016 19:28, Gordon Levi wrote: Arshpreet Singh wrote: I am writing Imdb scrapper, and getting available list of titles from IMDB website which provide txt file in very raw format, Here is the one part of file(http://past

Re: Python text file fetch specific part of line

2016-07-28 Thread cs
On 28Jul2016 19:28, Gordon Levi wrote: Arshpreet Singh wrote: I am writing Imdb scrapper, and getting available list of titles from IMDB website which provide txt file in very raw format, Here is the one part of file(http://pastebin.com/fpMgBAjc) as the file provides tags like Distribution

Re: Python text file fetch specific part of line

2016-07-28 Thread cs
On 27Jul2016 22:12, Arshpreet Singh wrote: I am writing Imdb scrapper, and getting available list of titles from IMDB website which provide txt file in very raw format, Here is the one part of file(http://pastebin.com/fpMgBAjc) as the file provides tags like Distribution Votes,Rank,Title I wa

Re: PEP Request: Advanced Data Structures

2016-07-16 Thread cs
On 17Jul2016 12:43, Chris Angelico wrote: On Sun, Jul 17, 2016 at 12:33 PM, Paul Rubin wrote: Chris Angelico writes: keep a reference to an element deep in the list, and insert a new element in O(1) time at that point. at the C level, wouldn't tracing the links cost massively more than the

Re: PEP Request: Advanced Data Structures

2016-07-16 Thread cs
On 16Jul2016 19:49, Dennis Lee Bieber wrote: On Sat, 16 Jul 2016 15:33:12 -0700 (PDT), Shrey Desai declaimed the following: - Education: the Linked List is a core data structure that CS undergraduates (among others) use and study, so it is vital that they have hands on access to them. A list

Re: input vs. readline

2016-07-08 Thread cs
I was typing in a hurry. There are several unreadable items below. Let me correct myself... On 09Jul2016 09:45, Cameron Simpson wrote: Perhaps the Windows console is treating ESC specially, apparently as "line erase", discarduing any preceeding text. Hence your results. [...] - accept this, a

Re: input vs. readline

2016-07-08 Thread cs
On 08Jul2016 16:17, John Nagle wrote: If "readline" is imported, "input" gets "readline" capabilities. It also loses the ability to import control characters. It doesn't matter where "readline" is imported; an import in some library module can trigger this. You can try this with a simple tes

Re: Appending an asterisk to the end of each line

2016-07-05 Thread cs
On 05Jul2016 21:37, Python List wrote: On 07/05/2016 03:05 PM, Seymore4Head wrote: import os f_in = open('win.txt', 'r') f_out = open('win_new.txt', 'w') for line in f_in.read().splitlines(): f_out.write(line + " *\n") f_in.close() f_out.close() os.rename('win.txt', 'win_old.txt') os.re

Re: I'm wrong or Will we fix the ducks limp?

2016-06-05 Thread cs
On 03Jun2016 16:09, Sayth Renshaw wrote: (By the way, the "pf = pf.append(thing)" construction is weird. All you need is pf.append(thing).) I got the pf = pf.append(thing) from doing pandas because in pandas its not an inplace function. In Python this doesn't do what you think. The conventi

Re: Catch exception with message?

2016-06-03 Thread cs
On 04Jun2016 04:44, Piyush Verma <114piy...@gmail.com> wrote: Generally we catch exception using except Exception as e: But sometimes, we see same type of exception is present with different message.Is there a way to capture same exception with message filtering? Please help me to do this. Qui

Re: How can I debug silent failure - print no output

2016-05-28 Thread cs
On 28May2016 03:32, Sayth Renshaw wrote: On Saturday, 28 May 2016 19:44:53 UTC+10, Sayth Renshaw wrote: On Saturday, 28 May 2016 18:02:06 UTC+10, Sayth Renshaw wrote: > So how do i get argparse to read the file arguments correctly? > > Looking at the namespace it all gets pushed into path and

Re: How can I debug silent failure - print no output

2016-05-27 Thread cs
On 27May2016 21:02, Sayth Renshaw wrote: On Saturday, 28 May 2016 13:06:59 UTC+10, Michael Torrie wrote: Add more print() calls. Offhand I'd say that pq(filename=filename) is returning an empty list so that for loop is not doing anything. Hence your debugging print() calls never happen. Add

Re: What should Python apps do when asked to show help?

2016-05-02 Thread cs
On 02May2016 14:07, Grant Edwards wrote: On 2016-05-01, c...@zip.com.au wrote: Didn't the OP specify that he was writing a command-line utility for Linux/Unix? Discussing command line operation for Windows or OS-X seems rather pointless. OS-X _is_ UNIX. I spent almost all my time on this M

Re: What should Python apps do when asked to show help?

2016-05-01 Thread cs
On 01May2016 17:04, Grant Edwards wrote: On 2016-05-01, Steven D'Aprano wrote: On Mon, 2 May 2016 02:30 am, Grant Edwards wrote: In discussions like these, it would be important to draw from precedents. Are there commands that have such an option? It's pretty rare.  It is assumed that Unix

Re: What should Python apps do when asked to show help?

2016-05-01 Thread cs
On 01May2016 21:23, Chris Angelico wrote: On Sun, May 1, 2016 at 8:55 PM, Steven D'Aprano wrote: Is there an environment variable to tell the application what you consider "short", or should it read your mind? How about $LINES? If it's less than that, it'll fit on one screen. Of course, that

Re: What should Python apps do when asked to show help?

2016-05-01 Thread cs
On 01May2016 20:55, Steven D'Aprano wrote: On Sun, 1 May 2016 05:28 pm, c...@zip.com.au wrote: On 01May2016 16:44, Chris Angelico wrote: So you expect the environment variable to say which of multiple pagers you might want, but only when you already want a pager. Okay. How is an app supposed

Re: What should Python apps do when asked to show help?

2016-05-01 Thread cs
On 01May2016 16:44, Chris Angelico wrote: On Sun, May 1, 2016 at 3:24 PM, wrote: Yes, PAGER=cat would make "man" also not page, and likely almost everything. And yet I am unwilling to do so. Why? On reflection, my personal problems with this approach are twofold: - I want $PAGER to specify

Re: What should Python apps do when asked to show help?

2016-04-30 Thread cs
On 30Apr2016 23:46, Random832 wrote: On Sat, Apr 30, 2016, at 22:30, Grant Edwards wrote: We don't want to use a PAGER variable to specify when we want a pager and when we don't want a pager. If we want a pager we append "| less" to the command. If we don't want a pager, we don't append that

Re: What should Python apps do when asked to show help?

2016-04-30 Thread cs
On 29Apr2016 11:40, Steven D'Aprano wrote: On Fri, 29 Apr 2016 07:08 am, Grant Edwards wrote: On 2016-04-28, Random832 wrote: On Thu, Apr 28, 2016, at 15:39, Grant Edwards wrote: That's fine. If you want two or three forms of documentation then you prepare two or three forms of documentatio

Re: What should Python apps do when asked to show help?

2016-04-30 Thread cs
On 30Apr2016 13:23, Steven D'Aprano wrote: On Sat, 30 Apr 2016 12:49 pm, Ben Finney wrote: Random832 writes: On Fri, Apr 29, 2016, at 22:27, Rustom Mody wrote: > Instead it does some ½-assed fall-between-the-stools of both That doesn't answer the question of why, if you (Well, Ethan, but you

Re: sys.exit(1) vs raise SystemExit vs raise

2016-04-15 Thread cs
On 12Apr2016 18:20, Ganesh Pal wrote: I m on python 2.7 and Linux , I have a simple code need suggestion if I I could replace sys.exit(1) with raise SystemExit . ==Actual code== def main(): try: create_logdir() create_dataset() unittest.main() except Exception as

Re: Python Front-end to GCC

2013-11-15 Thread sharath . cs . smp
On Sunday, 20 October 2013 10:56:46 UTC-7, Philip Herron wrote: > Hey, > > > > I've been working on GCCPY since roughly november 2009 at least in its > > concept. It was announced as a Gsoc 2010 project and also a Gsoc 2011 > > project. I was mentored by Ian Taylor who has been an extremely b

CGI, MySQL & Python

2007-12-29 Thread CS
I'm new to programming and I'm trying to find some answers. I wrote a few python cgi scripts for my website all of which access a mysql db on 'localhost'. My question is, Is it a bad idea to have my username and password for my db coded in my script? Is there a better way to make sure that inf