Hey friends i tried a lot to install excel xlwt in ubuntu 9 but
failed
please help me before i get full fraustrated...
--
http://mail.python.org/mailman/listinfo/python-list
On 3/19/2011 1:03 AM, Vlastimil Brom wrote:
2011/3/19 Manatee:
I hope this is the place to post this question.
Yes.
Lesson 1. Report Python version used, as things change. For anything
that seems like it might by os/system specific, include that too.
Lesson 2. Always include tracebacks when
On Mar 18, 6:55 pm, Carl Banks wrote:
> On Mar 18, 5:31 pm, J Peyret wrote:
>
> > If I ever specifically work on an OSS project's codeline, I'll post
> > bug reports, but frankly that FF example is a complete turn-off to
> > contributing by reporting bugs.
>
> You probably shouldn't take it so pe
2011/3/19 Manatee :
> I hope this is the place to post this question. I am a really new
> pythonista. I am studying Tkinter and when I run this basic code, I
> get a syntax error on line 20, print "hi there, everyone". Its a
> simple print line, but I can't see the problem. I am using Python
> 2.
At 11:39 PM 3/18/2011, Manatee wrote:
I hope this is the place to post this question. I am a really new
pythonista. I am studying Tkinter and when I run this basic code, I
get a syntax error on line 20, print "hi there, everyone". Its a
simple print line, but I can't see the problem. I am using
On Friday 2011 March 18 21:39, Manatee wrote:
> I hope this is the place to post this question. I am a really new
> pythonista. I am studying Tkinter and when I run this basic code, I
> get a syntax error on line 20, print "hi there, everyone". Its a
> simple print line, but I can't see the probl
I hope this is the place to post this question. I am a really new
pythonista. I am studying Tkinter and when I run this basic code, I
get a syntax error on line 20, print "hi there, everyone". Its a
simple print line, but I can't see the problem. I am using Python
2.71, gVim for an editor, and a
Hey friends i tried a lot to unstall excel xlwt in ubuntu 9 but failed
please help me before i get full fraustrated...
--
http://mail.python.org/mailman/listinfo/python-list
On 3/18/2011 10:24 AM, Martin De Kauwe wrote:
def bounds_check(state):
""" check state values are> 0 """
for attr in dir(state):
if not attr.startswith('__') and getattr(state, attr)< 0.0:
print "Error state values< 0: %s" % (attr)
dir() has to do a bit a com
On 3/18/2011 5:27 PM, monkeys paw wrote:
TypeError: Error when calling the metaclass bases
module.__init__() takes at most 2 arguments (3 given)
OK, i overlooked that and the error was not very enlightening.
A detailed explanation: every module is an instance of a class we will
call Module. E
On Mar 18, 5:31 pm, J Peyret wrote:
> If I ever specifically work on an OSS project's codeline, I'll post
> bug reports, but frankly that FF example is a complete turn-off to
> contributing by reporting bugs.
You probably shouldn't take it so personally if they don't agree with
you. But it's ok,
On Fri, Mar 18, 2011 at 4:00 PM, Ethan Furman wrote:
> Dan Stromberg wrote:
>
>>
>> Are you on windows?
>>
>> You probably should use / as your directory separator in Python, not \.
>> In Python, and most other programming languages, \ starts an escape
>> sequence, so to introduce a literal \, y
On 3/18/2011 5:15 PM, Carl Banks wrote:
Multiple people reproduce a Python hang/crash yet it looks like no one
bothered to submit a bug report
I did not because I did not initially see a problem...
I observed the same behavior (2.6 and 3.2 on Linux, hangs) and went
ahead and submitted a
On Mar 18, 2:15 pm, Carl Banks wrote:
> Multiple people reproduce a Python hang/crash yet it looks like no one
> bothered to submit a bug report
>
> I observed the same behavior (2.6 and 3.2 on Linux, hangs) and went
> ahead and submitted a bug report.
>
> Carl Banks
Speaking for myself, I'v
Hello,
I wrote a test application to play around with UDP, the receiving part
looks like:
class proxyServer(SocketServer.ThreadingMixIn,
SocketServer.UDPServer):
pass
class proxyHandler(SocketServer.BaseRequestHandler):
def handle(self):
data = self.request[0]
source =
On 3/18/11 3:29 PM, Ned Deily wrote:
In article<4d838d28.5090...@creativetrax.com>,
Jason Grout wrote:
The problem appears to be that multiprocessing sets its workers to have
the daemon flag set to True, which prevents workers from creating child
processes. If I uncomment the line indicated
Wow, Jack, that is one awesome and simple module...thank you so much! I am
happily storing and accessing all the arrays I could ever want :)
Thanks to all for the quick assistance!
On Fri, Mar 18, 2011 at 4:24 PM, Jack Trades wrote:
>
> On Fri, Mar 18, 2011 at 5:21 PM, Jon Herman wrote:
>
>>
Actually, I'd probably create a class with 3 arguments - an initial value, a
lower bound, and an upper bound, give it a _check method, and call _check
from the various operator methods. The class would otherwise impersonate an
int.
In code that isn't performance-critical, it's better to check for
On Fri, 2011-03-18 at 15:18 -0700, Dan Stromberg wrote:
>
> Are you on windows?
>
>
You shouldn't use / or \ on Windows. You should use os.path.join(). On
Windows, when you start mixing / with \\ and spaces things can get hairy
and obscure. It's always best to just use os.path.join().
-
Dan Stromberg wrote:
Are you on windows?
You probably should use / as your directory separator in Python, not \.
In Python, and most other programming languages, \ starts an escape
sequence, so to introduce a literal \, you either need to prefix your
string with r (r"\foo\bar") or double yo
On Fri, 18 Mar 2011 15:16:40 -0700, Wanderer wrote:
> Thanks for the reply, but I'm still not sure I understand. Why should
> Object1 be at address1 and Object2 be at address2 and the next moment
> Object2 is at address1 and Object1 is at address2? I'll try casting
> them to see what the value is
> Offhand, my only quibble is that sys.exit is not helpful for debugging.
> Much better to raise an error:
>
> if not self.funcTable.get(attribute, lambda x: True)(value):
> raise ValueError ('error out of bound')
>
> or define a subclass of ValueError just for this purpose.
> Don't check for bounds, fix any bug in the code that would set your
> values out of bounds and use asserts while debugging.
>
whilst that is a nice idea in practice this just is not a practical
solution.
> Otherwise if you really need dynamic checks, it will cost you cpu, for
> sure.
Yes I a
On Fri, 2011-03-18 at 15:56 -0600, Jon Herman wrote:
> Jack,
>
> thanks.
>
> Alright, so what I did is create a file called hello.txt with a single
> line of text in there. I then did the following:
>
> f="fulldirectory\hello.txt" (where fulldirectory is of course the
> actual full directory on
On 18 Mar, 22:52, Miki Tebeka wrote:
> You can use mechanize, which holds a cookie jar and can user the browser
> cookies as well.
I use:
opener =
urllib.request.build_opener(urllib.request.HTTPCookieProcessor())
urllib.request.install_opener(opener)
I start scraping from http://page.com/home.ht
On Fri, Mar 18, 2011 at 5:21 PM, Jon Herman wrote:
> Folks,
>
> thanks for the many responses! Specifying the full file name (and not using
> parentheses when inappropriate, thanks Jack :)) I am now happily
> reading/writing files.
>
> My next question: what is the best way for me to write an arr
Folks,
thanks for the many responses! Specifying the full file name (and not using
parentheses when inappropriate, thanks Jack :)) I am now happily
reading/writing files.
My next question: what is the best way for me to write an array I generated
to a file?
And what is the best way for me to load
On 18.03.2011 22:33, Jon Herman wrote:
Hello all,
I am pretty new to Python and am trying to write data to a file. However, I
seem to be misunderstanding how to do so. For starters, I'm not even sure
where Python is looking for these files or storing them. The directories I
have added to my PYTH
On Mar 18, 5:48 pm, Nobody wrote:
> On Fri, 18 Mar 2011 10:34:35 -0700, Wanderer wrote:
> > I'm observing some strange behavior with ctypes. I created this test
> > code to try to figure out what I'm doing wrong creating pointers to
> > structures.
>
> What makes you think that you're doing anythi
Are you on windows?
You probably should use / as your directory separator in Python, not \. In
Python, and most other programming languages, \ starts an escape sequence,
so to introduce a literal \, you either need to prefix your string with r
(r"\foo\bar") or double your backslashes ("\\foo\\bar
On Fri, Mar 18, 2011 at 4:59 PM, Jack Trades wrote:
>
>
> On Fri, Mar 18, 2011 at 4:56 PM, Jon Herman wrote:
>
>> Jack,
>>
>> thanks.
>>
>> Alright, so what I did is create a file called hello.txt with a single
>> line of text in there. I then did the following:
>>
>> f="fulldirectory\hello.txt"
For open() or os.open(), it should look in your Current Working Directory
(CWD). Your python's CWD defaults to what the CWD was when python was
started, and it is changed with os.chdir().
Absolute paths will of course be relative to / on most OS's (or C:/ if
you're on C:, D:/ if you're on D:, etc
On Fri, Mar 18, 2011 at 4:56 PM, Jon Herman wrote:
> Jack,
>
> thanks.
>
> Alright, so what I did is create a file called hello.txt with a single line
> of text in there. I then did the following:
>
> f="fulldirectory\hello.txt" (where fulldirectory is of course the actual
> full directory on my
Jack,
thanks.
Alright, so what I did is create a file called hello.txt with a single line
of text in there. I then did the following:
f="fulldirectory\hello.txt" (where fulldirectory is of course the actual
full directory on my computer)
open("f", "w")
And I get the following error: IOError: [E
You can use mechanize, which holds a cookie jar and can user the browser
cookies as well.
--
http://mail.python.org/mailman/listinfo/python-list
Jon Herman wrote:
Hello all,
I am pretty new to Python and am trying to write data to a file.
However, I seem to be misunderstanding how to do so. For starters, I'm
not even sure where Python is looking for these files or storing them.
The directories I have added to my PYTHONPATH variable (w
On Fri, Mar 18, 2011 at 4:33 PM, Jon Herman wrote:
> Hello all,
>
> I am pretty new to Python and am trying to write data to a file. However, I
> seem to be misunderstanding how to do so. For starters, I'm not even sure
> where Python is looking for these files or storing them. The directories I
On 18/03/2011 5:33 PM, Jon Herman wrote:
I am pretty new to Python and am trying to write data to a file.
However, I seem to be misunderstanding how to do so. For starters, I'm
not even sure where Python is looking for these files or storing them.
The directories I have added to my PYTHONPATH var
Hi all,
I use a scraper to retrieve data from a web page.
In order to do that I need to enable cookies.
The data that I'm looking for is contained in a bunch of web pages.
Is there a way to show this web pages in a browser using the cookies
used in the script (otherwise it doesn't work).
Thanks,
On Fri, 18 Mar 2011 10:34:35 -0700, Wanderer wrote:
> I'm observing some strange behavior with ctypes. I created this test
> code to try to figure out what I'm doing wrong creating pointers to
> structures.
What makes you think that you're doing anything wrong.
Note that the hex number shown whe
Hello all,
I am pretty new to Python and am trying to write data to a file. However, I
seem to be misunderstanding how to do so. For starters, I'm not even sure
where Python is looking for these files or storing them. The directories I
have added to my PYTHONPATH variable (where I import modules f
On 3/18/2011 4:43 PM, Alexander Kapps wrote:
On 18.03.2011 21:13, monkeys paw wrote:
I have the following file:
FileInfo.py:
import UserDict
After this import statement, the name "UserDict" refers to the module.
class FileInfo(UserDict):
Here you are trying to subclass the module. What y
On Mar 18, 2:18 am, Duncan Booth wrote:
> Terry Reedy wrote:
> > On 3/17/2011 10:00 PM, Terry Reedy wrote:
> >> On 3/17/2011 8:24 PM, J Peyret wrote:
> >>> This gives a particularly nasty abend in Windows - "Python.exe has
> >>> stopped working", rather than a regular exception stack error. I've
On 18.03.2011 21:13, monkeys paw wrote:
I have the following file:
FileInfo.py:
import UserDict
After this import statement, the name "UserDict" refers to the module.
class FileInfo(UserDict):
Here you are trying to subclass the module. What you need instead is:
class FileInfo(UserDict.U
monkeys paw wrote:
I have the following file:
FileInfo.py:
import UserDict
class FileInfo(UserDict):
"store file metadata"
def __init__(self, filename=None):
UserDict.__init__(self)
self["name"] = filename
When i import it like so:
import FileInfo
i get this error
On 18/03/2011 20:13, monkeys paw wrote:
I have the following file:
FileInfo.py:
import UserDict
class FileInfo(UserDict):
"store file metadata"
def __init__(self, filename=None):
UserDict.__init__(self)
self["name"] = filename
When i import it like so:
import FileIn
In article <4d838d28.5090...@creativetrax.com>,
Jason Grout wrote:
> The problem appears to be that multiprocessing sets its workers to have
> the daemon flag set to True, which prevents workers from creating child
> processes. If I uncomment the line indicated in the code, I can create
> chi
I have the following file:
FileInfo.py:
import UserDict
class FileInfo(UserDict):
"store file metadata"
def __init__(self, filename=None):
UserDict.__init__(self)
self["name"] = filename
When i import it like so:
import FileInfo
i get this e
Welcome aboard !
On Mar 18, 2011 11:34 AM, "duxiu xiang" wrote:
> Dear friends:
> I am in China.For some rearon,I cannot visit your Google Group.May
> I joint this mail list for help in learning Python?
>
> --
> 笑看嫣红染半山,逐风万里白云间。
--
http://mail.python.org/mailman/listinfo/python-list
Dear friends:
I am in China.For some rearon,I cannot visit your Google Group.May
I joint this mail list for help in learning Python?
--
笑看嫣红染半山,逐风万里白云间。
--
http://mail.python.org/mailman/listinfo/python-list
Thanks All for your responses, all a help!
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, Mar 18, 2011 at 3:01 PM, Jean-Michel Pichavant <
jeanmic...@sequans.com> wrote:
>
> Don't check for bounds, fix any bug in the code that would set your values
> out of bounds and use asserts while debugging.
>
> Otherwise if you really need dynamic checks, it will cost you cpu, for
> sure.
I'm observing some strange behavior with ctypes. I created this test
code to try to figure out what I'm doing wrong creating pointers to
structures.
from ctypes import *
class QCamSettingId(Structure):
""" QCam_settings_id
"""
_fields_ = [("f1", c_ulong),
("f2", c_usho
> def bounds_check(state):
> """ check state values are > 0 """
> for attr in dir(state):
> if not attr.startswith('__') and getattr(state, attr) < 0.0:
> print "Error state values < 0: %s" % (attr)
> sys.exit()
Not that related to the question. But it's usua
In a recent application, a student of mine tried to create child
processes inside of a multiprocessing Pool worker (for security and
convenience reasons, we wanted to run some code inside of a child
process). Here is some test code for python 2.7:
=
import multipro
> I'm new to python and I am trying to figure out how to remove all sub
> directories from a parent directory using a wildcard. For example,
> remove all sub directory folders that contain the word "PEMA" from the
> parent directory "C:\Data".
>
> I've trying to use os.walk with glob, but I'm not
On 18/03/2011 16:41, JSkinn3 wrote:
I'm new to python and I am trying to figure out how to remove all sub
directories from a parent directory using a wildcard. For example,
remove all sub directory folders that contain the word "PEMA" from the
parent directory "C:\Data".
I've trying to use os.w
I'm new to python and I am trying to figure out how to remove all sub
directories from a parent directory using a wildcard. For example,
remove all sub directory folders that contain the word "PEMA" from the
parent directory "C:\Data".
I've trying to use os.walk with glob, but I'm not sure if thi
peterob wrote:
Im completely confinvalided from email library. When you parse email from
file it creates object Message.
f = open(emailFile, 'r')
msg = email.message_from_file(f)
f.close()
How can I access RAW header of email represented by object msg? I dont
wanna access each header field by
On Fri, 2011-03-18 at 14:16 +, Grant Edwards wrote:
> On 2011-03-18, peter wrote:
> > The Old Testament (1 Kings 7,23) says ... "And he made a molten sea,
> > ten cubits from the one brim to the other: it was round all about, and
> > his height was five cubits: and a line of thirty cubits did
Jean-Michel Pichavant wrote:
> Martin De Kauwe wrote:
> Don't check for bounds, fix any bug in the code that would set your
> values out of bounds and use asserts while debugging.
[ ... ]
> def __setattr__(self, attribute, value):
>if not self.funcTable.get(attribute, lambda x: True)(v
Martin De Kauwe wrote:
Hi,
if one has a set of values which should never step outside certain
bounds (for example if the values were negative then they wouldn't be
physically meaningful) is there a nice way to bounds check? I
potentially have 10 or so values I would like to check at the end of
e
What sort of checks are you making ? - in general greater than/less than
tend to be fairly optimal, although you might be able to do a faster "is
negative" test
Katie
On Fri, Mar 18, 2011 at 2:24 PM, Martin De Kauwe wrote:
> Hi,
>
> if one has a set of values which should never step outside ce
In <8uh0rcfe1...@mid.individual.net> Neil Cerutti writes:
> RIIght. What's a cubit?
How long can you tread water?
--
John Gordon A is for Amy, who fell down the stairs
gor...@panix.com B is for Basil, assaulted by bears
-- Edw
Hi,
if one has a set of values which should never step outside certain
bounds (for example if the values were negative then they wouldn't be
physically meaningful) is there a nice way to bounds check? I
potentially have 10 or so values I would like to check at the end of
each iteration. However as
On Mar 18, 2011, at 5:17 AM, Neil Cerutti wrote:
> On 2011-03-18, peter wrote:
>> The Old Testament (1 Kings 7,23) says ... "And he made a molten
>> sea, ten cubits from the one brim to the other: it was round
>> all about, and his height was five cubits: and a line of thirty
>> cubits did compa
On 2011-03-18, peter wrote:
> The Old Testament (1 Kings 7,23) says ... "And he made a molten sea,
> ten cubits from the one brim to the other: it was round all about, and
> his height was five cubits: and a line of thirty cubits did compass it
> round about. ". So pi=3. End Of.
There's nothin
Sherm Pendley, 18.03.2011 14:46:
Stefan Behnel writes:
Neil Cerutti, 18.03.2011 13:17:
On 2011-03-18, peter wrote:
The Old Testament (1 Kings 7,23) says ... "And he made a molten
sea, ten cubits from the one brim to the other: it was round
all about, and his height was five cubits: and a li
On Fri, 2011-03-18 at 02:10 -0700, peter wrote:
> On Mar 17, 5:22 pm, Kee Nethery wrote:
> > My favorite approximation is: 355/113 (visualize 113355 split into two 113
> > 355 and then do the division). The first 6 decimal places are the same.
> >
> > 3.141592920353982 = 355/113
> > vs
> > 3.141
Stefan Behnel writes:
> Neil Cerutti, 18.03.2011 13:17:
>> On 2011-03-18, peter wrote:
>>> The Old Testament (1 Kings 7,23) says ... "And he made a molten
>>> sea, ten cubits from the one brim to the other: it was round
>>> all about, and his height was five cubits: and a line of thirty
>>> cubi
"peter"
Kee Nethery > My favorite approximation is: 355/113 (visualize 113355 split
into two 113 355 and then do the division). The first 6 decimal places are
the same.
>
> 3.141592920353982 = 355/113
> vs
> 3.1415926535897931
>
> Kee Nethery
Or (more for fun than any practical application) try
On 2011-03-18, Stefan Behnel wrote:
> Neil Cerutti, 18.03.2011 13:17:
>> On 2011-03-18, peter wrote:
>>> The Old Testament (1 Kings 7,23) says ... "And he made a molten
>>> sea, ten cubits from the one brim to the other: it was round
>>> all about, and his height was five cubits: and a line of th
Neil Cerutti, 18.03.2011 13:17:
On 2011-03-18, peter wrote:
The Old Testament (1 Kings 7,23) says ... "And he made a molten
sea, ten cubits from the one brim to the other: it was round
all about, and his height was five cubits: and a line of thirty
cubits did compass it round about. ". So pi=3
On 2011-03-18, peter wrote:
> The Old Testament (1 Kings 7,23) says ... "And he made a molten
> sea, ten cubits from the one brim to the other: it was round
> all about, and his height was five cubits: and a line of thirty
> cubits did compass it round about. ". So pi=3. End Of.
RIIght. Wh
"John L. Stephens" writes:
> As the parent process terminates 'normally' (either through normal
> termination or SIGINT termination), mulitprocessing steps in and
> performs child process cleanup via the x.terminate() method. If the
> parent terminates any other way, multiprocessing doesn't have
On Thursday, March 17, 2011 8:24:36 PM UTC-4, J Peyret wrote:
>
> I suspect that object.__str__ is really object.__repr__ by default, as
> they both print out the same string, so that this doesn't make any
> sense.
They're not the same object, and they don't have all of the same methods.
In [1]:
On 3/17/2011 1:42 AM, Astan Chee wrote:
>
> I have 2 points in 3D space and a bunch of points in-between them. I'm
> trying to fit a polynomial curve on it. Currently I'm looking through
> numpy but I don't think the function exists to fit a function like this:
> y = ax**4 + bx**3 + cx**2 + dx + e
Terry Reedy wrote:
> On 3/17/2011 10:00 PM, Terry Reedy wrote:
>> On 3/17/2011 8:24 PM, J Peyret wrote:
>>> This gives a particularly nasty abend in Windows - "Python.exe has
>>> stopped working", rather than a regular exception stack error. I've
>>> fixed it, after I figured out the cause, which
On Mar 17, 5:22 pm, Kee Nethery wrote:
> My favorite approximation is: 355/113 (visualize 113355 split into two 113
> 355 and then do the division). The first 6 decimal places are the same.
>
> 3.141592920353982 = 355/113
> vs
> 3.1415926535897931
>
> Kee Nethery
Or (more for fun than any pract
79 matches
Mail list logo