Hi all,
We're still waiting for some tardy presenters who haven't put in their
proposals yet, and it's unfair to give just them an extension so we're
leaving the submission system open until next Monday, the 9th of May.
Thanks to everyone else who put in their proposals on time, and we'll
be start
You can do this easy by adding this to the options dict in setup.py
'dll_excludes': [ "mswsock.dll", "powrprof.dll" ]
source:
http://stackoverflow.com/questions/1979486/py2exe-win32api-pyc-importerror-dll-load-failed
-Amit
alex23 wrote:
>
> Alex Hall wrote:
>> I am stumped. The compiled v
On 2011-05-03 20:18:33 -0400, Catherine Moroney said:
Hello,
I have an object of class X that I am writing to a pickled file. The
pickling part goes fine, but I am having some problems reading the
object back out, as I get complaints about "unable to import module X".
The only way I have f
On Wed, May 4, 2011 at 10:45 AM, Astan Chee wrote:
> Hi,
> I'm trying to make a python script (in windows 7 x64 using python 2.5) to
> start a process, and kill it after x minutes/seconds and kill all the
> descendants of it.
> Whats the best way of doing this in python? which module is best suite
On Wed, May 4, 2011 at 10:18 AM, Catherine Moroney
wrote:
> Am I explaining myself properly? Why doesn't the code that loads the
> object from the pickled file work unless I am sitting in the same directory?
> The code that writes the pickled file has the statement
> "from Y.X import X" stateme
closer I think
1) I changed tp_name to be 'observation.MV' ( module is named observation.c
) and now I get a new error..
PicklingError: Can't pickle : import of module
observation failed
2) here is the init function, sorry I did not include it in the original
listing
void initobservation(void)
On 2011-05-03, Jabba Laci wrote:
> I'm just reading Robert M. Martin's book entitled "Clean Code". In Ch.
> 5 he says that a function that is called should be below a function
> that does the calling. This creates a nice flow down from top to
> bottom.
I generally expect the opposite: callees ab
Hello,
I have an object of class X that I am writing to a pickled file. The
pickling part goes fine, but I am having some problems reading the
object back out, as I get complaints about "unable to import module X".
The only way I have found around it is to run the read-file code out of
the
Hi,
I'm trying to make a python script (in windows 7 x64 using python 2.5) to
start a process, and kill it after x minutes/seconds and kill all the
descendants of it.
Whats the best way of doing this in python? which module is best suited to
do this? subprocess?
thanks for any help
--
http://mail.
Ben Finney writes:
> Jabba Laci writes:
>
>> Is there a convention for this? Should main() be at the top and called
>> function below?
>
> No, it's Python convention for both of those to be at the end of the
> module.
>
> I follow the convention described by Guido van Rossum in
> http://www.arti
In article ,
Jabba Laci wrote:
> I'm just reading Robert M. Martin's book entitled "Clean Code". In Ch.
> 5 he says that a function that is called should be below a function
> that does the calling. This creates a nice flow down from top to
> bottom.
There may have been some logic to this when
On 5/3/11 5:46 PM, MRAB wrote:
On 03/05/2011 23:31, Chris Angelico wrote:
On Wed, May 4, 2011 at 8:08 AM, Jabba Laci wrote:
Hi,
I'm just reading Robert M. Martin's book entitled "Clean Code". In Ch.
5 he says that a function that is called should be below a function
that does the calling. This
Jabba Laci writes:
> Is there a convention for this? Should main() be at the top and called
> function below?
No, it's Python convention for both of those to be at the end of the
module.
I follow the convention described by Guido van Rossum in
http://www.artima.com/weblogs/viewpost.jsp?thread=4
On Tuesday 03 May 2011 16:00:05 Terry Reedy wrote:
> On 5/3/2011 1:04 AM, Stefan Behnel wrote:
> > The bad thing about this recipe is that it requires quite a
> > bit of background knowledge in order to infer that the
> > code the developer is looking at is actually correct.
>
> The main math know
On Wed, May 4, 2011 at 8:31 AM, Ian Kelly wrote:
> A back-of-the-envelope calculation
> shows that with modern technology it would take more than 10 ** 257
> years to complete.
Then I propose that Python be extended to allow for underlying
hardware upgrades without terminating a script. This will
On 03/05/2011 23:31, Chris Angelico wrote:
On Wed, May 4, 2011 at 8:08 AM, Jabba Laci wrote:
Hi,
I'm just reading Robert M. Martin's book entitled "Clean Code". In Ch.
5 he says that a function that is called should be below a function
that does the calling. This creates a nice flow down from
On Tue, May 3, 2011 at 3:41 PM, Chris Angelico wrote:
> On Wed, May 4, 2011 at 3:10 AM, harrismh777 wrote:
>> If your point is that the infinite process is the problem, I agree. But my
>> point is that the cpu crunch and the rate at which the call stack is filled
>> has to do with the double call
On Wed, May 4, 2011 at 8:08 AM, Jabba Laci wrote:
> Hi,
>
> I'm just reading Robert M. Martin's book entitled "Clean Code". In Ch.
> 5 he says that a function that is called should be below a function
> that does the calling. This creates a nice flow down from top to
> bottom.
I prefer to define
On May 2, 11:23 pm, Stefan Behnel wrote:
> Terry Reedy, 03.05.2011 08:00:
>
> > On 5/3/2011 1:04 AM, Stefan Behnel wrote:
>
> >> The bad thing about this recipe is that it requires quite a bit of
> >> background knowledge in order to infer that the code the developer is
> >> looking at is actually
On Tue, May 3, 2011 at 2:47 PM, Chris Angelico wrote:
> On Wed, May 4, 2011 at 2:57 AM, Chris Rebert wrote:
>> from foo import *
>>
>> can be thought of as essentially doing:
>>
>> import foo
>> set = foo.set
>> var = foo.var
>> del foo
>
> Here's a side point. What types will hold a reference to
On Tue, May 3, 2011 at 3:54 PM, Chris Angelico wrote:
> On Wed, May 4, 2011 at 2:43 AM, Raymond Hettinger wrote:
>> We should have a separate thread for the most practical, best
>> documented, least surprising, and most boring recipe ;-)
>
> a += b # Adds b to a in-place. Polymorphic - works on
Hi,
I'm just reading Robert M. Martin's book entitled "Clean Code". In Ch.
5 he says that a function that is called should be below a function
that does the calling. This creates a nice flow down from top to
bottom.
However, when I write a Python script I do just the opposite. I start
with the lin
On 5/3/11 4:34 PM, Stefan Kuzminski wrote:
Thanks for the clues, I made a modification so that reduce returns this..
return Py_BuildValue("O(O)", Py_TYPE(self), PyTuple_New(0), Py_None,
Py_None, Py_None );
and now I get this different error when trying to pickle the type..
---
On Wed, May 4, 2011 at 6:47 AM, Hans Georg Schaathun wrote:
> This looks like plain old transmission by reference to me.
> I.e. the functions get a reference to an object and make any
> change to the object.
"Reference" being exactly what's passed around. There are now two
references to that obje
On Wed, May 4, 2011 at 2:43 AM, Raymond Hettinger wrote:
> We should have a separate thread for the most practical, best
> documented, least surprising, and most boring recipe ;-)
a += b # Adds b to a in-place. Polymorphic - works on a wide variety of types.
You didn't say it had to be complic
On Wed, May 4, 2011 at 2:57 AM, Chris Rebert wrote:
> from foo import *
>
> can be thought of as essentially doing:
>
> import foo
> set = foo.set
> var = foo.var
> del foo
Here's a side point. What types will hold a reference to the enclosing
module (or at least its dictionary)? Would it be poss
On Wed, May 4, 2011 at 3:10 AM, harrismh777 wrote:
> If your point is that the infinite process is the problem, I agree. But my
> point is that the cpu crunch and the rate at which the call stack is filled
> has to do with the double call (which never finds tail processing).
The double call _does
Thanks for the clues, I made a modification so that reduce returns this..
return Py_BuildValue("O(O)", Py_TYPE(self), PyTuple_New(0), Py_None,
Py_None, Py_None );
and now I get this different error when trying to pickle the type..
--
On 03 May 2011 15:20:42 GMT, Steven D'Aprano
wrote:
: You get credit for not falling into the trap of thinking there are only
: two, call by reference and call by value, but there are *many* more than
: just three. Wikipedia lists at least 13:
Ah. Those 13 approaches aren't all mutually e
On Tue, 03 May 2011 12:33:15 -0400, Mel
wrote:
: mwilson@tecumseth:~$ python
: Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
: [GCC 4.4.3] on linux2
: Type "help", "copyright", "credits" or "license" for more information.
: >>> def identify_call (a_list):
: ... a_list[0] = "If you can
Thank you! Would never have found that by myself.
"Paul Rubin" wrote in message
news:7x7ha75zib@ruckus.brouhaha.com...
"Alex van der Spek" writes:
refd=dict.fromkeys(csvr.fieldnames,[]) ...
I do not understand why this appends v to every key k each time.
You have initialized every el
On Tue, May 3, 2011 at 12:56 PM, Paul Rubin wrote:
> "Alex van der Spek" writes:
> > refd=dict.fromkeys(csvr.fieldnames,[]) ...
> > I do not understand why this appends v to every key k each time.
>
> You have initialized every element of refd to the same list. Try
>
>refd = dict((k,[]) fo
"Alex van der Spek" writes:
> refd=dict.fromkeys(csvr.fieldnames,[]) ...
> I do not understand why this appends v to every key k each time.
You have initialized every element of refd to the same list. Try
refd = dict((k,[]) for k in csvr.fieldnames)
instead.
--
http://mail.python.org/mai
On Wed, May 4, 2011 at 6:23 AM, Dun Peal wrote:
> P.S. now I have to ask: is there a symbolic reference in Python, i.e.
> a name foo that points to "whatever bar.baz is pointing at"?
Well, you could easily simulate that with proxy object,
class SymbolicReference(object):
def __init__(self, ns
I open a csv file and create a DictReader object. Subsequently, reading
lines from this file I try to update a dictionary of lists:
csvf=open(os.path.join(root,fcsv),'rb')
csvr=csv.DictReader(csvf)
refd=dict.fromkeys(csvr.fieldnames,[])
for row in csvr:
for (k,v) in row.items():
re
P.S. now I have to ask: is there a symbolic reference in Python, i.e.
a name foo that points to "whatever bar.baz is pointing at"?
Thanks, D.
--
http://mail.python.org/mailman/listinfo/python-list
On May 2, 10:48 pm, John Henry wrote:
> Attempt to push Pythoncard to a 1.0 status is now underway. A
> temporary website has been created at:
>
> http://code.google.com/p/pythoncard-1-0/
>
> The official website continues to behttp://pythoncard.sourceforge.net/
>
> Pythoncard is such a wonderful
OK, I understand now.
`from foo import var` means "create a module-global name `var` inside
the current module, and have it point at the object `foo.var` is
pointing at (following its evaluation)".
Naturally, regardless of whether `foo.var` ever changes, the global
`var` of the current module sti
On May 3, 11:19 pm, Anssi Saari wrote:
> rusi writes:
> > I am a bit surprised that no one has mentioned rcs so far
> > Not an option if you are not on a *ix system and not something I am
> > specifically recommending.
>
> I actually use rcs in Windows. Needs a little setup, but works great,
> fr
On May 2, 12:38 pm, Algis Kabaila wrote:
> On Monday 02 May 2011 19:09:38 jacek2v wrote:
>
>
>
>
>
>
>
>
>
> > On May 2, 9:48 am, Algis Kabaila wrote:
> > > On Monday 02 May 2011 17:19:57 rusi wrote:
> > > > On May 2, 12:08 pm, Algis Kabaila
>
> > > wrote:
> > > > > Actually, Bazaar is more conv
rusi writes:
> I am a bit surprised that no one has mentioned rcs so far
> Not an option if you are not on a *ix system and not something I am
> specifically recommending.
I actually use rcs in Windows. Needs a little setup, but works great,
from Emacs VC-mode too.
--
http://mail.python.org/mai
Stefan Kuzminski wrote:
> I have an extension type written in C, but I cannot get it to pickle, any
> insights would be greatly appreciated.
>
> I see in the docs that I should define a __reduce__ method and that does
> get called, but I don't know specifically the type of the 'callable
> object'
Hey, I am writing a code in python to access public data online (using
BeautifulSoup).
The task is relatively easy but the code does not get to the page
because I need to accept the terms and condition of the website first
(by a standard click 'Accept' button).
I need to tell python how to automati
Dun Peal wrote:
# module foo.py
var = 0
def set():
global var
var = 1
My two cents to add in addition to the correct accounts of [ Daniel,
Chris, Mel] is that you might have a misunderstanding of var, generally.
Python has no variables--- in the way you thin
Chris Angelico wrote:
The recursion is in the last block. Note that it calls a function,
then keeps going. It doesn't fork. There are two CALL_FUNCTION
opcodes, called*sequentially*. In terms of the call stack, there is
only ever one of those two calls active at any given time.
RuntimeError: ma
Your problem is reveal in the subject line. As discussed in many other
threads, including a current one, Python does not have 'variables' in
the way that many understand the term. Python binds names to objects.
Binding statements (assignment, augmented assignment, import, def,
class, and others
On 5/3/11 11:48 AM, Stefan Kuzminski wrote:
Hi all,
I have an extension type written in C, but I cannot get it to pickle, any
insights would be greatly appreciated.
I see in the docs that I should define a __reduce__ method and that does get
called, but I don't know specifically the type of the
Dun Peal wrote:
> Hi!
>
> Here's the demonstrating code:
>
> # module foo.py
> var = 0
>
> def set():
> global var
> var = 1
>
> Script using this module:
>
> import foo
> from foo import *
>
> print var, foo.var
> set()
> print var, foo.var
>
On Tue, May 3, 2011 at 9:31 AM, Dun Peal wrote:
> Hi!
>
> Here's the demonstrating code:
>
> # module foo.py
> var = 0
>
> def set():
> global var
> var = 1
>
> Script using this module:
>
> import foo
> from foo import *
>
> print var, foo.var
> set()
> print
On Wed, May 4, 2011 at 3:31 AM, Dun Peal wrote:
> Apparently, the `var` we imported from `foo` never got set, but
> `foo.var` on the imported `foo` - did. Why?
Because all names are references to some values, not other names (in
CPython, it means all names are PyObject*, and point directly to the
On 2011-05-03, Mel wrote:
> To illustrate the neither-fish-nor-fowl nature of Python calls:
>
> mwilson@tecumseth:~$ python
> Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
> [GCC 4.4.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
def identify_call (
On Tue, May 3, 2011 at 8:49 AM, Terry Reedy wrote:
> On 5/3/2011 2:29 AM, Gregory Ewing wrote:
>>
>> Terry Reedy wrote:
>>>
>>> The trick is that replacing x with j and evaluating therefore causes
>>> (in Python) all the coefficients of x (now j) to be added together
>>> separately from all the co
Hi all,
I have an extension type written in C, but I cannot get it to pickle, any
insights would be greatly appreciated.
I see in the docs that I should define a __reduce__ method and that does get
called, but I don't know specifically the type of the 'callable object' that
should be the first th
On May 2, 10:04 pm, Stefan Behnel wrote:
> The bad thing about this recipe is that it requires quite a bit of
> background knowledge in order to infer that the code the developer is
> looking at is actually correct. At first sight, it looks like an evil hack,
> and the lack of documentation doesn'
On May 2, 11:29 pm, Gregory Ewing wrote:
> Terry Reedy wrote:
> > The trick is that replacing x with j and evaluating
> > therefore causes (in Python) all the coefficients of x (now j) to be
> > added together separately from all the constant terms to reduce the
> > linear equation to a*x+b (= 0 i
Hans Georg Schaathun wrote:
> On 01 May 2011 08:45:51 GMT, Steven D'Aprano
>wrote:
> : Python uses a data model of "name binding" and "call by object" (also
> : known as "call by sharing"). I trust I don't need to define my terms,
> : but just in case:
>
> Without having the time to get my
Hi!
Here's the demonstrating code:
# module foo.py
var = 0
def set():
global var
var = 1
Script using this module:
import foo
from foo import *
print var, foo.var
set()
print var, foo.var
Script output:
0 0
0 1
Apparently, the `var` w
On Tue, May 3, 2011 at 5:49 AM, Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info> wrote:
> On Tue, 03 May 2011 21:04:07 +1000, Chris Angelico wrote:
>
> > And that, Your Honour, is why I prefer bignums (especially for integers)
> > to floating point. Precision rather than performance.
>
> I'
On 5/3/2011 2:29 AM, Gregory Ewing wrote:
Terry Reedy wrote:
The trick is that replacing x with j and evaluating therefore causes
(in Python) all the coefficients of x (now j) to be added together
separately from all the constant terms to reduce the linear equation
to a*x+b (= 0 implied).
Hmmm
On Tue, 03 May 2011 13:39:24 +0100, Hans Georg Schaathun wrote:
> On 01 May 2011 08:45:51 GMT, Steven D'Aprano
>wrote:
> : Python uses a data model of "name binding" and "call by object" (also
> : known as "call by sharing"). I trust I don't need to define my terms,
> but : just in case:
>
Wim Feijen wrote:
Excuse me, this message was sent to the wrong mailing list.
Sorry, Wim
2011/5/3 Wim Feijen mailto:w...@go2people.nl>>
Dag mannen,
You're lucky that the native language of our Benevolent Dictator For
Life is tolerated in this list.
JM
--
http://mail.python.org/mailman
On 2011-05-03, Hans Georg Schaathun wrote:
> On 01 May 2011 08:45:51 GMT, Steven D'Aprano
> wrote:
>: Python uses a data model of "name binding" and "call by object" (also
>: known as "call by sharing"). I trust I don't need to define my terms, but
>: just in case:
>
> Without having the ti
Excuse me, this message was sent to the wrong mailing list.
Sorry, Wim
2011/5/3 Wim Feijen
> Dag mannen,
>
> Afgelopen week liepen we tegen het feit op dat Google e-mails afkomstig van
> onze server als spam markeerde en deze zonder bericht verwijderde. Ik vroeg
> me af of een van jullie hier w
Pyinstaller can also be used to create executables. It does not need python
installed.
We have been able to make executables for windows and mac as well with this.
- Parikshit
On Tue, May 3, 2011 at 3:54 PM, Miki Tebeka wrote:
> > py2exe would work, but a correct installer would install Pytho
This is a place about python man! Python.
2011/5/3 Ashraf Ali
> What are you lookink for. Just visit to see what you want
> www.bollywoodhotactresswallpapers.blogspot.com
>
> www.bollywoodhotwallpaperz.blogspot.com
>
> www.bollywoodhotactresspicz.blogspot.com
>
> www.hottesthitsbollywood.blogspo
English man English.
2011/5/3 Wim Feijen
> Dag mannen,
>
> Afgelopen week liepen we tegen het feit op dat Google e-mails afkomstig van
> onze server als spam markeerde en deze zonder bericht verwijderde. Ik vroeg
> me af of een van jullie hier wel eens tegenop is gelopen en wil bij deze
> even w
Hello,
I've downloaded the 3.2 source tarball from python.org and tried to
compile Python from scratch in a Cygwin 1.7.7 environment. Configure
works as expected. Make fails with the following message:
make: *** No rule to make target `libpython3.2m.dll.a', needed by
`python.exe'. Stop.
T
Dag mannen,
Afgelopen week liepen we tegen het feit op dat Google e-mails afkomstig van
onze server als spam markeerde en deze zonder bericht verwijderde. Ik vroeg
me af of een van jullie hier wel eens tegenop is gelopen en wil bij deze
even waarschuwen dat dat dus zomaar kan gebeuren.
Wat voor o
Steven D'Aprano writes:
> "Python's data model is different from other languages"
>
> which is perfectly correct, if you think of C as "other languages". But
> it's equally correct to say that Python's data model is the same as other
> languages. As I understand it, Python and Ruby have the sam
> py2exe would work, but a correct installer would install Python if not
> present, then install the program.
py2exe packs everything you need, including Python. A program created with
py2exe does not depend on installed Python.
--
http://mail.python.org/mailman/listinfo/python-list
On 01 May 2011 08:45:51 GMT, Steven D'Aprano
wrote:
: Python uses a data model of "name binding" and "call by object" (also
: known as "call by sharing"). I trust I don't need to define my terms, but
: just in case:
Without having the time to get my hand around exactly what this means:
Sim
On Tue, May 3, 2011 at 10:49 PM, Steven D'Aprano
wrote:
> On Tue, 03 May 2011 21:04:07 +1000, Chris Angelico wrote:
>
>> And that, Your Honour, is why I prefer bignums (especially for integers)
>> to floating point. Precision rather than performance.
>
> I'm intrigued by your comment "especially f
On Tue, 03 May 2011 21:04:07 +1000, Chris Angelico wrote:
> And that, Your Honour, is why I prefer bignums (especially for integers)
> to floating point. Precision rather than performance.
I'm intrigued by your comment "especially for integers", which implies
that you might use bignums for non-i
On Tue, May 3, 2011 at 8:32 PM, Dave Angel wrote:
> What I'm surprised at is that nobody has pointed out that the logn version
> is also generally more accurate, given traditional floats. Usually getting
> the answer accurate (given the constraints of finite precision
> intermediates) is more impo
On May 3, 3:32 pm, Dave Angel wrote:
> What I'm surprised at is that nobody has pointed out that the logn
> version is also generally more accurate, given traditional floats.
> Usually getting the answer accurate (given the constraints of finite
> precision intermediates) is more important than p
On Apr 30, 6:39 pm, David Cournapeau wrote:
> On Sat, Apr 30, 2011 at 2:19 PM, James A. Donald
> wrote:
>
> > I have noticed that installingpythonprograms tends to be hell,
> > particularly underwindows, and installingpythonprograms that rely
> > on, or in large part are,pythonextensionswritten
On 01/-10/-28163 02:59 PM, rusi wrote:
On May 3, 10:29 am, Chris Angelico wrote:
On Tue, May 3, 2011 at 3:27 PM, Dan Stromberg wrote:
Doh.
Usually when someone gives a recursive solution to this problem, it's
O(logn), but not this time.
Here's a logn one:
:-) Ok so you beat me to it :D
Ian Kelly wrote:
> t = (type, value, traceback)
> raise t
>
> That it accepts the tuple and raises a value-less expression of type
> `type` surprises me. The docs don't say anything about this, and I
> would have expected a TypeError, but it appears to be extracting the
> first element of the t
On May 3, 10:29 am, Chris Angelico wrote:
> On Tue, May 3, 2011 at 3:27 PM, Dan Stromberg wrote:
> Doh.
> Usually when someone gives a recursive solution to this problem, it's
> O(logn), but not this time.
> Here's a logn one:
:-) Ok so you beat me to it :D
I was trying to arrive at an answer
On Tue, 3 May 2011 07:56:26 +1000, Chris Angelico
wrote:
: > often recursively. The compiler should generate code the way the CPU
: > thinks (most optimally), i.e. iteratively.
:
: The CPU can function iteratively or recursively.
I should have said 'hardware' rather than CPU. Iteratively it
You can check this https://github.com/kanaka/noVNC
2011/5/3 Dan Stromberg
>
> On Mon, May 2, 2011 at 5:23 PM, PyNewbie wrote:
>
>> Hi,
>> I'm looking for a python class or open source code that is tightly
>> integrated with VNC protocols - any ideas?
>> --
>> http://mail.python.org/mailman/list
81 matches
Mail list logo