On Sat, 12 Dec 2015 21:35:36 +0100
Peter Otten <__pete...@web.de> wrote:
> def read_file(filename):
> for encoding in ["utf-8", "iso-8859-1"]:
> try:
> with open(filename, encoding=encoding) as f:
> return f.read()
> except UnicodeDecodeError:
>
"Chris Angelico" wrote in message
news:CAPTjJmrfw-qNx-a=3q2qj244fgvxz3mpe4wa-wdusmchxuf...@mail.gmail.com...
On Sun, Dec 13, 2015 at 4:00 PM, Frank Millman wrote:
> My new solution is to pass a 'scale' factor into my aggregate function.
> The
> function uses the Decimal quantize method to ro
On Sun, Dec 13, 2015 at 4:00 PM, Frank Millman wrote:
> My new solution is to pass a 'scale' factor into my aggregate function. The
> function uses the Decimal quantize method to round the result before
> returning. So far it seems to be working.
So, effectively, you're using fixed point arithmet
"Frank Millman" wrote in message news:n4gigr$f51$1...@ger.gmane.org...
I have found a workaround for my problem, but first I needed to understand
what was going on more clearly. This is what I have figured out.
[...]
The reason for the '#' in the above function is that sqlite3 passes the
cu
On Sun, 13 Dec 2015 01:31 pm, Robert wrote:
> pydoc.help('module1')
> Help on module module1:
You don't need to do all that. help() has been a built-in command for Python
for, oh, probably a decade or more. Technically, it is added to the
built-ins on startup, so if you mess about with the site.
On Saturday, December 12, 2015 at 7:36:21 PM UTC-5, Peter Otten wrote:
> Robert wrote:
>
> > On Saturday, December 12, 2015 at 7:05:39 PM UTC-5, Robert wrote:
> >> On Saturday, December 12, 2015 at 6:24:25 PM UTC-5, Erik wrote:
> >> > On 12/12/15 23:08, Robert wrote:
> >> > > In fact, I wanted to
In a message of Sat, 12 Dec 2015 15:01:54 -0800, Robert writes:
>Hi,
>
>I want to use pydoc as some online tutorial shows, but it cannot run as
>below. What is wrong?
>
>
>Thanks,
>
>
>
>
import pydoc
pydoc
>
pydoc sys
>SyntaxError: invalid syntax
import sys
pydoc sys
>Syn
Robert wrote:
> On Saturday, December 12, 2015 at 7:05:39 PM UTC-5, Robert wrote:
>> On Saturday, December 12, 2015 at 6:24:25 PM UTC-5, Erik wrote:
>> > On 12/12/15 23:08, Robert wrote:
>> > > In fact, I wanted to run the following code. When it failed, I moved
>> > > to the original question abo
On 13/12/15 00:19, Robert wrote:
It turns out that Enthought does not allow pydoc as the link said:
http://stackoverflow.com/questions/12063718/using-help-and-pydoc-to-list-python-modules-not-working
I don't think that's what the article is telling you. Try what I said in
my previous message.
On Saturday, December 12, 2015 at 7:05:39 PM UTC-5, Robert wrote:
> On Saturday, December 12, 2015 at 6:24:25 PM UTC-5, Erik wrote:
> > On 12/12/15 23:08, Robert wrote:
> > > In fact, I wanted to run the following code. When it failed, I moved to
> > > the original question above.
> >
> > How did
Hi Robert,
On 13/12/15 00:04, Robert wrote:
Excuse me for the incomplete information on previous posts.
Here is the message when I run it on Canopy (module1.py and module2.py
are in the current folder):
Welcome to Canopy's interactive data-analysis environment!
with pylab-backend set to: qt
T
On Saturday, December 12, 2015 at 6:24:25 PM UTC-5, Erik wrote:
> On 12/12/15 23:08, Robert wrote:
> > In fact, I wanted to run the following code. When it failed, I moved to
> > the original question above.
>
> How did it fail? Tell us what _did_ happen.
>
> It works fine for me:
>
> $ pydoc mo
On 12/12/15 23:08, Robert wrote:
In fact, I wanted to run the following code. When it failed, I moved to
the original question above.
How did it fail? Tell us what _did_ happen.
It works fine for me:
$ pydoc module1
Help on module module1:
NAME
module1
FILE
/tmp/robert/module1.py
D
Robert writes:
> I want to use pydoc as some online tutorial shows
Which online tutorial? Please give the URL to the page that instructs
you to use ‘pydoc’ in that manner.
> >>> import pydoc
Allows you to use, in Python code, the ‘pydoc’ module by name.
> >>> pydoc
>
Accesses the ‘pydoc’ na
Hi Robert,
On 12/12/15 23:01, Robert wrote:
I want to use pydoc as some online tutorial shows, but it cannot run as
below. What is wrong?
"some online tutorial"?
import pydoc
pydoc
Correct - in the interactive interpreter, typing the name of an object
prints its value. You have imported
On Saturday, December 12, 2015 at 6:02:11 PM UTC-5, Robert wrote:
> Hi,
>
> I want to use pydoc as some online tutorial shows, but it cannot run as
> below. What is wrong?
>
>
> Thanks,
>
>
>
>
> >>> import pydoc
> >>> pydoc
>
> >>> pydoc sys
> SyntaxError: invalid syntax
> >>> import sys
Hi,
I want to use pydoc as some online tutorial shows, but it cannot run as
below. What is wrong?
Thanks,
>>> import pydoc
>>> pydoc
>>> pydoc sys
SyntaxError: invalid syntax
>>> import sys
>>> pydoc sys
SyntaxError: invalid syntax
>>> help(pydoc)
Help on module pydoc:
..
--
https://m
On Saturday, December 12, 2015 at 4:48:46 PM UTC-5, Pedro Vincenty wrote:
> Hello, I'm wondering how to append a line from a file onto a list(easy part)
> provided that the line contains strings specific to a previous list I've
> already made(hard part). I have this right now,
> for line in sat
Hi Pedro,
It would be _really useful_ if you included code that could be pasted
into an interpreter or file directly to show your problem. You are
referencing several data sources ("satellite_dataread" and "list2") that
we can only guess at.
On 12/12/15 21:48, Pedro Vincenty wrote:
Hello, I'm w
On 12/12/2015 4:48 PM, Pedro Vincenty wrote:
Hello, I'm wondering how to append a line from a file onto a list(easy part)
provided that the line contains strings specific to a previous list I've
already made(hard part). I have this right now,
for line in satellite_dataread:
if any(i i
Hello, I'm wondering how to append a line from a file onto a list(easy part)
provided that the line contains strings specific to a previous list I've
already made(hard part). I have this right now,
for line in satellite_dataread:
if any(i in line for i in list2):
line= line.
In a message of Sat, 12 Dec 2015 20:24:10 +, Tony van der Hoff writes:
>On 12/12/15 17:54, Laura Creighton wrote:
>> In a message of Sun, 13 Dec 2015 04:50:43 +1100, Chris Angelico writes:
>>> On Sun, Dec 13, 2015 at 4:30 AM, Tony van der Hoff
>>> wrote:
Thanks, Laura, and others who hav
D'Arcy J.M. Cain wrote:
> More Unicode bafflement. What I am trying to do is pretty simple I
> think. I have a bunch of files that I am pretty sure are either utf-8
> or iso-8859-1. I try utf-8 and fall back to iso-8859-1 if it throws a
> UnicodeError. Here is my test.
>
> #! /usr/pkg/bin/pyt
On 12/12/2015 1:24 PM, sms wrote:
What I need:
1. Fullscreen application
Not directly relevant to the below.
2. On the home screen: Three row
3. When I click on the main screen, it switches to one row only.
Create homescreen Frame(master=root) or subclasses thereof. Pack the
homescreen.
On 12/12/15 17:54, Laura Creighton wrote:
In a message of Sun, 13 Dec 2015 04:50:43 +1100, Chris Angelico writes:
On Sun, Dec 13, 2015 at 4:30 AM, Tony van der Hoff wrote:
Thanks, Laura, and others who have replied. You're right; python-3-pygame
exists in unstable, but has not yet made it to j
On 12/12/2015 12:30 PM, Tony van der Hoff wrote:
Thanks, Laura, and others who have replied. You're right;
python-3-pygame exists in unstable, but has not yet made it to jessie,
even in backports.
So, I'll stick with python 2.7 for the time being; really no hardship :)
pygame itself was porte
More Unicode bafflement. What I am trying to do is pretty simple I
think. I have a bunch of files that I am pretty sure are either utf-8
or iso-8859-1. I try utf-8 and fall back to iso-8859-1 if it throws a
UnicodeError. Here is my test.
#! /usr/pkg/bin/python3.4
# Running on a NetBSD 7.0 serv
Hello all,
I'm sorry to ask this question, but I am a very beginer.
What I need:
1. Fullscreen application
2. On the home screen: Three row
3. When I click on the main screen, it switches to one row only.
Actually, I am not able to switch from Window1 to Window2, Window2 comes
under Window1
In a message of Sun, 13 Dec 2015 04:50:43 +1100, Chris Angelico writes:
>On Sun, Dec 13, 2015 at 4:30 AM, Tony van der Hoff wrote:
>> Thanks, Laura, and others who have replied. You're right; python-3-pygame
>> exists in unstable, but has not yet made it to jessie, even in backports.
>>
>> So, I'l
On Sun, Dec 13, 2015 at 4:30 AM, Tony van der Hoff wrote:
> Thanks, Laura, and others who have replied. You're right; python-3-pygame
> exists in unstable, but has not yet made it to jessie, even in backports.
>
> So, I'll stick with python 2.7 for the time being; really no hardship :)
The easies
Thank you so much Steven
you've given me a really great head start
--
https://mail.python.org/mailman/listinfo/python-list
On 12/12/15 17:09, Laura Creighton wrote:
In a message of Sat, 12 Dec 2015 17:59:52 +0100, Peter Otten writes:
Tony van der Hoff wrote:
On 12/12/15 15:09, Mark Lawrence wrote:
On 12/12/2015 14:42, Tony van der Hoff wrote:
Debian Jessie, python 2.7; python 3.4
I have an application, using py
In a message of Sat, 12 Dec 2015 17:59:52 +0100, Peter Otten writes:
>Tony van der Hoff wrote:
>
>> On 12/12/15 15:09, Mark Lawrence wrote:
>>> On 12/12/2015 14:42, Tony van der Hoff wrote:
Debian Jessie, python 2.7; python 3.4
I have an application, using pygame for graphics, that w
In a message of Sat, 12 Dec 2015 16:31:54 +, Tony van der Hoff writes:
>On 12/12/15 15:09, Mark Lawrence wrote:
>> On 12/12/2015 14:42, Tony van der Hoff wrote:
>>> Debian Jessie, python 2.7; python 3.4
>>>
>>> I have an application, using pygame for graphics, that works fine under
>>> python2.
Tony van der Hoff wrote:
> On 12/12/15 15:09, Mark Lawrence wrote:
>> On 12/12/2015 14:42, Tony van der Hoff wrote:
>>> Debian Jessie, python 2.7; python 3.4
>>>
>>> I have an application, using pygame for graphics, that works fine under
>>> python2.7. I have run it through 2to3, but when running
On 12/12/2015 16:31, Tony van der Hoff wrote:
On 12/12/15 15:09, Mark Lawrence wrote:
On 12/12/2015 14:42, Tony van der Hoff wrote:
Debian Jessie, python 2.7; python 3.4
I have an application, using pygame for graphics, that works fine under
python2.7. I have run it through 2to3, but when runn
On 12/12/15 15:09, Mark Lawrence wrote:
On 12/12/2015 14:42, Tony van der Hoff wrote:
Debian Jessie, python 2.7; python 3.4
I have an application, using pygame for graphics, that works fine under
python2.7. I have run it through 2to3, but when running the result under
python 3.4, I get the erro
On 12/12/2015 14:42, Tony van der Hoff wrote:
Debian Jessie, python 2.7; python 3.4
I have an application, using pygame for graphics, that works fine under
python2.7. I have run it through 2to3, but when running the result under
python 3.4, I get the error :
Traceback (most recent call last):
Debian Jessie, python 2.7; python 3.4
I have an application, using pygame for graphics, that works fine under
python2.7. I have run it through 2to3, but when running the result under
python 3.4, I get the error :
Traceback (most recent call last):
File "ppm304.py", line 9, in
import py
Ganesh Pal wrote:
> On Thu, Dec 10, 2015 at 9:20 PM, Peter Otten <__pete...@web.de> wrote:
>> Ganesh Pal wrote:
>>
>
>> I recommend that you reread the unittest documentation.
>>
>> setUpClass() should be a class method, and if it succeeds you can release
>> the ressources it required in the corr
I am using xmpppy python library to connect with XMPP server(ejabberd2) but
unable to connect and actually don't have clarity on how to connect,
authenticate and send a message to the server.
Please help me to make it working
If possible please provide some code snippet using XMPPPY.
This
On Thu, Dec 10, 2015 at 9:20 PM, Peter Otten <__pete...@web.de> wrote:
> Ganesh Pal wrote:
>
> I recommend that you reread the unittest documentation.
>
> setUpClass() should be a class method, and if it succeeds you can release
> the ressources it required in the corresponding tearDownClass() met
On Sat, 12 Dec 2015 08:05 pm, Harbey Leke wrote:
> Create a class called BankAccount
class BankAccount:
pass
That's easy. Unfortunately, that class does nothing, but at least it exists!
Now all you have to do is create *methods* of the class that do the work.
Here I give it a method calle
On 12 December 2015 at 11:29, Harbey Leke wrote:
> oh oh okay start it for me please
> thanks or guide me about it then.
> --
> https://mail.python.org/mailman/listinfo/python-list
class BankAccount(object):
# your code goes here
Seriously: read the materials you got with your course, or the
oh oh okay start it for me please
thanks or guide me about it then.
--
https://mail.python.org/mailman/listinfo/python-list
oh oh okay start it for me please
thanks or guide me about it then.
--
https://mail.python.org/mailman/listinfo/python-list
On Sat, Dec 12, 2015 at 9:09 PM, Harbey Leke wrote:
> i need help with every part of the project, like a complete text of scripts
> for it, thrn i can practise with it on my own and then u can give me
> assignments to improve on
> thanks
No.
You're the one taking the course; you write the code
i need help with every part of the project, like a complete text of scripts for
it, thrn i can practise with it on my own and then u can give me assignments to
improve on
thanks
--
https://mail.python.org/mailman/listinfo/python-list
On Sat, Dec 12, 2015 at 8:05 PM, Harbey Leke wrote:
> Create a class called BankAccount
>
> .Create a constructor that takes in an integer and assigns this to a
> `balance` property.
>
> .Create a method called `deposit` that takes in cash deposit amount and
> updates the balance accordingly.
>
Create a class called BankAccount
.Create a constructor that takes in an integer and assigns this to a `balance`
property.
.Create a method called `deposit` that takes in cash deposit amount and updates
the balance accordingly.
.Create a method called `withdraw` that takes in cash withdrawal a
50 matches
Mail list logo