Trey Keown wrote:
Hey everybody,
I was wondering, how could I disable all keyboard/mouse input for the
whole windows system while I have a video playing? So the user can't
press, for example, the super key [one with windows logo on it], and have
the windows menu pop up?
Could this be
??? [EMAIL PROTECTED] wrote
I am learning Python. Do you know somewhere I can practice Python?
I means some sites where have exercises I can try solving.
The Useless Python website has some exercises and other small
projects.
Some have solutions some don't.
Also the Python Challenge web
Ian Witham [EMAIL PROTECTED] wrote
I basically wanna create a bitmap image in python. This will be
basically in pixels. X and y coordinates will be specified in the
program
and python should create an image by matching the colours.
I found it to be a very slow way to do things (both
Varsha Purohit [EMAIL PROTECTED] wrote
I want to create a wxpython program where i am reading a list
having
integer values like [1,2,3,4]. and i need to display the output
value as
bitmap image which shd be coloured after reading the values. Like
1=red,
2=yellow, 3=orange etc and it
GTXY20 [EMAIL PROTECTED] wrote
Any way to display the count of the values in a dictionary where the
values
are stored as a list? here is my dictionary:
{'1': ['a', 'b', 'c'], '3': ['a', 'b', 'c'], '2': ['a', 'b', 'c'],
'4':
['a', 'c']}
I would like to display count as follows and I
wormwood_3 wrote:
Well yes and no:-) This sort of application would fall under the
sprawling category of CGI, yes, and I can use Python scripts on my web
server, so it is supported. But nearly every tutorial I have seen
regarding Python and CGI only have to do with form submissions, doing
I've gone ahead and created a script that does this, however it also
strips punctuation. I was originally just comparing each character to a
string containing a single space ' ' but even using s[-1].isspace() I
lose punctuation marks. Any idea why that's happening?
(Not the OP, I just thought
wormwood_3 wrote:
I want
to do this because my site is on a shared hosting account, so I cannot
install a web framework like Django
Another option is to switch to a hosting account that supports Python. I
have been working with WebFaction and I'm very happy with them; an
account with Django
GTXY20 wrote:
Hello,
Any way to display the count of the values in a dictionary where the
values are stored as a list? here is my dictionary:
{'1': ['a', 'b', 'c'], '3': ['a', 'b', 'c'], '2': ['a', 'b', 'c'], '4':
['a', 'c']}
I would like to display count as follows and I would not
Andrew James wrote:
I've gone ahead and created a script that does this, however it also
strips punctuation. I was originally just comparing each character to a
string containing a single space ' ' but even using s[-1].isspace() I
lose punctuation marks. Any idea why that's happening?
My host actually does support Python. But I don't have access to Apache rules
nor the level of access to install apps like Django, so I am limited to just
scripts I write.
But for that price, i will definitely check out WebFaction!
-Sam
- Original Message
From: Kent Johnson [EMAIL
Dear Tutors,
I would like to make a new class instance, where
the intance attributes coming from the kwargs hash.
class ADUser:
def __init__(self, **kwargs):
for key in kwargs.keys():
self.key = kwargs[k]
a = ADUser(name='papa')
It isn't working :(
Yours sincerely,
János Juhász wrote:
Dear Tutors,
I would like to make a new class instance, where
the intance attributes coming from the kwargs hash.
class ADUser:
def __init__(self, **kwargs):
for key in kwargs.keys():
self.key = kwargs[k]
This sets the 'key' attribute of self
On Mon, Oct 01, 2007 at 04:51:53PM +0200, J?nos Juh?sz wrote:
Dear Tutors,
I would like to make a new class instance, where
the intance attributes coming from the kwargs hash.
class ADUser:
def __init__(self, **kwargs):
for key in kwargs.keys():
self.key =
Hello all,
I'm using MacPython 2.5 on OS X 10.4.
I was just wondering if all the Python modules are contained in this
directory:
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/
Also, I've installed the Python Image Library (PIL), and it seems to
be installed in this folder:
While not Python specific you could to the Ruby quizzes
(http://www.rubyquiz.com/). Just look at the problems and write a
solution in Python.
On 10/1/07, Alan Gauld [EMAIL PROTECTED] wrote:
??? [EMAIL PROTECTED] wrote
I am learning Python. Do you know somewhere I can practice Python?
I
This works perfectly.
However I will be dealing with an import of a very large dictionary - if I
call the commands at command line this seems to be very taxing on the CPU
and memory and will take a long time.
I was thinking of creating each as a fucntion whereby python would just to
write to a
GTXY20 wrote:
This works perfectly.
However I will be dealing with an import of a very large dictionary - if
I call the commands at command line this seems to be very taxing on the
CPU and memory and will take a long time.
I was thinking of creating each as a fucntion whereby
Hello,
after reading the responses to athread in 2004 [1] I am wondering why there is
no easy function in python to remove all white spaces from a string.
Like:
i am very fine
to
iamveryfine
In IDL there's just one simple function which does this: STRCOMPRESS [2].
Is there really not yet
Hi Alan,
Thanks for the response. Its not a home work problem its actually a task i
need to complete as i am tryin to make some tool which will be helpful to
use as a script in arcgis. i kinda got some clue will surely ask help if i
get stuck somewhere coz i know its difficult to put down in
Tim [EMAIL PROTECTED] wrote
after reading the responses to athread in 2004 [1] I am wondering
why there is
no easy function in python to remove all white spaces from a string.
i am very fine
to
iamveryfine
You can use string.replace.
'I am very fine'.replace(' ','')
'Iamveryfine'
János Juhász [EMAIL PROTECTED] wrote
class ADUser:
def __init__(self, **kwargs):
for key in kwargs.keys():
self.key = kwargs[k]
a = ADUser(name='papa')
It isn't working :(
Try using setattr instead of self.key assignment.
HTH,
--
Alan Gauld
Author of the Learn
János Juhász wrote:
Dear Tutors,
I would like to make a new class instance, where
the intance attributes coming from the kwargs hash.
class ADUser:
def __init__(self, **kwargs):
for key in kwargs.keys():
self.key = kwargs[k]
a = ADUser(name='papa')
Your
Roy Chen wrote:
Hello all,
I'm using MacPython 2.5 on OS X 10.4.
I was just wondering if all the Python modules are contained in this
directory:
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/
Try
import sys
sys.path
That will give you a list of all the places Python
There was another host that I wanted to mention along these lines (for Python
sites) that I think is even better: VPSLink (http://www.vpslink.com). They
allow root SSH access, and can install your choice of OS (lots of linux
flavors, ubuntu, SUSE, CentOS, etc) from a control panel. Aside from
Check to see if mod_python is installed/installable. It would quite
easily give you a very simple interface to do what you're looking for.
--Michael
--
Michael Langford
Phone: 404-386-0495
Consulting: http://www.TierOneDesign.com/
On 9/30/07, wormwood_3 [EMAIL PROTECTED] wrote:
Hello
Alan Gauld wrote:
There are no such things
as standard solutions to programming problems, its not like
doing math!
But usually there is The Right Way.
I think...
--
_
ASCII ribbon campaign ( )
- against HTML email X
vCards / \
On Mon, Oct 01, 2007, Alan Gauld wrote:
Tim [EMAIL PROTECTED] wrote
after reading the responses to athread in 2004 [1] I am wondering
why there is
no easy function in python to remove all white spaces from a string.
i am very fine
to
iamveryfine
You can use string.replace.
'I am
GTXY20 wrote:
Hello,
Any way to display the count of the values in a dictionary where the
values are stored as a list? here is my dictionary:
{'1': ['a', 'b', 'c'], '3': ['a', 'b', 'c'], '2': ['a', 'b', 'c'], '4':
['a', 'c']}
I would like to display count as follows and I would not
Thanks again I have worked that issue out.
However I have the following function and it is throwing this error:
FEXpython_v2.py, line 32, in UnitHolderDistributionqty
count[item]+=1
KeyError: 3
This is the function:
def Distributionqty(dictionary):
holder=list()
held=list()
Tim wrote:
Hello,
after reading the responses to athread in 2004 [1] I am wondering why there is
no easy function in python to remove all white spaces from a string.
Like:
i am very fine
to
iamveryfine
In IDL there's just one simple function which does this: STRCOMPRESS [2].
Is
GTXY20 wrote:
Thanks again I have worked that issue out.
However I have the following function and it is throwing this error:
FEXpython_v2.py, line 32, in UnitHolderDistributionqty
count[item]+=1
KeyError: 3
This is the function:
def Distributionqty(dictionary):
Thanks so much I changed to the following and this worked:
def HolderDistributionqty(dictionary):
from collections import defaultdict
count=defaultdict(int)
for item in dictionary.values():
count[len(item)]+=1
for k,v in sorted(count.items()):
fdist=k
qty=v
Hi,
I have a very simple question that I cannot find the answer to ... if I
knew the correct question to ask it would be simple.
I am trying to find the name of the file I am currently running (please
don't laugh at me I know it's simple but I cannot figure it out).
I want to know where my
On 02/10/2007, Suzanne Peel [EMAIL PROTECTED] wrote:
I am trying to find the name of the file I am currently running (please
don't laugh at me I know it's simple but I cannot figure it out).
Have a look at sys.argv[0] :-)
--
John.
___
Tutor
Suzanne Peel wrote:
Hi,
I have a very simple question that I cannot find the answer to ... if I
knew the correct question to ask it would be simple.
I am trying to find the name of the file I am currently running (please
don't laugh at me I know it's simple but I cannot figure it
I was looking for the source code for the strip
functions at python.org. I didn't find anything. Do
you or someone else know where the source code is
posted? I tried to find python on my workstation, but
I'm not sure where the sys admin installed it.
37 matches
Mail list logo