Denis
--
https://mail.python.org/mailman/listinfo/python-list
To: Schachner, Joseph
From: "denis akhiyarov"
To: Schachner, Joseph
From: denis.akhiya...@gmail.com
Either wait for IronPython 3.6, use COM interop, pythonnet, subprocess, or
things like gRPC. Based on PyPy experience, it is probably 1-2 years of
sponsored development to get
To: Schachner, Joseph
From: denis.akhiya...@gmail.com
Either wait for IronPython 3.6, use COM interop, pythonnet, subprocess, or
things like gRPC. Based on PyPy experience, it is probably 1-2 years of
sponsored development to get a working IronPython 3.6.
--- BBBS/Li6 v4.10 Toy-3
* Origin: Pri
Either wait for IronPython 3.6, use COM interop, pythonnet, subprocess, or
things like gRPC. Based on PyPy experience, it is probably 1-2 years of
sponsored development to get a working IronPython 3.6.
--
https://mail.python.org/mailman/listinfo/python-list
On 2018-03-13 23:56, Denis Kasak wrote:
On 2018-03-10 02:13, Steven D'Aprano wrote:
But I've stared at this for an hour and I can't see how to extend the
result to three coordinates. I can lay out a grid in the order I want:
1,1,1 1,1,2 1,1,3 1,1,4 ...
2,1,1 2,1,2
uot;""
n, m = c(i)
return c(n) + (m,)
Applying c3 to the natural numbers gives the sequence you wanted:
s = map(c3, count(1))
pprint([next(s) for _ in range(10)])
[(1, 1, 1),
(2, 1, 1),
(1, 1, 2),
(1, 2, 1),
(2, 1, 2),
(1, 1, 3),
(3, 1, 1),
(1, 2, 2),
(2, 1, 3),
(1, 1, 4)]
--
Denis Kasak
--
https://mail.python.org/mailman/listinfo/python-list
On Sunday, January 29, 2017 at 4:00:27 PM UTC-6, Gregory Ewing wrote:
> Joseph L. Casale wrote:
> >>.NET is a library that can be used from many languages, including Python.
> >
> > No.
>
> Yes:
>
> http://pythonnet.sourceforge.net/
>
> "Python for .NET is a package that gives Python programmer
Have a look at automatic web app builder using Django or Flask called Wooey
based Gooey.
https://github.com/wooey/Wooey
--
https://mail.python.org/mailman/listinfo/python-list
On Sunday, October 2, 2016 at 10:57:57 AM UTC-5, nicolases...@gmail.com wrote:
> >One problem with using very similar syntax for distinct languages is that it
> >can get confusing.
>
> The first inspiration for Fython was to be close to Fortran, while improving
> the syntax. The project is in th
On Saturday, September 3, 2016 at 8:53:18 PM UTC-5, Steve D'Aprano wrote:
> On Sat, 3 Sep 2016 12:34 pm, Denis Akhiyarov wrote:
>
> > Finally if anyone can contact Christian Heimes (Python Core Developer),
> > then please ask him to reply on request to update the license
On Sunday, July 24, 2016 at 11:30:09 PM UTC-5, Steven D'Aprano wrote:
> Yes, I said Pythons plural :-)
>
> For those wanting to use Python on .Net or Mono, there is some good news.
>
> Firstly, the venerable old "Python for .Net" project is still alive, and now
> supports up to Python 3.5 on .Net
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
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
Is it possible to embed CPython in CPython, e.g. using ctypes, cffi, or cython?
--
https://mail.python.org/mailman/listinfo/python-list
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
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
x != ''][0:3] == ['(', '(', '(']:
# string starts '((('
--
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
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
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
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
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
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
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
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
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
]
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
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
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 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
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
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
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
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
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
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
point (given by lat and lon) at that time.
--
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
": 13}
> }
>
> How do you get gengyang's maths scores ?
I refer to my previous answer. Open a web browser and google "python
dictionary"
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
n that
> list and returns Jordan's results i.e. (12) ?
You open a web browser and google for "python dictionary"
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
for anything useful, because it will just use all the
memory up. So perhaps you need to express your question in a better
manner.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
t; ...
> ('', 'who', '', None)
> (' likes ', 'what', '', None)
Or even:
>>> s = "{who} likes {what}"
>>> d = {'who': "Adam", 'what': "ants"}
>>> keys = [
ass_='lister-list'):
for link in item.find_all('a'):
# write link to file
# close file
Alternatively, use the with form:
with open("blah","wb") as text_file:
for item in soup.find_all(class_='lister-list'):
for link in item
for k in keybits:
del row[k]
plotdata[key] = row
This generates a dictionary (plotdata) keyed by the key tuples where the
value for each key is a dictionary of 0:0n : value
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
g about supposed "real names".
TPEL has been trolling html, php and javascript newsgroups for years,
recently he seems to have discovered python newsgroups. :(
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
provide executable tools at the OS level which are more efficient than
anything you will write in a scripting language.
Lesson 1 of computing. Use the right tool for the job. Writing a new
program is not always the right tool.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.or
e, the execution time varies with the size of the datafiles.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
rage of', students, 'scores is', sumscore / students
It was trivial to generate:
Sum of 50 scores is 3028
Average of 50 scores is 60
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
er, I
> can read the messages from there from time to time.
Read more carefully!
The earlier poster suggested options that would work if you set up your
own server, or already had one.
You can poll your gmail server using pop3 as the earlier reply suggested.
You may need to configure some op
er()
for i in range(100):
x = "test *"[-1] == "*"
elapsed = timeit.default_timer() - start_time
print "char compare, true", elapsed
RESULTS:
re, false 2.4701731205
re, true 2.42048001289
compiled re, false 0.875837087631
compiled re, true 0.876382112503
char comp
On Wed, 21 Oct 2015 20:07:21 +, Grant Edwards wrote:
> On 2015-10-21, Denis McMahon wrote:
>> On Wed, 21 Oct 2015 10:31:04 -0700, bigred04bd3 wrote:
>>
>>> So here what I have, I have a 3 IF's within the same level. If one IF
>>> is satisfied, I
if c2:
if c3:
# c1 && c2 && c3
# 4 second open
else:
# c1 && c2
# 3 second open
else:
# only c1
# 2 second open
Each condition only gets evaluated once.
--
Denis McMahon, denismfmcma.
On Sun, 18 Oct 2015 20:38:26 +, Denis McMahon wrote:
> On Sun, 18 Oct 2015 03:17:18 -0700, Beppe wrote:
>
>> hi to everybody, I must turn a tuple of lists into a dictionary.
>
> I went down a different path to Peter, and discovered something
> perplexing:
I just r
7;, 'c', 'd', 'e'], 'i':
['g', 'h'], 'h': ['g', 'i'], 'm': ['l', 'n', 'o'], 'l': ['m', 'n', 'o'],
'o': ['l', 'm', 'n'], 'n': ['l', 'm', 'o']}
The second variant using, m = deepcopy(l).remove(i) fails thus:
{'a': None, 'c': None, 'b': None, 'e': None, 'd': None, 'g': None, 'f':
None, 'i': None, 'h': None, 'm': None, 'l': None, 'o': None, 'n': None}
I'm not sure I understand why after m = deepcopy(l); m.remove(i); m is a
different value to that which it as after m = deepcopy(l).remove(i).
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
e all the permissions needed to write to the directories you're
asking it to put files in?
Did you run the installation process with those permissions?
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
stop or end to exit: ")
print("you entered: ", x)
if x in ["stop","quit","end"]:
stop = True
print("Finished now")
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
t; before you ask questions about it, then that would be even better.
> Knowing what piece of code would also help us to help you. As a starter
> here is a small piece of code.
>
> a = 1
>
> Is that adequate?
If not, perhaps:
b = [c for c in range(20)]
d = {e:b for e in
wand. It should work now. If it still doesn't work, please provide more
details about the problem.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
i]:
if len(row[i]) == 0:
flags[i] = True
else:
blanks = True
if not blanks:
break
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
unB(x, y):
return (x-y)
# this line
# print(funA(4,funB(2,3), funB(3,2)))
# can be written as the following 4 lines:
a = funB(2, 3) # 2 - 3 -> -1
b = funB(3, 2) # 3 - 2 -> 1
c = funA(4, a, b) # (4 + -1) * 1 -> 3
print(c) # 3
--
Denis McMahon, denismfmcma...@gmail.com
--
https
u have given,
I have waved my magic wand. If this didn't work, the information you
supplied was insufficient.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, 30 Sep 2015 23:30:47 +, Denis McMahon wrote:
> On Wed, 30 Sep 2015 11:34:04 -0700, massi_srb wrote:
>
>> firstly the description of my problem. I have a string in the following
>> form: .
>
> The way I solved this was to:
>
> 1) replace all the
(a list because I want to be able to
modify it)
setting d[word][n] = int(num) for each num element (numpatt.match(thing))
with n depending on whether it was the first or second num following the
previous word
then:
d = {x:tuple(d[x]) for x in d}
to convert the lists in the new dic to tuples
= data_tuple
Please don't top post.
What happens if there's more whitespace than you allow for preceding a
'(' or following a ',', or if there's whitespace following '('?
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
) alice tom (1, 4) peter (2) andrew(3,4) janet( 7,6 ) james
( 7 ) mike ( 9 )"
d = {'mike': (9, 0), 'janet': (7, 6), 'james': (7, 0), 'jim': (1, 0),
'andrew': (3, 4), 'alice': (0, 0), 'tom': (1, 4), 'peter': (2,
On Wed, 30 Sep 2015 23:06:13 +0530, Rusiri Jayalath wrote:
> Error code 0x80070570 appears when installing python 3.5.0 (32-bit)
> setup for my windows 8.1 system. Please help me to solve this problem.
This seems to be a windows error, not a python issue. Try google.
--
Denis M
On Tue, 29 Sep 2015 10:16:04 +0530, Laxmikant Chitare wrote:
> Is there any similar elegant way to check if a value is out of certain
> range?
What about:
if not (0 < x < 10):
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
o convert km to miles
def convert_km_mi(km):
return convert_float_a_b(km, 0.6214)
# now call main to kick it all off
main()
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
and the intent of the question you meant to ask, you
might find that the following code does something interesting:
x = 9876543210
y = []
while x > 0:
y.append(x % 10)
x = int(x / 10)
y = list(reversed(y))
print y
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org
essage, it's going to nuke Beijing and Moscow .
(I really really really hope that this is indeed fiction!)
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
t;/a/b.htm", "/a/c.htm"]
page = "\n"
fmt = "var frames=Array({});\n"
page += fmt.format(",".join(map(lambda x:'"'+x+'"', files)))
page += "\n"
print page
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
ut which question leads to which next question.
This way also makes for an interesting talking point about separating
data and code, especially given the multiple if statements issue.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
into a float, and (I think) should leave all others as they are. It
users a helper function and a list comprehension.
>>> def tofloat(x):
... try:
... return float(x)
... except ValueError:
... return None
...
>>> l = [ '300', '"N"', '1140', '"E"' ]
>>> l = [ tofloat(x) or x for x in l ]
>>> l
[300.0, '"N"', 1140.0, '"E"']
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
> Now in the calling function If I use that object to read or write to
> terminal I'm getting ERROR "AttributeError: 'NoneType' object has no
> attribute 'read_very_eager'".
My best guess would be that something failed and has returned None
instead of
esult:
00:16:3e:21:da:a4
00:16:3e:57:be:d2
00:16:3e:6b:e5:ae
00:16:3e:54:0e:f0
00:16:3e:57:5e:50
00:16:3e:21:99:6b
00:16:3e:12:e6:05
00:16:3e:53:02:6d
00:16:3e:79:17:1b
00:16:3e:02:ff:b8
00:16:3e:4e:ff:0d
Observation: No point in declaring mac1 as global in the global scope.
Is it possible that y
x == func()
Would you expect the last two calls to func() to return 999 or "Awesome"?
Why? What is the material difference if any between interpreter (a)
displaying the return value and (b) comparing the return value with
another value.
Debugging nightmare!
--
Denis McMahon, den
= sum(list_a)
print (s)
And if you only want to display the answer:
print (sum(list_a))
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, 09 Sep 2015 20:45:57 +, John Gordon wrote:
> In any case, I saved your code and ran it, and did not get an error.
+1
I think "Execution Succesful!" might be coming from his IDE?
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, 06 Sep 2015 16:09:42 -0700, babi pepek wrote:
> I wand update
update
There, now you have update.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, 06 Sep 2015 23:23:14 +1000, Chris Angelico wrote:
> WSGIScriptAlias / /path/to/scripts/MinstrelHall/mh.wsgi
One wonders if the OP has mod_wsgi installed.
https://code.google.com/p/modwsgi/wiki/WhereToGetHelp might be useful too.
--
Denis McMahon, denismfmcma...@gmail.com
--
ht
expect, you could come back here and post your code with a description of
what you think it should do, what it actually does, and why you think
that's wrong, and we'll try and help you fix.
What we won't do is write your application from scratch.
--
Denis McMahon, denismfmcma
receiving and how the xml nodes and their attributes and values
should be mapped into the csv file you want to create.
Unfortunately I don't think that there is a single standard mechanism for
doing that bit, although there are some tools and libraries that can help.
--
Denis McMahon, denism
bordinates' : ['army', 'navy', 'air force', 'jsoc'] },
'navy' : { 'superiors' : ['jcs', 'nsa', 'cia'], 'subordinates' :
['seals', 'marines', 'pacific fleet' ] },
}
The multiple parenting means that you need to use something as
references. You can't represent the hierarchy as a simple tree, because
in a simple tree a node only has one parent.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
e I posted may need the addition of a line something
like:
if line.startswith("From "):
in a relevant position, as well as additional indenting to take account
of that addition.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
commands of the
actual text elements that you want to extract.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
ours record always at position Y in the
timestamp.
c = [0 for i in range(24)]
f = open(filename,'r')
for l in f:
h = int(l.strip().split()[X].split(':')[Y])
c[h] = c[h] + 1
f.close()
for i in range(24):
print '{:02d} {}'.format(i, c[i])
--
D
can you please
transfer to floor-scrubbing 101.
[1] You have repeatedly ignored advice and instructions that you have
been given. This is de-facto proof that you are not capable of learning
to program computers.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, 12 Aug 2015 09:29:50 -0700, Ltc Hotspot wrote:
> Using the attached file of a diagram as a frame, why is there an
> attribute message?
Perhaps you should read the message. It's very clear.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/list
rse the strings in the log file(s), incrementing counts[x]
where x is the hour field of the timestamp.
Then I'd create a list of tuples:
ncounts = [(k,v) for k,v in counts.items()]
sort it by the hour field:
ncounts.sort(key = lambda x: x[0])
and print it:
for x in ncounts:
pr
unt.sort(reverse=True) print key,val
ncount is a single key-value pair. Why are you trying to sort ncount?
Do you want results ordered by count?
First, change your dictionary into a list of tuples:
ncount = [(a,c) for a,c in count.items()]
Then sort ncount on the second field of the tuple:
ncount
too hard. You can construct the json query syntax
fairly easily from python once you understand it:
>>> import json
>>> query = json.dumps( { "$and":[ { "$gt": {"age": 5} }, { "$not":
{"name": "curly"} } ] } )
>>> query
'{"$and": [{"$gt": {"age": 5}}, {"$not": {"name": "curly"}}]}'
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
to a database to see what comes out.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
put.csv", "wb") as f:
writer = csv.writer(f)
writer.writerows(tmp.values())
and lo:
$ cat output.csv
a,15
c,18
b,38
$
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
Ingress with a new single element list sg from makesg.
I suspect you've refactored some code from processing a list of things
inside a function to processing them in the main body, or vice versa, or
have just got confused about what you're processing where.
I suggest that you rename y
On Sun, 19 Jul 2015 17:35:03 +0100, MRAB wrote:
> rsplit -> one line.
def lastWordFirst(s):
return " ".join(reversed(s.rsplit(" ", 1)))
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On Sat, 18 Jul 2015 12:35:10 +0200, Sibylle Koczian wrote:
> Am 18.07.2015 um 02:40 schrieb Denis McMahon:
>> Having a list of words, get a copy of the list in reverse order. See
>> the reversed function (and maybe the list function).
> That won't really help, because the
able to a
list.
To join the elements of a list into a string, see the join method of
strings.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
ot;]""" % (row)
> result_rows.append(formatted)
>
> print(',\n'.join(result_rows))
>
>
> clean_json(data)
I assume you want the output as json.
The solution may be to put the data into a suitable structure and dump
the structure to json.
in your current code. Is this
what you want?
You could try the following:
# step 1, limit x to the range -50 .. 50
if x < -50:
x = -50.0
ix x >= 50:
x = 50.0
# step 2, scale x to the range 0 .. 12
x = x * 0.12 + 6.0
If you want an integer value, you need to determine which method
On Sun, 28 Jun 2015 17:07:00 -0700, Ned Batchelder wrote:
> On Sunday, June 28, 2015 at 5:02:19 PM UTC-4, Denis McMahon wrote:
>>
>> string 3
>> string 2
>> string 1
>>
>> Each is just a member of the collection things, the xml does
>> not
1 - 100 of 564 matches
Mail list logo