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 ac
"???" <[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 we
"wormwood_3" <[EMAIL PROTECTED]> wrote
> ...nearly every tutorial I have seen regarding Python and CGI only
> have to do with form submissions,
Thats the most common use of CGI but really a form submission is just
a standard HTTP GET/POST request with some predefined variables.
In reality the us
"Trey Keown" <[EMAIL PROTECTED]> wrote
> 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?
> Coul
"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 th
"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
"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 foll
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 t
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 Djan
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 wou
"Andrew James" <[EMAIL PROTECTED]> wrote
> string containing a single space ' ' but even using s[-1].isspace()
> I
> lose punctuation marks. Any idea why that's happening?
care to show us what you are doing?
>>> ';'.isspace()
False
So puntuation should not show up as true...
Alan G.
__
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?
H
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 PR
wormwood_3 wrote:
> 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.
Webfaction gives you both - you can install anything you like as long as
it doesn't require superuser
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
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
Dave Kuhlman wrote:
> 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.key
Dave Kuhlman wrote:
> 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.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 Pyth
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 fi
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 whereb
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 wor
"Roy Chen" <[EMAIL PROTECTED]> wrote
> 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/
The standard library modules are. Any custom moidules could
be alm
"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(' ','')
"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 o
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')
>
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
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 th
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:
> Hell
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 s
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
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()
dis
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: STRCOMPRE
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 er
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 mai
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
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.
_
wormwood_3 wrote:
> 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 co
Hello all,
Let's say I have the following dictionary:
{1:(a,b,c), 2:(a,c), 3:(b,c), 4:(a,d)}
I also have another dictionary for new value association:
{a:1, b:2, c:3}
How should I approach if I want to modify the first dictionary to read:
{1:(1,2,3), 2:(1,3), 3:(2,3), 4:(1,d)}
There is the p
On 02/10/2007, GTXY20 <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> Let's say I have the following dictionary:
>
> {1:(a,b,c), 2:(a,c), 3:(b,c), 4:(a,d)}
>
> I also have another dictionary for new value association:
>
> {a:1, b:2, c:3}
>
> How should I approach if I want to modify the first dictionar
Thankyou for your help,
However both suggestions will only give me that name of the 1st file
executed eg when I use execfile('EA_Owner.py') the name returned when
the __file__ or sys.argv[0] is executed always EA_Owner.py .
The Traceback feature is an excellent resource however the errors I
48 matches
Mail list logo