g in the php:
echo $para;
would become:
echo php_json_encoding_function( para );
and in the python:
para = result.read()
would become:
para = python_json_decoding_function( result.read() )
or possibly even:
para = json.decode( result.read() )
(I don't know the details, I'm tr
e
system to do, what data they expect to input, and what data they expect
to receive as outputs from it. Once you understand this, you may be in a
position to start defining the database schema, and only then are you
ready to think about the code that will put data into, and get it from,
t
requirements are.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
of tools out there that
can be used to reset passwords on various operating systems.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
a json
encoded string.
You might decide that each message is simply going to end with a specific
character or character sequence.
Whatever you choose, you need some way for the receiving application to
distinguish between individual messages in the stream of octets / bytes /
characters that i
(len(a))if(n==0 or a[n-1]!=a[n])])
output = ''.join(b)
If you really want to do it using just 'string' ops:
for i in range(len(input)):
if (i==0):
output=input[0]
elif input[i]!=input[i-1]:
output+=input[i]
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
ch for mysql on the python docs website, or perhaps try
googling "python mysql"?
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
sn't make a lot of sense (you'll be trading cpu in the
client for cpu in the server + network bandwidth and latency).
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
basically impossible
> without actually executing the JS code, which means largely replicating
> the web browser.
Oh, you think he meant scrape? I thought he was trying to scrap (as in
throw away / replace) an old javascript heavy website with something
using python instead.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
idea fast. Or ask your lecturers for advice. Or return
the advance you were paid on this coding job, because you don't seem to
have the skills to do it.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
+)\s+(.*)
The assumption is that it's not necessary to hold your hand through the
whole looping through the input and applying the re to each line, then
reading the captured bits and using them process.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
of a search, and the results of a split. I'm also assuming you're capable
of working out how to use the csv module from the documentation. If
you're not, then either go back and ask your lecturer for help, or tell
your boss to hire a real programmer for his quick and easy coding jo
On Wed, 22 Jan 2014 17:35:22 +, Denis McMahon wrote:
> On Tue, 21 Jan 2014 16:06:56 -0800, Shane Konings wrote:
>> The following is a sample of the data.
> A mechanism using regexes
Just to follow up, using regexes I transformed the sample data that I
believe is as follows
tion a()
Ignore the comment about needing to define the type of file on the first
line on linux, it's a red herring. You only need to do that (and possibly
chmod the file) on a *nix system if you want to execute it directly as a
command, rather than by calling the interpreter on it.
I suspect that if you remove the line:
"def a():"
and un-indent the rest of the text, the program will run just fine.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
author ]
elif scores[ author ] == x:
names.append( [ author ] )
print "the best matching author(s) is/are: ", names
Then all you have to do is find enough ways to calculate stats, and the
magic coefficients to use in the stat_weightings
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
ement at the
level you're trying to observe happens for the most part automatically at
the ip stack / network hardware level.
Do you think this database of which ip maps to which MAC is actually
going to have some human use? If so, what?
Or is this some sort of homework exercise as part of a programming course?
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
en here:
http://www.sined.co.uk/tmp/farms.txt
http://www.sined.co.uk/tmp/farms.csv
http://www.sined.co.uk/tmp/farms.htm
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
t contain a backdoor that sends copies of all the
plaintext to the NSA?
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
roblem, which is probably why the data you expect to be printed isn't
being printed.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
n either language, that value might need adjusting
otherwise.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
paragraph describing what each line of the
program does, you'll be on your way to understanding a few of the
structures, syntaxes and mechanisms of python.
Or you could show it to your lecturer or a TA and say it was suggested
that you ask her or him to work through it with you.
e midnight, and then converting seconds back into hours, minutes and
seconds.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
e
Hence:
discounted_price = list_price - discount_amount
0.6 * list_price = 1.0 * list_price - 0.4 * list_price
so discounted_price = ( 1.0 - 0.4 ) * list_price
where 0.4 is the decimal fraction of the discount
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
"price_per_book == (price_per_book * 1)" so rhs becomes
(price_per_book * 1) - (price_per_book * percent_discount)
and "(a * x) - (a * y)" == "a * (x - y)" so rhs becomes
price_per_book * (1 - percent_discount)
hence:
discounted_price = price_per_book * (1 - percent_discount
ink the while
condition that leads to the function call is ever fulfilled anyway.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
s=3
p=s*2
def b(n,x):
s=[]
while n:
s.append(str(n%x))
n=n/x
if s==[]:
return "0"
return ''.join(s[::-1])
for i in range(s**p):
r=("{:0"+str(p)+"d}").format(int(b(i,s)))
t;>>>
That wasn't obtained from running the code you posted.
Your code *as you posted it* gives:
$ python charlie.py
File "charlie.py", line 4
1 = float(input('First Number:'))
SyntaxError: can't assign to literal
$
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
g from the 0th element, up to and including the element preceding
the first element
Or [m:n] means starting from the mth element, everything up to and
including the element preceding the nth element
Are you sure you got (2,) for [0:1] and not for [2:3]? Are you sure your
initial tuple is what
of software that are not advisable to be developed using Python?
OS Kernels. Hardware drivers.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
) if 'class' in
p.attrs]
Then you can do this
for thing in stuff:
print thing
(Python 2.7)
This may be adaptable to your requirement.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
point (given by lat and lon) at that time.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
u define a string? Is it just a line with the spaces removed?
>>> "".join("this is a teststring my friends".split(" "))
'thisisateststringmyfriends'
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
name (first and last), student number, and mark out of 100
for each student;
4. Uses regular expressions or similar mechanisms to ensure the data
appears valid.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
nd secondly there's no mechanism in json that
tells you what class of object you have.
So you may have a __json_dumps__ that will dump your object out to a json
string representation, but then how does json.loads recognise that it's
loading your object to call your object's
return 'hammer'
if match == 'cat':
return 'dog'
if match == 'tree':
return 'fence'
return match
with open("input.txt","r") as inf, open("output.txt","w") as ouf:
line = inf.readline()
line = patt.sub(replfunc, line)
ouf.write(line)
(also not tested)
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
ts" or "license" for more information.
>>> tup = [1,2,3],[4,5,6]
>>> tup
([1, 2, 3], [4, 5, 6])
>>> tup[1]
[4, 5, 6]
>>> tup[1] += [7,8,9]
Traceback (most recent call last):
File "", line 1, in
TypeError: 'tuple' object does not su
On Tue, 01 Dec 2015 16:18:49 -0500, Terry Reedy wrote:
> On 12/1/2015 3:32 PM, Denis McMahon wrote:
>> On Tue, 01 Dec 2015 03:32:31 +, MRAB wrote:
>>
>>> In the case of:
>>>
>>> tup[1] += [6, 7]
>>>
>>> what it
On Tue, 01 Dec 2015 14:44:38 -0600, Ian Kelly wrote:
> On Tue, Dec 1, 2015 at 2:32 PM, Denis McMahon
> wrote:
>> On Tue, 01 Dec 2015 03:32:31 +, MRAB wrote:
>>
>>> In the case of:
>>>
>>> tup[1] += [6, 7]
>>>
>>> what it
ternet search engines because of the
way newsgroups get gated to websites.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, 03 Dec 2015 01:46:44 +0100, Laura Creighton wrote:
> In a message of Wed, 02 Dec 2015 22:51:13 +0000, Denis McMahon writes:
>>On Wed, 02 Dec 2015 11:32:25 -0600, Ian Kelly wrote:
>>
>>> In what way is discussion of a tangential topic feeding the troll?
&g
]
def isgood(item)
for thing in badthings:
if thing in item:
return False
return True
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
e above three line codes are what I guess (I forgot the original
> tutorial
> now). Do you remember there is such a list application?
bb = [ for i in range()]
will create bb as a list of size whatever elements each of which is
eg:
>>> bb = [ ['a'] for i in range(4)]
&g
you'd like to post a short self contained example of the problem
here instead.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
idth*20,height*20), Image.ANTIALIAS)
This appears to attempt to extrapolate 400 pixels from each pixel in the
original image.
That only works on TV crime dramas, you can't do it in real life.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Wednesday, December 16, 2015 at 6:45:50 PM UTC-6, Rick Johnson wrote:
> On Wednesday, December 16, 2015 at 6:03:55 PM UTC-6, Bruce Whealton wrote:
>
> > Surely, one is going to want to create GUI apps for users
> > that are not Python Developers. I would not think to ask
> > someone to install
variable value to prompt for the next player.
After each player takes a turn, add 1 to the current player. If this is
greater than the number of players, set it back to 1.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
udent on this course, perhaps they are setting exercises for
which they have not previously provided the necessary tuition. If that is
the case, I suggest you ask them to reimburse your course fees, and then
go and find better tutors.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
nd you've
managed to reach line 6194 without going through that block.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
turn statement might help in returning a value.
When you recurse back into a function you still need to return the result
of the recursion.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
ython interpreter on the
machine they wish to execute them on.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
x != ''][0:3] == ['(', '(', '(']:
# string starts '((('
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Wednesday, February 17, 2016 at 1:49:44 PM UTC-6, wrong.a...@gmail.com wrote:
> I am mostly getting positive feedback for Python.
>
> It seems Python is used more for web based applications. Is it equally fine
> for creating stand-alone *.exe's? Can the same code be compiled to run on
> Linux
Note that you can continue using your existing vb6 code from python through COM
using pywin32 or pythonnet, until you decide to rewrite it.
--
https://mail.python.org/mailman/listinfo/python-list
Is it possible to embed CPython in CPython, e.g. using ctypes, cffi, or cython?
--
https://mail.python.org/mailman/listinfo/python-list
Embed using C-API from ctypes, cffi or cython, but not using subprocesses.
Thanks for asking!
Here is link to official documentation about embedding:
https://docs.python.org/3.6/extending/index.html
--
https://mail.python.org/mailman/listinfo/python-list
restriction in CPython?
On Thursday, March 3, 2016 at 2:10:15 AM UTC-6, Christian Gollwitzer wrote:
> Hi Denis,
>
> Am 03.03.16 um 06:01 schrieb Denis Akhiyarov:
> > Is it possible to embed CPython in CPython, e.g. using ctypes, cffi, or
> > cython?
> >
>
> sinc
ne.
As I said above, getting your head round why this is happening is
essential, and I really do suggest that you slow down and try and
understand these basic concepts, because at the moment it seems you are
striving to attempt more and more complicated things without
understanding the basics upon which they are constructed, and like many
other similar newsgroups, it's been my experience in the past that there
is limited tolerance here for people who repeatedly make the same basic
errors without learning from them.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
s:
a) The input you actually gave it isn't the input you thought you gave it
b) You didn't read the description of the function, and it doesn't in
fact do what you thought
c) Both a and b above
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, 22 Oct 2014 19:11:51 -0400, Seymore4Head wrote:
> On Wed, 22 Oct 2014 22:43:14 + (UTC), Denis McMahon
> wrote:
>
>>On Wed, 22 Oct 2014 16:30:37 -0400, Seymore4Head wrote:
>>
>>> def nametonumber(name):
>>> lst=[""]
>>>
On Thu, 23 Oct 2014 10:04:56 -0400, Seymore4Head wrote:
> On Thu, 23 Oct 2014 09:15:16 + (UTC), Denis McMahon
> wrote:
>>Try the following 3 commands at the console:
You obviously didn't, so I'll try again. Try each of the following three
commands in the python conso
code
written for codeskulptor outside of the codeskulptor environment.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
falsey - empty set)
"" (falsey - empty string)
[""] (truthy - non empty set)
[0] (truthy - non empty set)
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
ght that would work in Python 3. It
> didn't.
It does if you enter it properly.
also try:
str(list(range(10)))
Note that that has three "(" and three ")" on the line.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
are "0" and
"1"
To recreate the python2 behaviour in python 3, use:
str(list(range(10)))
which gives
'[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]'
howver the test:
if x.isdigit():
is much better.
But finally, with your telephone number decoder, look at:
http:
On Fri, 24 Oct 2014 10:38:31 -0400, Seymore4Head wrote:
> Thanks everyone for your suggestions.
Try loading the following in codeskulptor:
http://www.codeskulptor.org/#user38_j6kGKgeOMr_0.py
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
iscovering the difference between the python2 and
python3 range() functions, and what happens when you encapsulate them in
string.
I've already posted about this once this evening.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
hat makes it easier to read. I
> changed treating all " -()" With a space.
> I am still thinking about how to treat the large space if it is a digit
> instead:
> 1 800 555
Note that my decoder assumes anything other than a letter can be copied
straight to the output
to the full list of possible
values, so str(list(range(10))) is a string representation of the list
containing the values that the iterable range(10) creates.
Note that whether you're looking at a string representation of a value or
the value itself is a lot clearer in the interpreter console where
s
the numbers yielded by
the iterable a, none of them match because character "8" is not the same
as number 8
When you try and compare a character x eg "8" with the elements of the
list b, none of them match because character "8" is not the same as
number 8
Wh
On Sat, 25 Oct 2014 15:01:54 +, Grant Edwards wrote:
> On 2014-10-24, Denis McMahon wrote:
>> On Fri, 24 Oct 2014 10:38:31 -0400, Seymore4Head wrote:
>>
>>> Thanks everyone for your suggestions.
>>
>> Try loading the following in codeskulpto
> print (b[1])
b[1] is the number 1
> if name[1] == b[1]:
> print ("Eureka!")
This didn't happen
> else:
> print ("OK, I get it")
This happened
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, 26 Oct 2014 17:12:29 -0700, Dan Stromberg wrote:
> Are the following two expressions the same?
>
> x is y
>
> Id(x) == id(y)
No, although if "Id" and "id" were the same function, they might be
equivalent in some cases.
--
Denis McMahon,
at, but I'm not sure from your problem description if that's your
definition of a "most popular name" or not.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
ppend' & do my job (less elegantly though).
Not sure if this is elegant or not:
d = [[list(range(1,13))[i*3+j] for j in range(3)] for i in range(4)]
but it seems to be a one-line solution for what you're trying to do.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, 28 Oct 2014 01:29:28 +, Joshua Landau wrote:
> On 28 October 2014 00:36, Denis McMahon
> wrote:
>>
>> d = [[list(range(1,13))[i*3+j] for j in range(3)] for i in range(4)]
>
> A quick note. Ranges (even 2.7's xrange) are all indexable. The cast to
>
ry common request. Does anyone know why?
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
ing how to code this.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
return int(tmp.group(1))
tmp = patt2.match(x)
if tmp:
return int(tmp.group(1))
return None
a = []
for n in l:
a.append(getTheInt(n))
print a
# end of code
prints:
[1, -1, 0, 2, 2, -2, 0, 3, 3, -3, 0, -4, 4, 0, None, None, None, None,
None, None, None, None, None, None, None]
I know re matching the strings may be overkill, but it may be the best
way of checking that the string contains the expected character format to
convert to an int.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
dth to enforce squareness
upon the square. All the other methods of rectangle will work equally
well for the square.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, 02 Nov 2014 21:32:13 +1100, Tim Delaney wrote:
> On 2 November 2014 20:50, Denis McMahon
> wrote:
>
>> The question (I thought) was to write a class for Square that inherited
>> a class Rectangle but imposed on it the additional constraints of a
>> square ov
On Sun, 02 Nov 2014 11:31:12 -0500, Dennis Lee Bieber wrote:
> On Sun, 2 Nov 2014 12:27:06 + (UTC), Denis McMahon
> declaimed the following:
>
>>On Sun, 02 Nov 2014 21:32:13 +1100, Tim Delaney wrote:
>>> If course, that's probably because rectangles have a m
On Mon, 03 Nov 2014 06:29:39 +, Dan Sommers wrote:
> On Mon, 03 Nov 2014 03:12:32 +0000, Denis McMahon wrote:
>
>> Quadrilateral
>> Parallelogram
>> Square Rectangle Rhombus Diamond (4 sides eq)
>> Trapezoid
>> Arrowhead
>
&g
, you should have had
sufficient instruction in the relevant algorithms and language features
to be able to figure it out yourself.
In either case, what not explain what you tried, what you expected it to
do, and what it actually did.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, 04 Nov 2014 05:53:04 -0800, Fatih Güven wrote:
> Call employee1.name or employee2.salary and assign it to a new variable,
> something etc.
1) Put the file into a database.
2) database calls
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/
assume the first word ends when the letter that started
it is found again.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, 04 Nov 2014 21:30:06 -0500, Dennis Lee Bieber wrote:
> If you have an old system with front-panel toggle switches, you
set the
> switches for binary values, and then push the "enter" switch.
You've booted a PDP-8 then ;)
--
Denis McMahon, denismfmcma..
ord bar dib
python DOLORIUM HELLOL thewordword barbaz dibdibdob
$
I wonder which of these three is actually the algorithm the OP wants.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
uestions without showing the solutions to the
students.
I'm quite proud of a 2 line solution to the third algorithm that I
implemented, although it might be considered as somewhat obfuscated code
by some. ;)
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, 06 Nov 2014 03:36:40 +, Denis McMahon wrote:
> On Wed, 05 Nov 2014 18:49:01 +, MRAB wrote:
>
>> It doesn't work for the final example or "barbaz".
>
> Oh, and we really need a private "python homework answers" list where we
> can d
On Thu, 06 Nov 2014 15:14:05 +1100, Chris Angelico wrote:
> On Thu, Nov 6, 2014 at 3:00 PM, Denis McMahon
> wrote:
>> def baseword(s):
>> """find shortest sequence which repeats to generate s"""
>> return s[0:["".join([s[0:x
self.w.cursor = row, new_col
>
> There's also the different methods index vs rindex.
yes, those fall under point 2 of my earlier post. "something" and
"something else" would be the complete means of calculating the value to
assign to variable.
--
Deni
bit trickier, the best I
came up with was:
while direction and condition_a or (not direction) and condition_b
But I'm sure someone has something better
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
ng software
engineers do need to do, so it sounds as if you'd be better off signing
up with an escort agency.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
thon+http+request
and perhaps
http://www.lmgtfy.com/?q=python+parse+html
Personally I think last time I wanted to do we scraping in python I used
requests and beautifulsoup, but ymmv.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, 11 Nov 2014 01:37:21 -0800, satishmlmlml wrote:
> What does ?s do in the following piece of code?
It tells you to learn about regex.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, 11 Nov 2014 01:18:02 -0800, satishmlmlml wrote:
> What does \1 do in the following piece of code(fourth line)?
It tells you to learn about regex.
http://www.pcre.org/pcre.txt
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, 09 Nov 2014 11:58:49 -0800, Syed Khalid wrote:
> Python script that does batch find and replace in txt files Need a
> python script that opens all .txt files in a folder find replace/delete
> text and save files.
Sounds like you need sed, not python.
--
Denis McMahon, de
method to
create a list of tuples just to split them up into key:value pairs.
However the zip method handles the inequal length list problem. Granted
it would probably be advisable to check that x and y are the same length
before starting anyway.
--
Denis McMahon, denismfmcma...@gmail.com
if the function modifies the object (e.g. by appending
an item to a list), the default value is in effect modified.
[1] ie when the function is 'compiled', not each time it executes.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
y trying to import and what
the complete error messages are. For example, are these imports of code
that you've written yourself, or part of the standard library modules, or
third party modules.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
101 - 200 of 564 matches
Mail list logo