Hello
List sys.path contains all paths where python shall
look for libraries.
Eg on my system, here is the content of sys.path:
>>> import sys
>>> sys.path
['',
'C:\\Users\\jean-marc\\Desktop\\python',
'C:\\Program Files\\Python36-32\\python36.zip',
'C:\\Program Files\\Python36-32\\DLLs',
'C:\\
ast writes:
> I looked for windows environment variables to tell python
> how to fill sys.path at startup but I didn't found.
>
> So how does it work ?
Read the (so called) docstring at the beginning of the module
"site.py".
Either locate the module source in the file system
and read it in an ed
On 9/7/19, ast wrote:
>
> Eg on my system, here is the content of sys.path:
>
> >>> import sys
> >>> sys.path
> ['',
In the REPL, "" is added for loading modules from the current
directory. When executing a script, this would be the script
directory.
> 'C:\\Users\\jean-marc\\Desktop\\python',
Hi,
Currently I'm making a statistics tool for a game I'm playing with PyQt5. I'm
not happy with my current graphing library though. In the beginning I've used
matplotlib, which was way too laggy for my use case. Currently I have
pyqtgraph, which is snappy, but is missing useful features.
The
import csv
import fileinput
import sys
print("Version: " + str(sys.version_info))
print("Files: " + str(sys.argv[1:]))
with fileinput.input(sys.argv[1:]) as f:
for line in f:
print(f"File number: {fileinput.fileno()}")
print(f"Is first line: {fileinput.isfirstline()}")
I run
On 9/7/19 11:12 AM, Jason Friedman wrote:
$ grep "File number" ~/result | sort | uniq
File number: 3
I expected that last grep to yield:
File number: 1
File number: 2
File number: 3
File number: 4
File number: 5
File number: 6
As per https://docs.python.org/3/library/fileinput.html#fileinput.
> On 7 Sep 2019, at 16:33, Dan Sommers <2qdxy4rzwzuui...@potatochowder.com>
> wrote:
>
>with fileinput ...:
>for line in f:
>if fileinput.isfirstline():
>headers = extract_headers(line)
>else:
>pass # process a non-header line
>
> If you're certain that the headers are the same in each file,
> then there's no harm and much simplicity in reading them each
> time they come up.
>
> with fileinput ...:
> for line in f:
> if fileinput.isfirstline():
> headers = extract_headers(line)
2to3 converts syntactically valid 2.x code to syntactically valid 3.x
code. It cannot, however, guarantee semantic correctness. A particular
problem is that str is semantically ambiguous in 2.x, as it is used both
for text encoded as bytes and binary data.
To resolve the ambiguity for conver
On 9/7/2019 5:51 AM, ast wrote:
'C:\\Program Files\\Python36-32\\lib\\site-packages']
The last path is used as a location to store libraries
you install yourself.
If I am using a virtual environment (with venv) this last
path is different
'C:\\Users\\jean-marc\\Desktop\\myenv\\lib\\site-packa
>>> (-80538738812075974)**3 + 80435758145817515**3 +
12602123297335631**3 == 42
True # Impressively quickly, in a blink of an eye.
This is the last number < 100, not theoretically excluded, to be solved.
Compute power provided by CharityEngine. For more, see Numberphile...
https://www.youtu
I am trying to read a log file that is in CSV format.
The code snippet is below:
###
import matplotlib.pyplot as plt
import seaborn as sns; sns.set()
import numpy as np
import pandas as pd
import os
import csv
from numpy import genfromtxt
# read the CSV and get into X
On Sat, Sep 7, 2019 at 8:21 PM Sharan Basappa wrote:
>
> I am trying to read a log file that is in CSV format.
>
> The code snippet is below:
>
> ###
> import matplotlib.pyplot as plt
> import seaborn as sns; sns.set()
> import numpy as np
> import pandas as pd
> import
On Sat, Sep 7, 2019 at 8:28 PM Joel Goldstick wrote:
>
> On Sat, Sep 7, 2019 at 8:21 PM Sharan Basappa
> wrote:
> >
> > I am trying to read a log file that is in CSV format.
> >
> > The code snippet is below:
> >
> > ###
> > import matplotlib.pyplot as plt
> > import
On 2019-09-08 01:19, Sharan Basappa wrote:
I am trying to read a log file that is in CSV format.
The code snippet is below:
###
import matplotlib.pyplot as plt
import seaborn as sns; sns.set()
import numpy as np
import pandas as pd
import os
import csv
from numpy imp
I know it is valid, according to the Tkinter source, every widget constructor
has a 'master=None' default. What happens on doing this? In what circumstance,
we do it this way? and will it cause any trouble?
--Jach
--
https://mail.python.org/mailman/listinfo/python-list
On Saturday, 7 September 2019 21:18:11 UTC-4, MRAB wrote:
> On 2019-09-08 01:19, Sharan Basappa wrote:
> > I am trying to read a log file that is in CSV format.
> >
> > The code snippet is below:
> >
> > ###
> > import matplotlib.pyplot as plt
> > import seaborn as sn
17 matches
Mail list logo