Hello Everyone,
I have a Python script that I wrote to support a project that I work on
(that runs primarily on Unix OSes). Given its support role in this
package, this script should not introduce any other dependencies. As a
result, I wrote the script in Python 2, since every Linux currently sh
On Sun, Jun 2, 2013 at 1:20 PM, Chris Angelico wrote:
>
> Hmm. Could be costly. Hey, you know, Python has something for testing that.
>
> >>> timeit.timeit('debugprint("asdf")','def debugprint(*args):\n\tif not
> DEBUG: return\n\tprint(*args)\nDEBUG=False',number=100)
> 0.5838018519113444
>
>
On Sun, Jun 2, 2013 at 11:10 PM, Dan Sommers wrote:
> On Sun, 02 Jun 2013 20:16:21 -0400, Jason Swails wrote:
>
> > ... If you don't believe me, you've never hit a bug that 'magically'
> > disappears when you add a debugging print statement ;-).
>
On Mon, Jun 3, 2013 at 1:12 PM, Ian Kelly wrote:
> On Sun, Jun 2, 2013 at 6:16 PM, Jason Swails
> wrote:
> > I'm actually with RR in terms of eliminating the overhead involved with
> > 'dead' function calls, since there are instances when optimizing in
>
On Mon, Jun 3, 2013 at 1:12 PM, Ian Kelly wrote:
> On Sun, Jun 2, 2013 at 6:16 PM, Jason Swails
> wrote:
> > I'm actually with RR in terms of eliminating the overhead involved with
> > 'dead' function calls, since there are instances when optimizing in
>
ack, sorry for the double-post.
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Jun 4, 2013 at 11:44 AM, Rick Johnson
wrote:
>
> This implicit conversion seems like a good idea at first,
> and i was caught up in the hype myself for some time: "Hey,
> i can save a few keystrokes, AWESOME!". However, i can tell
> you with certainty that this implicit conversion is folly
On Wed, Jun 5, 2013 at 9:07 PM, Sudheer Joseph wrote:
> Dear Members,
> Is there a way to get the time:origin attribute from a
> netcdf file as string using the Python netcdf?
>
Attributes of the NetCDF file and attributes of each of the variables can
be accessed via the dot-op
On Fri, Jun 7, 2013 at 10:32 PM, Tim Chase wrote:
> Playing around, I've been trying to figure out the most pythonic way
> of incrementing multiple values based on the return of a function.
> Something like
>
> def calculate(params):
> a = b = 0
> if some_calculation(params):
> a +
On Sat, Jun 8, 2013 at 2:47 AM, Peter Otten <__pete...@web.de> wrote:
>
> You can hide the complexity in a custom class:
>
> >>> class T(tuple):
> ... def __add__(self, other):
> ... return T((a+b) for a, b in zip(self, other))
> ...
> >>> t = T((0, 0))
> >>> for pair in [(1, 10), (
On Mon, Jun 10, 2013 at 7:26 PM, Dave Angel wrote:
> On 06/10/2013 06:54 PM, Chris Angelico wrote:
>
>> On Tue, Jun 11, 2013 at 8:39 AM, Grant Edwards
>> wrote:
>>
>>> On 2013-06-10, Terry Jan Reedy wrote:
>>>
>>> Another principle similar to 'Don't add extraneous code' is 'Don't
rebind b
On Thu, Jun 13, 2013 at 11:33 PM, Rick Johnson wrote:
> On Thursday, June 13, 2013 3:18:57 PM UTC-5, Joshua Landau wrote:
>
> > [...]
> > GUI is boring. I don't give a damn about that. If I had it
> > my way, I'd never write any interfaces again (although
> > designing them is fine). Console inte
On Fri, Jun 14, 2013 at 3:21 AM, Chris Angelico wrote:
> On Fri, Jun 14, 2013 at 4:13 PM, Steven D'Aprano
> wrote:
> > Here's another Pepsi Challenge for you:
> >
> > There is a certain directory on your system containing 50 text files, and
> > 50 non-text files. You know the location of the dir
On Sat, Jun 15, 2013 at 11:55 PM, rusi wrote:
> On Jun 16, 4:14 am, Chris Angelico wrote:
> > On Sun, Jun 16, 2013 at 12:16 AM, Roy Smith wrote:
> > > The advantage of DVCS is that everybody has a full copy of the repo.
> > > The disadvantage of the DVCS is that every MUST have a full copy of t
On Sun, Jun 16, 2013 at 9:30 AM, Chris “Kwpolska” Warrick <
kwpol...@gmail.com> wrote:
> On Sun, Jun 16, 2013 at 1:14 AM, Chris Angelico wrote:
> > Hmm. ~/cpython/.hg is 200MB+, but ~/pike/.git is only 86MB. Does
> > Mercurial compress its content? A tar.gz of each comes down, but only
> > to ~17
On Sun, Jun 16, 2013 at 3:06 PM, C. N. Desrosiers wrote:
> Hi,
>
> I'm planning to buy a Macbook Air and I want to use it as a sort of alarm.
> I'd like to write a program that boots my computer at a specific time,
> loads iTunes, and starts playing a podcast. Is this sort of thing possible
> in
On Thu, Jun 27, 2013 at 2:50 PM, Ethan Furman wrote:
>
> If the OP is writing an interactive shell, shouldn't `cmd` be used instead
> of `argparse`? argparse is, after all, intended for argument parsing of
> command line scripts, not for interactive work.
>
He _is_ using cmd. He's subclassed c
On Thu, Jun 27, 2013 at 8:22 PM, Tim Chase wrote:
> On 2013-06-28 09:02, Cameron Simpson wrote:
> > On 27Jun2013 11:50, Ethan Furman wrote:
> > | If the OP is writing an interactive shell, shouldn't `cmd` be used
> > | instead of `argparse`? argparse is, after all, intended for
> > | argument pa
On Thu, Jul 4, 2013 at 2:52 PM, Ferrous Cranus wrote:
> Στις 4/7/2013 9:40 μμ, ο/η Grant Edwards έγραψε:
>
> On 2013-07-04, ?? wrote:
>>
>>>
>>> If you guys want to use it i can send you a patch for it. I know its
>>> illegal thing to say but it will help you use it without buying it.
>
On Thu, Jul 11, 2013 at 9:05 AM, Ulrich Eckhardt <
ulrich.eckha...@dominolaser.com> wrote:
> Hello!
>
> I just stumbled over a case where Python (2.7 and 3.3 on MS Windows) fail
> to detect that an object is a function, using the callable() builtin
> function. Investigating, I found out that the o
On Tue, Jul 23, 2013 at 7:42 AM, Vincent Vande Vyvre <
vincent.vandevy...@swing.be> wrote:
> On Windows a script where de endline are the system line sep, the files
> are open with a double line in Eric4, Notepad++ or Gedit but they are
> correctly displayed in the MS Bloc-Notes.
>
> Example with
On Tue, Jul 23, 2013 at 5:38 AM, wrote:
> Dear Christian,
>
> Thanks for the help. Can you please add a source example as I am new with
> Tkinter.
>
http://docs.python.org/2/library/ttk.html#progressbar
You can do something like this:
#!/usr/bin/env python
import Tkinter as tk
import ttk
imp
On Tue, Jul 23, 2013 at 9:26 AM, Vincent Vande Vyvre <
vincent.vandevy...@swing.be> wrote:
> Le 23/07/2013 15:10, Vincent Vande Vyvre a écrit :
>
> The '\n' are in the original file.
>>
>> I've tested these other versions:
>>
>> --**-
>> def write():
>> strings = [
You've gotten plenty of good advice from people discussing the coding and
coding style itself, I'll provide some feedback from the vantage point of a
perspective user.
On Thu, Jul 25, 2013 at 9:24 AM, Devyn Collier Johnson <
devyncjohn...@gmail.com> wrote:
> Aloha Python Users!
>
>I made a P
Hello,
I'm running into an unexpected issue in a program I'm writing, and I was
hoping someone could provide some clarification for me. I'm trying to
subclass numpy.ndarray (basically create a class to handle a 3D grid).
When I instantiate a numpy.ndarray, everything works as expected. When I
c
On Thu, Aug 2, 2012 at 5:49 AM, Ulrich Eckhardt <
ulrich.eckha...@dominolaser.com> wrote:
> Hi!
>
> I'm trying to write some code that should work with both Python 2 and 3.
> One of the problems there is that the input() function has different
> meanings, I just need the raw_input() behaviour of P
On Sat, Aug 18, 2012 at 11:19 AM, kj wrote:
>
> Basically, I'm looking for a read-only variable (or variables)
> initialized by Python at the start of execution, and from which
> the initial working directory may be read or computed.
>
This will work for Linux and Mac OS X (and maybe Cygwin, but
On Sun, Aug 26, 2012 at 9:54 PM, Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info> wrote:
> Yes, you read the subject line right -- Python 1.5. Yes, I am nuts ;)
>
> (I like having old versions of Python around for testing historical
> behaviour.)
>
> On Debian squeeze, when I try to build P
On Thu, Sep 20, 2012 at 5:06 PM, Gelonida N wrote:
> I'd like to implement the equivalent functionality of the unix command
> /usr/bin/which
>
> The function should work under Linux and under windows.
>
> Did anybody already implement such a function.
> If not, is there a portable way of splittin
On Fri, Oct 19, 2012 at 4:11 PM, wrote:
> I am trying to create a button in Tkinter and then when it is pressed
> delete it/have it disappear. Does anyone know the simplest script to do
> that with. Thanks for your help.
>
Note that there is a _big_ difference between having a button 'disappear'
Hello,
I was having some trouble understanding decorators and inheritance and all
that. This is what I was trying to do:
# untested
class A(object):
def _protector_decorator(fcn):
def newfcn(self, *args, **kwargs):
return fcn(self, *args, **kwargs)
return newfcn
@_pro
On Thu, Jan 31, 2013 at 12:46 AM, Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info> wrote:
> On Wed, 30 Jan 2013 19:34:03 -0500, Jason Swails wrote:
>
> > Hello,
> >
> > I was having some trouble understanding decorators and inheritance and
> > a
On Thu, Jan 31, 2013 at 10:28 AM, Chris Angelico wrote:
>
> >> Well, that surely isn't going to work, because it always decorates the
> >> same function, the global "fcn".
> >
> >
> > I don't think this is right. fcn is a passed function (at least if it
> acts
> > as a decorator) that is declare
On Thu, Jan 31, 2013 at 11:00 AM, Jason Swails wrote:
>
>
> On Thu, Jan 31, 2013 at 10:28 AM, Chris Angelico wrote:
>
>>
>> >> Well, that surely isn't going to work, because it always decorates the
>> >> same function, the global "fcn&quo
On Thu, Jan 31, 2013 at 6:16 PM, Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info> wrote:
>
> Normally, subclasses should extend functionality, not take it away. A
> fundamental principle of OO design is that anywhere you could sensibly
> allow an instance, should also be able to use a subcl
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
>
On Tue, Aug 16, 2011 at 9:14 PM, Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info> wrote:
> David Monaghan wrote:
>
> > On Tue, 16 Aug 2011 13:13:10 -0700 (PDT), rantingrick
> > wrote:
> >
> >>If conciseness is all you seek then perhaps you prefer the following?
> >>
> >>ORIGINAL: "I used t
Hello everyone,
This is probably a basic question with an obvious answer, but I don't quite
get why the type(foo).__name__ works differently for some class instances
and not for others. If I have an "underived" class, any instance of that
class is simply of type "instance". If I include an expli
On Sun, Aug 28, 2011 at 10:41 PM, Russ P. wrote:
>
> > You could look at the return value of os.system, which may tell you the
> > exit status of the process.
>
> Thanks for the suggestion. Yeah, I guess I could do that, but it seems
> that there should be a simpler way to just kill the "whole en
On Thu, Sep 1, 2011 at 5:12 PM, Fulvio wrote:
> Hello,
>
> I'm on python3.2, trying some experiment with OptionParser but no success
>
> >>> from optparse import OptionParser as parser
> >>> parser.add_option('-n','--new', dest='new')
>
Here you've imported parser as an alias to the OptionParser
Hello,
I have a question I was having a difficult time finding with a quick google
search, so I figured someone on here might know. For the sake of backwards
compatibility (and supporting systems whose default python is OLD), I'd like
to rewrite some code to be compliant with Pythons as old as 2.
> subpackage1 imports the exceptions module from package1, and I do that
> like
> > this:
> >
> > from ..exceptions import MyException
> >
>
> You'll have to import that using the absolute import. It would be
> "from package1.exceptions import MyException".
>
Ah; I didn't quite see how something i
On Mon, Mar 14, 2011 at 11:25 AM, Alexander Schatten wrote:
> They don't. Hm, ok, I am always for best practices. If there is a
> better way to do it I am open for suggestions ;-) How would the best
> practice be to load configuration data from a file.
>
> I mean, this is something very common: yo
> The metric system is defined to such a ridiculous level of precision
> because we have the technology, and the need, to measure things to that
> level of precision. Standards need to be based on something which is
> universal and unchanging.
>
Other systems of measure (for instance, atomic units
On Thu, Mar 24, 2011 at 4:05 PM, Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info> wrote:
> On Thu, 24 Mar 2011 19:39:21 +0100, Seldon wrote:
>
> > Hi, I have a question about generating variable assignments dynamically.
> [...]
> > Now, I would like to use data contained in this list to dyn
I'm guessing you have something like
list1=['1.0', '2.3', '4.4', '5.5', ...], right?
You can do this:
for i in range(len(list1)):
list1[i] = float(list1[i])
There's almost certainly a 1-liner you can use, but this should work.
--Jason
On Fri, Mar 25, 2011 at 8:19 AM, joy99 wrote:
> Dear G
2011/3/27 joy99
> Dear Group,
>
> I have two questions one related to pow() and other is related to
> random.
> My questions are as below:
>
> (i) By standard definition of Likelihood Estimation, we get if x EURO X,
> where X is a countable set of types, p is probability and f is
> frequency.
> L
Hello everyone,
This may sound like a bit of a strange desire, but I want to change the way
in which a python program quits if an exception is not caught. The program
has many different classes of exceptions (for clarity purposes), and they're
raised whenever something goes wrong. Most I want to
On Sun, Apr 10, 2011 at 12:34 PM, Laszlo Nagy wrote:
> 2011.04.10. 21:25 keltezéssel, Jason Swails írta:
>
> Hello everyone,
>
> This may sound like a bit of a strange desire, but I want to change the
> way in which a python program quits if an exception is not caught. The
On Sun, Apr 10, 2011 at 4:49 PM, Jerry Hill wrote:
> On Sun, Apr 10, 2011 at 3:25 PM, Jason Swails
> wrote:
> >
> > Hello everyone,
> >
> > This may sound like a bit of a strange desire, but I want to change the
> way in which a python program quits if an except
On Mon, Apr 11, 2011 at 7:12 PM, James Mills
wrote:
>
> > Are you saying the two snippets above are equivalent?
>
> def foo(n):
>x = n < 5
>if x:
>return x
>
> is functionally equivalent to:
>
> def foo(n):
>return n < 5
>
>
This is only true if n < 5. Otherwise, the first ret
On Thu, Apr 14, 2011 at 1:52 PM, Fabio wrote:
> Then, I started to use TexWrangler, and I wanted to use the "shebang"
> menu, and "run" command.
> I have the "#! first line" pointing to the 2.6 version.
> It works fine, as long as I don't import the libraries, in which case it
> casts an error sa
On Wed, Apr 13, 2011 at 7:03 PM, Ryan Kelly wrote:
> It's also an oft-cited troll conspiracy that Guido hangs out on
> python-list and posts under various pseudonyms. I think it would be
> kinda fun if he did...
>
What if one of those was rr? I can't imagine he'd have that much time for
self-e
Hello!
I am running into a very perplexing issue that is very rare, but creeps up
and is crashing my app.
The root cause of the issue comes down to the following check returning
true:
isinstance([], collections.Mapping)
Obviously you can get this behavior if you register `list` as a subclass of
On Sun, Dec 29, 2013 at 10:29 PM, Steven D'Aprano wrote:
> On Mon, 30 Dec 2013 10:30:11 +1100, Chris Angelico wrote:
>
> > On Mon, Dec 30, 2013 at 10:22 AM, Steven D'Aprano
> > wrote:
> >> So you need to X-forward from the remote machine to the machine you are
> >> physically on, or perhaps it's
On Tue, Jan 12, 2016 at 9:12 AM, me wrote:
> On 2016-01-10, Peter Otten <__pete...@web.de> wrote:
> class Derived(Base):
> > ... def _init(self, x):
> > ... super()._init(x)
> > ... print("do something else with", x)
> > ...
> Derived(42)
> > do something with 42
> >
On Tue, Jan 19, 2016 at 2:27 AM, Arshpreet Singh wrote:
>
> I was playing with Generators and found that using Generators time is bit
> more than list-comprehensions or I am doing it wrong?
>
>
> Function with List comprehensions:
>
> def sum_text(number_range):
> return sum([i*i for i in xra
On Tue, Jan 19, 2016 at 3:19 PM, Jason Swails
wrote:
>
> I use generator expressions when
>
> - I *might* want to
>
I forgot to finish my thought here. I use generator expressions when I
don't want to worry about memory, there's a decent chance of
short-circuiting,
On Sun, Jan 31, 2016 at 9:08 PM, Paulo da Silva <
p_s_d_a_s_i_l_v_a...@netcabo.pt> wrote:
> Às 01:43 de 01-02-2016, Mark Lawrence escreveu:
> > On 01/02/2016 00:46, Paulo da Silva wrote:
> ...
>
> >>
> >
> > Is it as simple as adding a call to ts.show() ?
> >
> Thanks for the clue!
> Not so simple
On Sun, Feb 7, 2016 at 2:58 AM, Chris Angelico wrote:
>
> Would writing a script to figure out whether there are more
> statisticians or programmers be a statistician's job or a
> programmer's?
>
Yes.
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, Feb 24, 2016 at 8:01 PM, Feagans, Mandy
wrote:
> Dear Python,
>
>
> Hi! I am a student interested in conducting computational analysis of
> protein-ligand binding for drug development analysis. Recently, I read of
> an individual using a python program for their studies of protein-ligand
On Tue, 2014-11-04 at 16:22 +0630, Veek M wrote:
> https://github.com/Veek/Python/tree/master/junk/hello
> doesn't work.
> I have:
> hello.c which contains: int hello(void);
> hello.h
>
> To wrap that up, i have:
> hello.py -> _hello (c extension) -> pyhello.c -> method py_hello()
>
> People usin
On Tue, 2014-11-04 at 21:45 +0630, Veek M wrote:
> Jason Swails wrote:
>
> > I've submitted a PR to your github repo showing you the changes
> > necessary to get your module working on my computer.
>
> Segfaults :p which is an improvement :)
What operating system
On Tue, Nov 4, 2014 at 11:09 AM, Veek M wrote:
> static PyMethodDef hellomethods[] = {
> {"hello", py_hello, METH_VARARGS, py_hello_doc},
> {NULL, NULL, 0, NULL},
> };
>
> It's basically the METH_VARARGS field that's giving the problem. Switching
> it to NULL gives,
> SystemError: Bad cal
On Tue, 2014-11-04 at 23:03 +0630, Veek M wrote:
> okay got it working - thanks Jason! The 3.2 docs are slightly different.
What did you need to do to get it working?
--
https://mail.python.org/mailman/listinfo/python-list
This was a problem posed to me, which I solved in Python. I thought it was
neat and enjoyed the exercise of working through it; feel free to ignore.
For people looking for little projects to practice their skills with (or a
simple distraction), read on.
You have a triangle of numbers such that ea
On Thu, Feb 19, 2015 at 5:47 AM, ast wrote:
> Hello
>
> import numpy as np
import matplotlib.pyplot as plt
x = np.arange(10)
y = x**2
x
>>> array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
>
>> y
>>> array([ 0, 1, 4, 9, 16, 25, 36, 49, 64, 81])
>
>> plt.plot(x,y)
>>> [
On Wed, 2015-02-25 at 18:35 -0800, John Ladasky wrote:
> I've been working with machine learning for a while. Many of the
> standard packages (e.g., scikit-learn) have fitting algorithms which
> run in single threads. These algorithms are not themselves
> parallelized. Perhaps, due to their uniq
On Thu, 2015-02-26 at 14:02 +1100, Steven D'Aprano wrote:
> John Ladasky wrote:
>
>
> > What I would REALLY like to do is to take advantage of my GPU.
>
> I can't help you with that, but I would like to point out that GPUs
> typically don't support IEE-754 maths, which means that while they are
On Wed, Apr 2, 2014 at 1:03 AM, Josh English wrote:
> I have a program with several cmd.Cmd instances. I am trying to figure out
> what the best way to organize them should be.
>
> I've got my BossCmd, SubmissionCmd, and StoryCmd objects.
>
> The BossCmd object can start either of the other two, a
On Tue, Apr 8, 2014 at 3:07 AM, James Brewer wrote:
> I'm sure there will be a substantial amount of arrogance perceived from
> this question, but frankly I don't think that I have anything to learn from
> my co-workers, which saddens me because I really like to learn and I know
> that I have a l
On Wed, May 21, 2014 at 7:59 AM, Jamie Mitchell wrote:
> I have made a plot using the following code:
>
> python2.7
> import netCDF4
> import matplotlib.pyplot as plt
> import numpy as np
>
>
> swh_Q0_con_sw=netCDF4.Dataset('/data/cr1/jmitchel/Q0/swh/controlperiod/south_west/swhcontrol_swes
On Thu, Oct 10, 2013 at 2:29 PM, Skip Montanaro wrote:
> > Removing inappropriate entries is not much of a hack.
>
> True, but then I have to go through the trouble of adding them back in
> should they become valid again. :-)
>
It seems that this could be handled fairly straight-forwardly by
sub
On Thu, 2015-02-26 at 07:57 -0800, af300...@gmail.com wrote:
> Hi,
>
> I'm a complete neophyte to the whole use of GNU
> autotools/automake/auto... . (I'm not sure what it should be called
> anymore.) Regardless, I'm porting a library project, for which I'm a
> team member, to using this toolset
On Thu, 2015-02-26 at 16:53 +, Sturla Molden wrote:
> GPU computing is great if you have the following:
>
> 1. Your data structures are arrays floating point numbers.
It actually works equally great, if not better, for integers.
> 2. You have a data-parallel problem.
This is the biggest one
On Thu, Feb 26, 2015 at 4:10 PM, Sturla Molden
wrote:
> On 26/02/15 18:48, Jason Swails wrote:
>
>> On Thu, 2015-02-26 at 16:53 +, Sturla Molden wrote:
>>
>>> GPU computing is great if you have the following:
>>>
>>> 1. Your data structures ar
On Sat, Mar 7, 2015 at 4:15 AM, Lakshmipathi.G
wrote:
> Hi,
>
> I'm following this example :
> http://nedbatchelder.com/text/whirlext.html#h_making_a_type and trying
> to add
> new data into 'CountDict' type
>
> Adding a simple 'char' works well.
>
> typedef struct {
>PyObject_HEAD
>PyObj
On Wed, 2015-03-18 at 00:35 +, Mark Lawrence wrote:
> I've just come across this
> http://www.stavros.io/posts/brilliant-or-insane-code/ as a result of
> this http://bugs.python.org/issue23695
>
> Any and all opinions welcomed, I'm chickening out and sitting firmly on
> the fence.
I'll go
On Mon, Mar 23, 2015 at 8:38 PM, Emile van Sebille wrote:
> On 3/23/2015 5:52 AM, Steven D'Aprano wrote:
>
> Are there any other, possibly better, ways to calculate the fractional
>> part
>> of a number?
>>
>
> float (("%6.3f" % x)[-4:])
In general you lose a lot of precision this way...
--
On Fri, May 29, 2015 at 5:06 PM, wrote:
>
> > For example, the new (in 3.4) Enum class uses a metaclass.
> >
> >class SomeEnum(Enum):
> > first = 1
> > second = 2
> > third = 3
> >
> > The metaclass changes normal class behavior to:
> >
> >- support iterating: list(SomeE
On Mon, Jun 8, 2015 at 3:32 AM, naren wrote:
> Memory Error while working with pandas dataframe.
>
> Description of Environment Windows 7 python 3.4.2 32-bit version pandas
> 0.16.0
>
> We are running into the error described below. Any help provided will be
> sincerely appreciated.
>
> We are ab
On Thu, Jul 2, 2015 at 10:52 AM, Steven D'Aprano
wrote:
> Despite the title, this is not one of the usual "Why can't Python do
> maths?" "bug" reports.
>
> Can anyone reproduce this behaviour? If so, please reply with the version
> of
> Python and your operating system. Printing sys.version will
On Fri, Jul 3, 2015 at 11:13 AM, Oscar Benjamin
wrote:
> On 2 July 2015 at 18:29, Jason Swails wrote:
> >
> > As others have suggested, this is almost certainly a 32-bit vs. 64-bit
> > issue. Consider the following C program:
> >
> > // maths.h
> > #
On Fri, Jul 3, 2015 at 10:01 PM, Sayth Renshaw
wrote:
> In future releases of Python should ipython Notebooks replace idle as the
> default tool for new users to learn python?
> This would as I see it have many benefits?
>
> 1. A nicer more usual web interface for new users.
> 2. Would allow th
On Mon, Jul 6, 2015 at 11:44 AM, Oscar Benjamin
wrote:
> On Sat, 4 Jul 2015 at 02:12 Jason Swails wrote:
>
>> On Fri, Jul 3, 2015 at 11:13 AM, Oscar Benjamin <
>> oscar.j.benja...@gmail.com> wrote:
>>
>>> On 2 July 2015 at 18:29, Jason Swails wrote:
>
I am a little late to the party, but I feel that I have something to
contribute to this discussion. Apologies for the top-post, but it's really
in response to any particular question; more of a "this is my story with
Python 2.7". I still use primarily Python 2.7, although I write code using
six t
On Tue, Jul 21, 2015 at 10:58 PM, ryguy7272 wrote:
> On Monday, July 20, 2015 at 10:57:47 PM UTC-4, ryguy7272 wrote:
> > I'd like to install ALL Python packages on my machine. Even if it takes
> up 4-5GB, or more, I'd like to get everything, and then use it when I need
> it. Now, I'd like to im
On Fri, Jul 31, 2015 at 9:21 PM, Steve Burrus
wrote:
> How Do I access tkinter in Python 3.4 anyway? I've tried and tried but
> cannot do it.
>
You import it.
If I play mind-reader for a second, I suspect you're trying to do in Python
3 what you did in Python 2. That won't work -- the Tkinte
On Thu, Aug 13, 2015 at 6:32 AM, Tom P wrote:
> I'm having a problem trying to access OpenDAP files using netCDF4.
> The netCDF4 is installed from the Anaconda package. According to their
> changelog, openDAP is supposed to be supported.
>
> netCDF4.__version__
> Out[7]:
> '1.1.8'
>
> Here's some
> On Aug 14, 2015, at 3:18 AM, Tom P wrote:
>
> Thanks for the reply but that is not what the documentation says.
>
> http://unidata.github.io/netcdf4-python/#section8
> "Remote OPeNDAP-hosted datasets can be accessed for reading over http if a
> URL is provided to the netCDF4.Dataset construc
On Tue, Sep 1, 2015 at 2:07 PM, Chris Angelico wrote:
> On Wed, Sep 2, 2015 at 3:23 AM, wrote:
> > I'm starting in the Python scripts. I run this script:
> >
> >
> > import numpy as np
> >
> > import netCDF4
> >
> > f = netCDF4.Dataset('uwnd.mon.ltm.nc','r')
> >
> >
> > f.variables
> >
> >
> >
On Fri, Oct 9, 2015 at 6:08 AM, Joshua Stokes
wrote:
> Hi
>
> Is there an available script to remove file created by either using the
> Python module or by using git?
>
There's always this nugget:
git clean -fxd
This will get rid of *all* untracked files in the current directory of a
git repo
On Mon, Oct 12, 2015 at 1:50 PM, Bartc wrote:
> On 12/10/2015 18:20, Marko Rauhamaa wrote:
>
>> Bartc :
>>
>> (Example, calling fib(40) on the example below took 90 seconds on
>>> Python 3.4, 11 seconds with PyPy, but only 1.8 seconds running the
>>> equivalent with FreeBasic:
>>>
>>
>> I don't k
Hi everyone,
I'd like to get some opinions about some coding constructs that may seem at
first glance to serve no purpose, but does have *some* non-negligible
purpose, and I think I've come to the right place :).
The construct is this:
def my_function(arg1, arg2, filename=None):
""" Some fun
On Wed, Oct 14, 2015 at 10:07 PM, Ben Finney
wrote:
> Jason Swails writes:
>
> > What I recently realized, though, that what this construct allows is
> > for the coverage testing package (which I have recently started
> > employing for my project... thanks Ned and ot
On Thu, Nov 12, 2015 at 3:05 AM, Xiang Zhang <18518281...@126.com> wrote:
> Recently I am learning Python C API.
>
> When I read the tutorial <
> https://docs.python.org/3/extending/newtypes.html#the-basics>, defining
> new types, I feel confused. After PyType_Ready(&noddy_NoddyType) comes
> Py_IN
On Fri, Jun 20, 2014 at 4:10 AM, Jamie Mitchell wrote:
> Hi folks,
>
> Instead of colouring the entire bar of a histogram i.e. filling it, I
> would like to colour just the outline of the histogram. Does anyone know
> how to do this?
> Version - Python2.7
>
Look at the matplotlib.pyplot.hist fun
On Fri, Jun 20, 2014 at 10:27 AM, Jamie Mitchell <
jamiemitchell1...@gmail.com> wrote:
>
> That's great Jason thanks for the detailed response, I went with the
> easier option 1!
>
> I am also trying to put hatches on my histograms like so:
>
> plt.hist(dataset,bins=10,hatch=['*'])
>
> When it com
On Wed, Jul 16, 2014 at 11:40 AM, Mark Lawrence
wrote:
> On 16/07/2014 18:32, Deb Wyatt wrote:
>
>> Can you all stop already with the non python US bashing? Please?
>>
>> Deb in WA, USA
>>
>>
> rr started it with a fairly impressive piece of trolling but as you've
> asked so politely I will happ
On Wed, Jul 16, 2014 at 1:27 PM, Mark Lawrence
wrote:
>
> The difference between our most illustrious resident unicode expert and rr
> is that the former has only said anything of use once, whereas the latter
> does know about tkinter/IDLE. rr doesn't show up that often, the MIRUC has
> been spe
1 - 100 of 165 matches
Mail list logo