ponents can be identified mechanically. So it
needs to be a syntacticly valid RFC5322 message. Thus the encoding.
As an example (slightly contrived) of why this is important, multipart
messages are delimited with distinct lines, and their content may not
present such a line (even f it's in the "
On 2024-11-04 13:02:21 +0100, Loris Bennett via Python-list wrote:
> "Loris Bennett" writes:
> > "Loris Bennett" writes:
> >> Cameron Simpson writes:
> >>> On 01Nov2024 10:10, Loris Bennett wrote:
> as expected. The non-UTF-8 text occurs when I do
>
> mail = EmailMessage()
> >>>
"Loris Bennett" writes:
> "Loris Bennett" writes:
>
>> Cameron Simpson writes:
>>
>>> On 01Nov2024 10:10, Loris Bennett wrote:
as expected. The non-UTF-8 text occurs when I do
mail = EmailMessage()
mail.set_content(body, cte="quoted-printable")
...
if arg
"Loris Bennett" writes:
> Cameron Simpson writes:
>
>> On 01Nov2024 10:10, Loris Bennett wrote:
>>>as expected. The non-UTF-8 text occurs when I do
>>>
>>> mail = EmailMessage()
>>> mail.set_content(body, cte="quoted-printable")
>>> ...
>>>
>>> if args.verbose:
>>> print(mail)
>>>
>>>
Inada Naoki writes:
> 2024年11月2日(土) 0:36 Loris Bennett via Python-list :
>
>> Left Right writes:
>>
>> > There's quite a lot of misuse of terminology around terminal / console
>> > / shell. Please, correct me if I'm wrong, but it looks like you ar
Cameron Simpson writes:
> On 01Nov2024 10:10, Loris Bennett wrote:
>>as expected. The non-UTF-8 text occurs when I do
>>
>> mail = EmailMessage()
>> mail.set_content(body, cte="quoted-printable")
>> ...
>>
>> if args.verbose:
>> print(mail)
>>
>>which is presumably also correct.
>>
>>T
Try PYTHONUTF8=1 envver.
2024年11月2日(土) 0:36 Loris Bennett via Python-list :
> Left Right writes:
>
> > There's quite a lot of misuse of terminology around terminal / console
> > / shell. Please, correct me if I'm wrong, but it looks like you are
> > print
In comp.lang.python, Gilmeh Serda wrote:
> Python 3.12.6 (main, Sep 8 2024, 13:18:56) [GCC 14.2.1 20240805] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> help('modules')
>
> Please wait a moment while I gather a list of all available modules...
>
> Ass
On 2024-11-01, Eli the Bearded <*@eli.users.panix.com> wrote:
> In comp.lang.python, Gilmeh Serda wrote:
>> Python 3.12.6 (main, Sep 8 2024, 13:18:56) [GCC 14.2.1 20240805] on linux
>> Type "help", "copyright", "credits" or "license" for more information.
>> >>> help('modules')
>>
>> Please wai
> On 1 Nov 2024, at 22:57, Left Right wrote:
>
> Does this Windows Terminal support the use
> of programs like tmux?
I have not tried, but should work.
Best to install the terminal app from the MS app store.
Most use I make is to ssh into linux systems and stuff like editors.
Colour output a
> Windows does now. They implemented this feature over the last few years.
> Indeed they took inspiration from how linux does this.
>
> You might find https://devblogs.microsoft.com/commandline/ has interesting
> articles about this.
I don't have MS Windows. My wife does, but I don't want to both
> On 31 Oct 2024, at 16:42, Left Right via Python-list
> wrote:
>
> MS Windows doesn't have or use
> terminals (that's more of a Unix-related concept).
Windows does now. They implemented this feature over the last few years.
Indeed they took inspiration from how linux does this.
You might f
On 31Oct2024 21:53, alan.ga...@yahoo.co.uk wrote:
On 31/10/2024 20:50, Cameron Simpson via Python-list wrote:
If you're just dealing with this directly, use the `quopri` stdlib
module: https://docs.python.org/3/library/quopri.html
One of the things I love about this list are these little feat
On 01Nov2024 10:10, Loris Bennett wrote:
as expected. The non-UTF-8 text occurs when I do
mail = EmailMessage()
mail.set_content(body, cte="quoted-printable")
...
if args.verbose:
print(mail)
which is presumably also correct.
The question is: What conversion is necessary in order t
On 01Nov2024 08:11, Loris Bennett wrote:
Cameron Simpson writes:
If you're using the Python email module to parse (or construct) the
message as a `Message` object I'd expect that to happen automatically.
I am using
email.message.EmailMessage
Noted. That seems like the correct approach to
Loris Bennett wrote at 2024-11-1 10:10 +0100:
> ...
> mail.set_content(body, cte="quoted-printable")
In the line above, you request the content to use
the "cte" (= "Content-Transfer-Encoding") "quoted-printable"
and consequently, the content is encoded with `quoted-printable`.
Maybe, you do not n
Cameron Simpson writes:
> On 31Oct2024 16:33, Loris Bennett wrote:
>>I have a command-line program which creates an email containing German
>>umlauts. On receiving the mail, my mail client displays the subject and
>>body correctly:
> [...]
>>So far, so good. However, when I use the --verbose o
Left Right writes:
> There's quite a lot of misuse of terminology around terminal / console
> / shell. Please, correct me if I'm wrong, but it looks like you are
> printing that on MS Windows, right? MS Windows doesn't have or use
> terminals (that's more of
"Loris Bennett" writes:
> Cameron Simpson writes:
>
>> On 31Oct2024 16:33, Loris Bennett wrote:
>>>I have a command-line program which creates an email containing German
>>>umlauts. On receiving the mail, my mail client displays the subject and
>>>body correctly:
>> [...]
>>>So far, so good.
On 31/10/2024 20:50, Cameron Simpson via Python-list wrote:
> That looks to me like quoted-printable. This is an encoding for binary
> transport of text to make it robust against not 8-buit clean
...
> If you're just dealing with this directly, use the `quopri` stdlib
> module: https://docs.py
On 31Oct2024 16:33, Loris Bennett wrote:
I have a command-line program which creates an email containing German
umlauts. On receiving the mail, my mail client displays the subject and
body correctly:
[...]
So far, so good. However, when I use the --verbose option to print
the mail to the ter
There's quite a lot of misuse of terminology around terminal / console
/ shell. Please, correct me if I'm wrong, but it looks like you are
printing that on MS Windows, right? MS Windows doesn't have or use
terminals (that's more of a Unix-related concept). And, by "
Hi,
I have a command-line program which creates an email containing German
umlauts. On receiving the mail, my mail client displays the subject and
body correctly:
Subject: Übung
Sehr geehrter Herr Dr. Bennett,
Dies ist eine Übung.
So far, so good. However, when I use the --verbose opti
On 2024-05-30 21:47:14 -0700, HenHanna via Python-list wrote:
> [('the', 36225), ('and', 17551), ('of', 16759), ('i', 16696), ('a', 15816),
> ('to', 15722), ('that', 11252), ('in', 10743), ('it', 10687)]
>
> ((the 36225) (and 17551) (of 16759) (i 16696) (a 15816) (to 15722) (that
> 11252) (in 1074
;;; Pls tell me about little tricks you use in Python or Lisp.
[('the', 36225), ('and', 17551), ('of', 16759), ('i', 16696), ('a',
15816), ('to', 15722), ('that', 11252), ('in', 10743), ('it', 10687)]
((the 36225) (and 17551) (of 16759) (i 16696) (a 15816) (to 15722) (that
11252)
DL Neil writes:
> On 11/25/2023 3:31 AM, Loris Bennett via Python-list wrote:
>> Hi,
>> I want to print some records from a database table where one of the
>> fields contains a JSON string which is read into a dict. I am doing
>> something like
>>print(f"{id} {d['foo']} {d['bar']}")
>> Howev
duncan smith writes:
> On 24/11/2023 16:35, duncan smith wrote:
>> On 24/11/2023 14:31, Loris Bennett wrote:
>>> Hi,
>>>
>>> I want to print some records from a database table where one of the
>>> fields contains a JSON string which is read into a dict. I am doing
>>> something like
>>>
>>> p
On 11/25/2023 3:31 AM, Loris Bennett via Python-list wrote:
Hi,
I want to print some records from a database table where one of the
fields contains a JSON string which is read into a dict. I am doing
something like
print(f"{id} {d['foo']} {d['bar']}")
However, the dict does not always have
On 24/11/2023 16:35, duncan smith wrote:
On 24/11/2023 14:31, Loris Bennett wrote:
Hi,
I want to print some records from a database table where one of the
fields contains a JSON string which is read into a dict. I am doing
something like
print(f"{id} {d['foo']} {d['bar']}")
However, the d
On 24/11/2023 14:31, Loris Bennett wrote:
Hi,
I want to print some records from a database table where one of the
fields contains a JSON string which is read into a dict. I am doing
something like
print(f"{id} {d['foo']} {d['bar']}")
However, the dict does not always have the same keys, so
Hi,
I want to print some records from a database table where one of the
fields contains a JSON string which is read into a dict. I am doing
something like
print(f"{id} {d['foo']} {d['bar']}")
However, the dict does not always have the same keys, so d['foo'] or
d['bar'] may be undefined. I ca
On 6/9/22, Peter Otten <__pete...@web.de> wrote:
>
> Looks like the variable is now called PYLAUNCHER_DEBUG:
>
> https://docs.python.org/3.11/using/windows.html#diagnostics
I wonder why Steve changed the name of the environment variable
without supporting the old "PYLAUNCH_DEBUG" name, at least fo
On 09/06/2022 00:53, Richard David wrote:
Why am I not getting debug output on my windows 10 machine:
C:\temp>\Windows\py.exe -0
-V:3.11 *Python 3.11 (64-bit)
-V:3.10 Python 3.10 (64-bit)
C:\temp>set PYLAUNCH_DEBUG=1
C:\temp>\Windows\py.exe
Python 3.11.0b3 (main, Jun 1 20
On 09/06/2022 00:53, Richard David wrote:
Why am I not getting debug output on my windows 10 machine:
C:\temp>\Windows\py.exe -0
-V:3.11 *Python 3.11 (64-bit)
-V:3.10 Python 3.10 (64-bit)
C:\temp>set PYLAUNCH_DEBUG=1
C:\temp>\Windows\py.exe
Python 3.11.0b3 (main, Jun 1 20
Why am I not getting debug output on my windows 10 machine:
C:\temp>\Windows\py.exe -0
-V:3.11 *Python 3.11 (64-bit)
-V:3.10 Python 3.10 (64-bit)
C:\temp>set PYLAUNCH_DEBUG=1
C:\temp>\Windows\py.exe
Python 3.11.0b3 (main, Jun 1 2022, 13:29:14) [MSC v.1932 64 bit (AMD64)] on
On Sun, 1 May 2022 at 00:03, Vlastimil Brom wrote:
> (Even the redundant u prefix from your python2 sample is apparently
> accepted, maybe for compatibility reasons.)
Yes, for compatibility reasons. It wasn't accepted in Python 3.0, but
3.3 re-added it to make porting easier. It doesn't do anythi
"║"] ?
>
> 3. Given that I want to print a list of Unicode strings so that their
> characters are displayed (instead of their Unicode codepoint definitions),
> is there a more Pythonic way of doing it than concatenating them into a
> single string and printing that?
>
&
On 28/04/2022 14:27, Stephen Tucker wrote:
To Cameron Simpson,
Thanks for your in-depth and helpful reply. I have noted it and will be
giving it close attention when I can.
The main reason why I am still using Python 2.x is that my colleagues are
still using a GIS system that has a Python pro
o obvious reason why it *should*, and pretty decent
reasons why it shouldn't (it would be a hybrid mess of Python-syntax
repr output and raw string output).
> 3. Given that I want to print a list of Unicode strings so that their
> characters are displayed (instead of their Unicode codepoint
>
> >2. Should the second print statement produce [ ║] or ["║"] ?
>
> Well, to me its behaviour is correct. Do you _want_ to get your Unicode
> glyph? in quotes? That is up to you. But consider: what would be sane
> output if the list contained the string "], [3
yph? in quotes? That is up to you. But consider: what would be sane
output if the list contained the string "], [3," ?
>3. Given that I want to print a list of Unicode strings so that their
>characters are displayed (instead of their Unicode codepoint definitions),
>is there a m
oes the second print statement not produce [ ║] or ["║"] ?
2. Should the second print statement produce [ ║] or ["║"] ?
3. Given that I want to print a list of Unicode strings so that their
characters are displayed (instead of their Unicode codepoint definitions),
is there a more P
On 3/4/2021 4:28 PM, Terry Reedy wrote:
Quentin privately sent me 12 lines (which should have been posted here
instead), which can be reduced to the following 4 that exhibit his bug.
if a == b:
print('correct')
if a != b:
print('incorrect')
The bug is a != b will never be t
On 3/4/2021 3:15 PM, Terry Reedy wrote:
On 3/4/2021 12:10 PM, Quentin Bock wrote:
I won't paste the code into
this because it's 164 lines so I will attach a file copy,
The alternative to posting too much is to reduce your code to the
minimum needed to exhibit the behavior you want to change.
On 3/4/2021 12:10 PM, Quentin Bock wrote:
I won't paste the code into
this because it's 164 lines so I will attach a file copy,
The alternative to posting too much is to reduce your code to the
minimum needed to exhibit the behavior you want to change. Doing so may
reveal to you the solutio
Okay so, this is my biggest project, I'm not advanced in Python in any
way so don't expect it to be perfect. I made a trivia game and for the most
part, it works but I can't get it to print "Incorrect" and then what the
answer was for all but one of my questions and I don't know why. I use
PyCharm
Hi i am trying to use chi-square Test to select most important columns among
5501 columns. But for most of the columns i am getting NAN value as a Chi test
value
import pandas as pd
from sklearn.preprocessing import LabelEncoder
from sklearn.feature_selection import chi2
cols =[]
cols.append(int
Ooo thanks I understood.
On Thu, 19 Mar, 2020, 8:10 pm Pieter van Oostrum,
wrote:
> Souvik Dutta writes:
>
> > I should have been more clear
> > class first():
> > print("from first")
> > def second():
> > print("from second")
> > first()
> >
> > When I run the above code the ou
Souvik Dutta writes:
> I should have been more clear
> class first():
> print("from first")
> def second():
> print("from second")
> first()
>
> When I run the above code the output is
> "from first"
And where do you think this comes from? Are you thinking this comes from
the cal
On 19/03/2020 13:58, Souvik Dutta wrote:
I should have been more clear
class first():
print("from first")
def second():
print("from second")
first()
When I run the above code the output is
"from first"
(2ND CODE)
class first():
print("from first")
def second():
On Fri, Mar 20, 2020 at 1:04 AM Souvik Dutta wrote:
>
> I should have been more clear
> class first():
> print("from first")
> def second():
> print("from second")
> first()
>
> When I run the above code the output is
> "from first"
> (2ND CODE)
>
Try this *without* the call to fi
I should have been more clear
class first():
print("from first")
def second():
print("from second")
first()
When I run the above code the output is
"from first"
(2ND CODE)
class first():
print("from first")
def second():
print("from second")
first.second()
When I
Chris Angelico writes:
> Creating the class runs all the code in the class block, including
> function definitions, assignments, and in this case, a print call.
>
> Classes are not declarations. They are executable code.
Demo:
In [26]: class first():
... print("From first")
...
On Thu, Mar 19, 2020 at 12:30 PM Souvik Dutta wrote:
>
> Hi,
> I wrote a purposeless code today.
>
> class first():
> print("From first")
> def second():
> print("From second")
> first()
> first.second()
>
>
> Now the output I get is
> From first
> From second
>
> But when I comm
Hi,
I wrote a purposeless code today.
class first():
print("From first")
def second():
print("From second")
first()
first.second()
Now the output I get is
>From first
>From second
But when I comment the call of first that is the comment the second last
line of the code (#first()
To me it also seems to be the most sensible behaviour, since
dictionaries with their keys and values are different from most other
sequences.
You've got a point but
1. That goes against the compact=True expected behaviour
2. Small dicts (e.g. /{x: x for x in range(5)}/) are still printed on a
On Tue, Sep 11, 2018 at 1:58 PM, Nicolas Hug wrote:
> pprint({x: x for x in range(15)}, compact=True)
>
> would be be printed in 15 lines while it could fit on 2.
>
>
> Is this a bug or was this decided on purpose?
It is on purpose as can be seen in the code for pprint [1], which
calls _format [2
Is there a reason why the 'compact' parameter is ignored when pretty
printing a dict? For example:
pprint({x: x for x in range(15)}, compact=True)
would be be printed in 15 lines while it could fit on 2.
Is this a bug or was this decided on purpose?
Thank you!
--
https://mail.
On Mon, 20 Aug 2018 08:19:12 +1000
Cameron Simpson wrote:
[sorry for late reply]
> Someone else has descibed zip tersely: it pairs it the elements of 2
> lists. In fact it joins up matching elements of an arbitrary number
> of iterables. Here is a 3 iterable example:
>
> >>> zip( (1,2,3), (
On 19Aug2018 15:09, richard lucassen wrote:
On Sun, 19 Aug 2018 19:53:04 +1000
Cameron Simpson wrote:
Although I do not understand what zip is doing exactly here (I presume
I switch to use pointers instead of the values),
Someone else has descibed zip tersely: it pairs it the elements of 2 li
On Mon, Aug 20, 2018 at 7:55 AM, Cameron Simpson wrote:
> Draw little boxes with arrows. It helps. - Michael J. Eager
Draw good boxes. - DeviCat
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
On 19Aug2018 18:10, richard lucassen wrote:
On Sun, 19 Aug 2018 10:11:08 -0400
Joel Goldstick wrote:
Your allusion to pointers is misguided. Python is not like C or
assembler. You don't, and don't need to know where objects are
stored. Names are assigned to reference data objects
I'll hav
On Sun, 19 Aug 2018 12:37:18 -0400
Joel Goldstick wrote:
> > I'll have another look at it, I was just searching for a clear
> > explanation, but the page I found was not clear enough for me. I'll
> > have to take some time for it...
>
> try python.org tutorial, and search for terms like names, o
On Sun, Aug 19, 2018 at 12:16 PM Richard Lucassen
wrote:
>
> On Sun, 19 Aug 2018 10:11:08 -0400
> Joel Goldstick wrote:
>
> > > Well, apparently there were quite a lot of things that makes the
> > > code more readable I'd say. And even better. But it was indeed not
> > > very unPythony. OTOH, I'm
On Sun, 19 Aug 2018 10:11:08 -0400
Joel Goldstick wrote:
> > Well, apparently there were quite a lot of things that makes the
> > code more readable I'd say. And even better. But it was indeed not
> > very unPythony. OTOH, I'm not a programmer, otherwise I would have
> > written this in C ;-)
>
On Sun, 19 Aug 2018 19:53:04 +1000
Cameron Simpson wrote:
> There are always unPythonic bits. Even after you've cleaned them all
> up, since people will disagree about the finer points of Pythonicism
> there will be bits both over and under cleaned.
Although I do not understand what zip is doing
On Sun, Aug 19, 2018 at 9:56 AM richard lucassen
wrote:
>
> On Sun, 19 Aug 2018 12:02:51 +0300
> Marko Rauhamaa wrote:
>
> > richard lucassen :
> > > As I'm new to Python, just this question: are there any unPythony
> > > things in this code?
> >
> > Your code looks neat.
>
> Well, apparently the
On Sun, 19 Aug 2018 12:02:51 +0300
Marko Rauhamaa wrote:
> richard lucassen :
> > As I'm new to Python, just this question: are there any unPythony
> > things in this code?
>
> Your code looks neat.
Well, apparently there were quite a lot of things that makes the code
more readable I'd say. And
On Sun, 19 Aug 2018 19:53:04 +1000
Cameron Simpson wrote:
[Oops, apparently you set the Reply-To to python-list@python.org,
normally that's no problem, but I did something wrong somewhere]
> There are always unPythonic bits. Even after you've cleaned them all
> up, since people will disagree abo
On 19Aug2018 09:32, richard lucassen wrote:
This is a working script I made. It initializes the I/O expanders, then
it waits for an INT from these I/O expanders on GPIO23, reads the
contents and sends which bit on which chip went up or down to a fifo
(and stdout for logging)
As I'm new to Pytho
richard lucassen :
> As I'm new to Python, just this question: are there any unPythony
> things in this code?
Your code looks neat.
> except IOError:
> print ("[ALERT] I/O problem device 0x%x" % list_pcf[i])
Just double check that simply printing the al
On Fri, 17 Aug 2018 08:31:22 +1000
Cameron Simpson wrote:
> Just looking at your loop I would be inclined to just call flush once
> at the bottom, _before_ the sleep() call:
>
> sys.stdout.flush()
>
> Your call; the performance difference will be small, so it tends to
> come down to keeping y
On Fri, 17 Aug 2018 08:31:22 +1000
Cameron Simpson wrote:
> This isn't specific to Python, you'll find it with most programmes.
> (The shell's builtin "echo" command is an exception.)
[buffer explanation]
I already suspectec a buffered output and to check if it was the
buffer, I created a lot o
On 16Aug2018 22:37, richard lucassen wrote:
I can run a shell script from the commandline as root in which I start
a python script as user "ha". The output to stdout and stderr
generated by the python script is visible in an xterm:
#!/bin/dash
exec 2>&1
chpst -u ha:ha:i2c -U ha /usr/local/ha/in
I can run a shell script from the commandline as root in which I start
a python script as user "ha". The output to stdout and stderr
generated by the python script is visible in an xterm:
#!/bin/dash
exec 2>&1
chpst -u ha:ha:i2c -U ha /usr/local/ha/init.sh
exec chpst -u ha:ha:i2c:gpio /usr/local/h
On Tuesday, April 24, 2018 at 4:13:17 AM UTC+5:30, MRAB wrote:
> On 2018-04-23 22:11, Hac4u wrote:
> > On Tuesday, April 24, 2018 at 12:54:43 AM UTC+5:30, MRAB wrote:
> >> On 2018-04-23 18:24, Hac4u wrote:
> >> > I have a raw data of size nearly 10GB. I would like to find a text
> >> > string and
On 2018-04-23 22:11, Hac4u wrote:
On Tuesday, April 24, 2018 at 12:54:43 AM UTC+5:30, MRAB wrote:
On 2018-04-23 18:24, Hac4u wrote:
> I have a raw data of size nearly 10GB. I would like to find a text string and
print the memory address at which it is stored.
>
> This is my code
>
> import os
On Tuesday, April 24, 2018 at 12:54:43 AM UTC+5:30, MRAB wrote:
> On 2018-04-23 18:24, Hac4u wrote:
> > I have a raw data of size nearly 10GB. I would like to find a text string
> > and print the memory address at which it is stored.
> >
> > This is my code
> >
> > import os
> > import re
> > fi
On Tuesday, April 24, 2018 at 1:28:07 AM UTC+5:30, Paul Rubin wrote:
> Hac4u writes:
> > I have a raw data of size nearly 10GB. I would like to find a text
> > string and print the memory address at which it is stored.
>
> The simplest way is probably to mmap the file and use mmap.find:
>
> http
On 23/04/2018 21:45, Stefan Ram wrote:
MRAB writes:
offset += search_length
Or, offset += 1, to also find overlaps of that kind:
file = "eee"
word = "ee"
. The above word "ee" occurs at position 0 and 1 in the file.
My attempt:
#include
#include
int main( void )
{ FILE * const
On 2018-04-23, Hac4u wrote:
> I have a raw data of size nearly 10GB. I would like to find a text
> string and print the memory address at which it is stored.
The first thing I would try is to map the file into memory as a string
(Pythonb 2) or bytearray (Python 3), and then search it using the
f
On 2018-04-23 18:24, Hac4u wrote:
I have a raw data of size nearly 10GB. I would like to find a text string and
print the memory address at which it is stored.
This is my code
import os
import re
filename="filename.dmp"
read_data=2**24
searchtext="bd:mongo:"
he=searchtext.encode('hex')
with op
ndex(searchtext))
> > print offset
> > except ValueError:
> > print 'Not Found'
> > else:
> > continue
>
> You have a loop that reads a slab of data from a file, then searches
> the curre
a loop that reads a slab of data from a file, then searches
the current data only. Then you search that again for the actual
index, and print it - but you're printing the offset within the
current chunk only. You'll need to maintain a chunk position in order
to get the actual offset.
I have a raw data of size nearly 10GB. I would like to find a text string and
print the memory address at which it is stored.
This is my code
import os
import re
filename="filename.dmp"
read_data=2**24
searchtext="bd:mongo:"
he=searchtext.encode('hex')
with open(filename, 'rb') as f:
while T
On Tuesday, January 16, 2018 at 6:04:06 PM UTC+5:30, Rustom Mody wrote:
Had missed the mtd element
ie changing
elemfmt = """%d
"""
to
elemfmt = """%d
"""
--
https://mail.python.org/mailman/listinfo/python-list
On Tuesday, January 16, 2018 at 5:10:14 PM UTC+5:30, Rustom Mody wrote:
> On Sunday, January 14, 2018 at 3:28:02 AM UTC+5:30, bo...@questa.la.so wrote:
> > Rustom Mody writes:
> >
> > > Specifically and for starters, I want a numpy array — lets say 2D to
> > > start with — to be displayed(display
On Sunday, January 14, 2018 at 3:28:02 AM UTC+5:30, bo...@questa.la.so wrote:
> Rustom Mody writes:
>
> > Specifically and for starters, I want a numpy array — lets say 2D to
> > start with — to be displayed(displayable) as elegantly as sympy does
> > to (its) matrices
> #
bo...@questa.la.so writes:
> def prmat(mat):
> return (r'\begin{bmatrix}' +
> r'\\'.join('&'.join('%f'%x for x in row) for row in mat) +
> r'\end{bmatrix}'
add a closing parenthesis here ^
--
https://mail.python.org/mailman/listinfo/python-list
Rustom Mody writes:
> Specifically and for starters, I want a numpy array — lets say 2D to
> start with — to be displayed(displayable) as elegantly as sympy does
> to (its) matrices
import numpy as np
from IPython.display im
On Thursday, January 11, 2018 at 2:49:27 PM UTC+5:30, Thomas Jollans wrote:
> On 2018-01-11 09:59, Rustom Mody wrote:
> > On Thursday, January 11, 2018 at 2:13:46 PM UTC+5:30, Paul Moore wrote:
> >> The HTML representation is supplied by the object's _repr_html_
> >> method. See https://ipython.or
On 2018-01-11 09:59, Rustom Mody wrote:
> On Thursday, January 11, 2018 at 2:13:46 PM UTC+5:30, Paul Moore wrote:
>> The HTML representation is supplied by the object's _repr_html_
>> method. See https://ipython.org/ipython-doc/3/config/integrating.html
>> for some details.
>>
> import pandas
On Thursday, January 11, 2018 at 2:13:46 PM UTC+5:30, Paul Moore wrote:
> The HTML representation is supplied by the object's _repr_html_
> method. See https://ipython.org/ipython-doc/3/config/integrating.html
> for some details.
>
> >>> import pandas as pd
> >>> df = pd.DataFrame()
> >>> df._rep
The HTML representation is supplied by the object's _repr_html_
method. See https://ipython.org/ipython-doc/3/config/integrating.html
for some details.
>>> import pandas as pd
>>> df = pd.DataFrame()
>>> df._repr_html_()
'\n\n.dataframe tbody tr th:only-of-type {\n
vertical-align: middle;\
If I make a data-frame in pandas in jupyter notebook it prints very nicely
ie it looks quite like a spreadsheet
How does it do it?
Who does it?
The data-frame does not seem to have str/repr methods…
--
https://mail.python.org/mailman/listinfo/python-list
It wouldn't be too difficult to write a file object wrapper that emulates tee,
for instance (untested):
class tee(object):
def __init__(self, file_objs, autoflush=True):
self._files = file_objs
self._autoflush = autoflush
def write(self, buf):
for f in self._files
On 10/10/2017 10:09 AM, Vail, Rick wrote:
> I have a script for Cisco devices that will do configuration or any CLI
> command. What I would like to do is print the output to my terminal(windows)
> and to a file. I can come up with stdout parameters
> To print to a file but not to the screen and
On 2017-10-10 17:00, Vail, Rick wrote:
I have a script for Cisco devices that will do configuration or any CLI
command. What I would like to do is print the output to my terminal(windows)
and to a file. I can come up with stdout parameters
To print to a file but not to the screen and when I re
Follow Presidio on Twitter]<http://www.twitter.com/presidio>
From: Vail, Rick
Sent: Tuesday, October 10, 2017 7:04 AM
To: 'python-list@python.org'
Subject: Printing to a file and a terminal at the same time
I have a script for Cisco devices that will do configuration or any CLI
I have a script for Cisco devices that will do configuration or any CLI
command. What I would like to do is print the output to my terminal(windows)
and to a file. I can come up with stdout parameters
To print to a file but not to the screen and when I remove the stdout part it
prints to the sc
1 - 100 of 927 matches
Mail list logo