lokeshkopp...@gmail.com wrote:
>
>ok Peter Otten,
>but how to make a Class global??
Your class IS global. I still don't think you understand what you did
wrong. You've tripped into a strange little quirk of scoping. Here is
your code with some unimportant lines removes.
class Node:
def __i
On Wed, May 8, 2013 at 10:54 PM, dieter wrote:
> jamadagni writes:
> > ...
> I cannot help you with "ctypes". But, if you might be able to use
> "cython", then calling callbacks is not too difficult
> (you can find an example in e.g. my "dm.xmlsec.binding").
>
> Note, however, that properly hand
On Friday, May 10, 2013 12:02:08 AM UTC+5:30, Nobody wrote:
> This line should be:
> spiro_to_bezier_strict ( src, len ( src ), byref(bc) )
> Without the byref(...), it will try to pass a copy of the structure rather
> than passing a pointer to it.
Wow silly silly mistake of mine, passing an obj
Send the output of the following commands:
uname -a
/sbin/iptables -V
> From: notr...@earthlink.net
> Subject: Read txt file, add to iptables not working on new host
> Date: Thu, 23 May 2013 22:44:38 -0400
> To: python-list@python.org
>
> First, let me sa
First, let me say that I have no knowledge of or experience with Python
or Linux/Unix. I have a script which was written by a host tech person
that ran via cron on my old server. It was designed to read IP addresses
from a text file and add them to be blocked on iptables. That way, we
could add
Carlos Nepomuceno於 2013年5月22日星期三UTC+8上午2時49分28秒寫道:
>
> > From: alyssonbr...@gmail.com
> > Date: Tue, 21 May 2013 09:03:13 -0300
> > Subject: Re: PEP 378: Format Specifier for Thousands Separator
> > To: python-list@python.org
> >
> > This work in 3.1+:
> >
In article ,
Dave Angel wrote:
> On 05/23/2013 09:09 AM, Roy Smith wrote:
> >
> >
> >
> > nosetests --process-timeout=60 --processes=40 test_api.py
> >
>
> Do you have a 40-processor system?
No, but many of the tests are I/O bound.
> And do you have enough RAM to run all of those proces
Thank you! Hail Eris!!! :)
> Date: Thu, 23 May 2013 21:17:54 -0400
> Subject: Re: PEP 378: Format Specifier for Thousands Separator
> From: malaclyp...@gmail.com
> To: carlosnepomuc...@outlook.com
> CC: python-list@python.org
>
> On Thu, May 23, 2013 at 6:20
not exactly for the homework, but as my starting point of learning
thank you so much.
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, May 23, 2013 at 6:20 PM, Carlos Nepomuceno <
carlosnepomuc...@outlook.com> wrote:
> Can str.format() do the following?
>
> f = '%d %d %d'
> v = '1,2,3'
> print f % eval(v)
>
Sure:
Python 3.2.2 (default, Sep 4 2011, 09:51:08) [MSC v.1500 32 bit (Intel)]
on win32
>>> f = "{} {} {}"
>>> v
On May 23, 8:37 pm, Schneider wrote:
> My aim is to store instances of this class in a database.
Have you considered just pickling the classes instead?
--
http://mail.python.org/mailman/listinfo/python-list
On 23/05/13 18:44, Dan Stromberg wrote:
On Thu, May 23, 2013 at 9:41 AM, duncan smith mailto:buzzard@invalid.invalid>> wrote:
RBT is quicker than Treap for insertion with randomized data, but
slower with ordered data. Randomized data will tend to minimize the
number of tree rotatio
import ldap
conn = ldap.initialize("ldap://ldap.uci.cu";)
conn.protocol_version = ldap.VERSION3
conn.simple_bind_s( "uid=xxx,dc=uci,dc=cu", "xxx" )
Result:
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line
207, in simpl
Chris Angelico writes:
> Ben Finney wrote:
> > This resulted in a library for rolling dice in different
> > combinations, and looking up result tables
> > https://pypi.python.org/pypi/alea>.
>
> Fun fun! Of course, when I hear "rolling dice in different
> combinations", my mind immediately turns
On Fri, May 24, 2013 at 3:49 AM, wrote:
>
> Yeah that is the case. Once I change the f = opener.open('website') line to a
> link that has a https I get that socket error. Nothing else changes. I was
> reading online and came across this site which shows you how if the version
> of python insta
> From: denismfmcma...@gmail.com
[...]
>> Dear all who involved with responding to my question - Thank you so much
>> for your nice code which really helped me.
>
> Hold on a sec? Someone posted code that gave the correct answer to a
> homework question?
>
>
> To: python-list@python.org
> From: tjre...@udel.edu
[...]
>> It's a conflict in the design. A tuple is used to supply multiple
>> arguments to the % operator. So if you want to have a tuple as the
>> first argument, you need to enclose it in another tuple.
On Thursday, May 23, 2013 7:56:19 PM UTC+1, Mark Lawrence wrote:
> On 23/05/2013 19:19, Andrew Edwards-Adams wrote:
>
> > On Thursday, May 23, 2013 7:11:28 PM UTC+1, Andrew Berg wrote:
>
> >> On 2013.05.23 11:58, Andrew Edwards-Adams wrote:
>
> >>
>
> >>> Hi thanks for the reply Andrew, my firs
On 05/23/2013 04:52 PM, Terry Jan Reedy wrote:
On 5/23/2013 2:52 PM, Matthew Gilson wrote:
This is a question regarding the documentation around dictionary
unpacking. The documentation for the call syntax
(http://docs.python.org/3/reference/expressions.html#grammar-token-call)
says:
"If the s
On 05/23/2013 03:20 PM, Neil Cerutti wrote:
On 2013-05-23, Matthew Gilson wrote:
That's fine, but what is a keyword argument? According to the glossary
(http://docs.python.org/3.3/glossary.html):
/"keyword argument/: an argument preceded by an identifier (e.g. name=)
in a function call or pa
On 5/23/2013 2:52 PM, Matthew Gilson wrote:
This is a question regarding the documentation around dictionary
unpacking. The documentation for the call syntax
(http://docs.python.org/3/reference/expressions.html#grammar-token-call)
says:
"If the syntax **expression appears in the function call,
I am importing lines from an external csv file and when I iterate through the
lines and increment, new lines are introduced.
How would I cut out the newlines. I have attempted several pythonic strip()
and rstrip() how can i implent this?
import sys, os
f=open('europe_csv')
lines=f.readlines()
On 2013-05-23, Wolfgang Keller wrote:
>> But there's another option that is available to every platform and
>> (practially) every high level language: the web browser. Make your app
>> serve HTTP and do up your UI in HTML5/CSS3 - your facilities are
>> pretty extensive. Plus you get networking sup
On 5/23/2013 2:42 PM, Dave Angel wrote:
On 05/23/2013 11:26 AM, Carlos Nepomuceno wrote:
eggs(a,f)
Traceback (most recent call last):
File "", line 1, in
eggs(a,f)
File "", line 1, in eggs
def eggs(spam, ham): return spam % ham
TypeError: not all arguments converted during string formattin
On 5/23/2013 9:58 AM, Kihup Boo wrote:
I am trying to make an HTTPS connection and read that HTTPS support is
only available if the socket module was compiled with SSL support.
_http://www.jython.org/docs/library/httplib.html_
Can someone elaborate on this? Where can I get the socket module for
On Thu, May 23, 2013 at 12:52 PM, Matthew Gilson wrote:
> Using Cpython, we can do the following:
>
> def func(**kwargs):
> print kwargs
>
> d = {'foo bar baz':3}
>
> So that might lead us to believe that the keys of the mapping do not need to
> be valid identifiers. However,
On Thu, 23 May 2013 07:17:58 -0700, Keira Wilson wrote:
> Dear all who involved with responding to my question - Thank you so much
> for your nice code which really helped me.
Hold on a sec? Someone posted code that gave the correct answer to a
homework question?
--
Denis McMahon, denismfmcma.
On 05/23/2013 12:20 PM, Neil Cerutti wrote:
On 2013-05-23, Matthew Gilson wrote:
That's fine, but what is a keyword argument? According to the glossary
(http://docs.python.org/3.3/glossary.html):
/"keyword argument/: an argument preceded by an identifier (e.g. name=)
in a function call or pa
On 5/23/2013 2:58 AM, Ulrich Eckhardt wrote:
Well, per PEP 8, classes use CamelCaps, so your naming might break
automatic test discovery. Then, there might be another thing that could
cause this, and that is that if you have an intermediate class derived
from unittest.TestCase, that class on its
On 2013-05-23, Matthew Gilson wrote:
> That's fine, but what is a keyword argument? According to the glossary
> (http://docs.python.org/3.3/glossary.html):
>
> /"keyword argument/: an argument preceded by an identifier (e.g. name=)
> in a function call or passed as a value in a dictionary prece
On 23/05/2013 19:19, Andrew Edwards-Adams wrote:
On Thursday, May 23, 2013 7:11:28 PM UTC+1, Andrew Berg wrote:
On 2013.05.23 11:58, Andrew Edwards-Adams wrote:
Hi thanks for the reply Andrew, my first bit of code was heading in the right
direction I was managing to pull out the usernames fro
This is a question regarding the documentation around dictionary
unpacking. The documentation for the call syntax
(http://docs.python.org/3/reference/expressions.html#grammar-token-call)
says:
"If the syntax **expression appears in the function call, expression
must evaluate to a mapping, th
On 05/23/2013 11:26 AM, Carlos Nepomuceno wrote:
Date: Thu, 23 May 2013 06:44:05 -0700
Subject: Re: PEP 378: Format Specifier for Thousands Separator
From: prueba...@latinmail.com
To: python-list@python.org
[...]
You left out the part where a and f are
On 05/23/2013 09:09 AM, Roy Smith wrote:
nosetests --process-timeout=60 --processes=40 test_api.py
Do you have a 40-processor system? And do you have enough RAM to run
all of those processes?
--
DaveA
--
http://mail.python.org/mailman/listinfo/python-list
On Thursday, May 23, 2013 7:11:28 PM UTC+1, Andrew Berg wrote:
> On 2013.05.23 11:58, Andrew Edwards-Adams wrote:
>
> > Hi thanks for the reply Andrew, my first bit of code was heading in the
> > right direction I was managing to pull out the usernames from the JSON,
> > using REGEX.
>
> It's a
On 2013.05.23 11:58, Andrew Edwards-Adams wrote:
> Hi thanks for the reply Andrew, my first bit of code was heading in the right
> direction I was managing to pull out the usernames from the JSON, using REGEX.
It's also worth mentioning that regexes are almost always the wrong tool,
especially fo
On 2013.05.23 11:58, Andrew Edwards-Adams wrote:
> If there was a trackback/debug I might know where to look, but its not
> yielding errors, its simply yielding nothing. What i dont know, is if it is
> the code that isnt working, or what I am inputting in the " print
> text1['rows'][0]['id']" th
Yeah that is the case. Once I change the f = opener.open('website') line to a
link that has a https I get that socket error. Nothing else changes. I was
reading online and came across this site which shows you how if the version of
python installed supports ssl.
http://morlockhq.blogspot.ca/20
On Thu, May 23, 2013 at 9:41 AM, duncan smith wrote:
>
> RBT is quicker than Treap for insertion with randomized data, but slower
> with ordered data. Randomized data will tend to minimize the number of tree
> rotations needed to keep the RBT balanced, whilst the Treap will be
> performing rotatio
On Thursday, May 23, 2013 5:40:49 PM UTC+1, Andrew Berg wrote:
> On 2013.05.23 11:09, Andrew Edwards-Adams wrote:
>
> > I was recommended to use the following code to access the Json data
> > directly, however I cannot get it to return anything.
>
> Where exactly is the problem? Do you not get J
On 23/05/2013 17:09, Andrew Edwards-Adams wrote:
Hey guys
I think its worth stating that I have been trying to code for 1 week.
I am trying to access some Json data. My innitial code was the below:
"import mechanize
import urllib
import re
def getData():
post_url =
"http://www.tweetnaps.c
On 23/05/13 04:31, Dan Stromberg wrote:
What kind of ordered dictionaries? Sorted by key.
I've redone the previous comparison, this time with a better red-black
tree implementation courtesy of Duncan G. Smith.
The comparison is at
http://stromberg.dnsalias.org/~strombrg/python-tree-and-heap-c
On 2013.05.23 11:09, Andrew Edwards-Adams wrote:
> I was recommended to use the following code to access the Json data directly,
> however I cannot get it to return anything.
Where exactly is the problem? Do you not get JSON back? Do you get the wrong
values? Do you get a KeyError or IndexError t
Hello!
I'm using pulp for linear optimization but when I run my code I get the
following output:
Central Optimization:
MAXIMIZE
0*__dummy + 0
SUBJECT TO
_C1: 2 T0 >= 0
_C2: 2 T0 <= 0
_C3: 0.0686928673545 Frigorifico0 >= 0
_C4: 0.0686928673545 Frigorifico0 <= 0
_C5: 2 Termo0 >= 0
_C6: 2 Ter
On Fri, May 24, 2013 at 2:12 AM, wrote:
> I only have the http of the proxy. I guess I could find out the ip of it.
> However, even if I use the http proxy address, why would it work for a http
> site and not a https site if its the proxy that can't resolve.
Can you post working code for HTTP
I only have the http of the proxy. I guess I could find out the ip of it.
However, even if I use the http proxy address, why would it work for a http
site and not a https site if its the proxy that can't resolve.
--
http://mail.python.org/mailman/listinfo/python-list
Hey guys
I think its worth stating that I have been trying to code for 1 week.
I am trying to access some Json data. My innitial code was the below:
"import mechanize
import urllib
import re
def getData():
post_url =
"http://www.tweetnaps.co.uk/leaderboards/leaderboard_json/all_time";
On Fri, May 24, 2013 at 1:41 AM, Wolfgang Keller wrote:
>> But there's another option that is available to every platform and
>> (practially) every high level language: the web browser. Make your app
>> serve HTTP and do up your UI in HTML5/CSS3 - your facilities are
>> pretty extensive. Plus you
On Fri, May 24, 2013 at 1:48 AM, wrote:
> I am trying to write a program that requires me hitting a https web link.
> However, I can't seem to get it to work. The program works fine when dealing
> with http sites, however, when I try it with a https site I get
>
> socket.gaierror: [Errno 11001]
I am trying to write a program that requires me hitting a https web link.
However, I can't seem to get it to work. The program works fine when dealing
with http sites, however, when I try it with a https site I get
socket.gaierror: [Errno 11001] getaddrinfo failed
It seems like it has something
> But there's another option that is available to every platform and
> (practially) every high level language: the web browser. Make your app
> serve HTTP and do up your UI in HTML5/CSS3 - your facilities are
> pretty extensive. Plus you get networking support for free! Obviously
> this option isn'
> Date: Thu, 23 May 2013 06:44:05 -0700
> Subject: Re: PEP 378: Format Specifier for Thousands Separator
> From: prueba...@latinmail.com
> To: python-list@python.org
[...]
eggs(a,f)
> Traceback (most recent call last):
> File "", line 1, in
> eggs(a,f)
Dear all who involved with responding to my question - Thank you so much for
your nice code which really helped me.
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, May 23, 2013 at 11:58 PM, Kihup Boo wrote:
> I am trying to make an HTTPS connection and read that HTTPS support is only
> available if the socket module was compiled with SSL support.
>
> http://www.jython.org/docs/library/httplib.html
>
> Can someone elaborate on this? Where can I get th
I am trying to make an HTTPS connection and read that HTTPS support is only
available if the socket module was compiled with SSL support.
http://www.jython.org/docs/library/httplib.html
Can someone elaborate on this? Where can I get the socket module for HTTPS,
or how do I build one if I have to
On May 22, 6:31 pm, Carlos Nepomuceno
wrote:
>
>
> > Date: Wed, 22 May 2013 13:26:23 -0700
> > Subject: Re: PEP 378: Format Specifier for Thousands Separator
> > From: prueba...@latinmail.com
> > To: python-l...@python.org
> [...]
>
> > Maybe a cformat(form
I've got a suite of about 150 tests written using unittest. It takes
5-10 minutes to run, so I'd really like to use nose to run things in
parallel. The problem is, when I do that, I get lots of test failures.
Obviously, we've got some kind of inter-test dependency that I haven't
been able to
In article ,
Ulrich Eckhardt wrote:
> if you have an intermediate class derived
> from unittest.TestCase, that class on its own will be considered as test
> case! If this is not what you want but you still want common
> functionality in a baseclass, create a mixin and then derive from both
>
On Thu, May 23, 2013 at 10:28 PM, Neil Cerutti wrote:
> On 2013-05-22, Tim Chase wrote:
>> On 2013-05-22 01:15, i...@databaseprograms.biz wrote:
>>> A computer programmer, web developer and network administrator
>>
>> ...walk into a bar...
>>
>> So what's the punchline?
>
> "Ow." Get it? "Ow."
B
On 2013-05-22, Tim Chase wrote:
> On 2013-05-22 01:15, i...@databaseprograms.biz wrote:
>> A computer programmer, web developer and network administrator
>
> ...walk into a bar...
>
> So what's the punchline?
"Ow." Get it? "Ow."
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python
On 05/23/2013 07:30 AM, lokeshkopp...@gmail.com wrote:
i need to get 32 bit binary equivalent of a decimal and need to change the 0's
to 1's and 1's to 0's
For Example
if the input is 2
Output should be:
the 32bit equivalent of 2 : 0010
and the 1's compliment is
On Thu, May 23, 2013 at 8:25 PM, wrote:
> ok Peter Otten,
> but how to make a Class global??
He gave some examples. It'd be helpful to quote some of his post, for
context... and preferably, show some proof that you've understood it.
You're starting a number of threads that look like you're tryi
On 20 mai, 19:56, Christian Gollwitzer wrote:
> Oops, I thought we were posting to comp.dsp. Nevertheless, I think
> numpy.fft does mixed-radix (can't check it now)
>
> Am 20.05.13 19:50, schrieb Christian Gollwitzer:
>
>
>
>
>
>
>
> > Am 20.05.13 19:23, schrieb jmfauth:
> >> Non sense.
>
> > Dito
On Thu, May 23, 2013 at 9:30 PM, wrote:
> i need to get 32 bit binary equivalent of a decimal and need to change the
> 0's to 1's and 1's to 0's
> For Example
> if the input is 2
> Output should be:
> the 32bit equivalent of 2 : 0010
> and the 1's compliment is:
On Thu, May 23, 2013 at 10:37 AM, Carlos Nepomuceno
wrote:
>
>> From: oscar.j.benja...@gmail.com
>> Date: Thu, 23 May 2013 01:34:37 +0100
>> Subject: Re: file I/O and arithmetic calculation
>> To: carlosnepomuc...@outlook.com
>> CC: python-list@python.org
>
i need to get 32 bit binary equivalent of a decimal and need to change the 0's
to 1's and 1's to 0's
For Example
if the input is 2
Output should be:
the 32bit equivalent of 2 : 0010
and the 1's compliment is: 1101
is there any
On 05/23/13 13:37, Schneider wrote:
Hi list,
how can I serialize a python class to XML? Plus a way to get the class
back from the XML?
My aim is to store instances of this class in a database.
Hi,
I'm working on a project called Spyne (http://spyne.io). With one object
definition, you can
Hi list,
how can I serialize a python class to XML? Plus a way to get the class
back from the XML?
My aim is to store instances of this class in a database.
bg,
Johannes
--
GLOBE Development GmbH
Königsberger Strasse 260
48157 MünsterGLOBE Development GmbH
Königsberger Strasse 260
48157 Müns
On 23 May 2013 04:15, Carlos Nepomuceno wrote:
> The last line of my noob piece can be improved. So this is it:
Most of it can be improved.
> filenames = ['1.txt', '2.txt', '3.txt', '4.txt', '5.txt']
> contents = [[[int(z) for z in y.split(',')] for y in open(x).read().split()]
> for x in file
ok Peter Otten,
but how to make a Class global??
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, May 23, 2013 at 8:23 PM, wrote:
> Thanks Chris Angelico,
> i am new to python can you suggest me how to remove the error and solve it.
> so,how can i create an instance for "Node" in that function??,is, it not
> possible to create an instance in such a way?
The problem isn't the instan
Thanks Chris Angelico,
i am new to python can you suggest me how to remove the error and solve it.
so,how can i create an instance for "Node" in that function??,is, it not
possible to create an instance in such a way?
--
http://mail.python.org/mailman/listinfo/python-list
lokeshkopp...@gmail.com wrote:
> i had written the following code i am unable to create the instance of the
> class "Node" in the method "number_to_LinkedList" can any one help me how
> to do ?? and what is the error??
>
>
> class Node:
> def __init__(self, value=None):
> self.valu
On Thu, May 23, 2013 at 7:51 PM, wrote:
> i had written the following code i am unable to create the instance of the
> class "Node" in the method "number_to_LinkedList" can any one help me how to
> do ??
> and what is the error??
It would really help if you post the actual exception and traceb
On Thu, May 23, 2013 at 7:54 PM, wrote:
> Can anyone give me an idea of how to find the 2's Complement in python with
> an example
Do you know what two's complement is? (Not to be confused with two's
compliment, which is when numbers start telling you how clever you
are.) If not, you should pro
Dan Stromberg gmail.com> writes:
>
> What kind of ordered dictionaries? Sorted by key.
Calling them "sorted dictionaries" avoids any confusions with Python's
standard OrderedDict class:
http://docs.python.org/3.3/library/collections.html#ordereddict-objects
Regards
Antoine.
--
http://mail.
Can anyone give me an idea of how to find the 2's Complement in python with an
example
--
http://mail.python.org/mailman/listinfo/python-list
i had written the following code i am unable to create the instance of the
class "Node" in the method "number_to_LinkedList" can any one help me how to do
??
and what is the error??
class Node:
def __init__(self, value=None):
self.value = value
self.next = None
def numb
Thank you very much, Peter!
It works!
On Thu, May 23, 2013 at 9:32 AM, Peter Otten <__pete...@web.de> wrote:
> Alex Naumov wrote:
>
> > I'm trying to call new process with some parameters. The problem is that
> > the last parameter is a "string" that has a lot of spaces and different
> > symbols
It would be way more practical to have an embedded browser. Appjs doesn't
even occupy a port on the client. We could totally benefit from that.
Django applications practically make themselves.
On 23 May 2013 08:02, "Carlos Nepomuceno"
wrote:
> You don't! If your app needs local content just use a
Alex Naumov wrote:
> I'm trying to call new process with some parameters. The problem is that
> the last parameter is a "string" that has a lot of spaces and different
> symbols like slash and so on. I can save it in file and use name of this
> file as parameter, but my question is: how to make it
On Thu, May 23, 2013 at 5:11 PM, Terry Jan Reedy wrote:
> On 5/23/2013 12:47 AM, Steven D'Aprano wrote:
>>
>> On Wed, 22 May 2013 22:31:04 +, Alister wrote:
>>
>>> Please write out 1000 time (without using any form of loop)
>>>
>>> "NEVER use input in python <3.0 it is EVIL"*
>
>
>> But all jo
Hello,
I'm trying to call new process with some parameters. The problem is that
the last parameter is a "string" that has a lot of spaces and different
symbols like slash and so on. I can save it in file and use name of this
file as parameter, but my question is: how to make it without additiona
Am 22.05.2013 17:32, schrieb Charles Smith:
I'd like to subclass from unittest.TestCase. I observed something
interesting and wonder if anyone can explain what's going on... some
subclasses create null tests.
I can perhaps guess what's going on, though Terry is right: Your
question isn't ver
On 5/23/2013 12:47 AM, Steven D'Aprano wrote:
On Wed, 22 May 2013 22:31:04 +, Alister wrote:
Please write out 1000 time (without using any form of loop)
"NEVER use input in python <3.0 it is EVIL"*
But all joking aside, eval is dangerous, yes, but it is not "evil".
He put that label o
On Thu, May 23, 2013 at 4:58 PM, Carlos Nepomuceno
wrote:
> You don't! If your app needs local content just use a regular open() (or your
> browser) to read the files and render them as you see fit.
>
> For remote content you just need the 'urllib2' module or something like
> 'requests' module t
You don't! If your app needs local content just use a regular open() (or your
browser) to read the files and render them as you see fit.
For remote content you just need the 'urllib2' module or something like
'requests' module to get the data.
> Date: We
87 matches
Mail list logo