Search and Replace of string in a yaml file

2019-03-23 Thread Pradeep Patra
Hi all,

I have several yaml files in a directory around 100s. I have some values
and my script should search a string(reading from the JSON file)  from the
series of yaml files and run some validation like the key of the file that
is updated  in the yaml file and run some basic validation tests like data
integrity of the replaced string with the source string read from JSON. Can
anyone suggest some reliable and efficient method to achieve this and
appreciate some examples for the same?

Regards
Pradeep
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Determining latest stable version for download

2019-03-23 Thread Tim Johnson
* Tim Johnson  [190320 10:46]:
> Some time in the near future I will want to install the latest
> current stable version of python on a remote server. I anticipate
> that I will either use wget from the server shell or download to my
> workstation and transfer via FTP. I will need source to compile.
> 
> I see python source at https://www.python.org/ftp/python/.
> 
> How do I determine the following?
> 1) Latest current stable version of python 3*
> 2) Correct tarfile for linux - at this time I assume it will be
>linux centOS
  Thanks for the constructive replies. I'll attempt a compile from
  source after this weekend.
  I'll use these instructions:
  https://my.hostmonster.com/hosting/help/python-install
  as a guide and post results under a topic more appropriate to my
  goal: that of installing and running later versions of python on a
  shared server (sans root access).
-- 
Tim Johnson
http://www.tj49.com
-- 
https://mail.python.org/mailman/listinfo/python-list


[CfP] DLS 2019 - 15th Dynamic Languages Symposium, co-located with SPLASH 2019

2019-03-23 Thread Nick Papoylias

Call for Papers

 DLS 2019 - 15th Dynamic Languages Symposium

 Co-located with SPLASH 2019, October 22, Athens, Greece

   https://conf.researchr.org/home/dls-2019
Follow us @dynlangsym


Dynamic Languages play a fundamental role in today’s world of software,
from the perspective of research and practice. Languages such as
JavaScript, R, and Python are vehicles for cutting edge research as well
as building widely used products and computational tools.

The 15th Dynamic Languages Symposium (DLS) at SPLASH 2019 is the
premier forum for researchers and practitioners to share research and
experience on all aspects on dynamic languages.

DLS 2019 invites high quality papers reporting original research and
experience related to the design, implementation, and applications of
dynamic languages.

Areas of interest are generally empirical studies, language design,
implementation, and runtimes, which includes but is not limited to:

- innovative language features
- innovative implementation techniques
- innovative applications
- development environments and tools
- experience reports and case studies
- domain-oriented programming
- late binding, dynamic composition, and run-time adaptation
- reflection and meta-programming
- software evolution
- language symbiosis and multi-paradigm languages
- dynamic optimization
- interpretation, just-in-time and ahead-of-time compilation
- soft/optional/gradual typing
- hardware support
- educational approaches and perspectives
- semantics of dynamic languages
- frameworks and languages for the Cloud and the IoT

Submission Details
--

Submissions must neither be previously published nor under review at
other events. DLS 2019 uses a single-blind, two-phase reviewing process.

Papers are assumed to be in one of the following categories:

  Research Papers:
  describe work that advances the current state of the art

  Experience Papers:
  describe insights gained from substantive practical
  applications that should be of a broad interest

  Dynamic Pearls:
  describe a known idea in an appealing way to remind the
  community and capture a reader’s interest

The program committee will evaluate each paper based on its
relevance, significance, clarity, and originality.
The paper category needs to be indicated during submission,
and papers are judged accordingly.

Papers are to be submitted electronically at https://dls19.hotcrp.com/
in PDF format. Submissions must be in the ACM SIGPLAN conference acmart
format, 10 point font, and should not exceed 12 pages. Please see full
details in the instructions for authors available at:

https://conf.researchr.org/home/dls-2019#Instructions-for-Authors

DLS 2019 will run a two-phase reviewing process to help authors make
their final papers the best that they can be. Accepted papers will be
published in the ACM Digital Library and will be freely available for
one month, starting two weeks before the event.

Important Deadlines
---

Abstract Submission:   May 29, 2019
Paper Submission:  June 5, 2019
First Phase Notification:  July 3, 2019
Final Notifications:   August 14, 2019
Camera Ready:  August 28, 2019



All deadlines are 23:59 AoE (UTC-12h).

AUTHORS TAKE NOTE: The official publication date is the date the
proceedings are made available in the ACM Digital Library. This date
may be up to two weeks prior to the first day of your conference.
The official publication date affects the deadline for any patent
filings related to published work.

Program Committee
-

Alexandre Bergel, University of Chile
Carl Friedrich Bolz-Tereick, Heinrich-Heine-Universität Düsseldorf
Chris Seaton, Oracle Labs
David Chisnall, Microsoft Research
Elisa Gonzalez Boix, Vrije Universiteit Brussel
Gregor Richards, University of Waterloo
Guido Chari, Czech Technical University
Hannes Payer, Google
James Noble, Victoria University of Wellington
Jeremy Singer, University of Glasgow
Joe Gibbs Politz, University of California San Diego
Juan Fumero, The University of Manchester
Julien Ponge, Red Hat
Mandana Vaziri, IBM Research
Manuel Serrano, Inria
Marc Feeley, Université de Montréal
Mark Marron, Microsoft Research
Na Meng, Virginia Tech
Nick Papoulias, Université Grenoble Alpes
Richard Roberts, Victoria University of Wellington
Sam Tobin-Hochstadt, Indiana University
Sarah Mount, Aston University
Sébastien Doeraene, École polytechnique fédérale de Lausanne
William Cook, University of Texas at Austin


Program Chair
-

Stefan Marr, University of Kent, United Kingdom
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: log file

2019-03-23 Thread Sharan Basappa
On Friday, 22 March 2019 09:09:14 UTC+5:30, DL Neil  wrote:
> On 22/03/19 4:25 PM, Sharan Basappa wrote:
> > I am running a program and even though the program runs all fine, the log 
> > file is missing. I have pasted first few lines of the code.
> > 
> > Any suggestions where I maybe going wrong?
> > 
> > import os
> > import csv
> > import logging
> > import assertion_design as asd
> > import random
> > 
> > #Create and configure logger
> > logging.basicConfig(filename="test_1.log", filemode='w', 
> > format='%(asctime)s %(message)s')
> > import os
> > import csv
> > import logging
> > import assertion_design as asd
> > import random
> > 
> > #Create and configure logger
> > logging.basicConfig(filename="test_1.log", filemode='w', 
> > format='%(asctime)s %(message)s')
> > 
> 
> 
> Do all of these lines actually appear, or is it an accidental 
> copy-paste+paste?
> 
> What do you use to actually record data in the log? eg
> 
>   logging.info("Informational message")
> 
> Any error message from Python?
> 
> When you say "the log file is missing" do you mean that there is no such 
> file, that there is an empty file, or what? Which directory do you run 
> the code from, and in which directory do you expect to find the log file?
> 
> -- 
> Regards =dn

There is no log file at all in the directory where I am running.
I expected the log file to be in the directory where I am running the test from.

Let me describe it in more detail.
This is the directory - "D:\Users\sharanb\OneDrive - HCL Technologies 
Ltd\Projects\MyBackup\Projects\Initiatives\machine 
learning\programs\assertion\CNN"

The test program imports the design and runs some test on it.
Both the design file and test file are in the above directory.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: log file

2019-03-23 Thread Sharan Basappa
On Friday, 22 March 2019 09:09:16 UTC+5:30, [email protected]  wrote:
> On Thursday, March 21, 2019 at 10:26:14 PM UTC-5, Sharan Basappa wrote:
> > I am running a program and even though the program runs all fine, the log 
> > file is missing. I have pasted first few lines of the code.
> > 
> I am thinking--hoping, rather--that you just kind of double pasted there. 
> Anyways, you needed to specify the logging level in basicConfig:
> 
> import os
> import csv
> import logging
> import random
> 
> #Create and configure logger
> # Check out level=logging.INFO
> logging.basicConfig(filename="test_1.log", filemode='w', format='%(asctime)s 
> %(message)s', level=logging.INFO)
> log = logging.getLogger()
> log.info("Yay!")

Adam,

I don't understand. The logger is set to DEBUG level using the following line.
logger.setLevel(logging.DEBUG)

Do you see anything incorrect?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: log file

2019-03-23 Thread Sharan Basappa
On Friday, 22 March 2019 09:13:18 UTC+5:30, MRAB  wrote:
> On 2019-03-22 03:25, Sharan Basappa wrote:
> > I am running a program and even though the program runs all fine, the log 
> > file is missing. I have pasted first few lines of the code.
> > 
> > Any suggestions where I maybe going wrong?
> > 
> > import os
> > import csv
> > import logging
> > import assertion_design as asd
> > import random
> > 
> > #Create and configure logger
> > logging.basicConfig(filename="test_1.log", filemode='w', 
> > format='%(asctime)s %(message)s')
> > import os
> > import csv
> > import logging
> > import assertion_design as asd
> > import random
> > 
> > #Create and configure logger
> > logging.basicConfig(filename="test_1.log", filemode='w', 
> > format='%(asctime)s %(message)s')
> > 
> Are you sure that you know where it's putting the log file? You have a 
> relative path there, but relative to where? Try it with an absolute path.
> 
> Are you sure that it's logging anything? Log a simple message just after 
> configuring to double-check.

Would the file not get logged using the current directory?

BTW, I changed the file location as follows and still I don't see it:

logging.basicConfig(filename="D:\Users\sharanb\OneDrive - HCL Technologies 
Ltd\Projects\MyBackup\Projects\Initiatives\machine 
learning\programs\assertion\CNN\test_1.log", filemode='w', format='%(asctime)s 
%(message)s')
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: log file

2019-03-23 Thread Cameron Simpson

On 23Mar2019 21:47, Sharan Basappa  wrote:

On Friday, 22 March 2019 09:13:18 UTC+5:30, MRAB  wrote:

On 2019-03-22 03:25, Sharan Basappa wrote:
> I am running a program and even though the program runs all fine, the log 
file is missing. I have pasted first few lines of the code.
> Any suggestions where I maybe going wrong?

[...]

> #Create and configure logger
> logging.basicConfig(filename="test_1.log", filemode='w', format='%(asctime)s 
%(message)s')
>
Are you sure that you know where it's putting the log file? You have a
relative path there, but relative to where? Try it with an absolute path.

Are you sure that it's logging anything? Log a simple message just after
configuring to double-check.


Would the file not get logged using the current directory?


It should be.


BTW, I changed the file location as follows and still I don't see it:

logging.basicConfig(filename="D:\Users\sharanb\OneDrive - HCL 
Technologies Ltd\Projects\MyBackup\Projects\Initiatives\machine 
learning\programs\assertion\CNN\test_1.log", filemode='w', 
format='%(asctime)s %(message)s')


Did you read my other recent post? You should define strings with 
backslashes in them such are your file path as 'raw strings', which 
start with r' or r" instead of a plain quote character. Raw strings do 
not interpret \x escapes. In particular your path above has a '\a' in 
it, which is not a backslash followed by an "a", it is a BEL character.


That said, I can't see what's wrong with your original example which has 
no backslashes.


Cheers,
Cameron Simpson 
--
https://mail.python.org/mailman/listinfo/python-list