Re: List open files

2008-04-08 Thread Guillaume
Oh and don't forget to take care about saving correctly the Oracle database ! ^^ (private joke *giggles* j/k :)) Regards, -- Guillaume -- http://mail.python.org/mailman/listinfo/python-list

How to set the socket type and the protocol of a socket using create_connection?

2012-08-20 Thread Guillaume Comte
ntation. Thank you, Guillaume -- http://mail.python.org/mailman/listinfo/python-list

Re: How to set the socket type and the protocol of a socket using create_connection?

2012-08-20 Thread Guillaume Comte
In fact, socket.create_connection is for TCP only so I cannot use it for a ping implementation. Does anyone have an idea about how to be able to set a source address for ICMP messages? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to set the socket type and the protocol of a socket using create_connection?

2012-08-20 Thread Guillaume Comte
Le lundi 20 août 2012 15:38:14 UTC+2, Hans Mulder a écrit : > On 20/08/12 14:36:58, Guillaume Comte wrote: > > > In fact, socket.create_connection is for TCP only so I cannot use it for a > > ping implementation. > > > > Why are you trying to reimplement ping

Re: How to set the socket type and the protocol of a socket using create_connection?

2012-08-21 Thread Guillaume Comte
Unfortunatly, my_socket.bind((src_addr, 1)) doesn't work. I get the error message: "socket.error: [Errno 49] Can't assign requested address"... I've tried to change the protocol to IPPROTO_RAW. Here is a simple example of the code: import socket import os import struct import time import sele

Re: How to set the socket type and the protocol of a socket using create_connection?

2012-08-22 Thread Guillaume Comte
Le mercredi 22 août 2012 04:10:43 UTC+2, Dennis Lee Bieber a écrit : > On Tue, 21 Aug 2012 10:00:28 -0700 (PDT), Guillaume Comte > > declaimed the following in > > gmane.comp.python.general: > > > > A later follow-up > > > Unfortunatly, my_socket

Re: How to set the socket type and the protocol of a socket using create_connection?

2012-08-22 Thread Guillaume Comte
I've managed to build the IP header. I've put the source and destination addresses in this header but it doesn't change the real source address... I'm trying to read the ping source code but I'm lost... -- http://mail.python.org/mailman/listinfo/python-list

Re: How to set the socket type and the protocol of a socket using create_connection?

2012-08-22 Thread Guillaume Comte
Le mercredi 22 août 2012 11:03:11 UTC+2, Hans Mulder a écrit : > > On my laptop, 0 appears to be the only port number that bind accepts > > for a raw socket. Other numbers I tried all raise "socket.error: > > [Errno 49] Can't assign requested address". > > > > But this might depend on your

Problem using s.strip() to remove leading whitespace in .csv file

2012-02-29 Thread Guillaume Chorn
atch the names in the second list. However, when I try to do this as follows: positions = open('/home/guillaume/Documents/playerpos.csv') for line in positions: info = line.split(',') name = info[0] name = name.strip() print name #to examine the effect of name.str

Re: Problem using s.strip() to remove leading whitespace in .csv file

2012-02-29 Thread Guillaume Chorn
es of finding out. Anyway thanks again for the help! cheers, Guillaume -- http://mail.python.org/mailman/listinfo/python-list

err: A cool new chatbot written and extensible in python

2012-06-10 Thread Guillaume BINET
/wiki/plugin-dev Feel free to contact us if you have cool plugins to submit ! Guillaume. -- http://mail.python.org/mailman/listinfo/python-list

Windows installation - questions about DLLs

2005-07-01 Thread Guillaume Hiron
Hi, I need to install python (2.3.5) on windows without the giving installer program. Do you know what dlls are needed? I found python23.dll, but the other (msvcrt.dll,msvcrit.dll) seems not be useful. Is there other dll? Are msvcrt.dll and msvcrit.dll used by something?(test/test___all__.py retur

Re: pyserial with binary data

2004-11-30 Thread Guillaume Weymeskirch
Hi, I've got the same problem. Errno 11 is because too much data, sending is in progress. Fix is easy: assign a non zero value to the writeTimeout property of your serial objet. Then the write method will wait up to this time for sending data. Hope that's help Guillaum

distutils

2005-04-04 Thread Guillaume JULLIEN
es path work in python ? Thanks a lot for your help Guillaume -- http://mail.python.org/mailman/listinfo/python-list

Re: garbage collector and slowdown (guillaume weymeskirch)

2008-10-05 Thread guillaume weymeskirch
Thanks ! No more slowdown in python 2.6, both on gentoo and winxp systems. I love python so much so I can live with that until I will upgrade to the 2.6 version. -- http://mail.python.org/mailman/listinfo/python-list

Shelve or pickle module

2008-05-17 Thread Guillaume Bog
Hello, I read and re-read "Python in a Nutshell" written by Alex Martelli, who knows what he is talking about. I'm a bit new to python and I'm going to start doing persistence side on a project. Martelli's book seems to tell me that I should use shelve module, but any code I browsed is using pickl

Re: php vs python

2008-05-25 Thread Guillaume Bog
On Mon, May 26, 2008 at 8:12 AM, Jerry Stuckle <[EMAIL PROTECTED]> wrote: > Ivan Illarionov wrote: > >> On Sun, 25 May 2008 17:09:43 -0400, Jerry Stuckle wrote: >> >>> Not at all. I do it every day. >>> >>> And BTW - yes, I write Python, also. But I find I can write better, >>> faster code in PH

Re: How do web templates separate content and logic?

2008-06-29 Thread Guillaume Bog
On Mon, Jun 30, 2008 at 11:27 AM, Tim Roberts <[EMAIL PROTECTED]> wrote: > John Salerno <[EMAIL PROTECTED]> wrote: > > > > > If it seems out of place to you, then you shouldn't do it. In general, you > need to find a model that makes sense to you, and that allows you to write > readable, workable

garbage collector and slowdown (guillaume weymeskirch)

2008-10-04 Thread guillaume weymeskirch
Hello everybody, To test the python 2.5 garbage collector, I wrote a trivial script allocating dummy objects of various sizes, then forgetting them in a loop. The garbage collector seems working well, limiting the memory used. But I've noticed a near linear slowdown of the execution : after a fe

[Ask for Review] Scalpl: A lightweight wrapper to operate on nested dictionaries (yet another)

2017-05-29 Thread guillaume . paulet
you to use the entire dict API 'with.this.kind.of.keys'. - Almost no instantiation/conversion cost, it's just a wrapper. You can install it via pip (Python3 only): pip3 install scalpl Have a great week :) ! Guillaume -- https://mail.python.org/mailman/listinfo/python-list

Re: Circular iteration on tuple starting from a specific index

2017-05-30 Thread guillaume . paulet
Hi Beppe ! There are some powerful tools in the standard *itertools* module, you should have a look at it :) https://docs.python.org/3/library/itertools.html This is what I would do to cycle over you iterable without making several copies of it. ``` from itertools import islice, chain def

Re: Circular iteration on tuple starting from a specific index

2017-06-02 Thread guillaume . paulet
@Gregory Ewing: you were right, your version without *chain* is faster and I quiet like it :) ``` from timeit import timeit from itertools import chain, cycle, islice def cycle_once_with_chain(sequence, start): return chain(islice(sequence, start, None), islice(sequence, start)) def cy

New release of Scalpl (v0.2.4) ✨🍰✨

2017-06-08 Thread guillaume . paulet
Good morning evernyone ! I released a new version (0.2.4) of Scalpl yesterday evening which is available on PyPI :) https://github.com/ducdetronquito/scalpl https://pypi.python.org/pypi/scalpl/ Scalpl is a lightweight wrapper that helps you to operate on nested dictionaries through the built-

Release of Scalpl (v0.2.5) ✨🍰✨ - a lightweight wrapper for your nested dictionaries

2017-06-26 Thread guillaume . paulet
Hi everyone ! I released a new version (0.2.5) of **Scalpl** which is available on PyPI :) https://github.com/ducdetronquito/scalpl You can install it via pip: pip3 install scalpl Scalpl is a lightweight wrapper that helps you to operate on nested dictionaries through the built-in dict

import from environment path

2011-06-17 Thread Guillaume Martel-Genest
Hi, Here's my situation : I got a script a.py that need to call b.py. The 2 scripts can't be in a same package. Script a.py knows the path of b.py relative to an environment variable B_PATH, let's say B_PATH/foo/ b.py. The solution I found is to do the flowwing : b_dir = os.path.join(os.environ['

Handling import errors

2011-06-21 Thread Guillaume Martel-Genest
What is the pythonic way to handle imports error? What is bugging me is that the imports can't be inside a function (because I use them in different places in the script and thus they have to be in the global scope). I would write something like: try: -- http://mail.python.org/mailman/listinfo/py

Handling import errors

2011-06-21 Thread Guillaume Martel-Genest
What is the pythonic way to handle imports error? What is bugging me is that the imports can't be inside a function (because I use them in different places in the script and thus they have to be in the global scope). I would write something like: try: import foo except ImportError: logging

Re: Handling import errors

2011-06-22 Thread Guillaume Martel-Genest
I did not think about using a global variable, and the top-level try...except solution is interesting. After further thinking, I have to reformulate my initial question: How do I manage to run code before my imports? For example, I want to make sure that I can use the logging module in the case a

Re: Project-wide variable...

2011-06-23 Thread Guillaume Martel-Genest
On Jun 23, 9:41 am, Gnarlodious wrote: > Is there a way to declare a project-wide variable and use that in all > downstream modules? > > -- Gnarlir What about using an environment variable? -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Wing IDE 3.2.3 released

2009-12-10 Thread Jean Guillaume Pyraksos
In article , Wingware wrote: > http://wingware.com/downloads/wingide-101/3.2 No Cocoa version for MacOS-X ? Shall we have to use X11 in 2009 ? How come ? JG -- http://mail.python.org/mailman/listinfo/python-list

Python IDE for MacOS-X

2010-01-18 Thread Jean Guillaume Pyraksos
What's the best one to use with beginners ? Something with integrated syntax editor, browser of doc... Thanks, JG -- http://mail.python.org/mailman/listinfo/python-list

Python and Ruby

2010-01-27 Thread Jean Guillaume Pyraksos
What are the arguments for choosing Python against Ruby for introductory programming ? Python has no provisions for tail recursion, Ruby is going to... So what ? Thanks, JG -- http://mail.python.org/mailman/listinfo/python-list