Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

19 May, 2024: Line wrapping has been changed to be more consistent with Usenet standards.
 If you find that it is broken please let me know here rocksolid.nodes.help


devel / comp.lang.python / RE: Extract lines from file, add to new files

SubjectAuthor
* RE: Extract lines from file, add to new filesRich Shepard
`- Re: Extract lines from file, add to new filesStefan Ram

1
RE: Extract lines from file, add to new files

<mailman.6.1706545541.3227.python-list@python.org>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25195&group=comp.lang.python#25195

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!paganini.bofh.team!2.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: rshepard@appl-ecosys.com (Rich Shepard)
Newsgroups: comp.lang.python
Subject: RE: Extract lines from file, add to new files
Date: Mon, 29 Jan 2024 08:15:44 -0800 (PST)
Lines: 19
Message-ID: <mailman.6.1706545541.3227.python-list@python.org>
References: <c9cf741b-9781-8dd6-96df-d270d0ac2@appl-ecosys.com>
<2a5eef2d-3d66-8cea-64eb-602ea5aff946@appl-ecosys.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII; format=flowed
X-Trace: news.uni-berlin.de 7o0u2KF6RG5RcPCuhMZgBg2eDeypfrNmuFBWcTKMYMIg==
Cancel-Lock: sha1:QzfAfXYALMqs5OBVP538hyVz1Co= sha256:10huoczhO4DdREbuiog3cR25SbLjBQc2uASrnbeJBZw=
Return-Path: <rshepard@appl-ecosys.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.000
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'file?': 0.05; 'variable':
0.05; '"python': 0.07; 'explanation': 0.07; 'subject:add': 0.07;
':-)': 0.09; 'question:': 0.09; 'subject:files': 0.09; 'tricks':
0.09; 'from:addr:appl-ecosys.com': 0.16; 'from:addr:rshepard':
0.16; 'from:name:rich shepard': 0.16; 'received:50.126': 0.16;
'received:50.126.108': 0.16; 'received:50.126.108.78': 0.16;
'received:appl-ecosys.com': 0.16; 'received:mail.appl-ecosys.com':
0.16; 'shepard': 0.16; 'specify': 0.16; 'tia,': 0.16; 'wrote:':
0.16; 'python': 0.16; 'values': 0.17; 'to:addr:python-list': 0.20;
"i've": 0.22; 'fri,': 0.22; 'subject:file': 0.22; 'looked': 0.31;
'extract': 0.32; 'python-list': 0.32; "i'm": 0.33; "i'll": 0.33;
'script': 0.33; 'same': 0.34; 'header:In-Reply-To:1': 0.34;
'subject:from': 0.37; 'received:192.168': 0.37; 'file': 0.38;
'use': 0.39; 'finding': 0.39; 'both': 0.40; 'email': 0.63; 'pass':
0.64; 'clear': 0.64; 'well': 0.65; 'sufficiently': 0.84
In-Reply-To: <c9cf741b-9781-8dd6-96df-d270d0ac2@appl-ecosys.com>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <2a5eef2d-3d66-8cea-64eb-602ea5aff946@appl-ecosys.com>
X-Mailman-Original-References: <c9cf741b-9781-8dd6-96df-d270d0ac2@appl-ecosys.com>
 by: Rich Shepard - Mon, 29 Jan 2024 16:15 UTC

On Fri, 12 Jan 2024, Rich Shepard via Python-list wrote:

> For my use 1) the salutation and email address (always with an '@') are
> sequential and 2) I'm developing the script to extract both from the same
> file.

I've looked at my Python books "Python Crash Course," "Effective Python,"
and "Python Tricks The Book" as well as web pages in my searches without
finding the answer to what may be a simple question: how to specify a
variable in one file that has its values in another file.

Specifically, how to I designate the salutation holder in the message file
and pass it the name value from the name/email address file?

If this explanation is not sufficiently clear I'll re-write it. :-)

TIA,

Rich

Re: Extract lines from file, add to new files

<file-20240129174003@ram.dialup.fu-berlin.de>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25196&group=comp.lang.python#25196

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.lang.python
Subject: Re: Extract lines from file, add to new files
Date: 29 Jan 2024 16:41:14 GMT
Organization: Stefan Ram
Lines: 15
Expires: 1 Dec 2024 11:59:58 GMT
Message-ID: <file-20240129174003@ram.dialup.fu-berlin.de>
References: <mailman.6.1706545541.3227.python-list@python.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de aEjY8ZoxDb6UJfgrbI9XOQg/QR4v9rFOunPje/JycxVk+J
Cancel-Lock: sha1:GJZEuuUUDoTFzwrd/YTik4r1R2Q= sha256:Q8h6ez2AaAUsZh3tfjQ1QmPsxjpGvEFMT2KiWjQsD0k=
X-Copyright: (C) Copyright 2024 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
Accept-Language: de-DE-1901, en-US, it, fr-FR
 by: Stefan Ram - Mon, 29 Jan 2024 16:41 UTC

Rich Shepard <rshepard@appl-ecosys.com> writes: how to specify a
>variable in one file that has its values in another file.

In the first file, you can write

variable = eval( open( "otherfile" ).read() )

, and the value for "variable" will be taken from "otherfile".

$ echo 3.14 >otherfile
$ echo "v = eval( open( 'otherfile' ).read() ); print( v )" > thisfile
$ python3 thisfile
3.14
$


devel / comp.lang.python / RE: Extract lines from file, add to new files

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor