itted to seek to a point in the file,
and then write from that point on.
A write to a read mode ("r") file isn't permitted at all,
so neither is "write after seek" to a read mode file.
A write to an append mode ("a" and "a+") file always write to
before the invention of C. Computer languages have inherited and used it
since (at least) 1948.
Dartmouth BASIC (1964) had "FOR"
FOR I=1 TO 10
ALGOL-60 (1960) had "for"
for i:=1 step 1 until 10
ALGOL-58 (1958) had "for"
for i:=1(1)10
Superplan (1948) h
Chris Angelico wrote:
> On Wed, Apr 12, 2017 at 1:24 AM, Lew Pitcher
> wrote:
>>
>> What in "Try changing your target encoding to something other than ASCII"
>> is encouragement to use "old legacy encodings"?
>>
>>> In 2017, unless yo
Steve D'Aprano wrote:
> On Tue, 11 Apr 2017 12:50 am, Lew Pitcher wrote:
>
>> David Shi wrote:
>>
>>> In the data set, pound sign escape appears:
>>> u'price_currency': u'\xa3', u'price_formatted': u'\xa3525,000
r: 'ascii' codec can't encode
> character u'\xa3' in position 0: ordinal not in range(128)
There is no "pound sign" in ASCII[1]. Try changing your target encoding to
something other than ASCII.
[1]: See http://std.dkuug.dk/i18n/charmaps/ascii for a list of
to be a complete idiot.
>
> I suppose all that could be a reality, but, how many
> computers do you know of have been compromised in this
> manor?
Probably many, especially in high-use, public or semi-restricted systems like
those found in Universities, libraries, and other "public" institutions. Even
corporate systems have this exposure, which is why large corporations spend a
lot of money on Information Systems security.
--
Lew Pitcher
"In Skills, We Trust"
PGP public key available upon request
--
https://mail.python.org/mailman/listinfo/python-list
On Thursday December 8 2016 11:48, in comp.lang.python, "Random832"
wrote:
> On Wed, Dec 7, 2016, at 15:29, Lew Pitcher wrote:
>> But, point of fact is that the feature to disable globbing is not often
>> needed. Most Unix programs that accept filenames are happy to acce
lt shell options to parse
commandlines in the Popen() method, then you need to talk to the authors of
Python to see if they can give you a way to alter this behaviour.
Otherwise, you are just being cranky and argumentative. Stop it. Suck it up
and move on. The world doesn't revolve around B
isable temporarily or permanently if necessary.
For example:
calculate '3*5'
or
sh -o noglob -c "calculate 3*5"
or even
sh -o noglob
calculate 3*5
> This expression might be seen as 345 if there happens to be file called
> '345' lying around.
Only if shell globbing is enabled, and you don't specifically bypass it.
--
Lew Pitcher
"In Skills, We Trust"
PGP public key available upon request
--
https://mail.python.org/mailman/listinfo/python-list
On Monday December 5 2016 17:24, in comp.lang.python, "Chris Angelico"
wrote:
> On Tue, Dec 6, 2016 at 8:38 AM, Lew Pitcher
> wrote:
>> The OP asked for the runlevel, not the systemd target.
>
> Runlevels don't exist in systemd. And systemd targets don't
")
16:36 $ python rlevel.py
sh: systemctl: command not found
16:36 $
> systemd 'graphical.target' corresponds to the old runlevel 5.
Yes? So?
The OP asked for the runlevel, not the systemd target.
--
Lew Pitcher
"In Skills, We Trust"
PGP public key available upon request
--
https://mail.python.org/mailman/listinfo/python-list
mal ones recommence.
The best way to think about it is that all parameters are parameters, whether
derived from a glob input to a shell, or explicitly specified in the
invocation.
If you have a need for positional parameters, then either specify that your
code only accepts them in specific places,
gt;
>subprocess.Popen(["python","a.py", "*"])
>
> the output will be: ['a.py','*']?
>
> In that case forget Windows vs. Linux, you now have a program that will
> get command parameters processed differently depending on whether it w
use os.mkdir() to create a file named with the name of the sanitized
path, /or/ use os.makedirs(), which will create all the subdirectories
required by your given path.
2) Apparently os.mkdir() (at least) defaults to requiring an ASCII pathname.
Those of your titles that contain Unicode characters cannot be stored
verbatim without either
a) re-encoding the title in ASCII, or
b) flagging to os.mkdir() that Unicode is acceptable.
Apparently, this is a common problem; a google search brought up several pages
dedicated to answering this question, including one extensive paper on the
topic (http://nedbatchelder.com/text/unipain.html). There apparently are ways
to cause os.mkdir() to accept Unicode inputs; their effectiveness and
side-effects are beyond me.
HTH
--
Lew Pitcher
"In Skills, We Trust"
PGP public key available upon request
--
https://mail.python.org/mailman/listinfo/python-list
line consisting only of two hyphens followed by a
space. Any lines that follow that line are considered to be part of the
signature.
--
Lew Pitcher
"In Skills, We Trust"
PGP public key available upon request
--
https://mail.python.org/mailman/listinfo/python-list
;,i);
rc = EXIT_FAILURE;
}
if (rc == EXIT_SUCCESS) puts("SUCCESS");
return rc;
}
18:39 $ cc -o testlogic testlogic.c
18:39 $ ./testlogic
SUCCESS
--
Lew Pitcher
"In Skills, We Trust"
PGP public key available upon request
--
https://mail.python.org/mailman/listinfo/python-list
16 matches
Mail list logo