Re: About python while statement and pop()

2014-06-11 Thread Vincent Vande Vyvre
x.pop()) return y Something like that : def foo(x): return reversed(x) -- 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: Unable to run print('Réussi') on windows and on linux

2014-08-14 Thread Vincent Vande Vyvre
Le 14/08/2014 14:35, marc.vanhoomis...@gmail.com a écrit : Hello, This very simple program runs well on windows 7 # -*- utf8 -*- print('Réussi') But, when I start the vrey same file on Linux (ubuntu 14), I got: Traceback (most recent call last): File "/partages/bureau/PB/Dev/Python3/test.p

Re: Unable to run print('Réussi') on windows and on linux

2014-08-14 Thread Vincent Vande Vyvre
Le 14/08/2014 15:31, YBM a écrit : Le 14/08/2014 14:35, marc.vanhoomis...@gmail.com a écrit : Hello, This very simple program runs well on windows 7 # -*- utf8 -*- print('Réussi') But, when I start the vrey same file on Linux (ubuntu 14), I got: Traceback (most recent call last): File "/p

Re: PyQt4 - Issue with deleting a QWidget from a QGridLayout

2014-08-19 Thread Vincent Vande Vyvre
Le 20/08/2014 00:11, Alex Murray a écrit : Hi, I've discovered some very strange behaviour when trying to delete a QWidget from a QGridLayout. The following code demonstrates this behaviour: >>> from PyQt4 import QtGui >>> import sys >>> app = QtGui.QApplication(sys.argv) >>> grid_layout = QtG

Re: PyQt4 - Issue with deleting a QWidget from a QGridLayout

2014-08-20 Thread Vincent Vande Vyvre
Le 20/08/2014 16:22, Alex Murray a écrit : Please do not post in HTML it makes everything an unreadable mess (I have left you original post above so you can see what I mean.) Sorry, here's the original e-mail in plain text: Hi, I've discovered some very strange behaviour when trying to delete

Re: Python Imaging Library 1.x - 64bit setup file for Python 2.7.2.

2014-09-25 Thread Vincent Vande Vyvre
Le 25/09/2014 10:07, Pinter, Karina /C a écrit : Dear Team, I am working as a software analyst at ExxonMobil. I received a software request for Python Imaging Library 1.x and the user needs a 64bit setup file for Python 2.7.2. Can I download it somewhere? Thanks in advance. */Best Regards,

Re: Creating a counter

2014-10-15 Thread Vincent Vande Vyvre
uot;\rProgress .. %s" % i, ... sys.stdout.flush() ... time.sleep(1) ... >>> counter(5) Vincent. -- https://mail.python.org/mailman/listinfo/python-list

Re: ANN: unpyc3 - a python bytecode decompiler for Python3

2011-09-13 Thread Vincent Vande Vyvre
    code = Code(code_obj)   File "unpyc3.py", line 210, in __init__     for v in code_obj.co_cellvars + code_obj.co_freevars] AttributeError: 'NoneType' object has no attribute 'co_cellvars' ... Cheers -- Vincent V.V. Oqapy . Qarte+7 . PaQager -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: unpyc3 - a python bytecode decompiler for Python3

2011-09-14 Thread Vincent Vande Vyvre
Le 14/09/11 08:20, Arnaud Delobelle a écrit : On 14 September 2011 06:53, Vincent Vande Vyvre wrote: Hi, trying your code, I have had numbers of errors: Hi Vincent, thanks for trying it.   File "unpyc3.py", l

Re: ANN: unpyc3 - a python bytecode decompiler for Python3

2011-09-14 Thread Vincent Vande Vyvre
Le 14/09/11 10:13, Vincent Vande Vyvre a écrit : Le 14/09/11 08:20, Arnaud Delobelle a écrit : On 14 September 2011 06:53, Vincent Vande Vyvre wrote: Hi, trying your code, I have had numbers of errors: Hi Vincent

Re: ANN: unpyc3 - a python bytecode decompiler for Python3

2011-09-14 Thread Vincent Vande Vyvre
Le 14/09/11 11:31, Arnaud Delobelle a écrit : On 14 September 2011 09:44, Vincent Vande Vyvre wrote:   File "unpyc3.py", line 211, in __init__     for v in code_obj.co_cellvars + code_obj.co_freevars] AttributeError: 'NoneType' obj

Different class 'str' between v3.

2011-09-16 Thread Vincent Vande Vyvre
rsion.split()[0]) print(platform.platform()) paths = ['/home/vincent/image.jpg', '/home/vincent/àéèîö.jpg'] for path in paths: print('\nPath: {0}, Type: {1}'.format(path, type(path))) if not os.path.exists(path) or not os.path.isfile(p

Re: Different class 'str' between v3.

2011-09-16 Thread Vincent Vande Vyvre
Le 17/09/11 01:28, Ian Kelly a écrit : On Fri, Sep 16, 2011 at 7:52 AM, Vincent Vande Vyvre wrote: [vincent@myhost ~]$ python string_2.py Python version:  3.2.2 Linux-3.0-ARCH-x86_64-Pentium-R-_Dual-Core_CPU_T4500_@_2.30GHz-with-glibc2.2.5 Path: /home

Re: Different class 'str' between v3.

2011-09-16 Thread Vincent Vande Vyvre
Le 17/09/11 05:28, Vincent Vande Vyvre a écrit : Le 17/09/11 01:28, Ian Kelly a écrit : On Fri, Sep 16, 2011 at 7:52 AM, Vincent Vande Vyvre wrote: [vincent@myhost ~]$ python string_2.py Python version:  3.2.2 Linux-3.0-ARCH

Re: Getting a list value from key/value pair

2011-09-18 Thread Vincent Vande Vyvre
# -*- coding: utf-8 -*- items = {'fees':[('status','pending'), ('timeout',60)], 'hostel':[('status',  'pending'), ('timeout','120')]} for key, value in items.iteritems():     print

Re: Getting a list value from key/value pair

2011-09-18 Thread Vincent Vande Vyvre
':[('status','pending'), ('timeout',60)], 'hostel':[('status',  'pending'), ('timeout','120')]} for key, value in d.items():     print("\n {0}".format(key))     for val in value:     print("\t{0}:  {1}".format(val[0], val[1])) -- Vincent V.V. Oqapy . Qarte+7 . PaQager -- http://mail.python.org/mailman/listinfo/python-list

Re: installeventfilter

2011-10-11 Thread Vincent Vande Vyvre
== 14:     resize()     return True In your case, 'MainWindow' seems to be 'parent' -- Vincent V.V. Oqapy . Qarte+7 . PaQager -- http://mail.python.org/mailman/listinfo/python-list

Re: Close as Many Files/External resourcs as possible in the face of exceptions

2011-11-21 Thread Vincent Vande Vyvre
, why             is_not_closed[obj] = why         for f in L:         close_(f) Now, your dictionnary contain the file as key and the exception message as value. -- Vincent V.V. Oqapy . Qarte+7 . PaQager -- http://mail.python.org/mailman/listinfo/python-list

Re: pyside dynamic buttons

2011-12-13 Thread Vincent Vande Vyvre
ame with pyside. -- Vincent V.V. Oqapy . Qarte+7 . PaQager -- http://mail.python.org/mailman/listinfo/python-list

Re: calculate difference between two timestamps [newbie]

2011-12-17 Thread Vincent Vande Vyvre
import datetime   begin = datetime.datetime(2011, 12, 13, 9, 47, 12) today = datetime.datetime(2011, 12, 13, 9, 47, 39) dif = str(today - begin) print dif >>> 0:00:27 Regards -- Vincent V.V. Oqapy . Qarte+7 . PaQager -- http://mail.python.org/mailman/listinfo/python-list

Re: can some one help me with my code. thanks

2012-01-20 Thread Vincent Vande Vyvre
'346.5905371', 'end'] If you can give me some lead to fix the code I wrote below that will be great: def average(bin): num=[] total = 0.0 count=0 for number in bin: while True: if number!='

Re: can some one help me with my code. thanks

2012-01-22 Thread Vincent Vande Vyvre
Le 20/01/12 20:30, Vincent Vande Vyvre a écrit : Le 20/01/12 19:49, Tamanna Sultana a écrit : can some one help me?? I would like to create a function that, given a bin, which is a list (example below), generates averages for

Re: Eric - "No module named MainWindow"

2013-02-17 Thread Vincent Vande Vyvre
s.exit(app.exec_()) > > if __name__ == '__main__': > main() > > I have tried mainWindow and mainwindow as well so it appears not to be > a case error. > Are you sure you have a class MainWindow in your ui.MainWindow.py ? Can you show us the code of this MainWind

Re: Eric - "No module named MainWindow"

2013-02-17 Thread Vincent Vande Vyvre
Le 17/02/13 16:13, Joel Goldstick a écrit : > > > > On Sun, Feb 17, 2013 at 6:35 AM, Vincent Vande Vyvre > mailto:vincent.vandevy...@swing.be>> wrote: > > Le 17/02/13 10:08, Phil a écrit : > > Thank you for reading this. > > > > I'v

Re: Eric - "No module named MainWindow"

2013-02-18 Thread Vincent Vande Vyvre
Le 18/02/13 00:04, Phil a écrit : > ... > > from PyQt4 import QtCore, QtGui > from ui.MainWindow import MainWindow > As I've sayed in my last post, this is not "ui.MainWindow" but "ui.mainwindow" -- Vincent V.V. Oqapy <https://launchpad.net/oqapy> .

Re: tracer une cercle dans python tkinter?

2013-03-01 Thread Vincent Vande Vyvre
Le 01/03/13 18:53, olsr.ka...@gmail.com a écrit : > comment tracer une cercle contient un numéro au un symbole dans le center > dans python tkinter? Posez votre question ici: http://www.developpez.net/forums/f96/autres-langages/python-zope/ -- Vincent V.V. Oqapy <https://launchpad.

Re: Error about " module object has no attribute 'QStringList' "

2013-03-17 Thread Vincent Vande Vyvre
Forget the reference: http://pyqt.sourceforge.net/Docs/PyQt4/incompatible_apis.html -- Vincent V.V. Oqapy <https://launchpad.net/oqapy> . Qarte <https://launchpad.net/qarte> . PaQager <https://launchpad.net/paqager> -- http://mail.python.org/mailman/listinfo/python-list

Re: Error about " module object has no attribute 'QStringList' "

2013-03-17 Thread Vincent Vande Vyvre
Le 17/03/13 17:15, ofene...@hotmail.com a écrit : > sip.setapi("QString", 2) Remove the line: sip.setapi("QString", 2) and try it. -- Vincent V.V. Oqapy <https://launchpad.net/oqapy> . Qarte <https://launchpad.net/qarte> . PaQager <https://launchpad.n

Re: Error about " module object has no attribute 'QStringList' "

2013-03-17 Thread Vincent Vande Vyvre
Le 17/03/13 17:53, Vincent Vande Vyvre a écrit : > Le 17/03/13 17:15, ofene...@hotmail.com a écrit : >> Dear List, >> >> I have been working on restructured text(rest) documents and found a nice >> application which makes viewing the rest documents easy. It is a web &

Re: Export data from python to a txt file

2013-03-29 Thread Vincent Vande Vyvre
ot;, "copyright", "credits" or "license" for more information. >>> a=[1,3,5,6,10] >>> b=['a', 't', 'q', 'r', 's'] >>> sta = " ".join([str(i) for i in a]) >>> stb = " ".jo

Re: How to do this?

2013-04-01 Thread Vincent Vande Vyvre
Le 01/04/13 12:14, Ana Dionísio a écrit : > for t in range(20): > if t == 4: > vt[t]=1 Sets only the needed values: for t in range(4, 8): vt[t]=1 -- Vincent V.V. Oqapy <https://launchpad.net/oqapy> . Qarte <https://launchpad.net/qarte> . PaQager <https

Re: Error in working with Dict

2013-04-01 Thread Vincent Vande Vyvre
is because I have initialized both dicts inside the > function, But why dicts are not saved out, if I intialize the dicts > outside the function, the processing is still done inside and end > result I am getting is an empty dict. > > > Thanks in Advance for suggestions >

Re: QTableWidget updating columns in a single row

2013-04-24 Thread Vincent Vande Vyvre
mething like that: # Get the content of row 0, column A first = str(self.table.item(0, 0).text()) for entryPos in range(lastRow, len(data)): if str(data[entryPos][0]) == first: self.update_first_row(data[entryPos]) else: self.add_new_row(data[entryPos]) -- Vincent V

how can I get the name of a method inside it?

2007-06-03 Thread \"S�bastien Vincent\"
I would like to know if it's possible to retrieve the name of a method when you're inside it. For example, in the following script, I would like to assign _s so that it prints "you are in method1". *** class Obj1: def __init__(self): ... def

a trick with lists ?

2008-02-07 Thread "S�bastien Vincent"
I've found some class on the Net which takes basically this form : ## class Foo: def __init__(self): self.tasks = [] ... def method1(self): tasks = [] while True: ... append/pop elements into/from tasks ... if condition : break self.tasks[:] = t

Re: a trick with lists ?

2008-02-08 Thread "S�bastien Vincent"
Thank you, that's very clear indeed. "Helmut Jarausch" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > Sébastien Vincent > I've found some class on the Net which takes basically this form : >> >> ## >> class Foo

Deadlock and a rather weird stacktrace

2011-02-04 Thread Vincent van Beveren
"c:\PYTHON26\lib\threading.py", line 121, in acquire rc = self.__block.acquire(blocking) Can someone tell me how the sleep of one thread can continue as the 'run' of another? Is this normal? Thanks in advance! Regards, Vincent van Beveren ___ Ing. V. van Beveren Software Engineer, FOM Rijnhuizen T: +31 (0) 30-6096769 E: v.vanbeve...@rijnhuizen.nl -- http://mail.python.org/mailman/listinfo/python-list

The untimely dimise of a weak-reference

2010-07-30 Thread Vincent van Beveren
g I can do about it? I wish to reference these bound functions, but I do not want to keep them in memory once the object they belong to is no longer referenced. Regards, Vincent van Beveren ___ Ing. V. van Beveren Software Engineer, FOM Rijnhuizen E: v.vanbeve...@rijnhuizen.nl -- http://mail.python.org/mailman/listinfo/python-list

RE: The untimely dimise of a weak-reference

2010-07-30 Thread Vincent van Beveren
Hi Peter, I did not know the object did not keep track of its bound methods. What advantage is there in creating a new bound method object each time its referenced? It seems kind of expensive. Regards, Vincent -Original Message- From: Peter Otten [mailto:__pete...@web.de] Sent

RE: The untimely dimise of a weak-reference

2010-08-01 Thread Vincent van Beveren
Hi Gregory, > You can create your own wrapper that keeps a weak reference to > the underlying object. Here's an example. > [...] Thanks for the code! Regards, Vincent -- http://mail.python.org/mailman/listinfo/python-list

RE: The untimely dimise of a weak-reference

2010-08-01 Thread Vincent van Beveren
ree list. The creation of a new bound > method just takes a few pointer assignments and three INCREFs. Okay, that also explains the consistent memory assignment. Maybe I'll create a bound-method caching object, see how slow/fast it is in comparison, and see what ever other issues

Re: os.path.isfile

2017-02-10 Thread Vincent Vande Vyvre
2016, 01:08:31) [GCC 4.8.4] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.path.isfile('/home/vincent/oqapy-3/trunk/__pycache__/grid.cpython-34.pyc ') False Why ? -- https://mail.python.org/mailman/listinfo/python-list

Re: os.path.isfile

2017-02-10 Thread Vincent Vande Vyvre
Le 10/02/17 à 21:36, Peter Otten a écrit : Vincent Vande Vyvre wrote: Le 10/02/17 à 19:11, epro...@gmail.com a écrit : Hello NG Python 3.5.2 Windows 10 os.path.isfile() no recognise file with double dot? eg. match.cpython-35.pyc Please somebody know something about that? Thank You in

Re: os.path.isfile

2017-02-10 Thread Vincent Vande Vyvre
Le 10/02/17 à 22:03, Vincent Vande Vyvre a écrit : Le 10/02/17 à 21:36, Peter Otten a écrit : Vincent Vande Vyvre wrote: Le 10/02/17 à 19:11, epro...@gmail.com a écrit : Hello NG Python 3.5.2 Windows 10 os.path.isfile() no recognise file with double dot? eg. match.cpython-35.pyc Please

Usage of ast.

2017-02-27 Thread Vincent Vande Vyvre
malformed node or string: ' + repr(node)) ValueError: malformed node or string: <_ast.Call object at 0x7fcf955871d0> Is it an import question ? Vincent -- https://mail.python.org/mailman/listinfo/python-list

Re: Usage of ast.

2017-02-27 Thread Vincent Vande Vyvre
Le 27/02/17 à 14:09, Chris Angelico a écrit : On Mon, Feb 27, 2017 at 11:57 PM, Vincent Vande Vyvre wrote: I've this strange error: Python 3.4.3 (default, Nov 17 2016, 01:08:31) [GCC 4.8.4] on linux Type "help", "copyright", "credits" or "license"

Re: python and pyqt4

2017-03-14 Thread Vincent Vande Vyvre
3='world' self.dlg.lineEdit_2.setText(str(area1)) self.dlg.lineEdit_3.setText(str(area2)) self.dlg.lineEdit_4.setText(str(area3)) pass but no change. distance is a string, then you have to compare it with the string "0" not the integer Vincent -- https://mail.python.org/mailman/listinfo/python-list

Re: Temporary variables in list comprehensions

2017-04-06 Thread Vincent Vande Vyvre
r example: [(tmp, tmp + 1) for x in data with tmp = expensive_calculation(x)] Alas! With two passes e = [expensive_calculation(x) for x in data] final = [(x, y+1) for x, y in zip(e, e)] Vincent -- https://mail.python.org/mailman/listinfo/python-list

CPython Class variable exposed to Python is altered.

2017-04-12 Thread Vincent Vande Vyvre
alphabetical order, but not only for the attribute name, also for the reference n. Same into a console: (py352_venv) vincent@djoliba:~/CPython/py352_venv/pydcraw$ python Python 3.5.2 (default, Dec 19 2016, 11:46:33) [GCC 4.8.4] on linux Type "help", "copyright", "credit

Re: CPython Class variable exposed to Python is altered.

2017-04-12 Thread Vincent Vande Vyvre
Le 12/04/17 à 08:57, Vincent Vande Vyvre a écrit : Hi, Learning CPython, I've made this simple exercice, a module test which contains an object Test. The object Test has an attribute name, fixed at instanciation. So, I try my code with a s

Re: CPython Class variable exposed to Python is altered.

2017-04-12 Thread Vincent Vande Vyvre
Le 12/04/17 à 10:51, Peter Otten a écrit : Vincent Vande Vyvre wrote: Le 12/04/17 à 08:57, Vincent Vande Vyvre a écrit : Hi, Learning CPython, I've made this simple exercice, a module test which contains an object Test. The object Test has an attribute name, fixed at instanciation.

Re: CPython Class variable exposed to Python is altered.

2017-04-12 Thread Vincent Vande Vyvre
Le 12/04/17 à 11:47, Peter Otten a écrit : Vincent Vande Vyvre wrote: No, no warning. For the truth, this code is copy-pasted from the doc. https://docs.python.org/3.5//extending/newtypes.html#adding-data-and-methods-to-the-basic-example But the example expects objects (the big O), not

Python 3.5+ Arrow keys and others in the console

2017-04-16 Thread Vincent Vande Vyvre
Key Python 3.6.1 (default, Apr 12 2017, 11:39:17) [GCC 4.8.4] on linux Type "help", "copyright", "credits" or "license" for more information. >>> f = "lkjgh" >>> ^[[A^[[B# Up Arrow Key and Backspace Key F

Re: Python 3.5+ Arrow keys and others in the console

2017-04-16 Thread Vincent Vande Vyvre
Le 16/04/17 à 15:19, Wolfgang Maier a écrit : On 16.04.2017 10:56, Vincent Vande Vyvre wrote: Hi, I'm using Python 3.5 and 3.6 in venv and I see a strange behaviour in the interactive interpreter. The arrow keys can't be used to move the cursor into the current line of code or to r

Re: PYhton Mercator projection

2017-04-18 Thread Vincent Vande Vyvre
fail. Vincent -- https://mail.python.org/mailman/listinfo/python-list

Re: Signals and Slots - Summerfield - what exactly is a signal?

2017-08-05 Thread Vincent Vande Vyvre
Changed) vat.setRate(17.5) # No change will occur (new rate is the same) vat.setRate(8.5) # A change will occur (new rate is different) Isn't this a mistake? self.connect( should be: vat.connect(vat, SIGNAL("rateChanged"), rate) Again, use the new syntaxe (new but not recent) it's more clear. Vincent -- https://mail.python.org/mailman/listinfo/python-list

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

2017-11-26 Thread nospam . Vincent Vande Vyvre
the ONLY two places > draw_ellipse is mentioned are right there in the ellipse() function... > WHAT am I missing?? > > 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

Simple Interpolation in Numpy?

2007-02-08 Thread LAPI, VINCENT J, ATTLABS
Hi, Please bear with me as I am new to Python and have not done any programming in about 20 years. I am attempting to do a simple interpolation of a line's intermediate points given the x,y coordinates of the line's two endpoints within an Active State Python script that I am working with. Is ther

RE Version of OpenSSl ?

2025-02-09 Thread Vincent Vande Vyvre via Python-list
> HI Vincent. > > You need the sources of the OpenSSL library, not the compiled library. > On Ubuntu, the packages with sources are typically named xxx-dev where > xxx is the package that provides the library. I don't have a Ubuntu > currently, but try looking for someth

Version of OpenSSl ?

2025-02-09 Thread Vincent Vande Vyvre via Python-list
) --- What can I do for that ? Vincent. -- https://mail.python.org/mailman/listinfo/python-list

RE Version of OpenSSl ?

2025-02-09 Thread Vincent Vande Vyvre via Python-list
opt/lib:$LD_LIBRARY_PATH ------ And rerun the compilation of 3.12.9 without problem with openssl. (*) https://openssl-library.org/source/old/1.1.1/index.html Vincent. -- https://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6