Question about extending the interperter

2005-05-09 Thread Eli
nts to '123'. What I need is to point it to the whole string received - 'foo ("123")'. Is there a way I can do this? Thanks in advance, Eli -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about extending the interperter

2005-05-10 Thread Eli
ered I could make all of the extensions to call a general function which will call the original functions (it can do so because it has the function address as a parameter). If I could get the full line the user has entered that would be great, if that's possible. Hope I've explained it correctly... cheers, Eli -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about extending the interperter

2005-05-15 Thread Eli
I've tried that and it worked. I've used Python to generate wrapper and it seems ok- I'm yet testing it, so far so good. thanks, Elie -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about extending the interperter

2005-05-15 Thread Eli
Thanks for your answer, I've tried the way Fredrik suggested which pointed out to a solution. cheers -- http://mail.python.org/mailman/listinfo/python-list

Calling PySys_WriteStdout from embedded Python

2005-05-16 Thread Eli
_ReleaseLock(); Well the code does not crash now, but it doesn't display anything in Python's console. If I call PySys_WriteStdout from the main thread it does display alright. Any ideas how I can get PySys_WriteStdout to work within a thread? tnanks, Eli -- http://mail.python.org/mailman/listinfo/python-list

check whether a value is scalar

2006-04-22 Thread Eli
Hi, I want to check whether a value is a scalar. A scalar can be: - None (null) - string - number (integer, float) - boolean How can I validate a value is one of these types? I care about the value only, and not its class methods. An object is not a scalar, since it's not a simple value. An array

Re: check whether a value is scalar

2006-04-22 Thread Eli
Python treats integers as objects, but as I mentioned that I do care about the value only, and not its object methods. I mean that it's not possible to share objects among application in different programming languages, but it's possible to share the scalar values among them. Strings, booleans, int

subplot function in matplotlib

2008-04-15 Thread eli
Does anyone know a workaround to plotting beyond 9 subplots in matplotlib? It would be nice to have 20 plots under the subplot function for example (poster). Cheers, Eli -- http://mail.python.org/mailman/listinfo/python-list

Re: subplot function in matplotlib

2008-04-16 Thread eli
On Apr 16, 8:27 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > eli wrote: > > Does anyone know a workaround to plotting beyond 9 subplots in > > matplotlib? It would be nice to have 20 plots under the subplot > > function for example (poster). > >

accuracy issues with numpy arrays?

2008-04-29 Thread eli
image) print x 1.7400700016878545e-05 The script is below. Thanks for the help. Eli import pyfits as p import scipy as s import scipy.ndimage as nd import numpy as n def flux2int(name): d = p.getdata(name) x,y = n.shape(d) l = x*y arr1= n.array(d.reshape(

Re: [Python-Dev] [RELEASED] Python 3.3.0

2012-09-29 Thread Eli Bendersky
On Sat, Sep 29, 2012 at 5:18 AM, Georg Brandl wrote: > On behalf of the Python development team, I'm delighted to announce the > Python 3.3.0 final release. > Yay :) -- http://mail.python.org/mailman/listinfo/python-list

Else statement executing when it shouldnt

2013-01-20 Thread eli m
an else statement is running when it shouldnt be. It is on the last line. Whenever i am in the math or game function, when i type in main, it goes back to the start of the program, but it also says not a valid function. I am stumped! Here is my code: #Cmd #Created By Eli M. #import modules

Re: Else statement executing when it shouldnt

2013-01-20 Thread eli m
On Sunday, January 20, 2013 8:54:13 PM UTC-8, René Klačan wrote: > You have to break while loop not to execute else branch > > > Rene > > > Can you explain in more detail please. -- http://mail.python.org/mailman/listinfo/python-list

Re: Else statement executing when it shouldnt

2013-01-20 Thread eli m
> > > > Your else is lined up with while, not with if. > > > > -m > > > > > > -- > > Lark's Tongue Guide to Python: http://lightbird.net/larks/ > > > > When a friend succeeds, I die a little. Gore Vidal Its lined up. It got messed up when i copied the code into the post. -- ht

Re: Else statement executing when it shouldnt

2013-01-20 Thread eli m
On Sunday, January 20, 2013 8:40:47 PM UTC-8, eli m wrote: hint: Use the comments in the code to find out where my error is. > > Here is my code: > > #Cmd > > #Created By Eli M. > > #import modules > > import random > > import math > > gtn = 0 &

Re: Else statement executing when it shouldnt

2013-01-20 Thread eli m
On Sunday, January 20, 2013 8:52:12 PM UTC-8, Chris Angelico wrote: > On Mon, Jan 21, 2013 at 3:40 PM, eli m wrote: > > > an else statement is running when it shouldnt be. It is on the last line. > > Whenever i am in the math or game function, when i type in main, it goes >

Re: Else statement executing when it shouldnt

2013-01-21 Thread eli m
On Sunday, January 20, 2013 9:56:59 PM UTC-8, alex23 wrote: > On Jan 21, 2:40 pm, eli m wrote: > > > an else statement is running when it shouldnt be. It is > > > on the last line. Whenever i am in the math or game > > > function, when i type in main, it goes b

stopping a thread with _Thread__stop

2011-08-05 Thread Eli Bendersky
d. In conformance to theory, the "timelimited" method this recipe defines leaves a thread running in the background if the function it's given is long-running (or infinite). Is there something I'm missing? Eli -- http://mail.python.org/mailman/listinfo/python-list

Calling super() in __init__ of a metaclass

2011-08-06 Thread Eli Bendersky
he second argument is a type, issubclass(type2, type) must be true (this is useful for classmethods). Yes, 'cls' is a type (it's "class Foo"), but no, it's not a subclass of MyMetaclass, so this doesn't help. Eli -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling super() in __init__ of a metaclass

2011-08-06 Thread Eli Bendersky
On Sat, Aug 6, 2011 at 11:04, Chris Rebert wrote: > On Sat, Aug 6, 2011 at 12:34 AM, Eli Bendersky wrote: >> Consider this standard metaclass definition: >> >> class MyMetaclass(type): >>    def __init__(cls, name, bases, dct): >>        super(MyMetaclas

Re: Python enabled gdb on Windows and relocation

2011-05-14 Thread Eli Zaretskii
> Date: Sat, 14 May 2011 11:09:13 +0200 > From: Ruben Van Boxem > Cc: g...@sourceware.org, python-list@python.org > > 1. Check hardcoded path; my suggestion would be " executable>/../lib/python27" > 2. If this fails to find the necessary files/scripts, find it like you > described above in Linux,

Re: [python-cffi] Fwd: Re: Progress migrating cffi and pycparser to libclang

2018-01-06 Thread Eli Bendersky
ase which remembers for each file what the exact flags to compile it are (https://clang.llvm.org/docs/JSONCompilationDatabase.html) To make this *really* work for CFFI you'd have to take all of this into account -- do you really want to deal with this on the CFFI level? Eli > >

Re: Different names for Unicode codepoint

2016-04-21 Thread Eli Zaretskii
> From: Lele Gaifax > Date: Thu, 21 Apr 2016 21:04:32 +0200 > Cc: python-list@python.org > > is there a particular reason for the slightly different names that Emacs > (version 25.0.92) and Python (version 3.6.0a0) give to a single Unicode > entity? They don't. > Just to mention one codepoint,

nested escape chars in a shell command

2005-10-18 Thread Eli Criffield
running any command with more then one word after the -c in su fails, It strips out the ' like so: ./sshexpect testserver "su -c 'ls -l /root'" + stty -echo + ssh -t -o 'StrictHostKeyChecking no' testserver 'su -c ls' -l /root su: user /root does not exist I have tried every combination of escaping i can think of can i can't get either problem solved. Any ideas? Eli -- http://mail.python.org/mailman/listinfo/python-list

Re: Web based applications are possible with wxPython?

2005-10-18 Thread Eli Criffield
http://www.nomachine.com/companion_screenshots.php While not exacly what your talking about, its about as close as i can think of. This allows you to run any X applications inside a web browser. Eli -- http://mail.python.org/mailman/listinfo/python-list

Re: nested escape chars in a shell command

2005-10-20 Thread Eli Criffield
I can't seem to get that to work either. child = pexpect.spawn('/bin/sh',args=['-c','/usr/bin/ssh','-t','-o','StrictHostKeyChecking no',host,command,'|','awk','{print %s:$0}'%host], timeout=30) Comp

Re: Web based applications are possible with wxPython?

2005-10-25 Thread Eli Criffield
not quite but close, NX is a compression protical for the X protical, so its a lot more like a java X client then a java VNC client. Eli -- http://mail.python.org/mailman/listinfo/python-list

Pick random choice from variables

2013-02-10 Thread eli m
How do i make something with python that will ask the user for input, and then use the random.choice function to select a random choice from what the user entered. -- http://mail.python.org/mailman/listinfo/python-list

How would you do this?

2013-02-14 Thread eli m
I want to make a guess the number game (Which i have), but i want to make the computer play the game against itself. How would i do this? -- http://mail.python.org/mailman/listinfo/python-list

Re: How would you do this?

2013-02-14 Thread eli m
On Thursday, February 14, 2013 4:09:37 PM UTC-8, Oscar Benjamin wrote: > On 14 February 2013 23:34, eli m wrote: > > > I want to make a guess the number game (Which i have), but i want to make > > the computer play the game against itself. How would i do this? > >

Small program ideas

2013-02-15 Thread eli m
Any small program ideas? I would prefer to stick to command line ones. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Small program ideas

2013-02-15 Thread eli m
On Friday, February 15, 2013 7:52:57 PM UTC-8, Mitya Sirenef wrote: > On 02/15/2013 10:22 PM, eli m wrote: > > > Any small program ideas? I would prefer to stick to command line ones. > > Thanks. > > > > How about these two: > > > > - simulation

Import Question

2013-02-20 Thread eli m
How long does it take for the program to import something? I am asking this because i have like 7 imports at the beginning of my program and i am thinking thats the reason why it is slow to start up. Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list

Re: Small program ideas

2013-02-25 Thread eli m
On Friday, February 15, 2013 7:22:41 PM UTC-8, eli m wrote: > Any small program ideas? I would prefer to stick to command line ones. Thanks. Thank you guys for the suggestions. Any more? -- http://mail.python.org/mailman/listinfo/python-list

Re: Small program ideas

2013-02-26 Thread eli m
On Monday, February 25, 2013 10:15:24 PM UTC-8, Dave Angel wrote: > On 02/25/2013 10:48 PM, eli m wrote: > > > On Friday, February 15, 2013 7:22:41 PM UTC-8, eli m wrote: > > >> Any small program ideas? I would prefer to stick to command line ones. > >> Thanks.

Re: Small program ideas

2013-02-26 Thread eli m
On Tuesday, February 26, 2013 4:22:10 PM UTC-8, Joshua Landau wrote: > On 26 February 2013 22:47, eli m wrote: > > > > > > How hard would it be to change one file to another and would it be a > small-medium sized program? > > > How do you want to change

Display video in tkinter?

2013-02-27 Thread eli m
Is there a way to display video (an avi) in tkinter without having to download other modules? If not then are there any other options? -- http://mail.python.org/mailman/listinfo/python-list

How would you do this?

2013-02-27 Thread eli m
How would you find the slope, y intercept, and slope-intercept form equation for a line in python? -- http://mail.python.org/mailman/listinfo/python-list

Store a variable permanently

2013-02-28 Thread eli m
So i have a variable called funds that i want to store the value of even after the program is exited. My funds variable holds the total value of funds i have. I add a certain number of funds each time i run the program by entering how much i want to add. How would i store the funds variable to k

Input wont work with if statement if it has a space

2013-03-05 Thread eli m
Hi guys, i have a program like this: (A lot of code is not included) run = 0 while run == 0: raw_input("Type in a function:") if function == "Example": print ("Hello World!") else: print ("blah blah blah") The problem is that whenever i type in example with a space after it th

Re: Input wont work with if statement if it has a space

2013-03-05 Thread eli m
On Tuesday, March 5, 2013 3:31:13 PM UTC-8, eli m wrote: > Hi guys, i have a program like this: (A lot of code is not included) > > run = 0 > > while run == 0: > >raw_input("Type in a function:") > >if function == "Example":

Re: Input wont work with if statement if it has a space

2013-03-05 Thread eli m
On Tuesday, March 5, 2013 3:47:31 PM UTC-8, emile wrote: > On 03/05/2013 03:33 PM, eli m wrote: > > > On Tuesday, March 5, 2013 3:31:13 PM UTC-8, eli m wrote: > > >> Hi guys, i have a program like this: (A lot of code is not included) > > >> > >

Insert comma in number?

2013-03-06 Thread eli m
I have a python program that accepts input and calculates the factorial of that number, and i want to know if i can make it so commas get inserted in the number. For example: instead of 1000 it would say 1,000 -- http://mail.python.org/mailman/listinfo/python-list

Re: Small program ideas

2013-03-18 Thread eli m
Any other ideas? -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem this random seed()

2013-03-18 Thread eli m
On Monday, March 18, 2013 6:57:30 PM UTC-7, NZach wrote: > Hello everyone, > > > > i am using the MMK.py example from a SimPy tutorial, which can be found here: > http://heather.cs.ucdavis.edu/~matloff/156/PLN/DESimIntro.pdf > > > > I have made very little changes to the code and i have uplo

Video tutorial for making a guess the number game in python

2013-05-04 Thread eli m
I made a video tutorial for making a guess the number game in python. You can check it out here: http://www.youtube.com/watch?v=0WSQb-7wMJQ -- http://mail.python.org/mailman/listinfo/python-list

tab compleation input

2006-11-13 Thread Eli Criffield
Question: ") answer = sys.stdin.readline().rstrip() if answer not in valid answers: print "Wrong!" --snip-- But what i want is when i enter the answer i can hit tab and it'll complete one of the validanswers I know i can do tab complete with readline and 'r

Re: tab compleation input

2006-11-13 Thread Eli Criffield
is like a bash shell prompt. >From a bash shell prompt try ls , like that. (readline does that for bash, but i don't know how to get readline to do anything but python commands in python). Eli [EMAIL PROTECTED] wrote: > On a gui on this would be a little bit easier but it's a completl

Re: tab compleation input

2006-11-13 Thread Eli Criffield
t("Answer the Question: ") if answer not in validanswers: print "Wrong!" else: print "Your answer is",answer Fredrik Lundh wrote: > Eli Criffield wrote: > > > Not sure what your trying to do, but it doesn't work. :) > > valid

Re: recursively removing files and directories

2007-04-09 Thread Eli Criffield
ions? > > Thanks! > bahoo Something like import os import re def processFiles(args,dir,fileList): for thisFile in fileList: if re.match(r'REGEXPATTERN',thisFile): os.unlink("%s%s"dir,thisFile) os.path.walk("/",processFiles

Re: recursively removing files and directories

2007-04-09 Thread Eli Criffield
Forgot the rmdir import os import re def processFiles(args,dir,fileList): for thisFile in fileList: if re.match(r'REGEXPATTERN',thisFile): os.unlink("%s%s"dir,thisFile) os.rmdir(dir) os.path.walk("/",processFiles,None) Eli Criffie

XML-RPC SSL and client side certs?

2007-04-10 Thread Eli Criffield
e setting it up here soon, but would be interested if anyone else has already written a solution like this or has used one (in python of course). Eli Criffield -- http://mail.python.org/mailman/listinfo/python-list

Re: Xah's Edu Corner: Criticism vs Constructive Criticism

2006-04-26 Thread Eli Gottlieb
Xah Lee wrote: > Criticism versus Constructive Criticism > > Xah Lee, 2003-01 > > A lot intelligent people are rather confused about criticism, > especially in our “free-speech” free-for-all internet age. When > they say “constructive criticisms are welcome” they mostly mean > “bitching and compl

Re: Tabs versus Spaces in Source Code

2006-05-14 Thread Eli Gottlieb
whitespace. I admit it doesn't usually matter, but then you go back to try and make your code prettier and find yourself asking "WTF?" Undoubtedly adding the second spark to the holy war, Eli -- The science of economics is the cleverest proof of free will yet constructed. --

Re: Software Needs Philosophers

2006-05-23 Thread Eli Gottlieb
John D Salt wrote: > <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > > [Snips] > >>Wrong. We live in a paradise of ideas and possibilities well beyond the >>wildest dreams of only 20 years ago. > > > What exciting new ideas exist in software that are both important and > cannot be trace

Re: John Bokma harassment

2006-05-24 Thread Eli Gottlieb
Tim N. van der Leeuw wrote: > [EMAIL PROTECTED] wrote: > >>I agree there are limits to you right to free speech, but I believe Xah >>Lee is not crossing >>any boundaries. If he starts taking over newspapers and TV stations be >>sure to notify me, >>I might revise my position. >>Immanuel > > > Pe

Re: John Bokma harassment

2006-05-24 Thread Eli Gottlieb
[EMAIL PROTECTED] wrote: > John Bokma wrote: > >>"Ant" <[EMAIL PROTECTED]> wrote: >> >> >>>I have no particular affinity for Xah's views, but what does get up my >>>nose is usenet Nazism. >> >>That's because you're clueless. >> >>-- >>John MexIT: http://johnbokma.com/

Re: Sorting dicts inside dicts

2010-07-03 Thread Eli Bendersky
'abc','reg_addr':'2004'},'reg_dict_2':{'name':'pqr','reg_addr':'2008'}}*/ >> /* >> */ >> >> Is it possible to sort the things? What I guess is Python stores dicts in >> a tree like structu

Re: ipython problem in opening a file

2010-07-09 Thread Eli Bendersky
t;os" module. You may not have permissions in C:\Windows\system32, which is why the error is printed. Eli -- http://mail.python.org/mailman/listinfo/python-list

Re: ipython problem in opening a file

2010-07-09 Thread Eli Bendersky
irectory" ipython executes in, by either executing it directly (from the command line) in the directory of your choice, or calling the os.chdir function with the path of your choice. Eli -- http://mail.python.org/mailman/listinfo/python-list

Re: Hello

2010-07-10 Thread Eli Bendersky
://wiki.python.org/moin/FrontPage) is also useful. For example, it has a rather comprehensive page about editors: http://wiki.python.org/moin/PythonEditors Eli -- http://mail.python.org/mailman/listinfo/python-list

Re: Basic Information about Python

2010-07-30 Thread Eli Bendersky
of a simple "hello world" script packed with py2exe or PyInstaller is around 2-3 MB. If you use large GUI libraries (like PyQt or wxPython) it goes up to 6-10MB, and so on (more libraries -> larger .exe) Eli -- http://mail.python.org/mailman/listinfo/python-list

co_firstlineno on decorated functions

2010-08-01 Thread Eli Bendersky
.6] The side-effects of this behavior can be easily seen in the output of modules like trace and profile. Would you say it's normal, or could this be considered a bug? Eli -- http://mail.python.org/mailman/listinfo/python-list

Re: parsing a c project

2010-08-04 Thread Eli Bendersky
te ISO C parser in pure Python. It has been used for tasks similar to this one (parsing of struct/union declarations for various purposes). Eli -- http://mail.python.org/mailman/listinfo/python-list

Re: Python library for Sequence Matching/Comparison

2010-08-07 Thread Eli Bendersky
of sub-libraries for almost anything you might need with processing natural text. Eli -- http://mail.python.org/mailman/listinfo/python-list

Re: Bit fields in python?

2010-09-07 Thread Eli Bendersky
ommunicate with other devices over the network or some other link. In my work with Python and embedded devices I've found the construct library (http://construct.wikispaces.com/) very useful. It allows to you very easily define complex formats for frames/messages on the bit and byte level. The idea is to use construct

Re: Bit fields in python?

2010-09-14 Thread Eli Bendersky
e')) StatusInfo = Struct('StatusInfo', ULInt16('size'), make_codec_info('mastercodec'), make_codec_info('slavecodec'), ) c = StatusInfo.parse('\x12\x13\x01\x02

-ffast-math

2022-09-07 Thread Eli the Bearded
https://twitter.com/moyix/status/1567167774039973888 Brendan Dolan-Gavitt @moyix New blog post is live! In which I download 4 TB of Python packages containing native x86-64 libraries and see how many of them use -ffast-math, potentially altering floating point behavior in any

Re: Find the path of a shell command

2022-10-13 Thread Eli the Bearded
In comp.lang.python, jkn wrote: > On Wednesday, October 12, 2022 at 6:12:23 AM UTC+1, jak wrote: >> I'm afraid you will have to look for the command in every path listed in >> the PATH environment variable. > erm, or try 'which rm' ? It is so hilarious seeing the responses to this thread. Hint:

Re: Application window geometry specifier

2021-01-12 Thread Eli the Bearded
In comp.lang.python, Rich Shepard wrote: >> Keep in mind that if you target Linux, the "modern" window server >> (Wayland) will not allow user code to decide the positioning and size of > I suspect that Slackware will continue with X11. Even with traditional X11, geometry is "preferred" size and

Re: why sqrt is not a built-in function?

2021-01-14 Thread Eli the Bearded
In comp.lang.python, Skip Montanaro wrote: > Finally, should have never considered it, I think you might want to > study the output of > > import this > > Think on the second and last lines in particular. >>> import this The Zen of Python, by Tim Peters Beautiful is better than ugly.

Re: Exploring terminfo

2021-01-14 Thread Eli the Bearded
In comp.lang.python, Barry Scott wrote: > Alan Gauld via Python-list wrote: >> I've written a short program that is supposed to >> - *clear the screen*, >> - read some input >> - display the result in a message *highlighted in bold*. >> - get input to end the program > It seems that curses does

Re: why sqrt is not a built-in function?

2021-01-14 Thread Eli the Bearded
In comp.lang.python, Ethan Furman wrote: > On 1/14/21 11:06 AM, Eli the Bearded wrote: >> "There should be one-- and preferably only one --obvious way to do it." >> Plus the ** operation ("root = x ** 0.5"), that's now three ways. > Yes, but which

Re: why sqrt is not a built-in function?

2021-01-15 Thread Eli the Bearded
In comp.lang.python, Chris Angelico wrote: > Michael F. Stemper wrote: >> On 15/01/2021 14.01, Stefan Ram wrote: >>> __import__( "math" ).sqrt( 4 ) >> I had no idea that syntax existed, and find it completely at odds >> with The Zen of Python. I'm torn between forgetting that I ever saw >> it an

Re: Exploring terminfo

2021-01-19 Thread Eli the Bearded
In comp.lang.python, Greg Ewing wrote: > On 18/01/21 3:34 am, Alan Gauld wrote: >> The problem is terminfo is not really part of curses. >> Curses is built on top of terminfo. > As far as I can tell from the man pages, terminfo itself > is just a file format. The only programmatic interfaces I >

Re: A 35mm film camera represented in Python object

2021-03-17 Thread Eli the Bearded
In comp.lang.python, D.M. Procida wrote: > Hi everyone, I've created - > a representation of a Canonet G-III QL17 in Python. > > There's also documentation: . This is interesting. Some feedback. > It's a pure P

Re: A 35mm film camera represented in Python object

2021-03-17 Thread Eli the Bearded
In comp.lang.python, D.M. Procida wrote: > Eli the Bearded <*@eli.users.panix.com> wrote: >> I see you don't even attempt to tackle ISO outside of >> supported range (and I have no idea how the camera itself deals with >> that). Is the camera sensing the ISO f

Re: A 35mm film camera represented in Python object

2021-04-01 Thread Eli the Bearded
In comp.lang.python, Richard Damon wrote: > On 4/1/21 6:41 PM, 2qdxy4rzwzuui...@potatochowder.com wrote: >> Richard Damon wrote: >>> If you keep track of the positions as a floating point number, the >>> precision will be more than you could actually measure it. >> I won't disagree with Richard,

Re: python text://protocol client?

2021-04-09 Thread Eli the Bearded
In comp.lang.python, Petite Abeille wrote: > Would you know of any python text://protocol client? Or server? The whole thing was started (judging by git commits) about a month ago. https://github.com/textprotocol?tab=overview&from=2021-03-01&to=2021-03-31 March 7: First repository I suspe

Re: basic auth request

2021-08-25 Thread Eli the Bearded
In comp.lang.python, Jon Ribbens wrote: > Another attempt at combatting this problem is DNS CAA records, > which are a way of politely asking all CAs in the world except the > ones you choose "please don't issue a certificate for my domain". > By definition someone who had hacked a CA would pay n

Re: basic auth request

2021-08-25 Thread Eli the Bearded
In comp.lang.python, Jon Ribbens wrote: > On 2021-08-25, Eli the Bearded <*@eli.users.panix.com> wrote: >> $COMPANY puts out a lot of things on different IP addresses from >> a shared public(ish) pool like AWS and assigns different names >> to them. Later $COMPANY

Re: basic auth request

2021-08-25 Thread Eli the Bearded
In comp.lang.python, Barry wrote: > It is possible to sign an ip address in a certificate, but that is not > often done. It's bad practice. I've never seen one in the wild. > Getting to reuse the IP address that example.com was using will not help > the attacker unless they can make a cert that

Re: XML Considered Harmful

2021-09-21 Thread Eli the Bearded
In comp.lang.python, Michael F. Stemper wrote: > I've heard of JSON, but never done anything with it. You probably have used it inadvertantly on a regular basis over the past few years. Websites live on it. > How does CSV handle hierarchical data? For instance, I have > generators[1], each of wh

Re: XML Considered Harmful

2021-09-23 Thread Eli the Bearded
In comp.lang.python, Christian Gollwitzer wrote: > Am 22.09.21 um 16:52 schrieb Michael F. Stemper: >> On 21/09/2021 19.30, Eli the Bearded wrote: >>> Yes, CSV files can model that. But it would not be my first choice of >>> data format. (Neither would JSON.) I'

Re: XML Considered Harmful

2021-09-25 Thread Eli the Bearded
In comp.lang.python, Chris Angelico wrote: > Eli the Bearded <*@eli.users.panix.com> wrote: >> I'd use one of the netpbm formats instead of JPEG. PBM for one bit >> bitmaps, PGM for one channel (typically grayscale), PPM for three >> channel RGB, and PAM for anyt

Re: The task is to invent names for things

2021-10-27 Thread Eli the Bearded
In comp.lang.python, Peter J. Holzer wrote: ^^ > On 2021-10-27 12:41:56 +0200, Karsten Hilbert wrote: >> In that situation, is it preferable to choose a nonsensical >> name over a mediocre one ? > I don't know. A mediocre name conveys at least some information, and > that seems t

news to me today: RIP Aahz

2021-11-18 Thread Eli the Bearded
Aahz, co-author of Python for Dummies with Stef Maruch, recently passed away. Tiny death notice (with name typo) from the wilds of the Internet: http://file770.com/pixel-scroll-10-15-21-i-know-what-pixel-you-scrolled-last-summer/ (12) AAHZ MARUCH (1967-2021). [Item by James Davis Nicoll.] Py

need help understanding: converting text to binary

2019-04-22 Thread Eli the Bearded
Here's some code I wrote today: -- cut here 8< -- HEXCHARS = (b'0', b'1', b'2', b'3', b'4', b'5', b'6', b'7', b'8', b'9', b'A', b'B', b'C', b'D', b'E', b'F', b'a', b'b', b'c', b'd', b'e', b'f') # decode a single hex digit def hord(c): c = ord(c) if c >= or

Re: need help understanding: converting text to binary

2019-04-23 Thread Eli the Bearded
In comp.lang.python, Chris Angelico wrote: > Have you checked to see if Python can already do this? You mention I'm sure there's a library already. I'm trying to mix library usage with my own code to get practice writing in python. In this case, I want code to deal with MIME encoding in email he

Re: need help understanding: converting text to binary

2019-04-23 Thread Eli the Bearded
In comp.lang.python, Paul Rubin wrote: > Eli the Bearded <*@eli.users.panix.com> writes: >> # decode a single hex digit >> def hord(c): ... > >def hord(c): return int(c, 16) That's a good method, thanks. > > # decode quoted printable, specificall

Re: need help understanding: converting text to binary

2019-04-23 Thread Eli the Bearded
In comp.lang.python, Cameron Simpson wrote: > On 23Apr2019 20:35, Eli the Bearded <*@eli.users.panix.com> wrote: >> That feels entirely wrong. I don't know what b'\x9A' means without >> knowing the character set and character encoding. If the encoding is a &g

Re: Generating generations of files

2019-04-29 Thread Eli the Bearded
In comp.lang.python, Peter J. Holzer wrote: > On 2019-04-29 20:12:28 -, Grant Edwards wrote: >> Well, the FILES-11 filesystem on VAX/VMS did that automatically, but >> that's probably not too helpful. > Until this is finished you could use something like this: > > #!/usr/bin/python3 > > impo

Re: Generating generations of files

2019-04-29 Thread Eli the Bearded
In comp.lang.python, DL Neil wrote: > On 30/04/19 10:59 AM, Chris Angelico wrote: >>> bet a FAT filesystem would produce a different error >> Probably it'd raise BadFileSystemError or something. Which is a > Fortunately, it runs on a Linux 'compute server'. I mount FAT under Linux all the time.

Re: Conway's game of Life, just because.

2019-05-07 Thread Eli the Bearded
In comp.lang.python, Paul Rubin wrote: Thanks for posting this. I'm learning python and am very familiar with this "game". > #!/usr/bin/python3 > from itertools import chain > > def adjacents(cell):# generate coordinates of cell neighbors > x, y = cell # a cell

Re: Conway's game of Life, just because.

2019-05-07 Thread Eli the Bearded
In comp.lang.python, MRAB wrote: > I've never seen a version of Conway's Game of Life where the board > doesn't wrap around. The one I wrote in vi macros doesn't. It's a design choice you can make. (Thanks for the explainations everyone.) Elijah -- the vi macro one is included in the vim

Re: convert .py to Android ?

2019-05-14 Thread Eli the Bearded
In comp.lang.python, Ben Finney wrote: > "Steve" writes: >> I have a working .py program >> that I want to get into my Android Moto G phone. > To my knowledge, an Android app must be implemented, at some level, in > Java and specifically linked to Android Java libraries. That's a hard > limitati

Re: Proper shebang for python3

2019-07-22 Thread Eli the Bearded
In comp.lang.python, Tim Daneliuk wrote: > On 7/20/19 1:20 PM, Chris Angelico wrote: > > On Sun, Jul 21, 2019 at 4:13 AM Michael Speer wrote: > >> You may want to use `#!/usr/bin/env python3` instead. I no longer have one to verify, but I recall Solaris boxen used /bin/env not /usr/bin/env. >

Re: Hermetic environments

2019-07-24 Thread Eli the Bearded
In comp.lang.python, DL Neil wrote: > Is Python going 'the right way' with virtual environments? ... > Am I 'getting away with it', perhaps because my work-pattern doesn't > touch some 'gotcha' or show-stopper? > > Why, if so much of 'the rest of the world' is utilising "containers", > both fo

Re: Proper shebang for python3

2019-07-25 Thread Eli the Bearded
In comp.lang.python, Thomas 'PointedEars' Lahn wrote: > Michael Torrie wrote: >> On 7/24/19 4:20 PM, Cameron Simpson wrote: >>> That is some progress, hooray. Then there's just sbin -> bin to go. >> I suppose in the olden days sbin was for static binaries, […] > No, “sbin” is short for “*system*

Re: [OT(?)] Ubuntu 18 vim now defaults to 4-space tabs

2019-09-09 Thread Eli the Bearded
In comp.lang.python, Tobiah wrote: > We upgraded a server to 18.04 and now when I start typing Your subject missed a critical word: vim. There are a lot of editors in Ubuntu, and probably they don't all do that. > This is more of a vim question perhaps, but I'm already > subscribed here and I f

  1   2   >