alex23 wrote:
But on the gripping hand, it is a clear triumph of "Explicit is better
than implicit." ;)
I think we may have found the long-lost 20th principle
of the Zen: "If it results in eye-bleedingly horrible
code, it might be a bad idea."
--
Greg
--
http://mail.python.org/mailman/listinf
En Tue, 04 Oct 2011 07:32:41 -0300, Wong Wah Meng-R32813
escribió:
Haha... yeah I reviewed the code, it is supposed to exposed some remote
methods locally (RMI proxy usage). However, I am not sure why what it
does is merely a pass.
I commented out this code and haven't seen any negative
En Mon, 03 Oct 2011 12:03:18 -0300, amit escribió:
I am really stuck in a very simple problem and wanted to know if you
could take some time to check it out -
My code is simple. Using BaseHTTPServer and ThreadInMix I want to run
a python script (Script1.py) for every request made simultaneousl
On Tue, 04 Oct 2011 20:20:34 -0700, alex23 wrote:
> Steven D'Aprano wrote:
>> Imported modules are variables like any other, and as they usually
>> exist in the global scope, so they will all need to be explicitly
>> referenced as global. This will get tiresome very quickly, and is a
>> cure far
Steven D'Aprano wrote:
> Imported modules are variables like any other, and as they usually exist
> in the global scope, so they will all need to be explicitly referenced as
> global. This will get tiresome very quickly, and is a cure far worse than
> the disease, and alone is enough to disqualify
On 10/4/2011 2:39 AM, masood shaik wrote:
Hi
I am trying to import java method in python. But i am getting the
following error.
error: ImportError: No module named Calculator
Calculator is the name of the class written in java. I am trying to
access the methods of that class.
Plea
On Mon, 03 Oct 2011 21:27:12 -0700, alex23 wrote:
> rantingrick wrote:
>> Why? Well because many times i find myself wondering if this or that
>> variable is local or global -- and when i say "global" i am speaking of
>> module scope! The "global" cures the ill.
>
> Given your stated propensity
On 10/4/2011 9:50 AM, Valiev Sergey wrote:
- `[]` - used for list comprehension,
- `()` - used for generators,
- `[start:stop]` / `[start:stop:step]` - used for slices.
The idea is to use `(start:stop)` / `(start:stop:step)` as 'lazy
evaluated' slices (like itertools.islice).
What do you think a
On Tue, 04 Oct 2011 00:14:49 -0700, masood shaik wrote:
> Hi
> I am trying out my hand on accessing java methods in python. here is
> my piece of code..
[...]
> Now i am trying to access the calculateTip() and its showing import
> error.
> It works fine when i am running it with jython but why i
On Tue, 04 Oct 2011 21:07:10 -0400, Alan Meyer wrote:
> Incidentally, all of these exercises involve maintaining or re-writing
> existing code written by other people. Students don't usually do much
> of that, but when they get a real job, they find that maintenance is
> most of what they actuall
On 10/4/2011 9:07 PM, Alan Meyer wrote:
... and to write up a comparison of the pros and cons of the global and
no-global approaches. ...
Of course you'll need to be fair in evaluating the students comparisons.
Some bright students are likely to come up with good reasons for using
globals
On 10/4/2011 5:12 PM, David Monaghan wrote:
On Tue, 04 Oct 2011 19:42:06 +0100, Chris Withers
wrote:
On 01/10/2011 23:00, David Monaghan wrote:
after opening the text.xls file i need to filter all the rows in which
the status column is passed and copy the whole sheet to another sheet
I don't
On 10/3/2011 12:26 PM, Alec Taylor wrote:
...
On Tue, Oct 4, 2011 at 3:21 AM, Aivar Annamaa wrote:
...
I'm looking for a trick or hidden feature to make Python 3 automatically
call a "main" function but without programmers writing `if __name__ ==
"__main__": ...`
...
Here's why I want such a
Hello world and everybody !
i'm pleased to announce the release of GOZERBOT 0.99.0, the first in a
series of releases that are supposed to lead to a proper 1.0 release
for GOZERBOT. The intention is to get a 1.0 version of GOZERBOT
available for users that still use this bot, got almost 2000 downl
Westley Martínez writes:
> Boiler plate is silly. Let the students figure out stuff themselves.
That argues directly against the Primacy effect mentioned earlier
https://secure.wikimedia.org/wikipedia/en/wiki/Principles_of_learning#Primacy>
https://secure.wikimedia.org/wikipedia/en/wiki/Serial_
On Tue, 04 Oct 2011 19:42:06 +0100, Chris Withers
wrote:
>On 01/10/2011 23:00, David Monaghan wrote:
>>> after opening the text.xls file i need to filter all the rows in which
>>> the status column is passed and copy the whole sheet to another sheet
>>
>> I don't do this often enough to have it t
On 10/04/2011 08:34 PM, Miki Tebeka wrote:
Do you have a local file/directory that is called sqlalchemy?
Funny thing, I have the same problem with another machine, with
sqlalchemy installed system-wide instead of locally.
Strange issue, maybe a problem with python 2.7/Linux?
--
http://mail.p
Mumble mumble... I described bad my question I think, yes I read that, but
maybe is not a correct way of working.
The http request I did retrieve (every time) an empty response, when I print
the read() result call the result is the same of the sample you are talking
about.
http://docs.python.
On 04/10/2011 21:29, pedr0 wrote:
Hi solved this problem, I have to add:
#connection
http_connection = http.client.HTTPConnection('www.xxx.net',80,timeout=60)
#first request
http_connection.request("POST", "/",params,headers=headers_)
r1 = http_connection.getresponse()
r1.read() // THIS ONE
#
Hi solved this problem, I have to add:
#connection
http_connection = http.client.HTTPConnection('www.xxx.net',80,timeout=60)
#first request
http_connection.request("POST", "/",params,headers=headers_)
r1 = http_connection.getresponse()
r1.read() // THIS ONE
#second request
http_connection.reque
Hi at all,
I don't understand why, in this piece of code, i catch the
raise ResponseNotReady(self.__state)
http.client.ResponseNotReady: Request-sent
EVERY time I run this piece of code:
#connection
http_connection = http.client.HTTPConnection('www.xxx.net',80,timeout=60)
#first request
http_
> How is it possible that the module exists and it's actually imported,
> and not found when I actually try to import something from it?
Do you have a local file/directory that is called sqlalchemy?
--
http://mail.python.org/mailman/listinfo/python-list
If this is strictly for 2D pixel graphics, I recommend using PyGame
(aka SDL). Why do you not think it's the way to go? It was built for
this type of thing.
You may also want to use PIL (Python Imaging Library) for various
image manipulation tasks, but PIL doesn't handle mouse clicks
On Oct 4, 11:05 am, galyle wrote:
> On Oct 4, 9:45 am, woooee wrote:
>
>
>
>
>
>
>
>
>
> > Sorry, I did not understand the question correctly, and so have added
> > another focus_set for the entry after the menu's creation. You can
> > still enter after the menu comes up, even though you can't s
On 01/10/2011 23:00, David Monaghan wrote:
after opening the text.xls file i need to filter all the rows in which
the status column is passed and copy the whole sheet to another sheet
I don't do this often enough to have it to mind, so what I normally do is
record a Macro, convert it to VBS and
Hi All,
The TestFixtures releases keep coming, I hope someone other than me is
finding these useful ;-)
This release features a change to test_datetime and test_date so that
they return instances of the real datetime.datetime and datetime.date
classes by default.
I'm hoping this will makin
On Oct 4, 9:45 am, woooee wrote:
> Sorry, I did not understand the question correctly, and so have added
> another focus_set for the entry after the menu's creation. You can
> still enter after the menu comes up, even though you can't see where
> you are entering.
>
> import Tkinter
>
> class dem
On Mon, Oct 03, 2011 at 09:35:16PM -0700, alex23 wrote:
> Sorry for hijacking Alec's response but I didn't see the OP.
>
> > Aivar Annamaa wrote:
> > > I'm looking for a trick or hidden feature to make Python 3 automatically
> > > call a "main" function but without programmers writing `if __name_
On Tue, Oct 4, 2011 at 9:50 AM, Valiev Sergey wrote:
> Hi,
> you may found this idea stupid, but nevertheless...
> - `[]` - used for list comprehension,
> - `()` - used for generators,
> - `[start:stop]` / `[start:stop:step]` - used for slices.
> The idea is to use `(start:stop)` / `(start:stop:s
On Tue, Oct 4, 2011 at 3:56 AM, Adam Funk wrote:
> I'd like to create a window with a "pause" button and a large plotting
> area, in which I'd like to draw a polygon, detect the pixel
> coördinates of a mouse click, and then start setting the colors of
> pixels by (x,y) coördinates. (This is just
Sorry, I did not understand the question correctly, and so have added
another focus_set for the entry after the menu's creation. You can
still enter after the menu comes up, even though you can't see where
you are entering.
import Tkinter
class demo:
def __init__(self, parent):
self.
Adding focus_set seems to work for me. What do want to do
differently?
import Tkinter
class demo:
def __init__(self, parent):
self._entry = Tkinter.Entry(width = 60)
self._suggestions = Tkinter.Menu(parent, tearoff = 0,
takefocus = 0)
self._entry.pack(padx = 20, pady
Sounds like a job for Processing...
On Tue, Oct 4, 2011 at 8:56 PM, Adam Funk wrote:
> I'd like to create a window with a "pause" button and a large plotting
> area, in which I'd like to draw a polygon, detect the pixel
> coördinates of a mouse click, and then start setting the colors of
> pixels
I'm struggling trying to get a working local pypi server.
Now eggbasket apparently also supports upload, which should be nice.
So I:
- created a virtualenv
- installed all the necessary
and trying to initializing the server I get:
--8<---cut here---start->8--
Hi,
you may found this idea stupid, but nevertheless...
- `[]` - used for list comprehension,
- `()` - used for generators,
- `[start:stop]` / `[start:stop:step]` - used for slices.
The idea is to use `(start:stop)` / `(start:stop:step)` as 'lazy evaluated'
slices (like itertools.islice).
What do y
Please help me
Regarding how to create java bridge as how to call a java function
from python
If you want to call a Java *method* from the C python implementation,
then there are many possibilities. For example, you can write your Java
program as a service. The Python program can talk to it t
Haha... yeah I reviewed the code, it is supposed to exposed some remote methods
locally (RMI proxy usage). However, I am not sure why what it does is merely a
pass.
I commented out this code and haven't seen any negative implication. I will
look into this again if I am convinced the next error
I'd like to create a window with a "pause" button and a large plotting
area, in which I'd like to draw a polygon, detect the pixel
coördinates of a mouse click, and then start setting the colors of
pixels by (x,y) coördinates. (This is just for my own amusement, to
play with some formulas for gene
On Oct 4, 1:16 pm, Chris Rebert wrote:
> On Tue, Oct 4, 2011 at 12:14 AM, masood shaik wrote:
> > Hi
> > I am trying out my hand on accessing java methods in python. here is
> > my piece of code..
>
> > Calculator.java
> > ---
> > public class Calculator {
>
> > public Calculator(
Thanks for all the comments!
It seems that the best way is still just to teach students self discipline.
And hope that they (for now) believe some things (eg. dangers of global
variables) without seeing.
Aivar
--
http://mail.python.org/mailman/listinfo/python-list
Wong Wah Meng-R32813 wrote:
> In migrating my application from python 1.5.2 to 2.7.1, one of my modules
> breaks when I import it. Here is the line where it breaks. Can I have a
> quick check if this built-in function still supported in python 2.7.1 and
> if so, what ought to be changed here? Than
On Tue, Oct 4, 2011 at 12:51 AM, Wong Wah Meng-R32813
wrote:
> In migrating my application from python 1.5.2 to 2.7.1, one of my modules
> breaks when I import it. Here is the line where it breaks. Can I have a
> quick check if this built-in function still supported in python 2.7.1
Er, `exec` is
On Tue, Oct 4, 2011 at 12:14 AM, masood shaik wrote:
> Hi
> I am trying out my hand on accessing java methods in python. here is
> my piece of code..
>
> Calculator.java
> ---
> public class Calculator {
>
> public Calculator(){
>
> }
>
> public double calculateTip(double cos
In migrating my application from python 1.5.2 to 2.7.1, one of my modules
breaks when I import it. Here is the line where it breaks. Can I have a quick
check if this built-in function still supported in python 2.7.1 and if so, what
ought to be changed here? Thanks in advance for replying.
exe
Hi
I am trying out my hand on accessing java methods in python. here is
my piece of code..
Calculator.java
---
public class Calculator {
public Calculator(){
}
public double calculateTip(double cost, double tipPercentage){
return cost * tipPercentage;
}
45 matches
Mail list logo