Before I get to the rest of this:
Thinking it through, I've been unreasonable and grumpy here, and I'm trying
to figure this out a bit more.
A general observation: There's no real data here, so far as I can tell.
There is no pair of languages which are exactly identical except for whether
they u
On Thu, 11 Aug 2011 19:03:36 -0700, goldtech wrote:
> Say I have a very big string with a pattern like:
>
> akakksssk3dhdhdhdbddb3dkdkdkddk3dmdmdmd3dkdkdkdk3asnsn.
>
> I want to split the sting into separate parts on the "3" and process
> each part separately. I might run into memory limitat
On 8/10/2011 11:36 PM, Philip Semanchuk wrote:
On Aug 9, 2011, at 1:07 PM, Tim Arnold wrote:
Hi, I'm having problems with an empty Queue using multiprocessing.
The task:
I have a bunch of chapters that I want to gather data on individually and then
update a report database with the results.
The purely graphical Python version of turtle Graphics is Turtle
Art/Turtle Blocks in the Sugar education software.
http://activities.sugarlabs.org/en-US/sugar/addon/4027
You are welcome to adapt the tutorials at
http:wiki.sugarlabs.org/go/Activities/TurtleArt/Tutorials
to Pynguin or any other
Matt Joiner wrote:
> +0.5
>
> The "trailing \" workaround is nonobvious. Wrapping in () is noisy and
> already heavily used by other syntactical structures.
"Noisy"? Compare:
# Best viewed with a fixed-width font
if a if (a
and b and b
or c:
goldtech wrote:
> Hi,
>
> Say I have a very big string with a pattern like:
>
> akakksssk3dhdhdhdbddb3dkdkdkddk3dmdmdmd3dkdkdkdk3asnsn.
Define "big".
What seems big to you is probably not big to your computer.
> I want to split the sting into separate parts on the "3" and process
> each
On 12/08/2011 03:03, goldtech wrote:
Hi,
Say I have a very big string with a pattern like:
akakksssk3dhdhdhdbddb3dkdkdkddk3dmdmdmd3dkdkdkdk3asnsn.
I want to split the sting into separate parts on the "3" and process
each part separately. I might run into memory limitations if I use
"split"
Hi,
Say I have a very big string with a pattern like:
akakksssk3dhdhdhdbddb3dkdkdkddk3dmdmdmd3dkdkdkdk3asnsn.
I want to split the sting into separate parts on the "3" and process
each part separately. I might run into memory limitations if I use
"split" and get a big array(?) I wondered if
On Thu, Aug 11, 2011 at 8:56 PM, Forafo San wrote:
>
> Thank you all for your replies. When I do a
>
> from Univariate import Univariate
>
> the TypeError disappears and everything is fine. Clearly this was an error
> that a newbie such as myself is likely to make because of little experience
>
Chris Angelico wrote:
> Incidentally, I will happily argue the
> benefits of Python's significant whitespace, even though I disagree
> with it; there are quite a few.
Please be careful about conflating significant indentation with significant
whitespace. Many languages have significant whitespac
On Thursday, August 11, 2011 8:22:20 PM UTC-4, MRAB wrote:
> On 11/08/2011 23:43, Forafo San wrote:
> > I wrote a class, Univariate, that resides in a directory that is in my
> > PYTHONPATH. I'm able to import that class into a *.py file. However when I
> > try to instantiate an object with that
On 11/08/2011 23:43, Forafo San wrote:
I wrote a class, Univariate, that resides in a directory that is in my
PYTHONPATH. I'm able to import that class into a *.py file. However when I try
to instantiate an object with that class like:
x = Univariate(a) # a is a list that is expect
On Thu, Aug 11, 2011 at 6:43 PM, Forafo San wrote:
> I wrote a class, Univariate, that resides in a directory that is in my
> PYTHONPATH. I'm able to >import that class into a *.py file. However when I
> try to instantiate an object with that class like:
What makes you think you're able to im
On Thu, Aug 11, 2011 at 10:19 PM, Seebs wrote:
> I am pretty sure Python is a pretty nice language. However, the indentation
> thing has screwed me a few times. Furthermore, I know people who like Python
> a great deal and acknowledge, without much difficulty, that the indentation
> thing has ca
In
Forafo San writes:
> I wrote a class, Univariate, that resides in a directory that is in my
> PYTHONPATH. I'm able to import that class into a *.py file. However when I
> try to instantiate an object with that class like:
> x = Univariate(a) # a is a list that is expected by t
I wrote a class, Univariate, that resides in a directory that is in my
PYTHONPATH. I'm able to import that class into a *.py file. However when I try
to instantiate an object with that class like:
x = Univariate(a) # a is a list that is expected by the Univariate
class
python raise
Well the tabs&spaces issue is no longer an issue as far as I
understand it (such a change to indent semantics could only go into
3.x), and cutting and pasting to the interpreter is obvious anyway
just visually, regardless of the specific error message.
The other issue sounds reasonable. Code that
Seebs wrote:
We're fully aware of the tradeoffs of significant indentation.
You are. A couple of other people I've talked to are. Many others
are not.
The times that whitespace indentation has bitten me, it was still not
difficult to fix -- I just had to look and see which line(s)
should/
On 2011-08-11, Steven D'Aprano wrote:
> Steven D'Aprano wrote:
>> indentation as flow control
> Gah! Of course, I meant indentation for blocks... after making the earlier
> point that indentation is *not* used for flow control, this was a
> particularly egregious error.
> How embarrassment.
My
On 2011-08-11, Steven D'Aprano wrote:
> Seebs wrote:
>> I have seen all the counterarguments, and what I've
>> mostly become convinced of is this:
>> 1. Indentation as flow control was a bad idea.
> I'm not aware of any language where indentation is used for flow control.
> Python is not one o
On 2011-08-11, Ben Finney wrote:
> What evidence do you have of these? The latter, especially, seems to be
> mere opinion unfounded in any measurement.
Well, on new collection of data, I'm less convinced.
The basic rule is:
Engineers are nearly always aware of tradeoffs. If I suddenly encounte
When I saw the headline I thought "oh no, not string concatenation
again... we have had scores of these thread before...", but this is a
rather interesting problem. The OP says he's not a database
developer, but why is he then fiddling with internal database
operations? Wouldn't it be better to go
On Thu, Aug 11, 2011 at 5:29 PM, Devin Jeanpierre
wrote:
> Howeverm indentation errors have been extremely rare in my experience,
> so I'm not really compelled to think it's harmful. Especially since
> 3.x outlaws mixing tabs and spaces.
I normally get them when starting with code from somewhere
a = b,
c = d
is a pair of such statements.
Howeverm indentation errors have been extremely rare in my experience,
so I'm not really compelled to think it's harmful. Especially since
3.x outlaws mixing tabs and spaces.
I don't love it, but I guess I prefer it to throwing parentheses and
e
On Thu, Aug 11, 2011 at 2:06 PM, Devin Jeanpierre wrote:
>
> Eek no. If I was suggesting anything, it would have been a third form
> of continuation: collapsing subsequent extra-indented lines. This is
> never ambiguous. (This could be done in such a way as to permit
> comments, namely, by doing i
> Right now you do not need to indent continuation lines. So in order to
> disambiguate you would need to enforce indentation for continuations, but for
> backward compatibility that would only be required when not using parentheses
> or backslashes. Ick. Can blank lines or comment lines appear
On Thu, Aug 11, 2011 at 12:24 PM, Devin Jeanpierre
wrote:
> Javascript also lets you break lines. For example, this does what you want:
>
> return 1
> + 5
>
> Whereas this does not
>
> return
> 1 + 5
>
> Of course, Python would have no such problem, because you could make b
On Aug 11, 8:48 am, Terry Reedy wrote:
> On 8/11/2011 3:19 AM, Paddy wrote:
>
> > We can access nonlocal variables in a function, but if we were to eval/
> > exec the function we cannot set up a nested stack of evironment dicts.
> > We are limited to just two: global and local.
>
> Right. That was
Javascript also lets you break lines. For example, this does what you want:
return 1
+ 5
Whereas this does not
return
1 + 5
Of course, Python would have no such problem, because you could make both
cases unambiguous due to the indent.
Devin
On Thu, Aug 11, 2011 at 3:17
Hi Matt,
On Thu, Aug 11, 2011 at 5:28 PM, Matt Joiner wrote:
> +0.5
>
> The "trailing \" workaround is nonobvious. Wrapping in () is noisy and
> already heavily used by other syntactical structures. Since a final
> ':' is needed anyway, i think this would be great.
>
> if a
> and b
> or c:
> d
In article
,
Eric Snow wrote:
> Specifically, I am wondering why there is a difference for co_names.
This is not an answer to your question but, as a metapoint, in my
experience it is usually faster and often more reliable to try to answer
questions like this yourself using the tools that the
Something like this already exists:
a = 0
b = 1
if (True == True
and False == False
and a + 1 == b
and b - 1 == a):
print 'meh'
So I've got no idea what this proposal is about except for the
dropping of readability of Python.
-1
Daniel Greenfeld
On Thu, Aug 11,
Hi I have written a tutorial about how to generate and send emails
with python.
You can find it here
http://blog.magiksys.net/generate-and-send-mail-with-python-tutorial
And here is the content. Enjoy.
This article follows two other articles (1, 2) about how to parse
emails in Python.
These art
-1 This idea seems like it would remove the true readability of
python. Personally it would create more confusion than it would
remove.
On Thu, Aug 11, 2011 at 3:28 PM, Matt Joiner wrote:
> +0.5
>
> The "trailing \" workaround is nonobvious. Wrapping in () is noisy and
> already heavily used by o
Amit Jaluf wrote:
> which book or tutorial i should for it(Python)
> i found "A Byte of Python " by Swaroop
> after that which tutorial(book) i have to read
You can read lots of book reviews online. That said, have you checked
http://www.python.org?
Uli
--
Domino Laser GmbH
Geschäftsführer: Th
On 2011-08-10, Chris Angelico wrote:
> On Wed, Aug 10, 2011 at 10:51 PM, Ben Finney
> wrote:
>> Seebs writes:
>>> I've seen bits of code in preprocessing-based "Python with {}" type
>>> things, and they still look like Python to me, only they favor
>>> explicit over implicit a little more stron
+0.5
The "trailing \" workaround is nonobvious. Wrapping in () is noisy and
already heavily used by other syntactical structures. Since a final
':' is needed anyway, i think this would be great.
if a
and b
or c:
do stuff()
On Thu, Aug 11, 2011 at 11:02 PM, MRAB wrote:
> On 11/08/2011 05:16
On 11 Aug, 16:06, Amit Jaluf wrote:
> On Aug 11, 8:15 am, MRAB wrote:
>
> > On 11/08/2011 13:56, Amit Jaluf wrote:> Hello Group,
> > > i just start python is it necessary indentation in python ?
>
> > Yes, indentation is part of the language.
>
> > Even in programming languages where it isn't nec
On Aug 11, 8:15 am, MRAB wrote:
> On 11/08/2011 13:56, Amit Jaluf wrote:> Hello Group,
> > i just start python is it necessary indentation in python ?
>
> Yes, indentation is part of the language.
>
> Even in programming languages where it isn't necessary, it's
> recommended because it makes the c
On Thu, Aug 11, 2011 at 2:46 PM, wrote:
> This is the way I am going to use.
> But what is the best data type to hold so many rows and then operate on them ?
>
List of strings. Take it straight from your Oracle interface and work
with it directly.
ChrisA
--
http://mail.python.org/mailman/listi
On Thu, Aug 11, 2011 at 11:59:31AM +0100, Chris Angelico wrote:
>
> What may be the easiest way is to do the select in a single process,
> then partition it and use the Python multiprocessing module to split
> the job into several parts. Then you need only concatenate the handful
> of strings.
Th
I'm using scitools (Pythonxy). It plots the curve of the function (Figure
window) but when I try to close Figure window I get the message 'Pythonw.exe
do not answer'. My operation system is windows 7. This happened when I'm
using Matplotlib for ploting. If I use gnuplot for plotting closing works
o
On 11/08/2011 13:56, Amit Jaluf wrote:
Hello Group,
i just start python is it necessary indentation in python ?
Yes, indentation is part of the language.
Even in programming languages where it isn't necessary, it's
recommended because it makes the code easier to read.
--
http://mail.python.org
On 11/08/2011 05:16, Chris Rebert wrote:
On Wed, Aug 10, 2011 at 7:52 PM, Yingjie Lan wrote:
:And if we require {} then truly free indentation should be OK too! But
:it wouldn't be Python any more.
Of course, but not the case with ';'. Currently ';' is optional in Python,
I think of it more
Hello Group,
i just start python is it necessary indentation in python ?
thanks in advance ...
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
> indentation as flow control
Gah! Of course, I meant indentation for blocks... after making the earlier
point that indentation is *not* used for flow control, this was a
particularly egregious error.
How embarrassment.
--
Steven
--
http://mail.python.org/mailman/list
Seebs wrote:
> I have seen all the counterarguments, and what I've
> mostly become convinced of is this:
>
> 1. Indentation as flow control was a bad idea.
I'm not aware of any language where indentation is used for flow control.
Python is not one of those languages: it uses for, while, if, etc
> Some of these values look wrong. Your 'path' ought to be as the
> browser sees it, and your 'domain' ditto;
...
> Otherwise, I would recommend omitting those elements and allowing the
> defaults through.
So I commented out those lines and now have this:
#!/usr/bin/env python
import strin
Chris Angelico, 11.08.2011 12:59:
On Thu, Aug 11, 2011 at 7:40 AM, wrote:
I am not a database developer so I don't want to change the whole process
of data flow between applications in my company. Another process is
reading this XML from particular Oracle table so I have to put the final XML
t
On Thu, Aug 11, 2011 at 12:52 PM, wrote:
> On Thu, Aug 11, 2011 at 11:59:31AM +0100, Chris Angelico wrote:
>> There's no guarantee that all of that 256GB is available to you, of course.
>
> I am the admin of this server - the memory is available for us :-)
Hehe. I mean to any particular applicat
On Thu, Aug 11, 2011 at 11:59:31AM +0100, Chris Angelico wrote:
> On Thu, Aug 11, 2011 at 7:40 AM, wrote:
> > I am not a database developer so I don't want to change the whole process
> > of data flow between applications in my company. Another process is
> > reading this XML from particular Orac
On 08/11/2011 12:28 PM, becky_lewis wrote:
> Just to add ...
>
> I ran through creating a virtualenv in the same manner as you:
>
>
> ipython is using the virtualenv when it can find them and the system
> wide packages when they are not in the virtualenv. Hope that helps you
> track down the pro
On 08/11/2011 05:24 AM, Miki Tebeka wrote:
> You can download the sources tarball and when building specify the compiler.
> See http://docs.python.org/install/index.html#gnu-c-cygwin-mingw
Your answer put me on the right track.
This works:
- downloading mingw
- downloading and extracting the tar
On Thu, Aug 11, 2011 at 7:40 AM, wrote:
> I am not a database developer so I don't want to change the whole process
> of data flow between applications in my company. Another process is
> reading this XML from particular Oracle table so I have to put the final XML
> there.
I think you may be lo
Just to add ...
I ran through creating a virtualenv in the same manner as you:
$ virtualenv SomeEnv
$ source SomeEnv/bin/activate
(SomeEnv)$ which pip
/home/user/virtual/SomeEnv/bin/pip
(SomeEnv)$ pip install ipython
Requirement already satisfied (use --upgrade to upgrade): ipython in /
usr/local
Yingjie Lan wrote:
> :The trouble of dealing with long lines can be avoided by a smart
> :editor. It's called line wrap.
>
> Yeah, usually they just wrap it pretty arbitrarily,
> and you don't have any control, isn't it?
umm... besides "notepad" pretty much any other serious "programmer editor"
On 08/11/2011 11:39 AM, becky_lewis wrote:
> Hi,
>
> are you doing a pip install from within your virtualenv (sourcing the
> virtualenv and THEN installing ipython)?
>
Yes this is what I was doing.
My default ipython without virtualenv is now:
$ ipython -V
0.10
Within my virualenv it is now:
$
Hi,
are you doing a pip install from within your virtualenv (sourcing the
virtualenv and THEN installing ipython)?
Becky Lewis
On Aug 11, 9:59 am, Gelonida N wrote:
> Hi,
>
> Short version
> ==
> I have a system with ipython installed by my Ubuntu distribution
> I created a virtual
On 08/11/2011 06:03 AM, Dan Stromberg wrote:
Hi Dan,
> FWIW, a few months ago I was working on a database application on
> Windows, and I benchmarked the psyco-enhanced version consistently
> running slower than the non-psyco version. The same code on Linux was
> faster with psyco though.
Good
Hi,
Short version
==
I have a system with ipython installed by my Ubuntu distribution
I created a virtualenv with
> virtualenv ~/myenv
I installed ipython
> pip install ipython --upgrade
When using ipython I notice, that it does import the modules from my
default python setup and not
On Thu, Aug 11, 2011 at 6:17 AM, Michael Trausch wrote:
> Somthing like an "option" keyword (which would only be a keyword until the
> first executable statement, e.g., would have to be before even imports)
> could enable things like "semicolon" or "explicit", or whatever really, and
> only affect
Danny Wong (dannwong) wrote:
> cmd_output = subprocess.Popen(['scm', 'load', '--force',
> '-r', nickname, '-d', directory, project], stdout=subprocess.PIPE,
> stderr=subprocess.PIPE)
> status = cmd_output.wait()
If you redirect stdout and/or stderr to a pipe, you must wait for EOF
b
http://www.mememaker.net/images/public/201108110739296015.jpg
--
http://mail.python.org/mailman/listinfo/python-list
From: Chris Rebert
To: Yingjie Lan
Cc: "python-list@python.org"
Sent: Thursday, August 11, 2011 3:50 PM
Subject: Re: allow line break at operators
On Thu, Aug 11, 2011 at 12:24 AM, Yingjie Lan wrote:
> From: Steven D'Aprano
> On Thu, 11 Aug 2011 12:52 pm Ying
On Thu, Aug 11, 2011 at 12:24 AM, Yingjie Lan wrote:
> From: Steven D'Aprano
> On Thu, 11 Aug 2011 12:52 pm Yingjie Lan wrote:
>
>> :And if we require {} then truly free indentation should be OK too! But
>>
>> :it wouldn't be Python any more.
>>
>> Of course, but not the case with ';'. Currently
On 8/11/2011 3:19 AM, Paddy wrote:
We can access nonlocal variables in a function, but if we were to eval/
exec the function we cannot set up a nested stack of evironment dicts.
We are limited to just two: global and local.
Right. That was and is Python's execution model.
Note that when you exe
On 10/08/2011 21:43, Christian Heimes wrote:
Am 10.08.2011 21:52, schrieb Ameet Nanda:
Hi,
Can anyone point me to a way to access windows shared folders from the
network using a python script. I tried accessing using open, which is
mentioned to work perfectly on the web, but it gives me followi
From: Steven D'Aprano
To: python-list@python.org
Sent: Thursday, August 11, 2011 12:18 PM
Subject: Re: allow line break at operators
On Thu, 11 Aug 2011 12:52 pm Yingjie Lan wrote:
> :And if we require {} then truly free indentation should be OK too! But
>
> :i
We can access nonlocal variables in a function, but if we were to eval/
exec the function we cannot set up a nested stack of evironment dicts.
We are limited to just two: global and local.
How about eval/exec take a new env argument that is a nested
dictionary whose outer level corresponds to loca
On Wed, Aug 10, 2011 at 03:38:42PM +0100, Chris Angelico wrote:
> On Wed, Aug 10, 2011 at 3:38 PM, Chris Angelico wrote:
> > Which SQL library are you suing?
>
> And this is why I should proof-read BEFORE, not AFTER, sending.
>
> Which SQL library are you *using*?
cx_oracle
Regards
Przemyslaw
From: Michael Trausch
To: Yingjie Lan
Cc: Chris Angelico ; "python-list@python.org"
Sent: Thursday, August 11, 2011 12:51 PM
Subject: Re: allow line break at operators
> Perhaps it could be made an optional thing to enable; for example, some
> languages by d
71 matches
Mail list logo