Re: Removing items from a list

2012-02-11 Thread Vincent Vande Vyvre
x [1, 3, 5, 7, 9, 0, 0, 0, 0, 0] Not a good example, with reversed(), you're not iterating on the list x but on an another list. More precisely a 'listreverseiterator object. -- Vincent V.V. Oqapy . Qarte+7 . PaQage

Re: dpkg status

2012-03-18 Thread Vincent Vande Vyvre
x27;" to find a package. -- Vincent V.V. Oqapy . Qarte+7 . PaQager -- http://mail.python.org/mailman/listinfo/python-list

Re: dpkg status

2012-03-18 Thread Vincent Vande Vyvre
Le 18/03/12 15:54, admin lewis a écrit : 2012/3/18 Vincent Vande Vyvre : Le 18/03/12 13:03, admin lewis a écrit : Hi, What url ?, Sources, maintainer? No, I need of to open /var/lib/dpkg/status and extract the packages and its url to

Re: PrintPreviewDialog problem

2012-04-17 Thread Vincent Vande Vyvre
ython.6.n6.nabble.com/PrintPreviewDialog-problem-tp4889139p4889139.html > Sent from the Python - python-list mailing list archive at Nabble.com. Works fine for me. Python 2.6.5 on Linux Qt 4.6.2 PyQt 4.7.2 Please, paste the exact error. -- Vincent V.V. Oqapy <https://launchpad.net/oqap

Re: how python dir works

2012-04-18 Thread Vincent Vande Vyvre
the file? Then you should probably forget > about dir() and use the ast module for parsing. > > Cheers, > Ian Eventually the module pyclbr http://docs.python.org/library/pyclbr.html?highlight=module#pyclbr.Class.module Cheers -- Vincent V.V. Oqapy <https://launchpad.net/oqapy

Re: Getting started with PyGTK [Receiving Error]

2012-04-28 Thread Vincent Vande Vyvre
any error). What might be error? It's a behaviour of GTK, not an error in your code. I use PyQt and I've always theses warnings under KDE and Unity, never under Gnome. I thing you can ignore it. -- Vincent V.V. Oqapy <https://launchpad.net/oqapy> . Qarte+7 <https://launchpad.net/qarte+7> . PaQager <https://launchpad.net/paqager> -- http://mail.python.org/mailman/listinfo/python-list

2to3 change direct import to relative import

2012-05-10 Thread Vincent Vande Vyvre
StatusBar +from .trailer import Trailer ... Of course the application don't run: from .ui_toolBar import ToolBar ValueError: Attempted relative import in non-package 2to3 help don't help me about that. Thank's for any advice.

Re: GUI toolkits and dynamic table browser widget

2012-05-17 Thread Vincent Vande Vyvre
ook at PyQt [1], specially QTableView [2] and QtSql [3] [1] http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/index.html [2] http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qtableview.html [3] http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qsql.html -- Vincen

Re: Doctest documentation?

2012-05-20 Thread Vincent Vande Vyvre
le's doctest directives modify doctest's behavior for that single example. Use ``+`` to enable the named behavior, or ``-`` to disable it. For example, this test passes:: >>> print(list(range(20))) #doctest: +NORMALIZE_WHITESPACE [0, 1, 2, 3, 4, 5, 6, 7, 8, 9,

Re: what gui designer is everyone using

2012-06-05 Thread Vincent Vande Vyvre
dates in over six years. Try Qt http://qt-project.org/doc/qt-4.8/designer-manual.html -- Vincent V.V. Oqapy <https://launchpad.net/oqapy> . Qarte+7 <https://launchpad.net/qarte+7> . PaQager <https://launchpad.net/paqager> -- http://mail.python.org/mailman/listinfo/python-list

Re: The Incredible Growth of Python (stackoverflow.blog)(kdnuggets)

2017-09-15 Thread Vincent Vande Vyvre
Again an other review: http://www.kdnuggets.com/2017/08/python-overtakes-r-leader-analytics-data-science.html Vincent -- https://mail.python.org/mailman/listinfo/python-list

Re: Textwrap doesn't honour NO-BREAK SPACE

2017-09-29 Thread Vincent Vande Vyvre
gt; text = ('Lorum ipsum dolor sit amet, consectetur adipiscing' ... ' elit ZZZ\xa0ZZZ sed do euismod tempor incididunt' ... ' ut labore et dolore magna aliqua.') >>> print(textwrap.fill(text, 59)) Lorum ipsum dolor sit amet, consectetur adipiscing elit ZZZ ZZZ sed do euismod tempor incididunt ut labore et dolore magna aliqua. Vincent -- https://mail.python.org/mailman/listinfo/python-list

The mysterious ways of Python mailing list

2017-09-29 Thread Vincent Vande Vyvre
Is it a reason why my messages appears always a long time (today 9 hours) on the list after I send it ? Send at 19:14 UTC+2 Vincent -- https://mail.python.org/mailman/listinfo/python-list

Return str to a callback raise a segfault if used in string formating

2017-10-13 Thread Vincent Vande Vyvre
allback() at the end of the func process that doesn't change anything. Regards, Vincent. -- https://mail.python.org/mailman/listinfo/python-list

Re: Return str to a callback raise a segfault if used in string formating

2017-10-13 Thread Vincent Vande Vyvre
Le 13/10/17 à 09:23, Chris Angelico a écrit : On Fri, Oct 13, 2017 at 4:46 PM, Vincent Vande Vyvre wrote: Simplified code: ---%<-- ... ---%<-- If I place self.callback() at the end of the func proces

Re: Return str to a callback raise a segfault if used in string formating

2017-10-13 Thread Vincent Vande Vyvre
ython with: static PyMemberDef PyUnraw_members[] = {     {"out_file", T_OBJECT_EX, offsetof(PyUnraw, outfname), 0, "Path of the decoded file"},     ... Vincent -- https://mail.python.org/mailman/listinfo/python-list

Re: Return str to a callback raise a segfault if used in string formating

2017-10-14 Thread Vincent Vande Vyvre
Le 14/10/17 à 15:59, Stefan Behnel a écrit : Vincent Vande Vyvre schrieb am 13.10.2017 um 13:18: Le 13/10/17 à 12:39, Paul Moore a écrit : As a specific suggestion, I assume the name of the created file is a string object constructed in the C extension code, somehow. The fact that you&#x

Re: for/ if against dict - one liner

2017-11-14 Thread Vincent Vande Vyvre
k >= 2: # do magnificent things Thank you AZ Maybe something like that: lst = [do_magnificent_thing(dct[k]) for k in dct if k >= 2] lst contains the returns of do_magnificent_thing(k) in unpredictable order. Vincent -- https://mail.python.org/mailman/listinfo/python-list

Re: Argh!! Can't wrap my head around this Python stuff!

2017-11-26 Thread Vincent Vande Vyvre
ing?? Thanks! -Stumpy (aka Greg) Hi, It's not defined in Python module but in Pillow-3.5/Pillow-master/libImaging/Draw.c ... line 748 Vincent -- https://mail.python.org/mailman/listinfo/python-list

Re: Package containing C sources (Posting On Python-List Prohibited)

2018-01-31 Thread Vincent Vande Vyvre
nd the Python code. Can this be done with just two packages: the C library and C wrapper and Python in one package? Hi, You can made an all-in-one package without problems. Vincent -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there are good DRY fix for this painful design pattern?

2018-02-26 Thread Vincent Vande Vyvre
s not None:     setattr(self, key, value)     def spam(self, **kwargs):     self.config(kwargs) Vincent -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP suggestion: Uniform way to indicate Python language version

2016-08-21 Thread Vincent Vande Vyvre
ot;help", "copyright", "credits" or "license" for more information. >>> import sys >>> assert sys.version >= (sys.version_info >= (3, 0)) Traceback (most recent call last): File "", line 1, in TypeError: unorderable types: str()

Re: Python GUI application embedding a web browser - Options?

2016-10-19 Thread Vincent Vande Vyvre
rtable coding in Python. Thanks, Paul Hi, PyQt is a good choice to embed a web viewer in a GUI application. There's no great differences between Qt4 and Qt5. An example with PyQt4: http://bazaar.launchpad.net/~vincent-vandevyvre/oqapy/2.0/files/head:/oqapy-2.0/g9n/ The same with PyQt5

Re: TemplateError

2016-11-20 Thread Vincent Vande Vyvre
ath.dirname(os.path.abspath('__files__')) PAGESDIR = os.path.join(os.path.dirname(WEBDIR), 'somewhere/templates') STATICDIR = os.path.join(os.path.dirname(WEBDIR), 'somewhere/static') ... app = Flask(__name__, template_folder=PAGESDIR, static_folder=STATICDIR) ... -- Vincent V.V. Oqapy <http://www.oqapy.eu> . python3-exiv2 <http://www.py3exiv2.tuxfamily.org/> . Qarte <https://launchpad.net/qarte> . PaQager <https://launchpad.net/paqager> -- https://mail.python.org/mailman/listinfo/python-list

Re: Can't see numpy etc after upgrading Python on Ubuntu

2016-12-20 Thread Vincent Vande Vyvre
Le 20/12/16 à 08:45, Chris Angelico a écrit : On Tue, Dec 20, 2016 at 5:19 PM, wrote: Thanks Chris for replying, but it didn't work. The upgrade happened, but still python can't see numpy! So it seems to be a path problem. The numpy (and scipy and matplotlib) files are there, so surely in pr

Re: Can't see numpy etc after upgrading Python on Ubuntu

2016-12-20 Thread Vincent Vande Vyvre
Le 20/12/16 à 10:13, Chris Angelico a écrit : On Tue, Dec 20, 2016 at 7:36 PM, Vincent Vande Vyvre wrote: It seems you have shadowed your default python2 with the new one. A very bad idea. Only because /usr/local/bin is ahead of /usr/bin in PATH. That's the problem. The link /us

Re: Unable to Debug

2017-01-02 Thread Vincent Vande Vyvre
ror that I could not understand why...Thanks in Advance Try with: for i in product_name: print(i) Vincent -- https://mail.python.org/mailman/listinfo/python-list

Re: lire du son en format natif avec python

2018-03-21 Thread Vincent Vande Vyvre
à l'installer depuis pyzo. Si quelqu'un peut m'aider, merci à lui d'avance. Hi, This is an English mailing list. If you prefer talk in French, I recommend you this forum: https://www.developpez.net/forums/f96/autres-langages/python-zope/ Best Vincent -- https://mail.python.org/mailman/listinfo/python-list

Uploading on PyPI fail

2018-05-15 Thread Vincent Vande Vyvre
/ username = VinsS password = ** - Note: I've tested on test.pypi.org without problems. Thanks for all advices, Vincent (send at Tue, 15 May 2018 12:04:10 +0200) -- https://mail.python.org/mailman/listinfo/python-list

Re: Uploading on PyPI fail (solved)

2018-05-15 Thread Vincent Vande Vyvre
Le 15/05/18 à 12:05, Vincent Vande Vyvre a écrit : Hi, Trying to upgrade a package on PyPI, I get this error: $ python3 setup.py register sdist upload ... Submitting dist/py3exiv2-0.3.0.tar.gz to https://pypi.python.org/pypi Upload failed (308): Redirect to Primary Domain error: Upload failed

Obsolete method in the html module

2018-06-09 Thread Vincent Vande Vyvre
scape() instead.',   DeprecationWarning, stacklevel=2)     return unescape(s) Vincent (send at 08:07 GMT) -- https://mail.python.org/mailman/listinfo/python-list

Re: Is it possible to call a class but without a new instance created?

2018-06-18 Thread Vincent Vande Vyvre
classic example : class Foo:     _instance = None     def __new__(cls, *args, **kwargs):     if cls._instance is None:     cls._instance = super(Foo, cls).__new__(cls, *args, **kwargs)     return cls._instance     def __init__(self, ...):         ... Vincent Send at Mon, 18 Jun 2018 09:17:21 +0200 -- https://mail.python.org/mailman/listinfo/python-list

Re: I'm getting a spamassassin party here

2018-06-26 Thread Vincent Vande Vyvre
ng the message ] Same day, same hour but arrived today From: "Steven D'Aprano" From: Steven D'Aprano On Sat, 23 Jun 2018 06:26:22 -0400, Richard Damon wrote: [ following the same message ] -------

Fishing from PyPI ?

2018-08-06 Thread Vincent Vande Vyvre
The Account Settings <https://pypi.us18.list-manage.com/track/click?u=b96f861be540deb98fd700265&id=1763135c31&e=8824682d0f> is : https://pypi.us18.list-manage.com/track/click?u=b96f861be540deb98fd700265&id=1763135c31&e=8824682d0f Phishing ? yes, no ?

Re: Grab metadata from images and save to file, batch mode

2016-04-02 Thread Vincent Vande Vyvre
(I want it to be python as that is what I am trying to learn) Can you give me some coding suggestions to get me goings? I haven't found any substantive scripts to use as guides. Many thanks in advance Have a look at py3exiv2: http://python3-exiv2.readthedocs.org/en/latest/ Vincent --

Re: PyQt4

2016-04-03 Thread Vincent Vande Vyvre
using matplotlib and PyQt4 at supercomputer. Any other suggestion??? There's no IndentationError in the exemple provided by Michael. Copy the code AS IT in a file and retry. Vincent -- https://mail.python.org/mailman/listinfo/python-list

Re: How to get a directory list sorted by date?

2016-05-15 Thread Vincent Vande Vyvre
nderstood here. The date used to sort the picture is not the file date provided by os.stat but the shooting date written into the metadata of each picture. Can the OP confirm that ? So, if the name of the picture are unchanged why not just compare the file name ? Vincent -- https://mail.py

Re: Developers using Python QT framework ??

2016-05-15 Thread Vincent Vande Vyvre
also a mailing list PyQt: https://www.riverbankcomputing.com/mailman/listinfo/pyqt Vincent -- https://mail.python.org/mailman/listinfo/python-list

Re: Setting Return-Path in email

2016-05-23 Thread Vincent Vande Vyvre
msg.attach(part) s = smtplib.SMTP('localhost') s.sendmail(fromid,toaddress, msg.as_string()) s.quit() Try with msg['Reply-To'] = the adress Vincent -- https://mail.python.org/mailman/listinfo/python-list

AttributeError into a bloc try-except AttributeError

2016-06-12 Thread Vincent Vande Vyvre
except AttributeError: self.core.artetv.configure_downloading(self.video) and ... Traceback (most recent call last): File "/home/vincent/qarte-3/trunk/loadingscheduler.py", line 240, in call_settings_dialog _ = self.video.category AttributeError: 'TVItem&#x

Re: AttributeError into a bloc try-except AttributeError

2016-06-12 Thread Vincent Vande Vyvre
Le 12/06/16 09:20, Vincent Vande Vyvre a écrit : Hi, I have a strange behaviour in my code. In an interactive session, the result is as expected: Python 3.4.3 (default, Oct 14 2015, 20:28:29) [GCC 4.8.4] on linux Type "help", "copyright", "credits" or "l

Re: PyQt5: is the wrapper incomplete?

2016-06-16 Thread Vincent Vande Vyvre
ce is appreciated, thanks! On Debian, this is a separate package python3-pyqt5.qtserialport, I don't know for other Linux After install you can use: from PyQt5.QtSeriaPort import QSerialPort Vincent -- https://mail.python.org/mailman/listinfo/python-list

Re: How to display video files (mkv, wav, mp4 etc) within a TKinter widget?

2019-01-02 Thread Vincent Vande Vyvre
this? TIA With Qt it's very easy to implement a video player. See this example: https://bazaar.launchpad.net/~vincent-vandevyvre/qarte/qarte-4/view/head:/gui/videoplayer.py It is implemented into this window: https://bazaar.launchpad.net/~vincent-vandevyvre/qarte/qarte-4/view/head

How to force the path of a lib ?

2019-01-22 Thread Vincent Vande Vyvre
/pyexiv2/libexiv2python.cpython-37m-x86_64-linux-gnu.so # and the latest version of libexiv2 ~/CPython/py370_venv/lib/libexiv2.so.0.27.0 All theses path are in the sys.path Now I test my binding: >>> import pyexiv2 Traceback (most recent call last):   File "", line 1, in   File "/hom

How to force the path of a lib ?

2019-01-22 Thread Vincent Vande Vyvre
;", line 1, in   File "/home/vincent/CPython/py370_venv/lib/python3.7/site-packages/py3exiv2-0.1.0-py3.7-linux-x86_64.egg/pyexiv2/__init__.py", line 60, in     import libexiv2python ImportError: /home/vincent/CPython/py370_venv/lib/python3.7/site-packages/py3exiv2-0.1.0-py3.7-linux-

Re: How to force the path of a lib ?

2019-01-24 Thread Vincent Vande Vyvre
Le 23/01/19 à 13:11, Neal Becker a écrit : dieter wrote: Vincent Vande Vyvre writes: . To load external C/C++ shared objects, the dynamic lickage loader (ldd) is used. "ldd" does not look at Pthon's "sys.path". Unless configured differently, it looks at stand

pip unable to find an extension of a lib.

2019-04-11 Thread Vincent Vande Vyvre
th this problem. Thanks for all advices Vincent. -- https://mail.python.org/mailman/listinfo/python-list

Re: pip unable to find an extension of a lib.

2019-04-12 Thread Vincent Vande Vyvre
ered as suitable, but I think the above is likely. Paul Exact, in mode verbose it enumerate all versions of pyqt-sip and all are declared "not compatible with this Python" So I'll create a 3.7.3 venv without the "--with-pydebug" Thanks, Vincent. -- https://mail.python.org/mailman/listinfo/python-list

Re: pip unable to find an extension of a lib.

2019-04-12 Thread Vincent Vande Vyvre
Le 12/04/19 à 07:40, dieter a écrit : Vincent Vande Vyvre writes: ... Using Python-3.7.2 (compiled with --with-pydebug) in a venv, I've encountered this problem: $ pip install --upgrade pip setuptools wheel Successfully installed setuptools-41.0.0 wheel-0

How to catch a usefull error message ?

2019-04-23 Thread Vincent Vande Vyvre
nstanciation of this object into a try-except bloc but how to read the error message ? Vincent -- https://mail.python.org/mailman/listinfo/python-list

Re: How to catch a usefull error message ?

2019-04-23 Thread Vincent Vande Vyvre
Le 23/04/19 à 19:23, Chris Angelico a écrit : On Wed, Apr 24, 2019 at 3:18 AM Vincent Vande Vyvre wrote: Hi, In a CPython lib I have an _init() method wich take one argument, a file name. char *fname; if (!PyArg_ParseTuple(args, "s", &fname)) return N

Re: How to catch a usefull error message ?

2019-04-23 Thread Vincent Vande Vyvre
Le 23/04/19 à 19:27, MRAB a écrit : On 2019-04-23 10:56, Vincent Vande Vyvre wrote: Hi, In a CPython lib I have an _init() method wich take one argument, a file name.       char *fname;       if (!PyArg_ParseTuple(args, "s", &fname))       return NULL; So, if I instanc

Re: How to catch a usefull error message ?

2019-04-24 Thread Vincent Vande Vyvre
Le 23/04/19 à 20:54, Chris Angelico a écrit : On Wed, Apr 24, 2019 at 4:47 AM Vincent Vande Vyvre wrote: Into the lib: static int ImgProc_init(ImgProc *self, PyObject *args, PyObject *kwds) { PyObject *tmp; char *fname; if (!PyArg_ParseTuple(args, "s&quo

Re: How to catch a usefull error message ?

2019-04-24 Thread Vincent Vande Vyvre
Le 23/04/19 à 21:48, MRAB a écrit : On 2019-04-23 19:21, Vincent Vande Vyvre wrote: Le 23/04/19 à 19:23, Chris Angelico a écrit : On Wed, Apr 24, 2019 at 3:18 AM Vincent Vande Vyvre wrote: Hi, In a CPython lib I have an _init() method wich take one argument, a file name.   char

Re: How to catch a usefull error message ?

2019-04-24 Thread Vincent Vande Vyvre
Le 24/04/19 à 19:57, MRAB a écrit : On 2019-04-23 20:21, Vincent Vande Vyvre wrote: Le 23/04/19 à 20:54, Chris Angelico a écrit : On Wed, Apr 24, 2019 at 4:47 AM Vincent Vande Vyvre wrote: Into the lib: static int ImgProc_init(ImgProc *self, PyObject *args, PyObject *kwds) {   PyObject

Re: How to catch a usefull error message ?

2019-04-25 Thread Vincent Vande Vyvre
Le 25/04/19 à 08:25, Chris Angelico a écrit : On Thu, Apr 25, 2019 at 2:32 PM Vincent Vande Vyvre wrote: Le 24/04/19 à 19:57, MRAB a écrit : On 2019-04-23 20:21, Vincent Vande Vyvre wrote: Le 23/04/19 à 20:54, Chris Angelico a écrit : Why a SystemError ? The SystemError means that you&#x

Re: Python 3.73 cannot install py3exiv2

2019-05-02 Thread Vincent Vande Vyvre
xecutable for Windows. But, recently an user send me how it has successfully compiled py3exiv2 for Windows. Hello Vincent,  I’ve run through the trouble of building py3exiv2 on Windows and was successful in doing so, therefore I’d like to present you the steps I’ve taken to get there, so that

Re: RFC: For Loop Invariants

2020-04-20 Thread Vincent Vande Vyvre
ot; > seek = {'a','b','c'} > count = sum(1 for a in chars if a in seek) > > So you haven't really changed any semantics - and it seems that this > is far better than fiddling with the for loop syntax. You can use boolean as integer. >>> ch

Re: Finding it very difficult to move pyexiv2 code from Python 2 to Python 3

2020-08-18 Thread Vincent Vande Vyvre
incent-vandevyvre/vvv     $ sudo apt-get update     $ sudo apt-get install python3-exiv2 Don't change your old code for pyexiv2, the names of the modules are unchanged, your old code should work as it. Off course old strings are now unicode. Vincent (AKA VinsS) -- https://mail.python.org/mailman/listinfo/python-list

Re: Finding it very difficult to move pyexiv2 code from Python 2 to Python 3

2020-08-19 Thread Vincent Vande Vyvre
Le 19/08/20 à 10:15, Robin Becker a écrit : > On 18/08/2020 20:05, Vincent Vande Vyvre wrote: > . >>> >> Hi, >> >> Two solutions: >> 1. Install exiv2-dev and py3exiv2 with pip >> $ sudo apt-get install libexiv2-dev >> $

Re: Finding it very difficult to move pyexiv2 code from Python 2 to Python 3

2020-08-20 Thread Vincent Vande Vyvre
Le 20/08/20 à 09:07, Robin Becker a écrit : > . >>> so obviously I need to install some version of boost libs or >>> Boost.Python etc etc. Gave up :( >>> -luddite-ly yrs- >>> Robin Becker >>> >> The aur repository, no ? >> >&

Pickling issue.

2020-12-21 Thread Vincent Vande Vyvre
Hi, I've an object that I want to serialise with pickle. When I reload the object the attributes of this object are correctly fixed except one of these. This attribute (value) define a simple string. Example: - tag =  XmpTag('Xmp.dc.format', 'image/

Re: Python for Myo Control Armband

2014-02-03 Thread Vincent Vande Vyvre
/ Maybe with PyQt, see: http://www.trinitydesktop.org/docs/qt4/gestures-overview.html and the bluetooth: http://qt-project.org/doc/qt-5/qtbluetooth-index.html -- Vincent V.V. Oqapy . Qarte . PaQager -- https://mail.python.org/mailman/listinfo/python-list

Re: Accessing container's methods

2015-12-08 Thread Vincent Vande Vyvre
Le 08/12/2015 20:02, Thomas 'PointedEars' Lahn a écrit : Erik wrote: Please fix, Erik #75656. On 07/12/15 18:10, Tony van der Hoff wrote: A highly contrived example, where I'm setting up an outer class in a Has-a relationship, containing a number of Actors. The inner class needs to access

Re: ouvrir python

2016-01-06 Thread Vincent Vande Vyvre
://www.developpez.net/forums/f96/autres-langages/python-zope/ Vincent -- https://mail.python.org/mailman/listinfo/python-list

Attribute path not in PurePosixPath ?

2016-01-24 Thread Vincent Vande Vyvre
", "credits" or "license" for more information. >>> from pathlib import PurePath >>> p = PurePath('/home/vincent/Images') >>> p.name 'Images' >>> p.suffix '' >>> p.parent PurePosixPath('/ho

Re: Attribute path not in PurePosixPath ?

2016-01-24 Thread Vincent Vande Vyvre
Le 24/01/2016 08:58, Vincent Vande Vyvre a écrit : Hi, Refering to the doc https://docs.python.org/3/library/pathlib.html?highlight=pathlib#pathlib.PurePath.path Python 3.4.3 (default, Oct 14 2015, 20:28:29) [GCC

Re: Struggeling with collections

2016-03-07 Thread Vincent Vande Vyvre
Le 07/03/2016 09:24, Faling Dutchman a écrit : Hey folks, I am just starting off in python, but have good knowledge of both Java and C#. Now is the problem that I need to have multiple instances of one dictionary, that is not a problem if you know how many, but now, it is an unknown amount. S

Re: Experimenting with PyPyJS

2016-03-19 Thread Vincent Vande Vyvre
t and tell your feeling Regards http://salvatore.diodev.fr/pypybox/ Use Firefox... That's look fine but: PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 4917 vincent 20 0 1081m 305m 52m R *50.3* 15.4 5:23.75 firefox 1094 root 20 0 48152 15m 7180 S *

Re: Exclude every nth element from list?

2016-03-26 Thread Vincent Vande Vyvre
'k', 'o', 'd', 'j', 'u', 'y', 'h', 'r', 't', 'g', 'f', 'e', 'd', 'c', 'v', 'f', 'g'] >>> ll = [c for i, c in enumerate(l) if i % 3] >>> ll.insert(0, l[0]) >>> ll ['l', 'k', 'o', 'j', 'u', 'h', 'r', 'g', 'f', 'd', 'c', 'f', 'g'] Vincent -- https://mail.python.org/mailman/listinfo/python-list

Re: Exclude every nth element from list?

2016-03-26 Thread Vincent Vande Vyvre
Le 26/03/2016 18:06, Vincent Vande Vyvre a écrit : Le 26/03/2016 17:49, beliavsky--- via Python-list a écrit : I can use x[::n] to select every nth element of a list. Is there a one-liner to get a list that excludes every nth element? Something like that: >>> l = list("lkod

Re: PySide 1.2.2 setMaxWidth and AeroSnap

2014-11-16 Thread Vincent Vande Vyvre
ur widget is a QMainWindow or a QDialog add a size grip: self.setSizeGripEnabled(True) The QWidget don't have this method, so, in this case, you must reimplement his resizeEvent() Vincent -- https://mail.python.org/mailman/listinfo/python-list

Re: PySide 1.2.2 setMaxWidth and AeroSnap

2014-11-16 Thread Vincent Vande Vyvre
Le 16/11/2014 19:09, Juan Christian a écrit : On Sun Nov 16 2014 at 3:46:40 PM Vincent Vande Vyvre <mailto:vincent.vande.vy...@telenet.be>> wrote: No probleme with PyQt but I think this is a window manager question. Window, gnome, KDE, Mate, ... If your widget is a QMain

Re: How to access Qt components loaded from file?

2014-11-18 Thread Vincent Vande Vyvre
Le 18/11/2014 13:18, Juan Christian a écrit : I have this simple code that load any Qt Designer .UI file: from PySide.QtCore import QFile from PySide.QtGui import QApplication from PySide.QtUiTools import QUiLoader def loadui(file_name): loader = QUiLoader() uifile = QFile(file_name) uifile.op

Re: How to access Qt components loaded from file?

2014-11-18 Thread Vincent Vande Vyvre
Le 18/11/2014 15:49, Juan Christian a écrit : I was doing some tests, then I tried this: app = QApplication(sys.argv) MainWindow = loadui("main.ui") MainWindow.btn.clicked.connect(MainWindow.txtbox.setText(test())) MainWindow.show() app.exec_() But I get "RuntimeError: Failed to connect signal

Re: smtplib not working as expected

2014-12-26 Thread Vincent Vande Vyvre
Le 27/12/2014 03:52, Juan Christian a écrit : On Fri Dec 26 2014 at 11:07:30 PM MRAB > wrote: According to the docs, if you let the port parameter default to 0, it'll use port 465. I tested with my ISP. Using port 465, it failed. Using the default, it succeed

Re: tabs and the Python3 console

2015-02-10 Thread Vincent Vande Vyvre
ile( BlockingIOError(complex( BrokenPipeError(continue ... Do I need a python3 enabled with readline support, or something? Thanks very much, Laura Creighton It's a recent change (3.4), use the argument -S if you want the old behaviour https://docs.python.org/3/library/s

Re: Cannot figure out line of code, also not understanding error

2014-02-20 Thread Vincent Vande Vyvre
.py", line 34 except IOError: ^ SyntaxError: invalid syntax PS C:\Users\N\desktop> What syntax is invalid here? One parenthesis missing here: return(Athlete(temp1.pop(0),temp1.pop(0), temp1)) -- Vincent V.V. Oqapy <https://launchpad.net/oqapy> . Qarte <https://launchpad.net/qarte> . PaQager <https://launchpad.net/paqager> -- https://mail.python.org/mailman/listinfo/python-list

Re: Putting Py 3.4.1 to work.

2014-05-20 Thread Vincent Vande Vyvre
isting site-packages directory is supposed to work or not. What about: from pyside import QtCore, QtGui ? -- Vincent V.V. Oqapy <https://launchpad.net/oqapy> . Qarte <https://launchpad.net/qarte> . PaQager <https://launchpad.net/paqager> -- https://mail.python.org/mailman/listinfo/python-list

Re: Putting Py 3.4.1 to work.

2014-05-20 Thread Vincent Vande Vyvre
Le 20/05/2014 20:12, Chris Angelico a écrit : On Wed, May 21, 2014 at 4:02 AM, Vincent Vande Vyvre wrote: from pyside import QtCore, QtGui Is it pyside or PySide? There seems to be some inconsistency here. ChrisA Yes PySide, off course. Sorry. -- Vincent V.V. Oqapy <https://launchpad.

Re: In pyqt, some signals seems not work well

2013-08-04 Thread Vincent Vande Vyvre
? #self.dialog.set_all(str(self.total())) # ... self.sig_set_label_text.emit('found', str(self.found())) # again ? self.sig_set_label_text.emit('all', str(self.total())) # etc self.sig_jump_finish_page.emit() -- Vincent V.V. Oqapy <https://launchpad.net/oqapy> . Qarte <ht

Re: how to detect comment in source code file ?

2013-09-04 Thread Vincent Vande Vyvre
typ, _, begin, _, _ in tokens: if typ == cmt: print 'Find comment line %s at column %s' % begin find_comment() --- (for Python 3 import StringIO from io) -- Vincent V.V. Oqapy <https://launchpad.net/oqapy>

Re: When i leave a LineEdit widget and run slot

2013-09-13 Thread Vincent Vande Vyvre
ignal editingFinished() is made for that. http://pyqt.sourceforge.net/Docs/PyQt4/qlineedit.html#editingFinished -- Vincent V.V. Oqapy <https://launchpad.net/oqapy> . Qarte <https://launchpad.net/qarte> . PaQager <https://launchpad.net/paqager> -- https://mail.python.org/mailman/listinfo/python-list

Re: How to differ between checked and unckecked

2013-09-15 Thread Vincent Vande Vyvre
accordance with the state wich is the argument of the signal `stateChanged`. -- Vincent V.V. Oqapy <https://launchpad.net/oqapy> . Qarte <https://launchpad.net/qarte> . PaQager <https://launchpad.net/paqager> -- https://mail.python.org/mailman/listinfo/python-list

Re: Qt connect and first connect or unicode

2013-09-17 Thread Vincent Vande Vyvre
t is these lines: try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: _fromUtf8 = lambda s: s Moshen, I thing if you pass the instance of your GUI at the class materialsInstance you'll can simplify your connections self.lineEdit.returnPressed.connect(self.materialsInstance.responseToRequestForData

Re: creating rectangle with qt-designer

2013-09-19 Thread Vincent Vande Vyvre
See : http://pyqt.sourceforge.net/Docs/PyQt4/qgroupbox.html -- Vincent V.V. Oqapy <https://launchpad.net/oqapy> . Qarte <https://launchpad.net/qarte> . PaQager <https://launchpad.net/paqager> -- https://mail.python.org/mailman/listinfo/python-list

Re: Aide pour bien démarrer en Python

2013-09-27 Thread Vincent Vande Vyvre
s available in French: https://wiki.python.org/moin/FrenchLanguage good luck to you -- Joel Goldstick http://joelgoldstick.com Je te recommande : http://python.developpez.com/cours/apprendre-python3/ -- Vincent V.V. Oqapy <https://launchpad.net/oqapy> . Qarte <https://launchpad.net/qarte> . PaQager <https://launchpad.net/paqager> -- https://mail.python.org/mailman/listinfo/python-list

Re: urllib2 timeout issue

2013-10-16 Thread Vincent Vande Vyvre
quot;. Am I missing something ? Thanks. The url "dumdgdfgdgmyurl.com/" is just an example ? If not, the result is normal. -- Vincent V.V. Oqapy <https://launchpad.net/oqapy> . Qarte <https://launchpad.net/qarte> . PaQager <https://launchpad.net/paqager> -- https://mail.python.org/mailman/listinfo/python-list

Re: PY QT

2013-10-22 Thread Vincent Vande Vyvre
re are is. If you want to know the number of rows and columns, you have rowCount() and columnCount(). Cheers -- Vincent V.V. Oqapy <https://launchpad.net/oqapy> . Qarte <https://launchpad.net/qarte> . PaQager <https://launchpad.net/paqager> -- https://mail.python.org/mailman/listinfo/python-list

Re: Use à Python 2 module with Python 3

2015-03-11 Thread Vincent Vande Vyvre
s of those who understand how to debug them." (Quoted from https://bugreports.qt.io/browse/PYSIDE-164) Vincent -- https://mail.python.org/mailman/listinfo/python-list

Re: Regex Python Help

2015-03-24 Thread Vincent Vande Vyvre
Le 24/03/2015 20:38, Vincent Vande Vyvre a écrit : Le 24/03/2015 20:22, Gregg Dotoli a écrit : Thank you! But The print error is gone, but now the script quickly finishes and doesnt walk the OS tree or search. Gregg On Tuesday, March 24, 2015 at 2:14:32 PM UTC-4, Gregg Dotoli wrote: I

Re: Regex Python Help

2015-03-24 Thread Vincent Vande Vyvre
g Dotoli Your indentation is wrong. for allfiles in viewfiles: file= os.path.join(path, allfiles) text=open(file, "r") for line in text: if re.match("DECRYPT_I", line): print line, Vincent -- https://mail.python.org/mailman/listinfo/python-list

Re: Bug in floating point multiplication

2015-07-02 Thread Vincent Vande Vyvre
n Centos and Debian, it prints 2049 and breaks. That should not happen. If you can reproduce that (for any value of i, not necessarily 2049), please reply. See also http://bugs.python.org/issue24546 for more details. Hi, vincent@tiemoko:~$ python3 Python 3.2.3 (default, Jun 18 2015, 21:46:

Re: Fwd: Python Error: ImportError: No module named ''folder_name’ at Command Prompt

2015-07-11 Thread Vincent Vande Vyvre
# or import calculatorcontroller But the init file must be named __init__.py NOT init.py as sayed in askubuntu. Vincent -- https://mail.python.org/mailman/listinfo/python-list

No request in module urllib ?

2015-09-03 Thread Vincent Vande Vyvre
Hi, Python 3.2.3 (default, Jun 18 2015, 21:46:42) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import urllib >>> urllib.request.urlopen('http://example.org') Traceback (most recent call last): File "", line 1, in AttributeError: 'module' obje

Re: No request in module urllib ?

2015-09-03 Thread Vincent Vande Vyvre
Le 04/09/2015 04:08, Chris Angelico a écrit : On Fri, Sep 4, 2015 at 11:56 AM, Vincent Vande Vyvre wrote: Python 3.2.3 (default, Jun 18 2015, 21:46:42) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. im

Re: No request in module urllib ?

2015-09-03 Thread Vincent Vande Vyvre
Le 04/09/2015 04:30, Chris Angelico a écrit : On Fri, Sep 4, 2015 at 12:17 PM, Vincent Vande Vyvre wrote: import urllib.request urllib.request.urlopen('http://example.org') Thanks, that works with 3.4.0. No with 3.2.3 Hmm, not sure why it wouldn't. According to the docs [

Re: Problem with Python 3.5.0

2015-10-11 Thread Vincent Vande Vyvre
;>> if a > 0: ... print('a is a positive') ... # here, type a Enter a is a positive >>> elif a >>> a = "test\nto\nsee\nif\nit\nis\nworking" >>> a 'test\nto\nsee\nif\nit\nis\nworking' >>> print(a) test to see if it is working >>> Clear ? Vincent -- https://mail.python.org/mailman/listinfo/python-list

Re: [Ubuntu] PyQt5

2015-11-07 Thread Vincent Vande Vyvre
I've tested the first example with the menuBar. Have you a message into the terminal? Maybe an error? Vincent -- https://mail.python.org/mailman/listinfo/python-list

Re: Persist objects in a LIST

2015-11-14 Thread Vincent Vande Vyvre
Le 14/11/2015 16:39, Dennis Lee Bieber a écrit : On Sat, 14 Nov 2015 07:02:41 -0800 (PST), John Zhao declaimed the following: I found a solution. replace bDict.clear() with bDict = {} Which is creating a second, empty, dictionary and binding the name "bDict" to that new one.

<    1   2   3   4   5   6   >