On Tue, Jan 13, 2015 at 6:51 PM, Fabien wrote:
> Thanks Chris. I should then rephrase my question to "what does python
> setup.pt do?" ;-). My point was also that I think that this information
> (mostly: what will change on my system or my virtual env when I install a
> python package?) could/shou
On 13/01/2015 07:05, cjgoh...@gmail.com wrote:
> On Monday, January 12, 2015 at 10:09:03 PM UTC-8, Tim Golden wrote:
>> On 12/01/2015 23:12, Andrew Koenig wrote:
>>> Fixed it!
>>>
>>> The aforementioned article is correct. I downloaded the RegDelNull
>>> program mentioned in the article
>>> (http:/
On Tue, 13 Jan 2015 00:09:04 -0800, wxjmfauth wrote:
> Le mardi 13 janvier 2015 08:00:06 UTC+1, Steven D'Aprano a écrit :
>> On Mon, 12 Jan 2015 05:24:00 -0800, wxjmfauth wrote:
>>
>> > To tell you the truth, I'm unable to
>> > put your product to work.
>>
>>
>> If you follow the instructions i
- Original Message -
> From: Jean-Michel Pichavant
> To: Albert-Jan Roskam
> Cc: Python
> Sent: Monday, January 12, 2015 4:20 PM
> Subject: Re: class-based class decorator
>
> - Original Message -
>> From: "Albert-Jan Roskam"
>
>> import functools
>> import inspect
>>
i consume a web service that return a element whose the type is "instance". but
this element seem be a dictionary but when i want to use it like a dictionary,
i got some errors. so this is the element and please someone can tell me how
can i use it. tkanks in advance.
(tCountryInfo){
sISOCo
Trying to run through all steps in data conversion app, and, up to last point,
it's fine, but, if I try to handle direct execution of data structure, and data
insertion scripts against a mySQL database, hosted locally here on same
machine, running under wamp, then after code has completely finis
On Tue, Jan 13, 2015 6:31 AM CET Ian Kelly wrote:
>On Jan 12, 2015 6:47 AM, "Albert-Jan Roskam" wrote:
>> Thanks for your replies. I changed it into a regular decorator (not a class
>> decorator). It would have been even nicer if I only needed to specify it
>> once
2015-01-12 22:19 GMT+01:00 :
>
> https://bpaste.net/show/93be9e15634b <--- Line 19 through 22
>
> At all times, my program is assigning the object priority of 0, even if
one already exists in the database with a priority of 0 (it's supposed to
be assigning it a priority of 1 in those cases).
>
> I'
On 1/13/2015 1:13 AM, Chris Angelico wrote:
On Tue, Jan 13, 2015 at 4:32 PM, Steven D'Aprano wrote:
Crashing the interpreter from
pure Python code is *absolutely not allowed*, so anything which would
allow that is forbidden.
Except when you willingly shoot yourself in the foot.
rosuav@sikors
On Tue, Jan 13, 2015 at 9:49 PM, Terry Reedy wrote:
> I would have expected an out-of-memory error. If there is not already a
> crash issue on the tracker for this, you could add one.
It's a stack fault, and it's a documented possibility:
https://docs.python.org/2/library/sys.html#sys.setrecurs
Terry Reedy :
> On 1/13/2015 1:13 AM, Chris Angelico wrote:
> def f(): sys.setrecursionlimit(sys.getrecursionlimit()+1) or f()
>> ...
> f()
>> Segmentation fault
>>
>> But otherwise, yes. You shouldn't be able to segfault Python with
>> Python code.
>
> I would have expected an out-of-memo
On Tue, Jan 13, 2015 at 10:00 PM, Marko Rauhamaa wrote:
> Terry Reedy :
>
>> On 1/13/2015 1:13 AM, Chris Angelico wrote:
>> def f(): sys.setrecursionlimit(sys.getrecursionlimit()+1) or f()
>>> ...
>> f()
>>> Segmentation fault
>>>
>>> But otherwise, yes. You shouldn't be able to segfault P
Jason Bailey wrote:
> My script first reads the DHCPD configuration file into memory -
> variable "filebody". It then utilizes the re module to find the
> configuration details for the wanted "shared network".
>
> The config file might look something like this:
>
> ##
I found a solution that I'm happy with.
from datetime import datetime
from easygui_qt import *
datestring = get_date()
mydate = datetime.strptime(datestring, '%b %d %Y')
On Saturday, January 10, 2015 at 1:02:30 AM UTC, André Roberge wrote:
> On Friday, 9 January 2015 19:09:15 UTC-4, stephen...@g
I'm a bit confused why in the second case x is not [1,2,3]:
x = []
def y():
x.append(1)
def z():
x = [1,2,3]
y()
print(x)
z()
print(x)
Output:
[1]
[1]
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, 13 Jan 2015 04:36:38 +, Steven D'Aprano wrote:
> On Mon, 12 Jan 2015 19:48:18 +, Ian wrote:
>
>> My recommendation would be to write a recursive decent parser for your
>> files.
>>
>> That way will be easier to write,
>
> I know that writing parsers is a solved problem in comput
On Tue, Jan 13, 2015 at 7:51 AM, wrote:
> I'm a bit confused why in the second case x is not [1,2,3]:
>
> x = []
>
> def y():
> x.append(1)
>
> def z():
> x = [1,2,3]
>
> y()
> print(x)
> z()
> print(x)
>
> Output:
> [1]
> [1]
>
x in the outer scope is not x in the z() scope
> --
> http
Hello,
stephen.bou...@gmail.com wrote:
> I'm a bit confused why in the second case x is not [1,2,3]:
>
> x = []
>
> def y():
> x.append(1)
>
> def z():
> x = [1,2,3]
Here x is a local, so global x is not modified.
If you want to modify gobal x, write:
def z():
global x
x = [1,
alister writes:
> On Tue, 13 Jan 2015 04:36:38 +, Steven D'Aprano wrote:
>
> > On Mon, 12 Jan 2015 19:48:18 +, Ian wrote:
> >
> >> My recommendation would be to write a recursive decent parser for
> >> your files.
> >>
> >> That way will be easier to write,
> >
> > I know that writing
On 01/13/15 23:51, stephen.bou...@gmail.com wrote:
I'm a bit confused why in the second case x is not [1,2,3]:
x = []
def y():
x.append(1)
def z():
x = [1,2,3]
y()
print(x)
z()
print(x)
Output:
[1]
[1]
In your y() function, as you are appending data, the list must already
exist
I have a string that I get as an output of a command as:
'\x01\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x0010232ae8944a\x02\x00\x00\x00\x00\x00\x00\x00\n'
I want to fetch '10232ae8944a' from the above string.
I want to find a re pattern that could replace all the \x01..\x0z to be replace
by empty
On Monday, January 12, 2015 at 4:55:43 PM UTC-5, jobop...@gmail.com wrote:
> Thanks Chris. This definitely helps. I will test it and see what happens. In
> terms of the previous code, what it was intended to do wasn't actually
> happening.
Thanks Chris. Your change worked.
--
https://mail.pytho
On Tuesday, January 13, 2015 at 4:57:50 AM UTC-5, Maxime S wrote:
> 2015-01-12 22:19 GMT+01:00 :
> >
> > https://bpaste.net/show/93be9e15634b <--- Line 19 through 22
> >
> > At all times, my program is assigning the object priority of 0, even if one
> > already exists in the database with a priori
Shambhu Rajak wrote:
> I have a string that I get as an output of a command as:
>
'\x01\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x0010232ae8944a\x02\x00\x00\x00\x00\x00\x00\x00\n'
>
> I want to fetch '10232ae8944a' from the above string.
>
> I want to find a re pattern that could replace all the
On Tuesday, January 13, 2015 at 2:03:30 AM UTC-7, brice DORA wrote:
> i consume a web service that return a element whose the type is "instance".
> but this element seem be a dictionary but when i want to use it like a
> dictionary, i got some errors. so this is the element and please someone can
On Tue, Jan 13, 2015, at 04:03, brice DORA wrote:
> i consume a web service that return a element whose the type is
> "instance". but this element seem be a dictionary but when i want to use
> it like a dictionary, i got some errors. so this is the element and
> please someone can tell me how can i
On Monday, January 12, 2015 at 11:34:57 PM UTC-6, Mark Lawrence wrote:
> You snipped the bit that says [normal cobblers snipped].
Oh my, where are my *manners* today? Tell you what, next time when
your sneaking up behind me with a knife in hand, do be a
friend and tap me on the shoulder first, so
[This announcement is in German since it targets a local user group
meeting in Düsseldorf, Germany]
ANKÜNDIGUNG
Python Meeting Düsseldorf
http://pyddf.de/
Ein Treffen v
Thomas 'PointedEars' Lahn wrote:
> Jason Bailey wrote:
>> shared-network My-Network-MOHE {
>>[…] {
>>
>> I compile my regex:
>> m = re.compile(r"^(shared\-network (" + re.escape(shared_network) + r")
>> \{((\n|.|\r\n)*?)(^\}))", re.MULTILINE|re.UNICODE)
>
> This code does not run as posted.
I want to send Message to rabbitmq and receive from rabbitmq, message format is
below.
how can I create a class and decode/encode as json?
{
"message":{
"dateCreated": "1417713299",
"sourceApplication": "ID",
"destinationApplication": "Name",
"messageUUID": "sdafda
- Original Message -
> From: "Albert-Jan Roskam"
> > From: Jean-Michel Pichavant
> > I don't really understand how you successfuly manage positional
> > parameters,
> > since the caller may not name them.
> > I'm asking because if your intend to check only the keyword
> > parameters,
> >
Hi,
I'm working on auto-generated python code with the exec function. I've done
some performance benches :
% python -m timeit '1 + 1'
1000 loops, best of 3: 0.0229 usec per loop
% python -m timeit "exec('1 + 1')"
10 loops, best of 3: 11.6 usec per loop
-> Maybe creating an exec environn
On Jan 12, 2015, at 5:51 PM, Jason Friedman wrote:
>> I have a long-running python/CherryPy Web App server process that I am
>> running on Mac OS X 10.8.5. Python 2.7.2 running in 32-bit mode (for now, I
>> have the code in place to change over to 64 bit, but need to schedule the
>> downtime to d
On Jan 13, 2015, at 6:27 AM, William Ray Wing wrote:
>
>> On Jan 9, 2015, at 12:40 PM, Israel Brewster wrote:
>>
>> I have a long-running python/CherryPy Web App server process that I am
>> running on Mac OS X 10.8.5. Python 2.7.2 running in 32-bit mode (for now, I
>> have the code in place
On Tuesday, January 13, 2015 at 12:39:55 AM UTC-6, Steven D'Aprano wrote:
> On Mon, 12 Jan 2015 15:47:08 -0800, Rick Johnson wrote:
> [...]
> > [...]
> >
> > #Ironic Twist (Reformatted)#
> > ###
Assuming you have gdb available, you should be able to attach to the
running process, then set a breakpoint in relevant functions (like
exit() or abort()). Once there, you can pick through the C stack
manually (kind of tedious) or use the gdbinit file which comes with
Python to get a Python stack t
On Tue, 13 Jan 2015 13:40:52 +, Shambhu Rajak wrote:
> I have a string that I get as an output of a command as:
> '\x01\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x0010232ae8944a\x02\x00
\x00\x00\x00\x00\x00\x00\n'
>
> I want to fetch '10232ae8944a' from the above string.
>
> I want to find a r
On Jan 13, 2015, at 8:26 AM, Skip Montanaro wrote:
> Assuming you have gdb available, you should be able to attach to the
> running process, then set a breakpoint in relevant functions (like
> exit() or abort()). Once there, you can pick through the C stack
> manually (kind of tedious) or use the
Israel Brewster writes:
> when it again crashed with a SIGABRT. The crash dump the
> system gave me doesn't tell me much, other than that it looks
> like python is calling some C function when it crashes. I've
> attached the crash report, in case it can mean somethi
On Tue, 13 Jan 2015 08:17:18 -0800, robertchen117 wrote:
> I want to send Message to rabbitmq and receive from rabbitmq, message
> format is below.
>
> how can I create a class and decode/encode as json?
It may be easier to use dictionaries than classes.
>>> import json
>>> thing = {}
>>> thing
On Tuesday, January 13, 2015 at 11:09:17 AM UTC-6, Rick Johnson wrote:
> [...]
> DO YOU NEED ME TO DRAW YOU A PICTURE?
I don't normally do this, but in the interest of education
i feel i must bear the burdens for which all professional
educators like myself are responsible.
https://plus.go
On Tue, 13 Jan 2015 06:56:11 -0800, Novocastrian_Nomad wrote:
> On Tuesday, January 13, 2015 at 2:03:30 AM UTC-7, brice DORA wrote:
>> i consume a web service that return a element whose the type is
>> "instance". but this element seem be a dictionary but when i want to
>> use it like a dictionar
See answers below.
Jacob Kruger
Blind Biker
Skype: BlindZA
"Roger Wilco wants to welcome you...to the space janitor's closet..."
- Original Message -
From: "Dennis Lee Bieber"
The very first hit /I/ get is:
https://social.technet.microsoft.com/Forums/windows/en-US/3932e3eb-c034-4eb
On Tue, Jan 13, 2015 at 4:20 AM, Chris Angelico wrote:
> On Tue, Jan 13, 2015 at 10:00 PM, Marko Rauhamaa wrote:
>> The code above, though, shouldn't consume memory since it is a simple
>> tail-recursive loop.
>
> Only if the interpreter can optimize it away. Bear in mind that it
> doesn't _retur
On Wed, Jan 14, 2015 at 5:56 AM, Ian Kelly wrote:
> On Tue, Jan 13, 2015 at 4:20 AM, Chris Angelico wrote:
>> On Tue, Jan 13, 2015 at 10:00 PM, Marko Rauhamaa wrote:
>>> The code above, though, shouldn't consume memory since it is a simple
>>> tail-recursive loop.
>>
>> Only if the interpreter c
Ok, and just tested MySQLdb connection to both XAMPP server instance on same
machine, as well as slightly remote connection to other machine over wifi,
and same error - so, seems issue is invoked/caused by MySQLdb connection
closing - if just put process to sleep for 30 seconds, nothing happens,
On Tue, Jan 13, 2015 at 10:02 AM, Jean-Baptiste Braun
wrote:
> Hi,
>
> I'm working on auto-generated python code with the exec function. I've done
> some performance benches :
>
> % python -m timeit '1 + 1'
> 1000 loops, best of 3: 0.0229 usec per loop
>
> % python -m timeit "exec('1 + 1')"
>
On Tuesday, 13 January 2015 08:23:30 UTC-4, stephen...@gmail.com wrote:
> I found a solution that I'm happy with.
>
> from datetime import datetime
> from easygui_qt import *
>
> datestring = get_date()
> mydate = datetime.strptime(datestring, '%b %d %Y')
I'm thinking of having the new version
[Please help spread the word by forwarding to other relevant mailing lists,
user groups, etc. world-wide; thanks :-)]
ANNOUNCING
Python Events Calendars - Please submit your 2015 events
maintained by th
Hi Marc-André,
In fact, during the PythonFOSDEM 2015, there will be a presentation with
the future events in 2015.
I will use the python-events calendar for that.
So, in this case, I propose to all the organisers of conferences to
submit as soon as possible the calendar of their events.
Tha
On 13.01.2015 22:24, =?utf-8?q?St=C3=A9phane?= Wirtel wrote:
> Hi Marc-André,
>
> In fact, during the PythonFOSDEM 2015, there will be a presentation with the
> future events in 2015.
> I will use the python-events calendar for that.
>
> So, in this case, I propose to all the organisers of confe
Jean-Baptiste Braun wrote:
> Hi,
>
> I'm working on auto-generated python code with the exec function. I've
> done some performance benches :
[snip timing results]
> Am I missing something or should I expect that result ? What does using
> exec imply that causes such a difference ?
exec'ing a
On 12-1-2015 5:17, Miki Tebeka wrote:
> Greetings,
>
> I've compiled a list of "python -m" tools at
> pythonwise.blogspot.com/2015/01/python-m.html.
>
> Did I miss something? What are your favorite "python -m" tools?
>
> Thanks,
> --
> Miki
>
python -m calendar
python -m test.pystone
python
On 01/12/2015 09:32 PM, Steven D'Aprano wrote:
On Mon, 12 Jan 2015 17:59:42 -0800, Andrew Robinson wrote:
[...]
What I am wanting to know is WHY did Guido think it so important to do
that ? Why was he so focused on a strict inability to have any
instances of a bool subclass at all -- that he
Basically, is it possible to compile multiple unrelated python scripts into a
single exe file, so when execute it several python programs are run at once.
In order to use this on another machine without python installed and only by
using one single file.
--
https://mail.python.org/mailman/listin
Hi,
I am trying to understand what does encode() do. What are the hex
representations of "u" in main.py? Why there is UnicodeEncodeError
when main.py is piped to xxd? Why there is no such error when it is
not piped? Thanks.
~$ cat main.py
#!/usr/bin/env python
u = unichr(40960) + u'abcd' + unich
Howdy all,
I am pleased to announce the release of version 2.0.3 of the
‘python-daemon’ library.
The current release is always available at
https://pypi.python.org/pypi/python-daemon/>.
The project's forums and VCS are hosted at Alioth
https://alioth.debian.org/projects/python-daemon/>.
Signif
Ok, and just tested MySQLdb connection to both XAMPP server instance on
same machine, as well as slightly remote connection to other machine over
wifi, and same error - so, seems issue is invoked/caused by MySQLdb
connection closing - if just put process to sleep for 30 seconds, nothing
happens
Hi All,
I have made a script in which i have started two thread named thread 1 and
thread 2.
In thread 1 one function will run named func1 and in thread 2 function 2
will run named func 2.
Thread 1 will execute a command and wait for 60 seconds.
Thread 2 will run only till thread 1 is running .
Ag
no nein writes:
> Basically, is it possible to compile multiple unrelated python scripts into a
> single exe file, so when execute it several python programs are run at once.
These are two distinct problems:
* for doing things in paralell, look at "threading" or "multiprocessing"
* for g
60 matches
Mail list logo