Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Perl will always provide the null. -- Larry Wall in <199801151818.KAA14538@wall.org>


devel / comp.lang.python / Re: Faker package

SubjectAuthor
o Re: Faker packageMRAB

1
Re: Faker package

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

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=18187&group=comp.lang.python#18187

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: python@mrabarnett.plus.com (MRAB)
Newsgroups: comp.lang.python
Subject: Re: Faker package
Date: Sat, 19 Jun 2021 03:10:41 +0100
Lines: 60
Message-ID: <mailman.121.1624068645.4164.python-list@python.org>
References: <alpine.LNX.2.20.2106181517520.8149@salmo.appl-ecosys.com>
<7f55cbe8-02b1-9d71-9100-d371ea190056@mrabarnett.plus.com>
<alpine.LNX.2.20.2106181847050.31789@salmo.appl-ecosys.com>
<5d5e04b2-5fd9-7fef-ddcb-1561ec68c1c3@mrabarnett.plus.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de xXYgzhy01ApldP8YIlTk2gJGBDSLZR35CYQMkVfblg6w==
Return-Path: <python@mrabarnett.plus.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=plus.com header.i=@plus.com header.b=JCHVbcNM;
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.000
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'traceback': 0.04; '(most':
0.05; 'last):': 0.05; 'usage': 0.05; '"python': 0.07; 'fake':
0.07; 'linux,': 0.07; 'docs,': 0.09; 'from:addr:python': 0.09;
'received:192.168.1.64': 0.09; 'skip:_ 20': 0.09; 'looks': 0.11;
'127,': 0.16; '56,': 0.16; '68,': 0.16; 'assumed.': 0.16; 'bash':
0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:name:mrab':
0.16; 'line"': 0.16; 'message-id:@mrabarnett.plus.com': 0.16;
'prompt.': 0.16; 'received:plus.net': 0.16; 'root.': 0.16;
'shepard': 0.16; 'subject:package': 0.16; 'windows.': 0.16;
'wrote:': 0.16; 'says': 0.16; 'syntax': 0.16; 'python': 0.16;
'sat,': 0.23; 'skip:_ 10': 0.23; "i'd": 0.23; 'to:addr:python-
list': 0.23; 'command': 0.24; 'jun': 0.27; 'module': 0.28;
'error': 0.28; 'header:User-Agent:1': 0.31; 'received:192.168.1':
0.31; 'skip:_ 30': 0.32; '"",': 0.32; 'unexpected': 0.32; 'using':
0.33; 'header:In-Reply-To:1': 0.33; 'windows': 0.36;
'received:192.168': 0.37; 'file': 0.38; "it's": 0.38; 'something':
0.38; 'use': 0.38; 'does': 0.38; 'means': 0.40; "skip:' 10": 0.40;
'named': 0.63; 'skip:m 20': 0.64; 'ago.': 0.65; 'years': 0.67;
'received:212': 0.68; 'skip:e 20': 0.70; "you'll": 0.75; 'near':
0.77; 'skip:" 40': 0.84; 'usage.': 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019;
t=1624068643; bh=+DGtu5qPhED1B/HOpsnCnKyCIqrAjJ+gBSLZNlaZkIU=;
h=Subject:To:References:From:Date:In-Reply-To;
b=JCHVbcNMFmCuhp7j6r8xlTdB0z4EDxryIwDQGJDO+Rlj3bTysfYYxzNCynDwxJiOG
DSE73Pp0dddXeoURSWND7ro5RPtTM0BGwoxNIj4se4iJmxKvcptcJU1EUIzOmCNPVI
HXpDH0q9Z5AHOJNxUDhmwaZJfeHlq+2BrGpZ1wyMNdsipVfzxEWxyTmbkGg8nEPrOS
LAh6Nd/cTmofrtb8ZaQDRckLnP8dVAGlePG6+vPNuPu4eFyZZ2aIn7C0NqGaLcupxx
4AEIumqJPFxH96Uxc1VvMh7kGqv+xTcBkxvVJVVqssKTks5IIZ6vWiQZZ+TqQf4pGL
vXBUmxWWoTbfg==
X-Clacks-Overhead: "GNU Terry Pratchett"
X-CM-Score: 0.00
X-CNFS-Analysis: v=2.3 cv=H+BAP9Qi c=1 sm=1 tr=0
a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17
a=IkcTkHD0fZMA:10 a=s51tAohOwnX6apqndNoA:9 a=QEXdDO2ut3YA:10
X-AUTH: mrabarnett@:2500
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
In-Reply-To: <alpine.LNX.2.20.2106181847050.31789@salmo.appl-ecosys.com>
Content-Language: en-GB
X-CMAE-Envelope: MS4wfCLSq9JMq2BTybzx/6eHzlzHamsanfkHr4SVuFgVUApPvgZOq6StMEXWq/o39GgvGBWNAXJQYm7SuomtTwcEgQ85eAi9xfBJHqW+AYh8uySZuiR7R6B4
WcPLF3ZZaVTtnIMkPrljBX1NksVYh/+NrcM+be5KDhrAsm7TJSFrgF5YXyKvlS8llHEe2fnDG1/znQ==
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
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: <5d5e04b2-5fd9-7fef-ddcb-1561ec68c1c3@mrabarnett.plus.com>
X-Mailman-Original-References: <alpine.LNX.2.20.2106181517520.8149@salmo.appl-ecosys.com>
<7f55cbe8-02b1-9d71-9100-d371ea190056@mrabarnett.plus.com>
<alpine.LNX.2.20.2106181847050.31789@salmo.appl-ecosys.com>
 by: MRAB - Sat, 19 Jun 2021 02:10 UTC

On 2021-06-19 02:51, Rich Shepard wrote:
> On Sat, 19 Jun 2021, MRAB wrote:
>
>> When it says "command line" it means the operating system's command line. If
>> it's the Python shell , it'll say "Python shell" or "Python prompt.
>
> MRAB,
>
> The root shell's (#) what I assumed. User shells (in bash, anyway) have $ as
> the prompt.
>
> Regardless,
>
> $ faker -o temp.out faker.names()
> -bash: syntax error near unexpected token `('
> [rshepard@salmo ~]$ faker -o temp.out faker.names
> Traceback (most recent call last):
> File "/usr/bin/faker", line 8, in <module>
> sys.exit(execute_from_command_line())
> File "/usr/lib64/python3.7/site-packages/faker/cli.py", line 264, in execute_from_command_line
> command.execute()
> File "/usr/lib64/python3.7/site-packages/faker/cli.py", line 246, in execute
> includes=arguments.include,
> File "/usr/lib64/python3.7/site-packages/faker/cli.py", line 67, in print_doc
> provider_or_field], includes=includes)
> File "/usr/lib64/python3.7/site-packages/faker/proxy.py", line 63, in __init__
> **config)
> File "/usr/lib64/python3.7/site-packages/faker/factory.py", line 56, in create
> prov_cls, lang_found = cls._get_provider_class(prov_name, locale)
> File "/usr/lib64/python3.7/site-packages/faker/factory.py", line 68, in _get_provider_class
> provider_class = cls._find_provider_class(provider, locale)
> File "/usr/lib64/python3.7/site-packages/faker/factory.py", line 90, in _find_provider_class
> provider_module = import_module(provider_path)
> File "/usr/lib64/python3.7/importlib/__init__.py", line 127, in import_module
> return _bootstrap._gcd_import(name[level:], package, level)
> File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
> File "<frozen importlib._bootstrap>", line 983, in _find_and_load
> File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
> ModuleNotFoundError: No module named 'faker.names'
> [rshepard@salmo ~]$
>
> It does not work from the bash command line as a user or as root.
>
>> The "root shell prompt (#)" suggests to me that it's Linux, so if you're
>> using Windows you'll need to use the equivalent for Windows.
>
> I don't do windows; defenestrated 24 years ago.
>
It looks like you're mixing some Python usage ("faker.names()") in with
command line usage.

Judging from the docs, I'd say you need something more like:

$ faker -o temp.out name

for 1 fake name or:

$ faker -r=10 -o temp.out name

for 10 fake names.


devel / comp.lang.python / Re: Faker package

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor