Re: I am new to python. I have a few questions coming from an armature!

2016-08-17 Thread Grant Edwards
ed > by "(*p)->m" (the parens are necessary because of the operator > precedence). ITYM (*p).m > This can be abbreviated to "p->m". > > Pascal, on the other hand, dereferences with a postfixed "^", so that > would be "p^.m"

Re: saving octet-stream png file

2016-08-20 Thread Grant Edwards
ord. Last time I looked a lot of DSP chips still have "byte" sizes larger than 8 bits. IIRC, 16, 24, and 32 bits are common byte sizes. Not that Python runs on any of them... -- Grant Edwards grant.b.edwardsYow! A can of ASPA

Re: integer's methods

2016-08-27 Thread Grant Edwards
_length". You need to enter the integer such that it's identified by the parser as an integer rather than as a broken floating point number: >>> (123).bit_length() 7 >>> 123 .bit_length() 7 -- Grant Edwards grant.b.edwardsYow! Look DEEP into the

Re: integer's methods

2016-08-27 Thread Grant Edwards
On 2016-08-27, Random832 wrote: > On Sat, Aug 27, 2016, at 13:24, Grant Edwards wrote: >> Becuase the parser thinks you've entered a floating point number with >> a fractional part of "bit_length". > > 123.+456 doesn't think that the fractional part is &q

Re: What's the best way to minimize the need of run time checks?

2016-08-29 Thread Grant Edwards
; hysterical raisins, pointers can be assigned to integers with just a > warning. (Good code should have an explicit cast here.) > > You probably should have warnings enabled. IMO, when doing doing development with GCC, -Wall -Werror is the absolute minimum standard. -- Gra

Re: [OT] Altair

2016-08-30 Thread Grant Edwards
generated by a CAD program for holes in a circuit board is still often referred to as a "drill tape". -- Grant Edwards grant.b.edwardsYow! Now that I have my at "APPLE", I comprehend COST

Re: What you can do about legalese nonsense on email (was: How to split value where is comma ?)

2016-09-08 Thread Grant Edwards
t, I'm sure there's a lawyer somewhere who's trying to cover his ass regardless of how foolish it looks... > This email is confidential and may be subject to privilege. If you > are not the intended recipient, please do not copy or disclose its > content but contact th

Re: What you can do about legalese nonsense on email (was: How to split value where is comma ?)

2016-09-09 Thread Grant Edwards
On 2016-09-08, Random832 wrote: > On Thu, Sep 8, 2016, at 18:13, Grant Edwards wrote: >> After all, that boilerplate just makes the corporation look stupid and >> incompetent. Any email that leaves the corporate network must be >> assumed to be visible to world+dog

Re: How to split value where is comma ?

2016-09-12 Thread Grant Edwards
;> ChrisA >> > > That could get someone into troubles. Well, you need to be a bit diplomatic about it: "Just FYI, people have told me that they think our boilerplate disclaimer makes it seem that the company is naive and lacks an understanding of how the Internet

Re: Why don't we call the for loop what it really is, a foreach loop?

2016-09-13 Thread Grant Edwards
alogous to PHP's "foreach". That said, I despise PHP so thoroughly that "because PHP does it" is, to me, a pretty strong argument for _not_ doing something. Even trying to ignore my bias agains PHP, I can't see that Python's calling it "for" instea

Re: Oh gods can we get any more off-topic *wink* [was Re: [Python-ideas] Inconsistencies]

2016-09-15 Thread Grant Edwards
oast of Ireland. > > I'm told that a few years ago somebody accidentally dumped a trailer load of > soil by the side of the road in Kanvas, and within a day some enterprising > entrepreneur had set up a thriving roadside business offering > mountain-cli

Re: unintuitive for-loop behavior

2016-09-30 Thread Grant Edwards
ink that's an absolutely brilliant feature, and I use it a _lot_ when writing C code. I'm a big fan of minimizing the lifetime/scope of variables. I wish if/then/else did the same thing: if ((r=some_function()) != R_SUCCESS) printf("some_function() failed with stat

Re: unintuitive for-loop behavior

2016-09-30 Thread Grant Edwards
On 2016-09-30, Grant Edwards wrote: > On 2016-09-30, Steve D'Aprano wrote: > >> To me, "make for-loops be their own scope" sounds like a joke >> feature out of joke languages like INTERCAL. I'm not aware of any >> sensible language that does anything

Re: Copying a compiled Python from one system to another

2016-10-01 Thread Grant Edwards
On 2016-10-01, Steve D'Aprano wrote: > Long story short: I have no working systems capable of compiling the > latest Python 3.6, and no time to upgrade my usual machines to > something which will work. > > However I do have access to another machine (actually a VM) which can > compile Python 3.6.

Re: Copying a compiled Python from one system to another

2016-10-01 Thread Grant Edwards
On 2016-10-01, Steve D'Aprano wrote: > Does gcc support static linking? Yes, but the real question is the CPython makefile includes recipes for a statically-linked target. > Even if I end up with a much bigger binary, at least I know it will > have everything it needs to run and I won't have to

Re: User Interface Suggestions? (newbie)

2016-10-06 Thread Grant Edwards
want to go one step further, you can use the terminfo library to deal with different terminal types, but I have no idea how to use it without ncurses. If people care about their programs working with different terminal types, they use ncurses. -- Grant Edwards grant.b.edwards

Re: User Interface Suggestions? (newbie)

2016-10-06 Thread Grant Edwards
> what terminal type you have (that's black magic itself) and then > works out what escape sequences you need. Nothing magic, it just looks at the 'TERM' enviroment varible and looks up that value in the terminfo database. -- Grant Edwards grant.b.edwards

Re: A newbie doubt on methods/functions calling

2016-10-06 Thread Grant Edwards
e Python syntax rather than trying to force it to be something it > is not. [Cue the decades-old story about the elaborate set of C macros that I once saw somebody using so he could write a C program that looked like some flavor of structured BASIC.] -- Grant Edwards grant.b.

Re: Python code is compiled before execution

2016-10-11 Thread Grant Edwards
On 2016-10-11, Pierre-Alain Dorange wrote: > For my part, i differenciate a strict compilation (ie. C) from a > translation into byte-code (ie. Python). FWIW I've seen C compilers that produced byte-code. They allowed for a highly interactive developemnt environment. -- Gr

Re: Without compilation, how to find bugs?

2016-10-13 Thread Grant Edwards
On 2016-10-13, pozz wrote: > However, I think the language interpreter could emit the error before > launching the script even without executing the wrong instruction, > because it perfectly knows how many arguments the function wants and > that one instruction calls it with a wrong number of

Re: pyserial: wait for execute

2016-10-16 Thread Grant Edwards
On 2016-10-16, Michael Okuntsov wrote: > is there a way, other than time.sleep(), to be sure that the command > sent through a serial port has been fully executed? If the remote device doesn't send a response telling you it's done executing the command, then there is no way to know when that has

Re: Why doesn't Python include non-blocking keyboard input function?

2016-10-26 Thread Grant Edwards
On 2016-10-27, Paul Rubin wrote: > Terry Reedy writes: > >> Today, ethernet-connected *nix servers have no keyboard, mouse, or >> even a directly connected terminal. > > Usually you ssh into them and connect to a pty which supports the > same ioctls that a real terminal would. On all the Unixes/

Re: Why doesn't Python include non-blocking keyboard input function?

2016-10-27 Thread Grant Edwards
On 2016-10-27, Marko Rauhamaa wrote: > Grant Edwards : >> I've offered a few times to extend the Linux pty driver to support the >> same set of ioctl calls that a tty does (so that it could be used in >> place of a tty generally), but I've never gotten any response

Re: Why doesn't Python include non-blocking keyboard input function?

2016-10-27 Thread Grant Edwards
supported by the pty driver, the video console tty driver, and the real serial-port tty driver, all provide a common set of API calls. -- Grant Edwards grant.b.edwardsYow! I wish I was on a at Cincinnati street corner

Re: Why doesn't Python include non-blocking keyboard input function?

2016-10-28 Thread Grant Edwards
x/man-pages/man3/exec.3.html Note that the arguments are passed as arbitrary length arrays of character pointers. > This might just be one of those Unixisms that doesn't apply on all > platforms. By using the name of a Unix system call, one might thin

Re: Call a shell command from Python (was: Calling Bash Command From Python)

2016-10-31 Thread Grant Edwards
other shell) or 2) a command line that must be interpreted by bash (or other shell) because it uses I/O redirection, variable substituion, globbing, etc. Your code does not use bash (or any other shell), nor does it need to. It's just running the sudo executable. There are no shells i

Re: Call a shell command from Python

2016-11-01 Thread Grant Edwards
on a Linux system, enter this into a terminal to illustrate: >> >> sudo grep ^$USER\: /etc/shadow > > Bash is not involved here. Python is calling grep directly. He's already been told this 6 times, and is willfully ignoring it. Just give up. -- Gr

Re: ANN: eGenix PyRun - One file Python Runtime 2.2.2

2016-11-18 Thread Grant Edwards
On 2016-11-18, eGenix Team: M.-A. Lemburg wrote: > eGenix PyRun is our open source, one file, no installation version of > Python, making the distribution of a Python interpreter to run based > scripts and applications What's a "based" script? -- Grant Edwards

Re: Request Help With Byte/String Problem

2016-12-02 Thread Grant Edwards
print(format_ip(addr)) If is an array of strings containing base-10 representations of integers, then the str() call isn't needed either: def format_ip(a): return '.'.join(s for s in a) addr = ['12','34','56','78'] print(format_ip(addr)) -- G

Re: correct way to catch exception with Python 'with' statement

2016-12-02 Thread Grant Edwards
m (other than the normal interrupt enable/disable mechanism) to allow you to lock the CPU for the duration of those three instructions to ensure that they are atomic. -- Grant Edwards grant.b.edwardsYow! I request a weekend in

Re: Request Help With Byte/String Problem

2016-12-02 Thread Grant Edwards
On 2016-12-02, Wildman via Python-list wrote: > On Fri, 02 Dec 2016 15:11:18 +0000, Grant Edwards wrote: > >> I don't know what the "addr" array contains, but if addr is a byte >> string, then the "int()" call is not needed, in Pythong 3, a byte is >

Re: correct way to catch exception with Python 'with' statement

2016-12-02 Thread Grant Edwards
On 2016-12-02, Marko Rauhamaa wrote: > Grant Edwards : >> In general CISC processors like x86, AMD64, 68K have read-modify-write >> instructions that allow you to increment a memory location or >> set/clear a bit in memory with a single instruction: >> >>

Re: Detect Linux Runlevel

2016-12-07 Thread Grant Edwards
is kind of communication. There are a few things in Unix that are fundamentally broken and really just can't be used for the things they are intended for (serial ports come to mind). However, that doesn't seem to prevent them from having been used sucessfully that way way for 40 years.

Re: python 2.7.12 on Linux behaving differently than on Windows

2016-12-08 Thread Grant Edwards
the cmd.exe shell only allow "\" as a path separator. Back in the day, you could change the DOS option character to "-", and then type paths they way God intended: with "/" as the separator. -- Grant Edwards grant.b.edwardsYow! I want another

Re: Linux terminals vs Windows consoles - was Re: python 2.7.12 on Linux behaving differently than on Windows

2016-12-08 Thread Grant Edwards
to flat-screen "thin-clients". I got a chance to play with one of those, and it was an industrial Single-board-PC and LCD monitor built into a single unit running Windows. It was configured to boot up and run a Wyse-50 terminal emulator -- and connect to the "real" computer v

Re: python 2.7.12 on Linux behaving differently than on Windows

2016-12-08 Thread Grant Edwards
On 2016-12-08, eryk sun wrote: > On Thu, Dec 8, 2016 at 4:34 PM, Grant Edwards > wrote: >> >> So, to avoid _that_ problem, Windows command line apps and the cmd.exe >> shell only allow "\" as a path separator. > > In cmd you can usually clarify the in

Re: Reading python list as a newsgroup (was ...)

2016-12-16 Thread Grant Edwards
to check all the reference values in a large sample of posts from both sources.] -- Grant Edwards grant.b.edwardsYow! I wonder if I could at ever get started in the gmail.comcredit worl

Re: Reading python list as a newsgroup (was ...)

2016-12-17 Thread Grant Edwards
On 2016-12-17, Dennis Lee Bieber wrote: > On Fri, 16 Dec 2016 15:11:54 + (UTC), Grant Edwards > declaimed the following: > >>I didn't notice much spam on c.l.p (but then again, I filter out all >>posts from google-groups). The problem on c.l.p that caused me t

Re: Reading python list as a newsgroup (was ...)

2016-12-17 Thread Grant Edwards
On 2016-12-17, D'Arcy Cain wrote: > On 2016-12-16 08:16 PM, Dennis Lee Bieber wrote: >> Unfortunately, my client can only "pre filter" on subject and author; I >> could kill all @gmail.*, but could not focus on just Google Groups >> submissions... > > I don't know what client you use but perh

Re: Parse a Wireshark pcap file

2016-12-30 Thread Grant Edwards
pylibpcap for ages. It's a bit old, but still works fine for me: https://sourceforge.net/projects/pylibpcap/ There's also pypcap: https://github.com/pynetwork/pypcap -- Grant Edwards grant.b.edwardsYow! Now KEN and BARBIE at

Re: learning and experimenting python.

2017-01-01 Thread Grant Edwards
On 2016-12-31, Ian Kelly wrote: > On Dec 31, 2016 3:12 AM, wrote: > > That's true. > > Please include quoted context in your replies. I have no idea who or what > you're responding to. I'd just like to thank everybody for replying to einstein1410's posts so that those of us who have plonked post

Re: Clickable hyperlinks

2017-01-03 Thread Grant Edwards
On 2017-01-03, Deborah Swanson wrote: > I'm sorry, I should have said a GUI console because I wouldn't expect a > text-based console to produce clickable links. What's a "GUI console"? -- Grant Edwards grant.b.edwards

Re: Clickable hyperlinks

2017-01-04 Thread Grant Edwards
On 2017-01-03, Deborah Swanson wrote: > Grant Edwards wrote, on January 03, 2017 3:13 PM >> >> On 2017-01-03, Deborah Swanson wrote: >> >> > I'm sorry, I should have said a GUI console because I >> wouldn't expect >> > a text-based c

Re: Clickable hyperlinks

2017-01-04 Thread Grant Edwards
s 'Firefox [sel]' or 'Chrome [sel]'. It's a few extra steps, but it works for almostly any application that displays text. -- Grant Edwards grant.b.edwardsYow! Where do your SOCKS at go when you lose

Re: Clickable hyperlinks

2017-01-05 Thread Grant Edwards
On 2017-01-03, Deborah Swanson wrote: > I'm sorry, I should have said a GUI console because I wouldn't expect a > text-based console to produce clickable links. What's a "GUI console"? -- Grant Edwards grant.b.edwards

Re: Clickable hyperlinks

2017-01-06 Thread Grant Edwards
On 2017-01-03, Deborah Swanson wrote: > Grant Edwards wrote, on January 03, 2017 3:13 PM >> >> On 2017-01-03, Deborah Swanson wrote: >> >> > I'm sorry, I should have said a GUI console because I >> wouldn't expect >> > a text-based console

Re: Clickable hyperlinks

2017-01-06 Thread Grant Edwards
t says 'Firefox [sel]' or 'Chrome [sel]'. It's a few extra steps, but it works for almostly any application that displays text. -- Grant Edwards grant.b.edwardsYow! Where do your SOCKS at

Re: Receiving a lot of double messages.

2017-01-06 Thread Grant Edwards
their original threads. Something is seriously broken somewhere... -- Grant Edwards grant.b.edwardsYow! I want a VEGETARIAN at BURRITO to go ... with gmail.comEXTRA MSG!! -- https://mail.pytho

Re: Extended ASCII

2017-01-13 Thread Grant Edwards
, since it's failing at line 11, and that's only 5 lines. It helps if we can tell which line generated the error. ;) I'm _guessing_ that line 11 is the print(), and it's barfing because stdout is using ascii encoding, and there's no way to encode that chara

Re: sorting list python

2017-01-18 Thread Grant Edwards
On 2017-01-18, Smith wrote: > could you do better? Yes. > link code: > https://repl.it/FMin/8 I would have done better by posting the actual code instead of a blind link that may point to Dog-knows-what... -- Grant Edwards grant.b.edwardsYow! I had panca

How to create a socket.socket() object from a socket fd?

2017-01-21 Thread Grant Edwards
Given a Unix file discriptor for an open TCP socket, I can't figure out how to create a python 2.7 socket object like those returned by socket.socket() Based on the docs, one might think that socket.fromfd() would do that (since the docs say that's what it does): Quoting https://docs.python.org/

Re: How to create a socket.socket() object from a socket fd?

2017-01-21 Thread Grant Edwards
On 2017-01-21, Grant Edwards wrote: > Given a Unix file discriptor for an open TCP socket, I can't figure > out how to create a python 2.7 socket object like those returned by > socket.socket() > > Based on the docs, one might think that socket.fromfd() would do that > (si

Re: How to create a socket.socket() object from a socket fd?

2017-01-21 Thread Grant Edwards
On 2017-01-21, Chris Angelico wrote: > On Sun, Jan 22, 2017 at 9:41 AM, Grant Edwards > wrote: >> | __init__(self, family=2, type=1, proto=0, _sock=None) >> | >> >> Ah! There's a keyword argument that doesn't appear in the docs, so >> let'

Re: How to create a socket.socket() object from a socket fd?

2017-01-21 Thread Grant Edwards
On 2017-01-21, Christian Heimes wrote: > You might be interested in my small module > https://pypi.python.org/pypi/socketfromfd/ . I just releases a new > version with a fix for Python 2. Thanks for the hint! :) > > The module correctly detects address family, socket type and proto from > a fd. I

Re: How to create a socket.socket() object from a socket fd?

2017-01-21 Thread Grant Edwards
Newsgroups: gmane.comp.python.general From: Grant Edwards Subject: Re: How to create a socket.socket() object from a socket fd? References: Followup-To: I'm still baffled why the standard library fromfd() code dup()s the descriptor. According to the comment in the CPython sources

Is Python SSL API thread-safe?

2017-01-22 Thread Grant Edwards
Is the Python SSL API thread-safe with respect to recv() and send()? IOW, can I have one thread doing blocking recv() calls on an SSL connection object while "simultaneously" a second thread is calling send() on that same connection object? I assumed that was allowed, but I can't find anything in

Re: Is Python SSL API thread-safe?

2017-01-22 Thread Grant Edwards
On 2017-01-22, Christian Heimes wrote: > On 2017-01-22 21:18, Grant Edwards wrote: >> Is the Python SSL API thread-safe with respect to recv() and send()? >> >> IOW, can I have one thread doing blocking recv() calls on an SSL >> connection object while "simultaneo

Re: How to create a socket.socket() object from a socket fd?

2017-01-23 Thread Grant Edwards
On 2017-01-23, Antoon Pardon wrote: > Op 22-01-17 om 01:52 schreef Grant Edwards: >> Newsgroups: gmane.comp.python.general >> From: Grant Edwards >> Subject: Re: How to create a socket.socket() object from a socket fd? >> References: >> >> >> Fol

Re: How coding in Python is bad for you

2017-01-23 Thread Grant Edwards
nd up assigned to a PHP project, you end up miserable and unpleasant to work with or just plain unemployed. -- Grant Edwards grant.b.edwardsYow! MERYL STREEP is my at obstetrician! g

Re: How coding in Python is bad for you

2017-01-24 Thread Grant Edwards
#x27;t use monochrome monitors, etc. -- Grant Edwards grant.b.edwardsYow! I want the presidency at so bad I can already taste gmail.comthe hors d'oeuvres. -- https://mail.python.org/mailman/listinfo/python-list

Re: Is shutil.get_terminal_size useless?

2017-01-28 Thread Grant Edwards
On 2017-01-28, Steve D'Aprano wrote: > Right: I want to know what the terminal window is sized to. What do you mean by "the terminal"? Do you mean the device to which the program's output is connected? Since output is what you have control over, and what's width you might want to change, that's

Re: Is shutil.get_terminal_size useless?

2017-01-28 Thread Grant Edwards
On 2017-01-28, Steve D'Aprano wrote: > On Sat, 28 Jan 2017 10:50 pm, Chris Angelico wrote: > >> On Sat, Jan 28, 2017 at 9:49 PM, Steve D'Aprano >> wrote: >>> The terminal size doesn't change just because I'm piping output to >>> another process. Using the terminal size as a proxy for "being piped

Re: Is Python SSL API thread-safe?

2017-01-28 Thread Grant Edwards
mode or with a > Memorio-BIO https://docs.python.org/3/library/ssl.html#ssl-nonblocking That section is about how to work with non-blocking sockets. I'm not using non-blocking sockets. -- Grant Edwards grant.b.edwardsYow! Now I'm concentrating

Re: Is shutil.get_terminal_size useless?

2017-01-28 Thread Grant Edwards
On 2017-01-28, Marko Rauhamaa wrote: > (Although if I were to design an operating system, I don't know if I > would bother with controlling terminals, job control or chirping > modems.) I've been using serial ports on Unix for 35 years, and maintaining serial drivers for Linux for almost 20. Man

Re: Is shutil.get_terminal_size useless?

2017-01-29 Thread Grant Edwards
On 2017-01-29, Marko Rauhamaa wrote: > Grant Edwards : > >> On 2017-01-28, Marko Rauhamaa wrote: >> >>> (Although if I were to design an operating system, I don't know if I >>> would bother with controlling terminals, job control or chirping >>&

Re: Is shutil.get_terminal_size useless?

2017-01-29 Thread Grant Edwards
On 2017-01-29, Marko Rauhamaa wrote: > Chris Angelico : > >> On Mon, Jan 30, 2017 at 3:28 AM, Marko Rauhamaa wrote: >>> Grant Edwards : >>> >>>> On 2017-01-29, Marko Rauhamaa wrote: >>>>> I *have* been longing for a serial console in linu

Re: Is shutil.get_terminal_size useless?

2017-01-29 Thread Grant Edwards
On 2017-01-29, Marko Rauhamaa wrote: > Mount? As a regular user? Yes, using a "fuse" use-space filesystem, you can mount things as a normal user. There are a couple ISO9660 fuse implemenations. But, you can't modify a mounted ISO9660 filesystem. I have read about how to use a union mount to si

Re: Is shutil.get_terminal_size useless?

2017-01-29 Thread Grant Edwards
On 2017-01-29, Grant Edwards wrote: > On 2017-01-29, Marko Rauhamaa wrote: > >> Mount? As a regular user? > > Yes, using a "fuse" use-space filesystem, you can mount things as a > normal user. There are a couple ISO9660 fuse implemenations. But, you > can

Re: Rename file without overwriting existing files

2017-01-30 Thread Grant Edwards
depends on your particular OS/libc/filesystem implementation. It's not determined by nor knowable by the authors of the os module. -- Grant Edwards grant.b.edwardsYow! I'm ANN LANDERS!! at I can SHOPLIFT!!

Re: Rename file without overwriting existing files

2017-01-30 Thread Grant Edwards
ot what beginners are trying to do.] I always found the first sentence to be a bit funny: This module provides a portable way of using operating system dependent functionality. I understand whay they're tying to say, but I always found it amusing to say you're going to pr

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Grant Edwards
-- The next time you are in the /tmp directory looking for something, can you guess what happens when you mistype "ls" as "sl"? > DOS and Windows has searched the current directory since their > beginning. Is that also dangerous? Yes. -

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Grant Edwards
f have been compromised in this manor? I've known a few people over the years who've been caught by that trick. The "evil" program was always more of a joke and did no real harm. -- Grant Edwards grant.b.edwardsYow! JAPAN is a WONDERFUL

Re: Style Q: Instance variables defined outside of __init__

2018-03-20 Thread Grant Edwards
On 2018-03-20, Alister via Python-list wrote: > but why would a functional programmer be programming an OOP class? Part of a 12-step recovery plan? ;) -- Grant Edwards grant.b.edwardsYow! Hello. I know at the divo

Re: Style Q: Instance variables defined outside of __init__

2018-03-20 Thread Grant Edwards
manual transmissions are much more likely to be RWD than are automatics. -- Grant Edwards grant.b.edwardsYow! Inside, I'm already at SOBBING! gmail.com -- https://mail.python.org/mailman/list

Re: [OT] Re: Style Q: Instance variables defined outside of __init__

2018-03-20 Thread Grant Edwards
On 2018-03-20, Tom Evans via Python-list wrote: > On Tue, Mar 20, 2018 at 5:25 PM, Grant Edwards > wrote: >> On 2018-03-20, Neil Cerutti wrote: >> >>> My automotive course will probaly divide cars into Automatic >>> Transmission, and Front Wheel Dr

Re: Putting Unicode characters in JSON

2018-03-23 Thread Grant Edwards
without orders from his boss, who won't order changes without because there's no budget for that. OK, perhaps it's not a _good_ reason by your metrics, but reasons like that are what you find in the real world. -- Grant Edwards grant.b.edwardsYow! ... My pants j

Re: Putting Unicode characters in JSON

2018-03-23 Thread Grant Edwards
either justify X or just ingore the subthreads about Y and Z. Except sometimes the answer _is_ that you really don't want to do X, and probably should do Y or Z. -- Grant Edwards grant.b.edwardsYow! Oh my GOD -- the at SUN just f

Re: Entering a very large number

2018-03-25 Thread Grant Edwards
On 2018-03-25, bartc wrote: > On 25/03/2018 02:47, Steven D'Aprano wrote: > >> The Original Poster (OP) is concerned about saving, what, a tenth of a >> microsecond in total? Hardly seems worth the effort, especially if you're >> going to end up with something even slower. > > Using CPython on my

Re: (unknown)

2018-03-27 Thread Grant Edwards
On 2018-03-27, kevon harris wrote: > Unable to pull up IDLE after downloading Python 3.6.4 Ah. What happens when you push down instead of pull up? > Sent from Mail for Windows 10 Sent from mutt for Gentoo Linux -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Developer Survey: Python 3 usage overtakes Python 2 usage

2018-03-31 Thread Grant Edwards
On 2018-03-31, Etienne Robillard wrote: > Are you trolling? Do you understand that a modern mobile device > typically require a Internet subscription and an additional subscription > for the smart phone? Huh? What is "an internet subscription"? Why would you need two of them if all you have

Re: want to export some of the packets from a big pacp file to another file.

2018-04-05 Thread Grant Edwards
k.org/Development/LibpcapFileFormat You should be able to use ctypes to directly access the winpcap library if you want to: https://www.winpcap.org/ -- Grant Edwards grant.b.edwardsYow! ! Up ahead! It's a at DONUT H

Re: [OT] multicore/cpu history

2018-04-11 Thread Grant Edwards
he CPUs shared SDRAM and used the same physical address space. They both saw the same PCI/ISA buses and all other peripherals. There was no way you could run two different OSes without some sort of hypervisor -- there was no practical difference between them and a modern multi-core CPU. --

Re: Most pythonic way to implement byte stuffing algorithm

2018-04-17 Thread Grant Edwards
ow, that's ugly -- I don't think I'd be able to tell you what it actually does without actually running it. If speed is that important, I might just write a function in C and call it with ctypes. :) -- Grant Edwards grant.b.edwardsYow! HAIR TONICS, please!! at gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Finding a text in raw data(size nearly 10GB) and Printing its memory address using python

2018-04-23 Thread Grant Edwards
.find(bytes(sys.argv[2],encoding='UTF-8')) print(i) The above code works for me, but I don't know how perfomance compares with other methods. I think the mmap() signature is slightly different on Windows. -- Grant Edwards grant.b.edwards

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread Grant Edwards
is actually 420 base 10 Aaargh. That's awful. I didn't think it was possible for my opinion of PHP to get any lower. I was wrong. -- Grant Edwards grant.b.edwardsYow! I wonder if I could at

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-11 Thread Grant Edwards
when the size of the object being read is 8 bits. -- Grant Edwards grant.b.edwardsYow! An INK-LING? Sure -- at TAKE one!! Did you BUY any gmail.comCOMMUNIST UNIFORMS?? -- https:/

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-11 Thread Grant Edwards
gt; than 63 hex The first 8080-compatible "computer" I owned was a Heathkit terminal with an 8085 CPU. The firmware listings used "split octal": 0x = 000 000 0x = 377 377 IIRC, PDP-11 assembly listings and machine documentation generally used octal for the same rea

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-11 Thread Grant Edwards
uters didn't run Windows. Of course not, everything ran Linux back in the good old days. -- Grant Edwards grant.b.edwardsYow! PIZZA!! at gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Read data from .msg all files

2018-05-15 Thread Grant Edwards
On 2018-05-15, mahesh d wrote: > import glob _Please_ stop creating new threads for this question. I think this is the fifth thread you've started for what appears to be a single question. -- Grant Edwards grant.b.edwardsYow! Like I al

Re: seeking deeper (language theory) reason behind Python design choice

2018-05-16 Thread Grant Edwards
ne and a half decades. > > That would still be plural decades. So would zero. ;) The only plural in English implies is that the quantity is not 1. It does _not_ imply the quantity is greater than 1. -- Grant Edwards grant.b.edwardsYow! ! Now I understand

Re: syntax oddities

2018-05-17 Thread Grant Edwards
400, Abdur-Rahmaan Janhangeer wrote: >> And one such popular issue is how top-posting is evil. -- Grant Edwards grant.b.edwardsYow! Catsup and Mustard all at over the place! It's the

Re: Python - requests - forms - web scraping - how to deal with multi stage forms

2018-05-17 Thread Grant Edwards
On 2018-05-17, kret...@gmail.com wrote: > https://stackoverflow.com/questions/50383210/python-requests-how-to-post-few-stages-forms Your point? -- Grant Edwards grant.b.edwardsYow! I had pancake makeup at for bru

Re: syntax oddities

2018-05-18 Thread Grant Edwards
asked or give you enough instructions to actually get the job done that > they want you to do. And most people seem to believe that if they read more that the first two sentences of any e-mail it might trigger the apocolypse or give their cat scabies or something else dreadful. -- Gra

Re: Spam levels.

2018-05-21 Thread Grant Edwards
ne, so threading works somewhat better. [Regardless of whether I'm using Usenet or Gmane, I have slrn configured to plonk all posts made from google.groups.] -- Grant Edwards grant.b.edwardsYow! My nose feels like a

Re: best way to remove leading zeros from a tuple like string

2018-05-22 Thread Grant Edwards
trying out the regex in a > Python console? Doesn't everybody have an executable file in their home directory named "testit.py" which is continually morphed to test different Python features? -- Grant Edwards grant.b.edwardsYow! What's the MATTER

Re: Spam levels.

2018-05-22 Thread Grant Edwards
On 2018-05-22, Peter J. Holzer wrote: > On 2018-05-21 15:42:28 +0000, Grant Edwards wrote: >> I switched from Usenet to Gmane mainly because references headers are >> bit more consistent on Gmane, so threading works somewhat better. > > This is interesting, because Gmane was

Tkinter and root vs. Wayland

2018-05-22 Thread Grant Edwards
s or Posix queues or whatnot? Can Python multiprocessing be used in this way? -- Grant Edwards grant.b.edwardsYow! If our behavior is at strict, we do not need fun! gmail.com -- htt

Re: Spam levels.

2018-05-22 Thread Grant Edwards
but it's pretty difficult to glean the the signal from the noise created by people with broken MUAs and/or NNTP clients. It's actually pretty impressive it all works as well as it does... In any case, ignoring all postings from Google Groups is recommended. -- Grant Edwards

Re: Usenet Gateway (was: Spam levels.)

2018-05-23 Thread Grant Edwards
et gmane do that). -- Grant Edwards grant.b.edwardsYow! I have many CHARTS at and DIAGRAMS.. gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Usenet Gateway

2018-05-23 Thread Grant Edwards
atures to try to make it work for shared discussions. As a result, mailing lists mostly work (especially for low-volume "groups") and are pretty decent compared to "web forums" and other such wastes of electrons. But IMO email pales in comparison to NNTP when there are more

<    3   4   5   6   7   8   9   10   11   12   >