Dan Bishop a écrit :
On May 27, 12:28 am, "inhahe" <[EMAIL PROTECTED]> wrote:
Does anybody know of a list for canonical prefixes to use for hungarian
notation in Python? Not that I plan to name all my variables with hungarian
notation, but just for when it's appropriate.
pnWe vUse adjHungaria
eliben <[EMAIL PROTECTED]> wrote:
>
>I ended up using an ugly hack to make it work for me. Since
>handle_request() only blocks until a request is received, the thread
>can be unblocked by sending it a real message. So to stop a server, I
>opened a XML-RPC client connection (using ServerProxy from x
Gary Herron <[EMAIL PROTECTED]> writes:
> mydict[(0,"person","setTime")] = "12:09:30"
> mydict[(0,"person","clrTime")] = "22:09:30"
Note that this is more succinctly written as:
mydict[0, "person", "setTime"] = "12:09:30"
with the added advantage that it looks like a multi-dimensional array
Jean-Claude Neveu <[EMAIL PROTECTED]> wrote:
>
>I am writing a Python program to check email using POP3. I've tried
>the sample code from python.org, and it works great. In other words,
>the code below successfully prints out my emails.
>
>import getpass, poplib, email
>M = poplib.POP3('mail.blah
I wanted to ask for ways to test whether a path exists. I usually use
os.path.exists(), which does a stat call on the path and returns True
if it succeeds, or False if it fails (catches os.error). But stat
calls don't fail only when a path doesn't exist. I see that, at least
on Windows, the instanc
Dear Mike,
Thanx your solutions came to the very point. And you understood the
problem so nicely. It is just perfect.
Great.
Regards,
Subhabrata Banerjee.
Mike Driscoll wrote:
> On May 27, 9:25�am, [EMAIL PROTECTED] wrote:
> > Dear Members of the group,
> > If any one can help me with an idea how
Gary Herron wrote:
> Alok Kumar wrote:
>> Dear All,
>>
>> I am using dictionary for filling my xpath parsed data.
>>
>> I wanted to use in the following manner.
>>
>> mydict[index] ["key1"] ["key2"]#Can someone help me with right
>> declaration.
>>
>> So that I can fill my XML xpath parsed dat
Dear Members of the group,
py2exe does not seem to be integrating with 2.5 or later versions.
I was trying to run it but requested only for 2.3.
How can I run it?
If any one can kindly help.
Regards,
Subhabrata Banerjee.
--
http://mail.python.org/mailman/listinfo/python-list
Dennis Lee Bieber, the ghost:
> I'd have to wonder why so many recursive calls?
Why not? Maybe the algorithm is written in a recursive style. A
language is good if allows you to use that style too.
On modern CPUs 5 levels don't look that many levels.
Bye,
bearophile
--
http://mail.python.org/
On May 28, 11:25 am, "James" <[EMAIL PROTECTED]> wrote:
> word = raw_input("Type a word:")
> start = len(word)
>
> for letter in range(start, 0, -1):
> print letter
Hi James,
for letter in reversed(word):
print letter
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
James a écrit :
Hey everyone,
I just started using python and cant figure this out, I'm trying to
make a program where someone types in a word and the program gives it
back backwards. For example if the person puts in "cat" I want the
program to give it back as "tac" and what it does is prin
Ankit wrote:
> Hi everyone,i wanted to build a flash decoder using python can
> somebody tell me which library to use and what steps should i follow
> to make a flash(video) decoder?By a decoder i mean that i need to
> display all the pixel values of each frame.Waiting for your replies.
Check out
Out of curiosity -- just what zone /is/ "BDT"... The only thing that
comes to mind is a type for "BST" (British Summer Time)
I think you are right. This date string was taken from a .co.uk site. :-)
My fault. It was a 3 letter code after a date, I was sure that it is a
time zone. A
Hey everyone,
I just started using python and cant figure this out, I'm trying to
make a program where someone types in a word and the program gives it
back backwards. For example if the person puts in "cat" I want the
program to give it back as "tac" and what it does is prints out 3,2,1.
Ho
Chris wrote:
> On May 28, 11:08 am, [EMAIL PROTECTED] wrote:
>> Say I have a file, utf8_input, that contains a single character, é,
>> coded as UTF-8:
>>
>> $ hexdump -C utf8_input
>> c3 a9
>> 0002
[...]
> weird thing is 'c3 a9' is é on my side... and copy/pasting the é
> gives me 'e
On May 28, 11:08 am, [EMAIL PROTECTED] wrote:
> Hi,
>
> I have problems getting my Python code to work with UTF-8 encoding
> when reading from stdin / writing to stdout.
>
> Say I have a file, utf8_input, that contains a single character, é,
> coded as UTF-8:
>
> $ hexdump -C utf8_input
>
[EMAIL PROTECTED] wrote:
> I wanted to ask for ways to test whether a path exists. I usually use
> os.path.exists(), which does a stat call on the path and returns True
> if it succeeds, or False if it fails (catches os.error). But stat
> calls don't fail only when a path doesn't exist. I see that,
On May 28, 10:59 am, [EMAIL PROTECTED] wrote:
> On May 28, 3:47 am, Matt Nordhoff <[EMAIL PROTECTED]> wrote:
>
>
>
> > [EMAIL PROTECTED] wrote:
> > > I wanted to ask for ways to test whether a path exists. I usually use
> > > os.path.exists(), which does a stat call on the path and returns True
> >
Hi everyone,i wanted to build a flash decoder using python can
somebody tell me which library to use and what steps should i follow
to make a flash(video) decoder?By a decoder i mean that i need to
display all the pixel values of each frame.Waiting for your replies.
Regards
Ankit Anand
--
http://
On May 28, 3:47 am, Matt Nordhoff <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > I wanted to ask for ways to test whether a path exists. I usually use
> > os.path.exists(), which does a stat call on the path and returns True
> > if it succeeds, or False if it fails (catches os.error). Bu
i used py2exe with python 2.5 and it worked fine just the other day.
py2exe-0.6.6.win32-py2.5.exe was the download filename.
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Dear Members of the group,
> py2exe does not seem to be integrating with 2.5 or later versions.
> I was tryin
On Wed, 28 May 2008 10:25:01 -
"James" <[EMAIL PROTECTED]> wrote:
> Hey everyone,
>
> I just started using python and cant figure this out, I'm trying to
> make a program where someone types in a word and the program gives it
> back backwards. For example if the person puts in "cat" I want
That is right, only bz2 is affected. I am happy that i could help. ;)
Regards
Sebastian Noack
--
http://mail.python.org/mailman/listinfo/python-list
On May 28, 12:25 pm, "James" <[EMAIL PROTECTED]> wrote:
> Hey everyone,
>
> I just started using python and cant figure this out, I'm trying to
> make a program where someone types in a word and the program gives it
> back backwards. For example if the person puts in "cat" I want the
> program to
On 19:48, martedì 27 maggio 2008 Alex Gusarov wrote:
> I tried Eric (on windows), but then decided in favour of Eclipse +
> PyDev.
I'm a KDE fan :) and I like Qt design. I've Qt designer installed, but I much
like if I can use an IDE which write python code, rather than wrappers.
I've just been
> Shouldn't you do data = data.decode('utf8') ?
Yes, that's it! Thanks.
-- dave
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 28 May 2008 02:28:54 -0700, bearophileHUGS wrote:
> Dennis Lee Bieber, the ghost:
>> I'd have to wonder why so many recursive calls?
>
> Why not?
Because of the recursion limit of course. And function call overhead in
Python is quite high compared to an iterative approach.
Ciao,
Hi,
I have problems getting my Python code to work with UTF-8 encoding
when reading from stdin / writing to stdout.
Say I have a file, utf8_input, that contains a single character, é,
coded as UTF-8:
$ hexdump -C utf8_input
c3 a9
0002
If I read this file by
On Wed, 28 May 2008 10:25:01 -
"James" <[EMAIL PROTECTED]> wrote:
> I just started using python and cant figure this out, I'm trying to
> make a program where someone types in a word and the program gives it
> back backwards. For example if the person puts in "cat" I want the
> program to g
[EMAIL PROTECTED] writes:
> Hi,
>
> I have problems getting my Python code to work with UTF-8 encoding
> when reading from stdin / writing to stdout.
>
> Say I have a file, utf8_input, that contains a single character, é,
> coded as UTF-8:
>
> $ hexdump -C utf8_input
> c3 a9
Hy guys,
I'm using the python-framework BeautifulSoup(BS) to parse some
information out of a german soccer-website.
I spend some qualitiy time with the BS-docs, but I couldn't really
figure out how to get what I was looking for.
Here's the deal:
I want to parse the article shown on the website. T
D'Arcy J.M. Cain a écrit :
On Wed, 28 May 2008 10:25:01 -
"James" <[EMAIL PROTECTED]> wrote:
Hey everyone,
I just started using python and cant figure this out, I'm trying to
make a program where someone types in a word and the program gives it
back backwards. For example if the person p
.oO(Ivan Illarionov)
>No. Language does matter.
And the weather.
If you know how to program, you can write good code in any language if
you're familiar enough with it. Many people write good code in PHP, and
many write total crap in C/C++. It's almost never about the language,
but about the prog
The following following code fails with the failiure:-
File "test.py", line 27, in __main__.sanitize_number
Failed example:
sanitize_number('0321-4683113')
Expected:
'03214683113'
Got:
'03214683113'
Expected and Got looks the same. The value should verify. What am I
doing wrong her
Thanks for replying guys but could you be a little more specific like
in terms of steps i shd follow to make the decoder and also how is
ffmpeg/libffmpeg going to help..
Regards
Ankit Anand
--
http://mail.python.org/mailman/listinfo/python-list
2008/5/28 Diez B. Roggisch <[EMAIL PROTECTED]>:
> Ankit wrote:
>
>> Hi everyone,i wanted to build a flash decoder using python can
>> somebody tell me which library to use and what steps should i follow
>> to make a flash(video) decoder?By a decoder i mean that i need to
>> display all the pixel va
2008/5/28 Ankit <[EMAIL PROTECTED]>:
> Thanks for replying guys but could you be a little more specific like
> in terms of steps i shd follow to make the decoder and also how is
> ffmpeg/libffmpeg going to help..
You can start by getting familiar with ffmpeg [1] by playing with it
and glance at it
On May 28, 1:48 pm, afrobeard <[EMAIL PROTECTED]> wrote:
> The following following code fails with the failiure:-
>
> File "test.py", line 27, in __main__.sanitize_number
> Failed example:
> sanitize_number('0321-4683113')
> Expected:
> '03214683113'
> Got:
> '03214683113'
>
> Expected
while traversing I get out of index error as mentioned below.
class EventTimeFilter:
def __init__(self):
* self.event = [Event()]*
def populateScheduleData(self):
self.doc = libxml2.parseFile(self.FILENAME)
for eachcamera in
self.doc.xpathEval('SetDeviceConfigura
I copied the text off here into a new file and it worked!.
I then took a diff between the version that didnt work and the version
that worked and the only difference was a couple of spaces after this
line:-
>>> sanitize_number('0321-4683113')>> brackets>
Apparently they caused the test case to f
2008/5/28 ankit anand <[EMAIL PROTECTED]>:
> hmm i am more interested in .swf format and more specifically i would like
> to have all the pixel values of all the frames can i do that using this
> library?
Not with ffmpeg. You can check out the code from Gnash [1] or Swfdec
[2] or start you swf dec
> Does this mean that Flaming Thunder requires explicit checking rather
> than offering exceptions?
Right now, yes, Flaming Thunder has minimal error handling. But error
handling is rising on the list of priorities for the next few weeks
(arrays, matrices, and 3D graphics are the hightest).
I th
On May 28, 3:11 am, Peter Otten <[EMAIL PROTECTED]> wrote:
> Gary Herron wrote:
> > Alok Kumar wrote:
> >> Dear All,
>
> >> I am using dictionary for filling my xpath parsed data.
>
> >> I wanted to use in the following manner.
>
> >> mydict[index] ["key1"] ["key2"] #Can someone help me with rig
Dave Parker <[EMAIL PROTECTED]> wrote:
> Catch also gives you a
> single, uniform, syntactically unambiguous way to embed statements (or
> whole statement lists) into expressions -- without causing the
> syntactic problems of = statements in if statements or the obfuscation
> of question mark nota
Dear Members of the group,
If I open a url by urlopen in the urllib, the file is either opening a
file or if no url is there it would give error. The error is generated
can be handled by IOError handling schemes.
But if there are thousands or millions of URLs and I do not know who
will open and who
> That error message is the erlang interpreter saying "Hey I know X is
> 8, and you've said it is 10 - that can't be right", which is pretty
> much what math teachers say too...
I enjoyed the discussion of how different languages handle the notion
of "="; I learned something new. Thanks.
On May
I am getting following error when tried as you suggested.
self.event = [] #Create an empty list, bind to the name "event" under the
"self" namespace
self.event.append(Event()) #Create an event object and append
to the end of the list
*class Event():
^
SyntaxError: in
Hi friends,
Okay so well, I have quite a problem right now with a file stream. What
I am doing is to use the Cannon SDK dlls to get control over my old
Cannon A60 Camera for some surveillance useage.
By using ctypes it all worked well until now. I am able to load the
dlls, use a lot of funct
[EMAIL PROTECTED] wrote:
> Dear Members of the group,
> If I open a url by urlopen in the urllib, the file is either opening a
> file or if no url is there it would give error. The error is generated
> can be handled by IOError handling schemes.
> But if there are thousands or millions of URLs and
"Mathieu Prevot" <[EMAIL PROTECTED]> wrote:
> 2008/5/28 Diez B. Roggisch <[EMAIL PROTECTED]>:
>> Ankit wrote:
>>
>>> Hi everyone,i wanted to build a flash decoder using python can
>>> somebody tell me which library to use and what steps should i
>>> follow to make a flash(video) decoder?By a decod
Hello,
I'd like to be able to do the following:
- open a connection to a MySQL or PostgreSQL database
- read the schema and contents for one or more tables
- create a new sqlite database file and open a connection to it
- write out the previously-read tables and their contents to this new
dat
On May 28, 1:42 pm, Michael Fesser <[EMAIL PROTECTED]> wrote:
> .oO(Ivan Illarionov)
>
> >No. Language does matter.
>
> And the weather.
>
> If you know how to program, you can write good code in any language if
> you're familiar enough with it. Many people write good code in PHP, and
> many write
On May 28, 4:59 am, [EMAIL PROTECTED] wrote:
> On May 28, 3:47 am, Matt Nordhoff <[EMAIL PROTECTED]> wrote:
...
> Thanks. So if OSError().errno == errno.ENOENT, then it means the path
> doesn't exist? (What does "ENOENT" stan for?)
I always read it as Error NO ENTry
--
http://mail.python.org/mailm
On Wed, 2008-05-28 at 09:31 -0400, Alok Kumar wrote:
> I am getting following error when tried as you suggested.
>
> self.event = [] #Create an empty list, bind to the name "event" under
> the "self" namespace
>self.event.append(Event()) #Create an event object and
> append to the e
On Wed, 28 May 2008 06:04:54 +, Tim Roberts wrote:
> Ivan Illarionov <[EMAIL PROTECTED]> wrote:
>>On Wed, 28 May 2008 05:10:20 +0400, AnrDaemon wrote:
>>> In reply to Your message dated Monday, May 26, 2008, 04:47:00,
>>>
> As I've said before - good programmers can write good code in any
I've been using Ulipad, a free IDE mainly for Python, and written in
wxPython, for a couple of years, and think it's terrific. Now another
user, Kelie Feng, has made an 8-minute video showing it off. The
visual clarity of the video is remarkable. You can download it
(Introducing_Ulipad_2008-05-
I am trying to script some image changes for multiple EXE files in
linux.
The problem I'm running across is that I haven't been able to find
anything out there that can do this...until now.
It *looks* like pefile (available at google code) would do the trick.
Unfortunately I know absolutely noth
> > If catch(set x to y+z.) < 0.1 then go to tinyanswer.
>
> So what does this do exactly if the set throws an error?
I think the catch should catch the error thrown by set, compare it to
0.1, the comparison will not return true because the error is not less
than 0.1, and so the go-to to tinyanswe
Hi,
I'm fiddling around with pydb. Installation and usage are fine. What I
especially like is the fact that you can attach a signal such that you drop
into debugging mode on demand.
But this is of limited use to me in situations where a server is written in
python. According to the source, pydb's
Hi
I get a BadStatusLine error (indicated below). Can anyone help with
how to
catch error in code before abort?
Thanks
Jim
Traceback (most recent call last):
File
"C:\Python25\Lib\site-packages\pythonwin\pywin\framework
\scriptutils.py",
line 310, in RunScript
exec codeObject in __main__.
Jim wrote:
> Hi
>
> I get a BadStatusLine error (indicated below). Can anyone help with
> how to
> catch error in code before abort?
http://docs.python.org/tut/node10.html
Diez
--
http://mail.python.org/mailman/listinfo/python-list
Matt <[EMAIL PROTECTED]> wrote:
> Okay so well, I have quite a problem right now with a file stream. What
> I am doing is to use the Cannon SDK dlls to get control over my old
> Cannon A60 Camera for some surveillance useage.
>
> By using ctypes it all worked well until now. I am able to loa
"inhahe" <[EMAIL PROTECTED]> writes:
> I like to think of a language that would combine low-level and high-level
> features to be used at the programmer's whim. C--, High Level Assembly, and
> C++ with in-line assembly are examples, but none of them come as high-level
> as Python. Other possib
On May 28, 12:01 pm, RossGK <[EMAIL PROTECTED]> wrote:
> I'm a newbie to python threads, and playing with some simple client
> server stuff and lots of print statements.
>
> My server thread launched with
> self.worker = WorkerThread(self)
> completes an interaction and then if I check on it's
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
Just wondering if there's a way to iterate through all variables which
an object has set?
Specifically, I'm using the OptionParser module, which returns an
options object, containing all command line options as object variables.
I'd like to itera
Hello,
I have a game class, and the game has a state. Seeing that Python has
no enumeration type, at first I used strings to represent states:
"paused", "running", etc. But such a representation has many
negatives, so I decided to look at the Enum implementation given here:
http://aspn.activestate
I'm a newbie to python threads, and playing with some simple client
server stuff and lots of print statements.
My server thread launched with
self.worker = WorkerThread(self)
completes an interaction and then if I check on it's status with
print "Status:", self.workerI get
Dave Challis wrote:
Hi,
Just wondering if there's a way to iterate through all variables which
an object has set?
Specifically, I'm using the OptionParser module, which returns an
options object, containing all command line options as object variables.
I'd like to iterate over these rather than
eliben wrote:
Hello,
I have a game class, and the game has a state. Seeing that Python has
no enumeration type, at first I used strings to represent states:
"paused", "running", etc. But such a representation has many
negatives, so I decided to look at the Enum implementation given here:
http://
[EMAIL PROTECTED] wrote:
On May 28, 1:42 pm, Michael Fesser <[EMAIL PROTECTED]> wrote:
.oO(Ivan Illarionov)
No. Language does matter.
And the weather.
If you know how to program, you can write good code in any language if
you're familiar enough with it. Many people write good code in PHP, an
eliben <[EMAIL PROTECTED]> writes:
> Hello,
>
> I have a game class, and the game has a state. Seeing that Python has
> no enumeration type, at first I used strings to represent states:
> "paused", "running", etc. But such a representation has many
> negatives, so I decided to look at the Enum imp
Date: Wed, 28 May 2008 11:29:59 -0400
From: "Sean Azelton" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: [Tutor] A video introducing Ulipad, an IDE mainly for Python
For those looking for the codec and not running Windows, you can find
it here for Mac OS X as well
http://www.techsmith.
I have a strange problem using the python-Idle: I'm used to be able to
position the cursor by clicking on the desired position. When I run Idle
under Mandriva (or under Arch Linux as well) this does not work.
Running under windows it works, running under Xandros linux on my eee pc
it works to
> I have a feeling that the form produced by Qt Designer, once converted to
> code, contains references to QCalendarWidget where you really want to use a
> customized calendar widget. If so, you should "promote" the calendar widget
> in Qt Designer to use your widget instead, and make sure you impo
"Gabriel Genellina" <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> I'm unsure if you're looking for a development environment like these:
> http://wiki.python.org/moin/IntegratedDevelopmentEnvironments
> or an interface designer for wxPython (see the bottom part of
> http://wiki.python.
Avowkind wrote:
On May 27, 6:34 am, [EMAIL PROTECTED] wrote:
(might not be the right forum for this but...)
what is the definition of a highlevel-language?
well there isnt one specifically and wikipedia and the like gives just
a very general description obv you can say it abstracts away low
> class Event(object):
>
> Always subclass object, unless you have a very compelling reason not to,
> or you are subclassing something else.
>
I've thought that if I write
class Event:
pass
, it'll be subclass of object too, I was wrong?
--
Best regards, Alex Gusarov
--
http://mail.python.
Am Tue, 27 May 2008 12:37:34 -0700 schrieb Dennis Lee Bieber:
>
> From the library reference:
> """
> Support for the %Z directive is based on the values contained in tzname
> and whether daylight is true. Because of this, it is platform-specific
> except for recognizing UTC and GMT which ar
I've answered my own question about the "None" state - an event was
setting the thread to None where I didn't expect it.
However, my question slightly repositioned is if a Thread is "Stopped"
it still seems to exist. Is there someway to make it go away, send it
to garbage collection etc?
Other p
On May 28, 2:22 am, Kam-Hung Soh <[EMAIL PROTECTED]> wrote:
> David Jackson wrote:
> > i used the csv module and saved its contents to a list.
>
> > ['Date', 'No.', 'Description', 'Debit', 'Credit']
> > ['3/17/2006', '5678', 'ELECTRONIC PAYMENT', '', '11.45']
> > ['3/04/2007', '5678', 'THE HOME DEP
Alex Gusarov schrieb:
class Event(object):
Always subclass object, unless you have a very compelling reason not to,
or you are subclassing something else.
I've thought that if I write
class Event:
pass
, it'll be subclass of object too, I was wrong?
Yes. That is the somewhat unfortu
"Alex Gusarov" <[EMAIL PROTECTED]> writes:
>> class Event(object):
>>
>> Always subclass object, unless you have a very compelling reason not to,
>> or you are subclassing something else.
>>
>
> I've thought that if I write
>
> class Event:
> pass
>
> , it'll be subclass of object too, I was
Arnaud Delobelle <[EMAIL PROTECTED]> writes:
> "Alex Gusarov" <[EMAIL PROTECTED]> writes:
>
>>> class Event(object):
>>>
>>> Always subclass object, unless you have a very compelling reason not to,
>>> or you are subclassing something else.
>>>
>>
>> I've thought that if I write
>>
>> class Event
Hi,
Being a newbie with Python, I'm trying a short program with this:
> <..>
t = RoboInterface()
> <..>
while not t.Digital(1): # while endpoint is not reached
15 pass
However, it always hangs on the 'while', which I can't find in the
tutorial at http://www.python.org/doc/. Assumi
On Wed, 28 May 2008 11:38:53 -0700, RossGK wrote:
>
> I've answered my own question about the "None" state - an event was
> setting the thread to None where I didn't expect it.
>
> However, my question slightly repositioned is if a Thread is "Stopped"
> it still seems to exist. Is there someway
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
[ Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> ]
> On Wed, 28 May 2008 02:28:54 -0700, bearophileHUGS wrote:
>
>> Dennis Lee Bieber, the ghost:
>>> I'd have to wonder why so many recursive calls?
>>
>> Why not?
>
> Because of the recursion limit of
On Wednesday 28 May 2008 09:22:53 am Dave Parker wrote:
> I think in a month or two, Flaming Thunder will be using catch/throw
> exception and error handling. So, for example:
Nice... Flaming Thunder sure evolves quickly. Too quickly to be considered
a 'feature' of the language. Following your p
Hello,
I'm having this script here:
import sys, tempfile, subprocess
if len(sys.argv) > 1:
i = 0
while i < 1000:
print "Hello World" * 500
i = i + 1
exit( 1 )
h,fp = tempfile.mkstemp()
print "out: " + fp
out = open(fp, "r")
proc = subp
On Wed, 28 May 2008 19:56:55 +0200, huub wrote:
> Being a newbie with Python, I'm trying a short program with this:
>
> > <..>
>> t = RoboInterface()
> > <..>
>> while not t.Digital(1): # while endpoint is not reached
>> 15 pass
>
> However, it always hangs on the 'while', which I can
Am Wed, 28 May 2008 10:41:51 -0700 schrieb davidj411:
> I like the str2num function approach, but then i get left with a float
> that has more than 2 decimal spaces , i.e. 11.50 becomes
> 11.449 and round will not fix that.
Welcome to the wonderful world of floating point numbers. For
On Wed, May 28, 2008 at 11:09 AM, Dave Parker
<[EMAIL PROTECTED]> wrote:
>> > If catch(set x to y+z.) < 0.1 then go to tinyanswer.
>>
>> So what does this do exactly if the set throws an error?
>
> I think the catch should catch the error thrown by set, compare it to
> 0.1, the comparison will not
Hi,
I'm trying to work out some strange (to me) behaviour that I see when
running a python script in two different ways (I've inherited some
code that needs to be maintained and integrated with another lump of
code). The sample script is:
# Sample script, simply create a new thread and run a
# re
On May 28, 12:09 pm, eliben <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have a game class, and the game has a state. Seeing that Python has
> no enumeration type, at first I used strings to represent states:
> "paused", "running", etc. But such a representation has many
> negatives, so I decided to l
[EMAIL PROTECTED] schrieb:
Hi,
I'm trying to work out some strange (to me) behaviour that I see when
running a python script in two different ways (I've inherited some
code that needs to be maintained and integrated with another lump of
code). The sample script is:
# Sample script, simply creat
On May 28, 8:26 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] schrieb:
>
>
>
> > Hi,
>
> > I'm trying to work out some strange (to me) behaviour that I see when
> > running a python script in two different ways (I've inherited some
> > code that needs to be maintained and in
On May 27, 6:13 am, Laura Creighton <[EMAIL PROTECTED]> wrote:
> In a message of Mon, 26 May 2008 12:38:28 PDT, [EMAIL PROTECTED] writes:
>
> >I forgot to ask: what's your target platform? I mentioned Organizer's
> >Database, but it only runs on Windows. If you need a Linux or OS X
> >solution, t
Jerry Stuckle <[EMAIL PROTECTED]> writes:
> A good OO programmer could easily write good functional code.
Over on #haskell there's a general belief that learning Haskell is
easier for nonprogrammers than it is for OO programmers, since the OO
programmers first have to unlearn what they previously
[EMAIL PROTECTED] schrieb:
On May 28, 8:26 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] schrieb:
Hi,
I'm trying to work out some strange (to me) behaviour that I see when
running a python script in two different ways (I've inherited some
code that needs to be maintaine
globalrev wrote:
> tried all kinds of combos to get this to work.
In case you meant to say that you can't get it to work, consider using lxml
instead.
http://codespeak.net/lxml
http://codespeak.net/lxml/lxmlhtml.html
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
> $ cat utf8_from_stdin.py
> import sys
> data = sys.stdin.read()
> print "length of data =", len(data)
sys.stdin is a byte stream in Python 2, not a character stream.
To make it a character stream, do
sys.stdin = codecs.getreader("utf-8")(sys.stdin)
HTH,
Martin
--
http:/
1 - 100 of 137 matches
Mail list logo