Maybe you'd better use descriptors?
On Tue, 28 Jan 2025 at 23:03, Ian Pilcher via Python-list <
python-list@python.org> wrote:
> (Note: I have mail delivery disabled for this list and read it through
> GMane. Please copy me on any responses, so that I can respond with
> proper threading.)
>
>
Well, Beautifulsoup is not
On Wed, Oct 10, 2018 at 02:installed on my system, just in the
environment, so how could apache run correctly my app without accessing my
environment?
I thought that venv or virtualenv point was only to create some folder
which was simply sourced. What other things they
I rsynced the full local project directory (which contains the virtualenv dir)
to a remote server.
And there I couldn't enter into it.
However, obviously apache2 achieved to...
October 9 2018 5:21 PM, "Chris Warrick" wrote:
> On Tue, 9 Oct 2018 at 11:18, wrote:
>
>> Here are the ouput during
Here are the ouput during sourcing:
[ftg @ localhost] [/var/www/ffablob]
% source env-p3/bin/activate
[ftg @ localhost] [
Hello everyone,
Here is a small picture of my project.
I'd like to fetch several datas from a website representing races results.
Each line of the result contains rank, runner's name and other attributes
of the runner (like club etc...).
For now I have created 2 classes (Race and Runner).
Methods
May 29 2018 11:12 AM, "Thomas Jollans" wrote:
> On 2018-05-29 09:55, f...@lutix.org wrote:
>
>> Hello,
>> Using Python 2.7 (will switch to Py3 soon but Before I'd like to understand
>> how string encoding
>> worked)
>
> Oh dear. This is probably the exact wrong way to go about it: the
> interpl
On 10/25/2017 03:07 PM, Thomas Jollans wrote:
What options are there for Python (that work)?
PyCharm's debugger is fine (also available in the community edition)
Cheers,
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
On 10/05/2017 12:00 AM, Thomas Jollans wrote:
On 04/10/17 22:47, Fabien wrote:
On 10/04/2017 10:11 PM, Thomas Jollans wrote:
Be warned, pandas is part of the scientific python stack, which is
immensely powerful and popular, but it does have a distinctive style
that may appear cryptic if you
On 10/04/2017 10:11 PM, Thomas Jollans wrote:
Be warned, pandas is part of the scientific python stack, which is
immensely powerful and popular, but it does have a distinctive style
that may appear cryptic if you're used to the way the rest of the world
writes Python.
Can you elaborate on this
On 07/14/2017 03:57 PM, jorge.conr...@cptec.inpe.br wrote:
Hi,
I installed the GDAL 2.2.1 using conda. Then I did:
import gdal
and I had:
Traceback (most recent call last):
File "", line 1, in
File "/home/conrado/miniconda2/lib/python2.7/site-packages/gdal.py",
line 2, in
fr
org/
- Shapely: http://toblerity.org/shapely/manual.html
Cheers,
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
On 01/11/2017 10:59 PM, Fabien wrote:
I would strongly recommend to use conda
(http://conda.pydata.org/miniconda.html) for managing your packages and
environments, and then use the conda-forge channel
(https://conda-forge.github.io/) to install gdal:
conda install -c conda-forge gdal
I
conda-forge channel
(https://conda-forge.github.io/) to install gdal:
conda install -c conda-forge gdal
Good luck!
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
On 12/21/2016 07:11 AM, Bernd Nawothnig wrote:
On 2016-12-20, Xristos Xristoou wrote:
I have a PostGIS database with shapefiles lines, polygons and points
and I want to create a topology rules with python. Any idea how to do
that ?some packages ?
http://www.gdal.org/
or:
pip install gdal
al
On 11/25/2016 09:29 AM, Mark Summerfield wrote:
On Thursday, November 24, 2016 at 7:35:03 PM UTC, bream...@gmail.com wrote:
> It's all here https://learnpythonthehardway.org/book/nopython3.html
I think the article is full of factual errors and is at best misleading
> and at worst downright dis
On 05/23/2016 05:15 AM, Siyi Deng wrote:
I have a dynamic library doing some numerical computations.
I used ctypes to interact it by passing numpy arrays back and forth.
Python 3.5 gives me the correct results.
Python 2.7 gives me different, erroneous results, but it never crashes.
How is this po
On 05/04/2016 01:48 AM, Vinicius Mesel wrote:
f you want to check it out, here is the link:https://github.com/vmesel/GeoMath
Thanks! What differences will your package have with shapely?
https://github.com/Toblerity/Shapely
Cheers
Fabien
--
https://mail.python.org/mailman/listinfo/python
On 04/21/2016 11:43 PM, Paulo da Silva wrote:
class C(pd.DataFrame):
Note also that subclassing pandas is not always encouraged:
http://pandas.pydata.org/pandas-docs/stable/internals.html#subclassing-pandas-data-structures
Cheers,
Fabien
--
https://mail.python.org/mailman/listinfo/python
On 04/01/2016 03:26 PM, Steven D'Aprano wrote:
Incorrect. range is a lazy sequence.
But how does range "know" that it has to start from scratch again? As in
this example:
it = range(10)
for i in it:
if i >= 3:
break
for i in it:
# why does it start from zero again?
print(
On 03/09/2016 09:09 PM, Drimades wrote:
Another thing to consider is that matrices I'm processing are heavily sparse.
Did you look at scipy.sparse.linalg ?
http://docs.scipy.org/doc/scipy/reference/sparse.linalg.html
--
https://mail.python.org/mailman/listinfo/python-list
On 03/07/2016 12:38 PM, BartC wrote:
(Although competing with CPython is too easy. PyPy is more of a problem.
With the Jpeg benchmark I mentioned, I can beat PyPy up to 6Mpix, but
then PyPy starts to get faster. At 80Mpix, PyPy is 60% faster.)
Just out of curiosity: are you also competing agai
On 03/02/2016 03:35 PM, Matt Wheeler wrote:
I agree that six should probably handle this,
Thank you Matt and Chris for your answers. Do you think I should open an
issue on six? It sounds unlikely that I am the first one having this
problem...
(until this difference with urlopen I have found
with urlopen('http://www.google.com') as resp:
_ = resp.read()
except AttributeError:
# python 2
resp = urlopen('http://www.google.com')
_ = resp.read()
(which is quite ugly).
Thanks!
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
-
I can see from your signature that you are going to use python for
scientific purposes. I recommend to go directly for Anaconda:
https://www.continuum.io/downloads
Cheers,
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
On 11/13/2015 06:27 AM, Karthik Sharma wrote:
How do I extract all the values in columns
Have a look at pandas:
http://pandas.pydata.org/pandas-docs/stable/generated/pandas.read_csv.html
--
https://mail.python.org/mailman/listinfo/python-list
r.
I think it should be fine.
Dear all,
I just wanted to report that everything worked fine. It wasn't even too
slow. I find it a quite elegant solution after all for all the students
to have the same working environment.
Thanks!
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
equivalent to writing:
x = None
So I don't really understand your question, I'm sorry...
Cheers,
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
On 06/21/2015 07:21 AM, Nasser M. Abbasi wrote:
v1=np.array([(1,2,3)]).T
v2=np.array([(4,5,6)]).T
v3=np.array([(7,8,9)]).T
v4=np.array([(10,11,12)]).T
mat =np.hstack(( np.vstack((v1,v3)), np.vstack((v2,v4))) )
Out[236]:
array([[ 1, 4],
[ 2, 5],
[ 3, 6],
[ 7, 10],
or
logging and other handling. Obviously you might return something more
sophisticated that my simple tuple above, but I'm sure you get the idea.
Cheers,
Cameron Simpson
Perfect! Much more elegant and easier to implement on top of my existing
workflow based on raising exceptions.
thanks
l, as no instance of task1
depends on any other instance of task1; but task2 should be started
only if all task1s finish successfully. OP, is this how it is? If not,
I apologize for the noise.
That's it! Thanks for clarifying, I might have trouble explaining myself
sometimes ;-)
Fabie
On 06/19/2015 04:25 PM, Andres Riancho wrote:
Fabien,
My recommendation is that you should pass some extra arguments to the task:
* A unique task id
* A result multiprocessing.Queue
When an exception is raised you put (unique_id, exception) to the
queue. When it succeeds you
On 06/19/2015 05:41 PM, Steven D'Aprano wrote:
On Sat, 20 Jun 2015 12:01 am, Fabien wrote:
>Folks,
>
>I am developing a tool which works on individual entities (glaciers) and
>do a lot of operations on them. There are many tasks to do, one after
>each other, and each t
ll tasks with a "try: exept:" block? How to switch
between behaviors? All the solutions I could think about look quite ugly
to me. And it seems that this is a general problem that someone cleverer
than me had solved before ;-)
Thanks,
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
MovingObject):
def move(self):
print "Dog is moving"
class Car(MovingObject):
def move(self):
print "Car is moving"
(Disclaimer: I learned OOP with Java)
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
future__ import division
try:
from itertools import izip as zip
except ImportError:
pass
Which might even become longer if I find other bugs ;-)
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
On 06/12/2015 05:26 PM, Ian Kelly wrote:
for stuff, branch in zip(stuffs, branches):
> # compute flux
> ...
> # add to the downstream branch
> id_branch = branches.index(branch.flows_to)
> branches[id_branch].property.append(stuff_i_computed)
Er, I don't s
On 06/12/2015 05:00 PM, Fabien wrote:
I've found the izip() function which should do what I want
I've just come accross a stackoverflow post where they recommend:
from future_builtins import zip
which is OK since I don't want to support versions <= 2.6
--
https://mail.
erous code but I can't find a more
elegant solution.
Thanks!
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
place. Numpy uses views,
not copies. There is however a .copy() method on numpy arrays
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
http://dir.gmane.org/gmane.comp.python.pystatsmodels
Cheers,
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
be a substantial piece of
work, and I don't know if it's something that anybody has looked into.
Isn't Numpy doing this (not sure, not a python nor a numpy expert):
>>> import numpy as np
>>> a = np.array([1,2,3,4])
>>> b = a[1:]
>>> b
On 14.04.2015 06:05, Chris Angelico wrote:
Not sure what you mean, here. Any given file will be written by
exactly one process? No possible problem. Multiprocessing within one
application doesn't change that.
yes that's what I meant. Thanks!
--
https://mail.python.org/mailman/listinfo/python-li
takes good care of
this stuff but I'm not an expert.
Tahnks,
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
On 13.04.2015 17:45, Devin Jeanpierre wrote:
On Mon, Apr 13, 2015 at 10:58 AM, Fabien wrote:
>Now, to my questions:
>1. Does that seem reasonable?
A big issue is the use of pickle, which is:
* Often suboptimal performance wise (e.g. you can't load only subsets
of the data)
* Mak
On 13.04.2015 18:25, Dave Angel wrote:
On 04/13/2015 10:58 AM, Fabien wrote:
Folks,
A comment. Pickle is a method of creating persistent data, most
commonly used to preserve data between runs. A database is another
method. Although either one can also be used with multiprocessing, you
a out of it and
writes it in Watershed object. Is it a bad idea to multiprocess this? (I
guess it is, since the file might be read twice at the same time)
4. Other comments you might have?
Sorry for the lengthy mail but thanks for any tip.
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
es. Then I would try something and if it doesn't
work and I really don't understand why I would ask for help in the
python GIS community: http://blog.gmane.org/gmane.comp.python.gis By
doing so I would try to be as precise as possible in formulating my
question.
All the best
On 02.03.2015 15:26, Mark Lawrence wrote:
Have you tried Pandas? http://pandas.pydata.org/
If your csv file has no other problems, the following should do the
trick:
import pandas as pd
df = pd.read_csv('file.csv', index_col=0, parse_dates= {"time" : [0]})
Cheers,
Fab
Have you tried Pandas? http://pandas.pydata.org/
If your csv file has no other problems, the following should do the trick:
import pandas as pd
df = pd.read_csv('file.csv', index_col=0, parse_dates= {"time" : [0]})
Cheers,
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
tions I got from this
discussion group. I find it neat to use a module for sharing config
states, but I always wondered: does this pattern fall into the "globals
are devil" category?
Cheers,
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
On 01.03.2015 19:24, Mark Lawrence wrote:
This seemed to be a low key affair, at least from my perspective
True, no messages yet on the scientific python mailing lists either. I
am wondering if avoiding a massive switch to a *.0 release was the
reason for this (relative) silence.
Fabien
om this normally very helpful group.
I'd guess that's because nobody here uses sklearn. Where did you get
sklearn? Is it possible that there's an sklearn forum somewhere?
http://blog.gmane.org/gmane.comp.python.scikit-learn
Cheers,
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
separated. It's also
the recommendation of the recommendation of the "Python Packaging
Authority":
https://packaging.python.org/en/latest/current.html#installation-tool-recommendations
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
On 21.02.2015 14:39, alb wrote:
Do you know of anyway to install wheezy packages on squeeze?
No need for a new distro. Use virtualenv, this is simple and great:
http://simononsoftware.com/virtualenv-tutorial-part-2/
Cheers,
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
On 12.02.2015 12:25, Marko Rauhamaa wrote:
Fabien:
>... what a coincidence then that a huge majority of scientists
>(including me) dont care AT ALL about unicode.
You shouldn't, any more than you care about ASCII or 2's-complement
encoding. Things should just work.
And they
. It's a pitty, given how easy it is to write py2/py3 compatible
scientific tools.
Thanks for the link to the article steven!
Fabien
(sorry for the OT & sorry for feeding the t)
--
https://mail.python.org/mailman/listinfo/python-list
are rather prone to confusion because the
order with wich you run the cells is important, so total beginners are
really confused about variables overwritting etc.
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
On 11.02.2015 14:11, Rustom Mody wrote:
Context:
I am using idle for taking python classes.
I know this is not your question, but: have you considered using iPython
notebooks for teaching? They save automatically, look nice, and can be
sent as code, html, rst, ...
Fabien
--
https
estpy3/lib/python3.3/site-packages/pip/_vendor/cachecontrol/serialize.py",
line 129, in prepare_response
body = io.BytesIO(cached["response"].pop("body"))
TypeError: 'str' does not support the buffer interface
I'm quite sure this problem appeared recently, I did not make any change
to my system recently...
Thanks,
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
On 12.01.2015 23:46, Chris Angelico wrote:
On Tue, Jan 13, 2015 at 9:35 AM, Fabien wrote:
>BUT I'm still asking myself: what does "pip install"*concretely* do on my
>virtual environment?
As far as I know, it's equivalent to three steps:
1) Download the appropriate
seem to provide an answer to
this question.
Or did I simply miss it?
Thanks!
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
but on linux it works like a charm
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
On 12.08.2014 09:59, David Palao wrote:
Also Gentoo uses Python3 by default for some months now. The positive
side effect for me has been that I started seriously to switch to
python3.
it's a matter of months for debian/ubuntu to rely only on python3 code
too, while still respecting PEP 394:
On 10.08.2014 00:30, Terry Reedy wrote:
The advantage of TDD is that it forces one to make code testable as you do.
Thanks a lot, Terry, for your comprehensive example!
--
https://mail.python.org/mailman/listinfo/python-list
On 09.08.2014 19:29, Terry Reedy wrote:
If possible, functions should *return* their results, or yield their
results in chunks (as generators). Let the driver function decide where
to put results. Aside from separating concerns, this makes testing much
easier.
I see. But then this is also true
this will avoid the useless superobject and allow to have to configfile
available to anyone.
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
Hi Ben,
On 09.08.2014 14:17, Ben Finney wrote:
Have one module of your application be responsible for the configuration
of the application::
# app/config.py
import configparser
parser = configparser.ConfigParser()
parser.read("app.conf")
Thanks for the suggestion. This w
le and if yes, how is it done "properly"?
I hope at least someone will understand what I mean ;-)
Cheers and thanks,
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
On 17.07.2014 06:47, Rick Johnson wrote:> Even though i will freely
admit that Python is the easiest
> language to learn (IMHO)
For non-informatic students (i.e the vast majority of
science/engineering students) I don't think that's true. Less general
languages like Matlab appear much easier t
My two cents as a new pythonista and a scientist: isn't python2 killing
python? This old stuff is everywhere in the tutorials, docs, etc. and
this is quite annoying. When I download a python notebook, the first
thing I have to do is to translate it to py3. Which is not an easy task,
given the f
On 24.06.2014 16:35, Chris Angelico wrote:
Would be nice if there could be some clear indication that this is the
official and current repo.
indeed. Also, the install procedure is a bit dangerous for new python
users like me. NetCDF4 is out since 2008, it would be great if SciPy
could support
Hi Chris,
On 24.06.2014 16:04, Chris Angelico wrote:
Here's what I'd try:
>>>import sys
>>>sys.modules[d1.__class__.__module__].__file__
>>>sys.modules[d2.__class__.__module__].__file__
that was it!
netCDF4 has two repositories online, one on google code and one on
github. I mistakenly ins
4 15:47, Chris Angelico wrote:
On Tue, Jun 24, 2014 at 11:28 PM, Fabien wrote:
So they are two instances of the same object but something in pyDev doesn't
want to compare them. Any Hint?
Are they really instances of the same class? One of them comes from
/usr/local/lib/python3.3/dist-pack
d2
TypeError: unorderable types: datetime() < datetime.datetime()
So they are two instances of the same object but something in pyDev
doesn't want to compare them. Any Hint?
Thanks!
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
quot;being able to find the right tool for me in less than three days"
surely is important too. The paradox of choice ;-)
Fabien
--
https://mail.python.org/mailman/listinfo/python-list
Ok guys, thanks for the lesson! I'm probably not going to try to
implement this solution. However, I've learned a lot!
--
http://mail.python.org/mailman/listinfo/python-list
SOAP standard doesn't provide any callback, and it looks like SOAPpy
doesn't too.
I remember using callbacks with Javascript and SOAP in Web pages. I was
just wondering if there could be the same with Python.
Thanks for your answer.
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I'm trying to find how to use a callback in a SOAP client using SOAPpy.
Does SOAPpy have to manage it, or does Python include some API to do
it?
Thanks a lot.
Fabien
--
http://mail.python.org/mailman/listinfo/python-list
> Python is not about certificates or diplomas, so do not spend any
> money on it (the other guy was only joking).
Even if Python is not about certificates, I think it's not the case for
some company. And when you say to a company that you know how to dev. in
Python, they don't know anything about
> Is it possible to open a mail and download its files attached in a
> hard-disk using a python script?
Use the poplib to do that. The documentation for this module can be
found at http://docs.python.org/lib/module-poplib.html.
--
Fabien
--
http://mail.python.org/mailman/listinfo/python-list
John Ridley wrote:
> fabien wrote on Sun, 01 May 2005 05:40:05 -0700:
>
Hello John,
>
>>Hi,
>
>
> Hello Fabien
>
>
>>I am writing a POV-RAY editor with Python using
>>either QT or GTK as GUI 'wrapper'. ( I am still trying both )
>>
Neil Hodgson wrote:
> Fabien:
>
>
>>There is a lexPOV.cxx file in the package, but I can not find any POV
>>keywords in any file ( there are about 150 POV keywords). Did i miss it,
>>and if not, how do I create one and include it for the library building ?
>
Hi,
I am writing a POV-RAY editor with Python using either QT or GTK as GUI
'wrapper'. ( I am still trying both )
* * * * PYGTK * * * *
I have downloaded PygtkScintilla-1.99.5.
There is a lexPOV.cxx file in the package, but I can not find any POV
keywords in any file ( there are about 150 POV ke
83 matches
Mail list logo