On Sat, May 25, 2013 at 4:38 PM, zoom wrote:
> But why would anyone want to use IPv6?
I hope you're not serious :)
ChrisA
--
http://mail.python.org/mailman/listinfo/python-list
But why would anyone want to use IPv6?
On 05/25/2013 05:48 AM, Chris Angelico wrote:
On Sat, May 25, 2013 at 1:35 PM, Roy Smith wrote:
"Python 3 vs. IPv6: who will win the race for early adoption?"
I think Py3 is winning that one so far. But really, both need to get
moving. Neither of my ISP
On Sat, May 25, 2013 at 4:05 PM, wrote:
> ya steven i had done the similar logic but thats not satisfying my professor
> he had given the following constrains
> 1. No in-built functions should be used
> 2. we are expecting a O(n) solution
> 3. Don't use count method
And now you finally admit
On Saturday, May 25, 2013 11:27:38 AM UTC+5:30, Steven D'Aprano wrote:
> On Fri, 24 May 2013 22:39:06 -0700, lokeshkoppaka wrote:
>
>
>
> > On Saturday, May 25, 2013 10:54:01 AM UTC+5:30, Chris Angelico wrote:
>
>
>
> >> In that case, you're not really ordering them, you're counting them.
>
avazqu...@grm.uci.cu writes:
> 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-pac
On Fri, 24 May 2013 22:39:06 -0700, lokeshkoppaka wrote:
> On Saturday, May 25, 2013 10:54:01 AM UTC+5:30, Chris Angelico wrote:
>> In that case, you're not really ordering them, you're counting them.
>> Look at the collections module; you can very easily figure out how
>> many of each there are,
Schneider writes:
> 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.
In case you want to describe the XML data via an XML-schema
(e.g. to exchange it with other applications; maybe via
WebSer
On May 25, 10:15 am, lokeshkopp...@gmail.com wrote:
> On Friday, May 24, 2013 1:34:51 PM UTC+5:30, lokesh...@gmail.com wrote:
> > i need to write a code which can sort the list in order of 'n' without use
> > builtin functions
>
> > can anyone help me how to do?
>
> Note:
> the list only contains
On Sat, May 25, 2013 at 3:39 PM, wrote:
> On Saturday, May 25, 2013 10:54:01 AM UTC+5:30, Chris Angelico wrote:
>> On Sat, May 25, 2013 at 3:15 PM, wrote:
>>
>> > On Friday, May 24, 2013 1:34:51 PM UTC+5:30, lokesh...@gmail.com wrote:
>>
>> >> i need to write a code which can sort the list in o
On Saturday, May 25, 2013 10:54:01 AM UTC+5:30, Chris Angelico wrote:
> On Sat, May 25, 2013 at 3:15 PM, wrote:
>
> > On Friday, May 24, 2013 1:34:51 PM UTC+5:30, lokesh...@gmail.com wrote:
>
> >> i need to write a code which can sort the list in order of 'n' without use
> >> builtin functions
* DRJ Reddy [2013-05-25 05:26]:
> Planning to start a python online chronicle.What you want to see in it. :)
- idiomatic python (common mistakes; do it 'pythonically')
- interviews
- challenge of the week (how would you solve that?)
- python for kids
- scientific python news
- new python-books
-
On Sat, May 25, 2013 at 3:15 PM, wrote:
> On Friday, May 24, 2013 1:34:51 PM UTC+5:30, lokesh...@gmail.com wrote:
>> i need to write a code which can sort the list in order of 'n' without use
>> builtin functions
>>
>> can anyone help me how to do?
>
> Note:
> the list only contains 0's,1's,2's
On Friday, May 24, 2013 1:34:51 PM UTC+5:30, lokesh...@gmail.com wrote:
> i need to write a code which can sort the list in order of 'n' without use
> builtin functions
>
> can anyone help me how to do?
Note:
the list only contains 0's,1's,2's
need to sort them in order of 'n'
--
http://mail.
On Sat, May 25, 2013 at 2:22 PM, Carlos Nepomuceno
wrote:
> Also, comparison of Python flavors (CPython, PyPy, Cython, Stackles, etc.) --
> How do they differ? What's the benefits and hindrances?
Good point. Could go even more general than that: Just highlight some
lesser-known Python and show i
> Date: Fri, 24 May 2013 21:10:02 -0700
> Subject: Re: Python Magazine
> From: rama29...@gmail.com
> To: python-list@python.org
>
> On Saturday, May 25, 2013 9:13:56 AM UTC+5:30, Carlos Nepomuceno wrote:
>> In-depth articles about Python! Like security anali
This is what i love with python community faster responses. :)
--
http://mail.python.org/mailman/listinfo/python-list
On Saturday, May 25, 2013 9:13:56 AM UTC+5:30, Carlos Nepomuceno wrote:
> In-depth articles about Python! Like security analisys of modules, packages,
> frameworks, everything Python related.
>
> Performance benchmarks. How a Python technology/solution compares to other
> competitor technologies
Oh great! Thank you!
> Date: Fri, 24 May 2013 21:06:05 -0700
> Subject: Re: Source code as text/plain
> From: c...@rebertia.com
> To: carlosnepomuc...@outlook.com
> CC: python-list@python.org
>
>
> On May 24, 2013 9:02 PM, "Carlos Nepomuceno"
> mailto:ca
On May 24, 2013 9:02 PM, "Carlos Nepomuceno"
wrote:
>
> I'd like to have the option to download the source code as text/plain
from the docs.python.org pages.
>
> For example: when I'm a docs page, such as:
>
> http://docs.python.org/2/library/string.html
>
> and I click the source code link I'm ta
I'd like to have the option to download the source code as text/plain from the
docs.python.org pages.
For example: when I'm a docs page, such as:
http://docs.python.org/2/library/string.html
and I click the source code link I'm taken to a Mercurial page:
http://hg.python.org/cpython/file/2.7/L
> Here are two lines from the CSV file:
> ,,172.20.{0}.0/27,172.20.{0}.32/27,172.20.{0}.64/27,29,172.20.{0}.96/27172.21.{0}.0/27,172.21.{0}.32/27,172.21.{0}.64/27,29,172.21.{0}.96/27
> GW:,,172.20.{0}.1,172.20.{0}.33,172.20.{0}.65,,172.20.{0}.97,,GW:,,172.21.{0}.1,172.21.{0}.33,172.21.{0}.65,,1
On Sat, May 25, 2013 at 1:35 PM, Roy Smith wrote:
> "Python 3 vs. IPv6: who will win the race for early adoption?"
I think Py3 is winning that one so far. But really, both need to get
moving. Neither of my ISPs does IPv6 :(
Seconding the recommendation for QOTW, that's good fun.
ChrisA
--
http
In-depth articles about Python! Like security analisys of modules, packages,
frameworks, everything Python related.
Performance benchmarks. How a Python technology/solution compares to other
competitor technologies.
Python competitions/contests/challenges!
On Saturday, May 25, 2013 9:08:28 AM UTC+5:30, zipher wrote:
> I always liked the daily Python-URL from Dr. Dobbs.
> quote of the week
Thanks zipher we have already planned to continue Python-URL and quote of the
week.
We will plan for other things that you have mentioned.
Thanks again :)
--
> Issue 1:
> "Whitespace as syntax: mistake or magic?"
Thanks Roy :)
--
http://mail.python.org/mailman/listinfo/python-list
In article <27969350-4dd8-4afa-881a-b4a2364b3...@googlegroups.com>,
DRJ Reddy wrote:
> Planning to start a python online chronicle.What you want to see in it. :)
Issue 1:
"Whitespace as syntax: mistake or magic?"
"Python 3 vs. IPv6: who will win the race for early adoption?"
"Did Python 3 br
I always liked the daily Python-URL from Dr. Dobbs.
Summaries of salient discussions on python-dev, ideas, list.
interviews with devs on philosophies.
quote of the week
--m
On 5/24/13, DRJ Reddy wrote:
> Planning to start a python online chronicle.What you want to see in it. :)
> --
> http://
On 05/24/2013 03:53 PM, Thomas Murphy wrote:
Here's where I got to:
raw_address = "cookielover93 TheGermanHatesSaurkraut WhatsThatBoy932834"
address_library = [raw_address.split()]
print address_library
for address in address_library:
final_address = "@" + str(address)
print final_addr
Planning to start a python online chronicle.What you want to see in it. :)
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, May 25, 2013 at 3:32 AM, wrote:
> http://i.imgur.com/KgvSKWk.jpg
>
> What this is is a publicly-accessible webpage...
If that's a screenshot of something that we'd be able to access
directly, then why not just post a link to the actual thing? More
likely I'm thinking it's NOT publicly ac
In article ,
Roy Smith wrote:
> We've got a package (with an empty __init__.py), which contains a
> setup.py file. When I run nosetests, the test discovery code finds
> setup.py, thinks it's a test, and tries to run it (with predictably poor
> results).
Ugh, I described that wrong. Setup i
We've got a package (with an empty __init__.py), which contains a
setup.py file. When I run nosetests, the test discovery code finds
setup.py, thinks it's a test, and tries to run it (with predictably poor
results).
Is there some way to mark this file as not a test? If it was a method in
a fi
In article ,
Roy Smith wrote:
> Is there some way to make nose print a report of how it partitioned the
> tests across the various processes?
I never found such a feature, but I did figure out a way to do what I
needed. We use a system of unique id's to track HTTP requests through
our syste
In article ,
Carlos Nepomuceno wrote:
> Is python.org powered by CPython?
Like many websites, the python.org domain consists of a number of
subdomains with several different webservers on various hosts. AFAIK,
the main www.python.org server is currently all (or mainly) static
content served
Is python.org powered by CPython?
Is it using WSGI?
What Python version is been used?
I already checked it's using Apache. Is it using mod_wsgi?
Thanks in advance.
--
http://mail.python.org/mailman/listinfo/python-list
On 05/24/2013 07:36 PM, Carlos Nepomuceno wrote:
page = urllib2.urlopen("http://example.com/page.html";).read().strip()
#to create the tables list
tables=[[re.findall('(.*?)',r,re.S) for r in re.findall('(.*?)',t,re.S)]
for t in re.findall('(.*?)',page,re.S)]
Pretty simple. Good luck!
Can you give an example of the code you have?
> From: jcas...@activenetwerx.com
> To: python-list@python.org
> Subject: Ldap module and base64 oncoding
> Date: Fri, 24 May 2013 21:00:01 +
>
> I have some data I am working with that is not being interpre
You probably need 'valgrind-devel' package installed.
> Date: Fri, 24 May 2013 20:59:22 -0400
> Subject: Why won't Python 2/3 compile when I have valgrind installed?
> From: yoursurrogate...@gmail.com
> To: python-list@python.org
>
> This isn't a huge issue,
This isn't a huge issue, but I'm wondering. I'm running
Mac OS X, I tried to configure with --with-valgrind and
this is the error that I got:
configure: error: Valgrind support requested but headers not available
Now, I have valgrind installed, so it should work, yes?
If someone has any extra in
> Date: Fri, 24 May 2013 17:11:18 -0700
> Subject: Re: Survey of Python-in-browser technologies
> From: drsali...@gmail.com
> To: carlosnepomuc...@outlook.com
> CC: python-list@python.org
>
>
> Security is an important topic... but I'm not sure how I could
On May 24, 11:33 pm, Carlos Nepomuceno
wrote:
>
>
>
>
>
>
>
>
>
>
> > Date: Fri, 24 May 2013 12:01:35 -0700
> > Subject: Re: Simple algorithm question - how to reorder a sequence
> > economically
> > From: peter.h.m.bro...@gmail.com
> > To: python-l...@pyt
Security is an important topic... but I'm not sure how I could gather info
about the security of these implementations. Still, it's an idea worth at
least keeping in the back of my mind.
On Fri, May 24, 2013 at 4:43 PM, Carlos Nepomuceno <
carlosnepomuc...@outlook.com> wrote:
> Thanks Dan! All o
> Which can be tidily written as a list comprehension:
>
> final_address = ['@' + address for address in raw_address.split()]
>
> -tkc
>
>
Ah! Thanks Tim…that tidiness is something I'm trying to head towards
in my own code. I'm trying to transition from the need to visually
write every little ste
Thanks Dan! All of that is relevant but I'm specially concerned about security
issues and think another column for that purpose would improve your database,
although I'm not sure if there's data available or how it would be presented.
> Date: Fri, 24 May 2013 16:
### table_data_extraction.py ###
# Usage: table[id][row][column]
# tables[0] : 1st table
# tables[1][2] : 3rd row of 2nd table
# tables[3][4][5] : cell content of 6th column of 5th row of 4th table
# len(table) : quantity of tables
# len(table[6]) : quantity of rows of 7th table
# l
On 2013-05-24 19:04, Thomas Murphy wrote:
>> raw_address = "cookielover93 TheGermanHatesSaurkraut
>> WhatsThatBoy932834" address_library = raw_address.split()
>> print address_library
>>
>> final_address = []
>> for address in address_library:
>> final_address.append("@" + str(address))
>> prin
On 25/05/2013 00:04, Thomas Murphy wrote:
Maybe this is what you're looking for?
raw_address = "cookielover93 TheGermanHatesSaurkraut WhatsThatBoy932834"
address_library = raw_address.split()
print address_library
final_address = []
for address in address_library:
final_address.append("@"
On 2013.05.24 17:53, Thomas Murphy wrote:
> I know I'm iterating wrong. May I ask how?
.split() already returns a list, so instead of iterating over the list and
getting a single username, you iterate over the list and get a
single list.
--
CPython 3.3.2 | Windows NT 6.2.9200 / FreeBSD 9.1
--
ht
I'm putting together a spreadsheet about Python-in-the-browser technologies
for my local python user group.
I've been hitting the mailing lists for the various implementations
already, but I thought I should run it by people here at least once.
Anyway, here it is:
http://stromberg.dnsalias.org/~
> Maybe this is what you're looking for?
>
> raw_address = "cookielover93 TheGermanHatesSaurkraut WhatsThatBoy932834"
> address_library = raw_address.split()
> print address_library
>
> final_address = []
> for address in address_library:
> final_address.append("@" + str(address))
> print final
On Fri, May 24, 2013 at 3:53 PM, Thomas Murphy
wrote:
> Hi beloved list,
>
> I'm having a dumb and SO doesn't seem to have this one answered. I was
> sent a long list of instagram usernames to tag for a nightlife
> announcement in this format(not real names(i hope))
>
> cookielover93
> TheGermanHa
Hi beloved list,
I'm having a dumb and SO doesn't seem to have this one answered. I was
sent a long list of instagram usernames to tag for a nightlife
announcement in this format(not real names(i hope))
cookielover93
TheGermanHatesSaurkraut
WhatsThatBoy932834
I'd like to turn this raw text into
> Date: Fri, 24 May 2013 12:01:35 -0700
> Subject: Re: Simple algorithm question - how to reorder a sequence
> economically
> From: peter.h.m.bro...@gmail.com
> To: python-list@python.org
>
> On May 24, 5:00 pm, Carlos Nepomuceno
> wrote:
>>
>>
>> I don't
You welcome! Can you send me whatever you decide is best to your case?
I'd like to have an example just in case I have to do that in the future.
I think that approach is gonna become more prevalent in the coming years. ;)
> Date: Fri, 24 May 2013 12:08:03
lol that reminds me of George! lol
;)
> Date: Fri, 24 May 2013 19:28:29 +0200
> From: andiper...@gmail.com
> To: python-list@python.org
> Subject: Re: PEP 378: Format Specifier for Thousands Separator
>
> On 24.05.2013 17:25, Carlos Nepomuceno wrote:
>> ---
I have some data I am working with that is not being interpreted as a string
requiring
base64 encoding when sent to the ldif module for output.
The base64 string parsed is ZGV0XDMzMTB3YmJccGc= and the raw string is
det\3310wbb\pg.
I'll admit my understanding of the handling requirements of non a
On 2013-05-24, RVic wrote:
> Thanks Steven,
>
> Yes, I see Python isn't going to do this very well, from what I
> can understand.
>
> Lets say I have a type of class, and this type of class will
> always have two methods, in() and out().
>
> Here is, essentially, what I am trying to do, but I don'
isn't correct*
On Friday, May 24, 2013 12:58:50 PM UTC-7, Sara Lochtie wrote:
> Hi,
>
>
>
> I'm trying to plot temperature vs. time using Qwt. I have temp data that i
> get in real time and I want to plot against time. So I thought I would have
> to use QwtPlot and QwtPlotCurve, so I did this
Hi,
I'm trying to plot temperature vs. time using Qwt. I have temp data that i get
in real time and I want to plot against time. So I thought I would have to use
QwtPlot and QwtPlotCurve, so I did this first:
self.tempGraph = Qwt.QwtPlot(self)
curve = QwtPlotCurve()
curve.setData(x, temp)
On 05/24/2013 01:32 PM, logan.c.gra...@gmail.com wrote:
Hey guys,
I'm learning Python
Welcome.
and I'm experimenting with different projects -- I like learning by doing. I'm
wondering if you can help me here:
na
What this is is a publicly-accessible webpage
No, it's just a jpeg file, an
On 05/24/2013 12:32 PM, JackM wrote:
So Chris, does this version look better? Changed to inFile to with.
#!/usr/bin/python
import os
import time
# Input, Output, and TimeStamp
logFile = open('/var/www/html/statistics/logs/banList.log','w')
stamp = time.asctime(time.localtime())
# Daily Flush
On 05/24/2013 09:59 AM, sloan...@gmail.com wrote:
http://wiki.python.org/moin/GoogleGroupsPython >
print PE2.format(count)
Thanks for the tip about the CSV module. I did not know about that.
So why aren't you using it? There's not much point in solving "the
newlines pro
Thanks Steven,
Yes, I see Python isn't going to do this very well, from what I can understand.
Lets say I have a type of class, and this type of class will always have two
methods, in() and out().
Here is, essentially, what I am trying to do, but I don't know if this will
make sense to you or
On May 24, 6:13 pm, Carlos Nepomuceno
wrote:
> Not exactly what you want but you may consider Google ACL XML[1].
>
> If there aren't any system integration restrictions you can do what you think
> it's best... for now.
>
> [1]https://developers.google.com/storage/docs/accesscontrol#applyacls
>
Th
On May 24, 6:42 pm, Michael Torrie wrote:
> On 05/24/2013 02:18 AM, Peter Brooks wrote:
>
> > I'm designing a system that should allow different views to different
> > audiences. I understand that I can use application logic to control
> > the access security, but it seems to me that it'd make mor
On May 24, 5:00 pm, Carlos Nepomuceno
wrote:
>
>
> I don't know what "spurious evidence of correlation" is. Can you give a
> mathematical definition?
>
If I run the simulation with the same sequence, then, because event E1
always comes before event E2, somebody might believe that there is a
causa
Am 24.05.13 14:58, schrieb Malte Forkel:
Finding out why a regular expression does not match a given string can
very tedious. I would like to write a utility that identifies the
sub-expression causing the non-match.
Try
http://laurent.riesterer.free.fr/regexp/
it shows the subexpressi
So apparently switching the http to https in the proxyHandler call did the
trick. Thanks for all the help.
--
http://mail.python.org/mailman/listinfo/python-list
On Friday, May 24, 2013 3:52:18 AM UTC-7, Steven D'Aprano wrote:
> On Fri, 24 May 2013 01:14:45 -0700, Peter Brooks wrote:
>
> > That is, for a sequence 1,2,3,4 to produce an arbitrary ordering (eg
> > 2,1,4,3) that is different each time.
>
> You can't *guarantee* that it will be different each
Hey guys,
I'm learning Python and I'm experimenting with different projects -- I like
learning by doing. I'm wondering if you can help me here:
http://i.imgur.com/KgvSKWk.jpg
What this is is a publicly-accessible webpage that's a simple database of
people who have used the website. Ideally wha
On 24.05.2013 17:25, Carlos Nepomuceno wrote:
Date: Thu, 23 May 2013 19:29:14 -0700
Subject: Re: PEP 378: Format Specifier for Thousands Separator
From: dihedral88...@gmail.com
[some typical dihedral stuff]
I'm sorry but I don't understand your question
On Sat, May 25, 2013 at 2:32 AM, JackM wrote:
> So Chris, does this version look better? Changed to inFile to with.
>
Heh, I didn't know you knew about with :) Since you know how to use
it, you probably also know why it's useful. Anyway, the main thing is
to see the exact command that's being exe
On 05/24/2013 02:18 AM, Peter Brooks wrote:
> I'm designing a system that should allow different views to different
> audiences. I understand that I can use application logic to control
> the access security, but it seems to me that it'd make more sense to
> have this documented in the data-stream
So Chris, does this version look better? Changed to inFile to with.
#!/usr/bin/python
import os
import time
# Input, Output, and TimeStamp
logFile = open('/var/www/html/statistics/logs/banList.log','w')
stamp = time.asctime(time.localtime())
# Daily Flush of blockList rules before re-applying
Not exactly what you want but you may consider Google ACL XML[1].
If there aren't any system integration restrictions you can do what you think
it's best... for now.
[1] https://developers.google.com/storage/docs/accesscontrol#applyacls
> Date: Fri, 24
> Date: Thu, 23 May 2013 19:29:14 -0700
> Subject: Re: PEP 378: Format Specifier for Thousands Separator
> From: dihedral88...@gmail.com
[...]
> Could a separate instance like the I/O device of a subprocess
> to be easily available in Python?
>
> The next qu
> Date: Fri, 24 May 2013 01:14:45 -0700
> Subject: Simple algorithm question - how to reorder a sequence economically
> From: peter.h.m.bro...@gmail.com
> To: python-list@python.org
>
> What is the easiest way to reorder a sequence pseudo-randomly?
>
> That
On 24/05/13 10:11, Chris Angelico wrote:
On Fri, May 24, 2013 at 6:47 PM, Fábio Santos wrote:
On 24 May 2013 09:41, "Chris Angelico" wrote:
On Fri, May 24, 2013 at 6:14 PM, Peter Brooks
wrote:
What is the easiest way to reorder a sequence pseudo-randomly?
That is, for a sequence 1,2,3,4
On May 24, 5:58 pm, Malte Forkel wrote:
> Finding out why a regular expression does not match a given string can
> very tedious. I would like to write a utility that identifies the
> sub-expression causing the non-match. My idea is to use a parser to
> create a tree representing the complete regul
Hi everybody,
I am new to the group (and relatively new to Python)
so I am sorry if this issues has been discussed (although searching for topics
in the group I couldn't find a solution to my problem).
I am using Python 2.7.3 to analyse the output of two 3rd parties programs that
can be launche
On Thursday, May 23, 2013 1:49:02 PM UTC-7, sloa...@gmail.com wrote:
> 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() ho
On 2013-05-24, Roy Smith wrote:
> Of course, most of Python user community are wimps and shy away
> from big hairy regexes [ducking and running].
I prefer the simple, lumbering regular expressions like those in
the original Night of the Regular Expressions. The fast, powerful
ones from programs l
On Fri, 24 May 2013 06:23:14 -0700, Peter Brooks wrote:
> Thanks for the warnings about random numbers too - I hope my lists will
> be short enough for the permutations of the function to be irrelevant. I
> don't need every single sequence to be unique, only that the same
> sequence only occurs o
On May 23, 2:42 pm, Dave Angel wrote:
> 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-
On Fri, May 24, 2013 at 12:44 PM, JackM wrote:
> outPut = os.popen( '/sbin/iptables -A INPUT -s' + ' ' + IP + ' ' +
> '-j REJECT' )
There's so much about this script that's less than Pythonic, but the
one thing I'd really like to see is a log of the exact command being
executed. Replace t
In article ,
Devin Jeanpierre wrote:
> On Fri, May 24, 2013 at 8:58 AM, Malte Forkel wrote:
> > As a first step, I am looking for a parser for Python regular
> > expressions, or a Python regex grammar to create a parser from.
>
> the sre_parse module is undocumented, but very usable.
>
> > Bu
Thank you all for those most helpful suggestions! random.shuffle does
precisely the job that I need quickly. Thank you for introducing me to
itertools, though, I should have remembered APL did this in a symbol
or two and I'm sure that itertools will come in handy in future.
Thanks for the warnings
In article ,
Malte Forkel wrote:
> Finding out why a regular expression does not match a given string can
> very tedious. I would like to write a utility that identifies the
> sub-expression causing the non-match. My idea is to use a parser to
> create a tree representing the complete regular ex
No, there's no need to change your python script, although it can be improved
because as it is it may flush (delete all) iptables rules and let you
vulnerable and don't create the new rules.
All you need to do is enter the commands in the shell and send it's output. The
'iptables' have changed.
On Fri, May 24, 2013 at 8:58 AM, Malte Forkel wrote:
> As a first step, I am looking for a parser for Python regular
> expressions, or a Python regex grammar to create a parser from.
the sre_parse module is undocumented, but very usable.
> But may be my idea is flawed? Or a similar (or better) t
Thanks for answering. Do you mean something like this?
outPut = os.popen('uname -a' '/sbin/iptables -V INPUT -s' + ' ' + IP + '
' + '-j REJECT' )
Sorry but like I said, I have no experience with any of this.
On 5/23/2013 11:10 PM, Carlos Nepomuceno wrote:
Send the output of the following
lol wtf?
If 'n' is the quantity of elements to be sorted there's
no way you can write an algorithm with complexity O(n) for the worst
case not knowing something special about the data.
For example, Quicksort will give you O(n*(log(n)) on average case (O(n^2) in
the worst case).
You gotta be m
Finding out why a regular expression does not match a given string can
very tedious. I would like to write a utility that identifies the
sub-expression causing the non-match. My idea is to use a parser to
create a tree representing the complete regular expression. Then I could
simplify the expressi
On 05/24/2013 04:04 AM, lokeshkopp...@gmail.com wrote:
i need to write a code which can sort the list in order of 'n' without use
builtin functions
can anyone help me how to do?
You could sort, but you couldn't print out the results, so what's the
point? In Python 3.3 at least, print() is a
On Fri, 24 May 2013 04:40:22 -0700, RVic wrote:
> I'm trying to figure out (or find an example) of polymorphism whereby I
> pass a commandline argument (a string) which comports to a class (in
> java, you would say that it comports to a given interface bu I don't
> know if there is such a thing in
On May 24, 2013, at 5:05 AM, Jean-Michel Pichavant wrote:
> - Original Message -
>> 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-proc
I'm trying to figure out (or find an example) of polymorphism whereby I pass a
commandline argument (a string) which comports to a class (in java, you would
say that it comports to a given interface bu I don't know if there is such a
thing in Python) then that class of that name, somehow gets in
On 5/24/2013 6:52 AM, Steven D'Aprano wrote:
On Fri, 24 May 2013 01:14:45 -0700, Peter Brooks wrote:
What is the easiest way to reorder a sequence pseudo-randomly?
import random
random.shuffle(sequence)
The sequence is modified in place, so it must be mutable. Lists are okay,
tuples are not.
On Fri, 24 May 2013 01:14:45 -0700, Peter Brooks wrote:
> What is the easiest way to reorder a sequence pseudo-randomly?
import random
random.shuffle(sequence)
The sequence is modified in place, so it must be mutable. Lists are okay,
tuples are not.
> That is, for a sequence 1,2,3,4 to produ
On 5/24/2013 4:14 AM, Peter Brooks wrote:
What is the easiest way to reorder a sequence pseudo-randomly?
That is, for a sequence 1,2,3,4 to produce an arbitrary ordering (eg
2,1,4,3) that is different each time.
I'm writing a simulation and would like to visit all the nodes in a
different order
1 - 100 of 107 matches
Mail list logo