On Tue, 16 Apr 2013 15:38:29 -0700, Mark Janssen wrote:
> On Mon, Apr 15, 2013 at 3:32 PM, Chris Angelico
> wrote:
>> On Tue, Apr 16, 2013 at 8:12 AM, Rotwang wrote:
>>> Traceback (most recent call last):
>>> File "", line 1, in
>>> class C(type(lambda: None)):
>>> TypeError: type 'functi
On Tue, 16 Apr 2013 12:20:18 -0600, Ian Kelly wrote:
> This isn't a Python question. If you take a look at the csv file that
> you download from Yahoo, you will see that it only contains 2 digits of
> precision. There's no way to make Python print out 4 digits of
> precision when it is only prov
Miki Tebeka wrote:
>
>I'm trying to find a way to have json emit float('NaN') as 'N/A'.
>I can't seem to find a way since NaN is a float, which means overriding
>"default" won't help.
>
>Any simple way to do this?
No. There is no way to represent NaN in JSON. It's simply not part of the
specif
Chris Rebert wrote:
>
>2. Glob/wildcard ("*") expansion is done by the shell, but
>subprocess.Popen does not use the shell by default (for good reason!).
This is only true in Linux. In Windows, the wildcard characters are passed
to the program, so each app must do its own glob expansion.
--
Tim
On 04/16/2013 08:37 AM, aaB wrote:
hello,
I represent the CA's rule with a list of integers, of value 1 or 0.
Here is the function I use to generate the list:
def get_rule(rulenum):
rule = []
while rulenum > 0:
rule.append(rulenume % 2)
rulenum /= 2
while len(rule) < 8:
On Apr 16, 10:42 pm, Terry Jan Reedy wrote:
> > "The “Batteries included” philosophy of Python was definitely the right
> > approach during the mid 90’s and one of the reasons that I loved Python
> > so much; this was a time before modern package management, and before it
> > was easy to find and
On Apr 17, 7:57 am, Bruce McGoveran wrote:
> These are terms that appear in section 5 (Expressions) of the Python online
> documentation. I'm having some trouble understanding what, precisely, these
> terms mean. I'd appreciate the forum's thoughts on these questions:
>
> 1. Section 5.2.1 ind
These are terms that appear in section 5 (Expressions) of the Python online
documentation. I'm having some trouble understanding what, precisely, these
terms mean. I'd appreciate the forum's thoughts on these questions:
1. Section 5.2.1 indicates that an identifier occurring as an atom is a n
Thank you all for thoughts. I'm just about to post another question about
atoms and primaries. If you have a moment to look it over, I would appreciate
your thoughts.
Many thanks in advance.
On Tuesday, April 16, 2013 6:19:25 PM UTC-4, Bruce McGoveran wrote:
> Hello. I am new to this group.
On Apr 16, 10:36 pm, Andrew Berg wrote:
> On 2013.04.16 12:14, rusi wrote:> However combine it with your other statement
>
> >> Python's package management is suboptimal (though it is being worked on),
>
> > and a different picture emerges, viz that *the ecosystem around the
> > language matters
[2nd try, quotation a bit messed up]
On 4/16/2013 6:19 PM, Bruce McGoveran wrote:
> Hello. I am new to this group. I've done a search for the topic
> about which I'm posting, and while I have found some threads that are
> relevant, I haven't found anything exactly on point that I can
> underst
Greetings,
I'm trying to find a way to have json emit float('NaN') as 'N/A'.
I can't seem to find a way since NaN is a float, which means overriding
"default" won't help.
Any simple way to do this?
Thanks,
--
Miki
--
http://mail.python.org/mailman/listinfo/python-list
On 17/04/2013 00:45, Victor Hooi wrote:
Hi,
I'm trying to compile a regex Python with the re.VERBOSE flag (so that I can
add some friendly comments).
However, the issue is, I normally use constants to define re-usable bits of the
regex - however, these doesn't get interpreted inside the tripl
On Tue, Apr 16, 2013 at 5:40 PM, Mark Janssen wrote:
> I feel like I'm having to "come up to speed" of the academic
> community, but wonder how and why this large chasm happened between
> the applied community and the theoretical. In my mind, despite the
> ideals of academia, students graduate a
On Tue, Apr 16, 2013 at 5:16 PM, Mark Janssen wrote:
> Understood, but I feel this is where theory has gone too far away from
> reality.
How so? Turing machines and lambda calculus were both invented in the
30s, before any real mechanical computers existed. If anything, it is
programming that h
Hi,
I'm trying to compile a regex Python with the re.VERBOSE flag (so that I can
add some friendly comments).
However, the issue is, I normally use constants to define re-usable bits of the
regex - however, these doesn't get interpreted inside the triple quotes.
For example:
import re
On Mon, Apr 15, 2013 at 2:06 AM, Uday S Reddy wrote:
> In programming language theory, there is no law to the effect that
> "everything" should be of one kind or another. So, we would not go with
> Alan Kay's ideal.
I understand. I state Kay's points to show how the evolution of (this
part of)
On 04/16/2013 08:37 AM, aaB wrote:
rule = getrule(int(8))
just rule = getrule(8) is sufficient -- you don't need to cast the integer 8
to an integer. ;)
Thanks, and sorry for the rather long post.
Not too long at all: it had lots of detail of what you were trying to do, what you were
On Tue, 16 Apr 2013 23:19:25 +0100, Bruce McGoveran
wrote:
Hello. I am new to this group. I've done a search for the topic about
which I'm posting, and while I have found some threads that are
relevant, I haven't found anything exactly on point that I can
understand. So, I'm taking the
> I'm not quite sure I understand your question, but I'll give it a shot. :-)
Thank you, and my apologies for my late reply.
> The C/C++ model, in which the types are anchored to the machine hardware, in
> the exception, not the rule. In the academic literature, "type theory" is
> almost entir
On Tue, Apr 16, 2013 at 4:38 PM, Mark Janssen wrote:
> I think his point remains valid, from a theoretical pov. Python
> prides itself on the idea of "first-class functions" and such, but
> unlike the world of lambda calculus, this selling point is a bit
> invalid. Because for Python (and any C-
On 04/16/2013 06:19 PM, Bruce McGoveran wrote:
Hello. I am new to this group. I've done a search for the topic about which
I'm posting, and while I have found some threads that are relevant, I haven't
found anything exactly on point that I can understand. So, I'm taking the
liberty of askin
On Mon, Apr 15, 2013 at 3:32 PM, Chris Angelico wrote:
> On Tue, Apr 16, 2013 at 8:12 AM, Rotwang wrote:
>> Traceback (most recent call last):
>> File "", line 1, in
>> class C(type(lambda: None)):
>> TypeError: type 'function' is not an acceptable base type
>>
>>
>> and I don't think that
On Tue, 16 Apr 2013 15:19:25 -0700, Bruce McGoveran wrote:
> Hello. I am new to this group. I've done a search for the topic about
> which I'm posting, and while I have found some threads that are
> relevant, I haven't found anything exactly on point that I can
> understand. So, I'm taking the
On Wed, Apr 17, 2013 at 2:50 AM, Andrew Berg wrote:
> On 2013.04.16 11:02, Rodrick Brown wrote:
>> I came across this article which sums up some of the issues I have with
>> modern programming languages. I've never really looked at Javascript
>> for anything serious or Node itself but I found thi
Hello. I am new to this group. I've done a search for the topic about which
I'm posting, and while I have found some threads that are relevant, I haven't
found anything exactly on point that I can understand. So, I'm taking the
liberty of asking about something that may be obvious to many rea
On Wed, Apr 17, 2013 at 7:40 AM, Walter Hurry wrote:
> On Wed, 17 Apr 2013 01:30:03 +1000, Chris Angelico wrote:
>
>> By the way, regarding your email address: there are no cheat codes in
>> Python
>
> ROFLMAO. Incidentally, my son used to use IDDQD rather than IDKFA.
>
> I of course spurned all s
On Wed, 17 Apr 2013 01:30:03 +1000, Chris Angelico wrote:
> By the way, regarding your email address: there are no cheat codes in
> Python
ROFLMAO. Incidentally, my son used to use IDDQD rather than IDKFA.
I of course spurned all such, since I preferred to do it the hard way.
Thus I was Doomed.
--
Using Opera's mail client: http://www.opera.com/mail/
--
http://mail.python.org/mailman/listinfo/python-list
On 04/16/2013 11:37 AM, aaB wrote:
hello,
I am a beginner programmer. I started learning programming about a year and a
half ago, using C. I picked up python a few months ago, but only wrote very few
scripts.
I am currently trying to learn more about the python way of doing things by
writing a
On 04/16/2013 08:14 AM, PEnergy wrote:
> Greetings,
>
> I am trying to write a python script that, when called from the DOS
> prompt, will call another python script and pass it input variables.
> My current code will open the other python script but doesn't seem to
> pass it any values:
>
> impo
On Tue, 16 Apr 2013 12:10:09 -0700, Chris Rebert wrote:
> On Tue, Apr 16, 2013 at 7:14 AM, PEnergy wrote:
>> Greetings,
>>
>> I am trying to write a python script that, when called from the DOS
>> prompt, will call another python script and pass it input variables.
>> My current code will open t
On Tue, Apr 16, 2013 at 7:14 AM, PEnergy wrote:
> Greetings,
>
> I am trying to write a python script that, when called from the DOS prompt,
> will call another python script and pass it input variables. My current code
> will open the other python script but doesn't seem to pass it any values:
On 4/16/2013 2:02 PM, hmjelte...@gmail.com wrote:
Hi!
I am using ystockquote with the following code:
def get_historical_prices(symbol, start_date, end_date):
"""
Get historical prices for the given ticker symbol.
Date format is 'MMDD'
Returns a nested list.
"""
I need a package for parsing a big .ttl file in pyhton2.7 in windows7
I have used rdflib but it returns out of memory Error.
Any suggestion?
--
http://mail.python.org/mailman/listinfo/python-list
On 16/04/2013 19:02, hmjelte...@gmail.com wrote:
Hi!
I am using ystockquote with the following code:
def get_historical_prices(symbol, start_date, end_date):
"""
Get historical prices for the given ticker symbol.
Date format is 'MMDD'
Returns a nested list.
"""
On Tue, Apr 16, 2013 at 11:29 AM, Ethan Furman wrote:
>>> The four are bool, NoneType, slice and ellipsis, I believe.
>>
>>
>> --> import builtins
>> --> for n in dir(builtins):
>>
>> ... if type(getattr(builtins, n)) is type:
>> ... try:
>> ... t = type(n, (getattr(builtin
On 4/16/2013 1:29 PM, Ethan Furman wrote:
On 04/16/2013 01:25 AM, Serhiy Storchaka wrote:
On 16.04.13 07:46, Ian Kelly wrote:
On Mon, Apr 15, 2013 at 9:17 PM, Terry Jan Reedy
wrote:
I will keep the above in mind if I write or review a patch. here are 4
non-subclassable builtin classes. Two ar
On Tue, Apr 16, 2013 at 12:02 PM, wrote:
> Hi!
>
> I am using ystockquote with the following code:
>
> def get_historical_prices(symbol, start_date, end_date):
> """
> Get historical prices for the given ticker symbol.
> Date format is 'MMDD'
>
> Returns a nested list.
> "
Hi!
I am using ystockquote with the following code:
def get_historical_prices(symbol, start_date, end_date):
"""
Get historical prices for the given ticker symbol.
Date format is 'MMDD'
Returns a nested list.
"""
url = 'http://ichart.yahoo.com/table.csv?s=%s&;' %
On 04/16/2013 01:25 AM, Serhiy Storchaka wrote:
On 16.04.13 07:46, Ian Kelly wrote:
On Mon, Apr 15, 2013 at 9:17 PM, Terry Jan Reedy wrote:
I will keep the above in mind if I write or review a patch. here are 4
non-subclassable builtin classes. Two are already documented. Bool in one,
forget w
On 4/16/2013 12:02 PM, Rodrick Brown wrote:
I came across this article which sums up some of the issues I have with
modern programming languages. I've never really looked at Javascript for
anything serious or Node itself but I found this article really
informational.
"The “Batteries included” ph
On 2013.04.16 12:14, rusi wrote:
> However combine it with your other statement
>
>> Python's package management is suboptimal (though it is being worked on),
>
> and a different picture emerges, viz that *the ecosystem around the
> language matters more than the language*
It was a minor point,
Thank you Terry, I am working with:
> cat /proc/version
Linux version 2.6.18-274.el5xen (brewbuil...@norob.fnal.gov) (gcc version
4.1.2 20080704 (Red Hat 4.1.2-50)) #1 SMP Thu Jul 21
> cat /etc/redhat-release
Scientific Linux SL release 5.1 (Boron)
I did not find distribution-specific tar balls f
On 2013-04-16, Lele Gaifax wrote:
> Neil Cerutti writes:
>
>> Imagine something like the following for loop taking place
>> somewhere:
>>
>> for (int i = 2; i <= 0; --i) {
>> fprintf(a[i]);
>> }
>
> Neil most probably meant
>
> for (int i = 2; i >= 0; --i) {
> fprintf(a[i]);
> }
>
> where
On 4/16/2013 11:37 AM, aaB wrote:
I represent the CA's rule with a list of integers, of value 1 or 0.
Here is the function I use to generate the list:
def get_rule(rulenum):
rule = []
while rulenum > 0:
rule.append(rulenume % 2)
rulenum /= 2
divmod(rulenum) will return both th
For javascript *the language* this is a good watch:
http://www.youtube.com/watch?v=kXEgk1Hdze0
However I believe that the language view is a bit dated.
On Apr 16, 9:50 pm, Andrew Berg wrote:
> Perhaps having a minimal core works well for node.js, but Python is much,
> much better off having it
Hi,
For the context, I'm working on Pelix (https://github.com/tcalmant/ipopo),
a service-oriented architecture framework (in GPLv3), inspired by OSGi
(from the Java world).
It runs on Python >= 2.6 (with the backport of importlib) and Python 3.1
(not tested upon this version).
It considers Python
On 4/16/2013 10:30 AM, rosoloum wrote:
I do not have admin rights on my machine
The answer to your question may depend on the OS (linux), distribution
(many), and version.
What about `_tkinter` and `dl`? How can I have them ready for the Python
installer?
Building _tkinter (a Python C-co
On 2013.04.16 11:02, Rodrick Brown wrote:
> I came across this article which sums up some of the issues I have with
> modern programming languages. I've never really looked at Javascript
> for anything serious or Node itself but I found this article really
> informational.
I don't think the aut
On 4/16/2013 5:07 AM, Antoon Pardon wrote:
Op 16-04-13 05:17, Terry Jan Reedy schreef:
On 4/15/2013 10:32 PM, Steven D'Aprano wrote:
On Mon, 15 Apr 2013 20:52:58 -0400, Terry Jan Reedy wrote:
I will keep the above in mind if I write or review a patch. here are 4
non-subclassable builtin cl
In aaB
writes:
> but when I do:
> for i in rule:
> print rule[i]
> I get the "complement":
> 1
> 1
> 1
> 1
> 0
> 1
> 1
> 1
When you iterate over a list with this statement:
for i in rule:
i contains each successive list item.
However, your code:
print rule[i]
acts as though i
On 16 April 2013 17:25, Ned Batchelder wrote:
> On 4/16/2013 12:02 PM, Rodrick Brown wrote:
>
> I came across this article which sums up some of the issues I have with
> modern programming languages. I've never really looked at Javascript for
> anything serious or Node itself but I found this a
On 4/16/2013 12:02 PM, Rodrick Brown wrote:
I came across this article which sums up some of the issues I have
with modern programming languages. I've never really looked at
Javascript for anything serious or Node itself but I found this
article really informational.
"The "Batteries included"
Neil Cerutti writes:
> Imagine something like the following for loop taking place
> somewhere:
>
> for (int i = 2; i <= 0; --i) {
> fprintf(a[i]);
> }
Neil most probably meant
for (int i = 2; i >= 0; --i) {
fprintf(a[i]);
}
where "fprintf" is actually a fictitious "do_something" functi
I came across this article which sums up some of the issues I have with
modern programming languages. I've never really looked at Javascript for
anything serious or Node itself but I found this article really
informational.
"The “Batteries included” philosophy of Python was definitely the right
ap
On 2013-04-16, idkfaidkfaid...@gmail.com wrote:
> Hi all,
> i'm programming in python for the first time (usually i use C as programming
> language). I don't understand these results:
>
a=[1,2,3,4,5]
a[:-1]
> [1, 2, 3, 4]
a[::-1]
> [5, 4, 3, 2, 1]
a[2::-1]
> [3, 2, 1]
The thi
On Wed, Apr 17, 2013 at 1:37 AM, aaB wrote:
> but when I do:
>
> for i in rule:
> print rule[i]
When you iterate over rule, you don't iterate over the indices, but
over the values themselves. Try this:
for i in rule:
print i
Incidentally, "for i in range(rule)" isn't actually going to wor
hello,
I am a beginner programmer. I started learning programming about a year and a
half ago, using C. I picked up python a few months ago, but only wrote very few
scripts.
I am currently trying to learn more about the python way of doing things by
writing a script that generates png images usin
When slicing: l[start:end:step]
In your example of "a[2::-1]" you are reversing the list by using a step of
-1, then you are slicing at index 2 (third element).
*Matt Jones*
On Tue, Apr 16, 2013 at 10:30 AM, Chris Angelico wrote:
> On Wed, Apr 17, 2013 at 1:20 AM, wrote:
> > Hi all,
> > i'm
On Wed, Apr 17, 2013 at 1:20 AM, wrote:
> Hi all,
> i'm programming in python for the first time (usually i use C as programming
> language). I don't understand these results:
>
a=[1,2,3,4,5]
a[:-1]
> [1, 2, 3, 4]
a[::-1]
> [5, 4, 3, 2, 1]
a[2::-1]
> [3, 2, 1]
>
> what does a
Hi all,
i'm programming in python for the first time (usually i use C as programming
language). I don't understand these results:
>>> a=[1,2,3,4,5]
>>> a[:-1]
[1, 2, 3, 4]
>>> a[::-1]
[5, 4, 3, 2, 1]
>>> a[2::-1]
[3, 2, 1]
what does a[2::-1] means?
Thanks
--
http://mail.python.org/mailman/listi
Hi D'A,
Thanks alot for your reply, it works for me perfectly.
Best,
Chen
On Mon, 15 Apr 2013 02:57:35 +0800
"pyth0n3r" wrote:
> float(). How can i remove the comma in int data? Any reply will be
int(n.replace(',', ''))
--
D'Arcy J.M. Cain | Democracy is three wolves
http://www.drui
PyOhio 2013, the annual Python programming conference for Ohio and the
surrounding region, is now accepting proposals for scheduled talks,
tutorials, and panels.
This year's PyOhio will will take place Saturday, July 27th, and Sunday,
July 28th, 2013 at the Ohio Union, on the campus of The Ohio St
I do not have admin rights on my machine and I am trying to build Python
directly from source code. After running:
./configure --prefix=/some/path --enable-shared
and then
make
I get the following:
> Python build finished, but the necessary bits to build these modules
> were n
Gilles writes:
> I see Python mentioned in /usr/lib and /usr/share, and was wondering
> if all it'd take to solve this issue, is just to cross-compile the
> interpreter and the rest is just CPU-agnostic Python scripts.
I suppose. In any case, cross compiling Python shouldn't be that hard. I
just
Greetings,
I am trying to write a python script that, when called from the DOS prompt,
will call another python script and pass it input variables. My current code
will open the other python script but doesn't seem to pass it any values:
import os,sys,subprocess
subprocess.Popen(['python.exe',
We are re-designing a part of our codebase, which should in short be
able to generate forms with custom fields.
We use django for the frontend and bottle for the backend (using CouchDB
as database), and at the moment we simply plug extra fields on normal
django forms.
This is not really scalable,
Op 16-04-13 05:17, Terry Jan Reedy schreef:
> On 4/15/2013 10:32 PM, Steven D'Aprano wrote:
>> On Mon, 15 Apr 2013 20:52:58 -0400, Terry Jan Reedy wrote:
>
>>> Some builtin classes cannot be subclassed. There is an issue to
>>> document
>>> which better. That does not mean that it is not a class.
>
On 16.04.13 07:46, Ian Kelly wrote:
On Mon, Apr 15, 2013 at 9:17 PM, Terry Jan Reedy wrote:
I will keep the above in mind if I write or review a patch. here are 4
non-subclassable builtin classes. Two are already documented. Bool in one,
forget which other. I believe it was recently decided to
zipher於 2013年4月15日星期一UTC+8上午11時48分05秒寫道:
> Hello,
>
>
>
> I'm new to the list and hoping this might be the right place to
>
> introduce something that has provoked a bit of an argument in my
>
> programming community.
I'll state about my opinions about the imperative and
non-imperative part.
71 matches
Mail list logo