Thanks guys. I picked up the Apress book on Python and downloaded the
Komodo IDE trial to get me started.
I'm going to try using Django to build my website and since my brother
already has hosting I'll just borrow some space.
He does PHP for a living, so it would probably be better for me to use
wowowow now THAT is what I call simple!
--
http://mail.python.org/mailman/listinfo/python-list
#!/usr/bin/python
#+
# This script ensures there is only one instance of a particular command
# running at a time. It may be useful, for example, for potentially
# lengthy cron tasks, to ensure that a new task is not started if the
# previous one has not finished yet.
#
# Invoke this script from th
Hello,
can anybody tell me if and how I do antialiased drawing in wxPython.
Andy
--
http://mail.python.org/mailman/listinfo/python-list
As the capabilities of core Python have increased, I've noticed that the
logic in import this can be simplified to one line:
print s.decode("rot13")
;)
At the very least the last line:
print "".join([d.get(c, c) for c in s])
could use a generator expression instead of a list comprehension.
--
Tim Hochberg ha scritto:
> I think this PEP is going off the rails. It's primary virtue was that it
> was a simpler, clearer way to write:
>
> class Foo(args):
> __metaclass__ = some_metaclass
> #...
>
> Once it starts calling secret magic methods behind the scenes it's
> losi
Thanks to both of you, Kent and Scott.
--
http://mail.python.org/mailman/listinfo/python-list
TPJ wrote:
>> (...) Even allowing for the
>> difficulties you've already experienced, it's nearly always better in
>> practical cases to use assignment to the keys of a dictionary. Then no
>> exec is required, and you have direct control over your own namespace.
>
> Well... Is this a sugestion, t
Kent Johnson wrote:
> flamesrock wrote:
> > Kind of a fun but confusing problem...
> >
> > I have two lists. Each list contains elements of two-element lists.
> > l1 = [['c1',1],['c2',2],['c3',4]]
> > l2 = [['c1',1],['c2',2],['c4',4],['c3',3]]
> >
> > Exactly in this format, where
> > superlist[
Ralph H. Stoos Jr. enlightened us with:
> File "autotp.py", line 21
> ready = raw_input("Ready to proceed ? TYPE (y)es or (n)o: ")
> ^
Please post the entire traceback, so we can see the actual error
message. Posting the context of the bad line also wouldn't hurt.
Sybren
--
The probl
Vielen Dank. Es funktioniert.
Mit freundlichen gruessen,
Aleksandar Cikota
"Gregor Horvath" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Aleksandar Cikota schrieb:
>
>> Can someone translate the VB code to Python?
>>
>> VB code:
>>
>> Dim chsr as New DriverHelper.Chooser
>> ch
Lawrence D'Oliveiro wrote:
> >BUT 'b' and 'c' simply do not exist outside the 'a' world.
>
> It's worth distinguishing between the _names_ 'b' and 'c' and the
> _functions_ referred to by those names. The _names_ certainly do not
> exist outside of the scope of the function referred to by 'a' (any
Paul Moore wrote:
> I've just added some instructions on how to build Python on Windows
> with the free MS Toolkit C++ compiler. They are at
> http://wiki.python.org/moin/Building_Python_with_the_free_MS_C_Toolkit.
Cool! If you think that adding/changing files in Python would simplify
the process,
[EMAIL PROTECTED] enlightened us with:
> ???d???b cx_Oracle (Oracle 9i, Python 2.4) ???b??windows
> xp ??python???a??C:\Python24\cx_Oracle-doc??
>
import cx_Oracle ???F
> Traceback (most recent call last):
> File "", line 1, in ?
> ImportError: DLL load failed: ???M?
fyleow wrote:
> Hi guys,
>
> I'm a student/hobbyist programmer interested in creating a web project.
> It's nothing too complicated, I would like to get data from an RSS
> feed and store that into a database. I want my website to get the
> information from the database and display parts of it dep
It had to happen :)
http://pyvm32.infogami.com/EPL
Seriously, this is not so much about the whitespace as for the
new features, which might interest people who are thinking about
new features. More specifically, "methods" and the "$" operator
are really great and seem to solve the problem
"Ben C" wrote:
> I used to think it assigned with things like integers, because if you
> write:
>
> a = 5
> b = a
> b += 1
> print a
>
> a is still 5. So it looked like a and b stored values and b got a "copy"
> of a's value. But this is the wrong interpretation,
>
> b += 1
>
>
Wildemar Wildenburger wrote:
> But I guess I'll just keep adding the (object) appendix even after that,
> so all my class definitions get syntax highlighting.
why are you using an IDE that doesn't understand Python syntax ?
--
http://mail.python.org/mailman/listinfo/python-list
First time trying to create an executable with py2exe. I have a small
program which makes use of python23 (2.3.5?), wxpython ('2.6.2.1'),
matplotlib ('0.83.2'), win32com (latest?), Numeric ('23.7') on Windows XP &
Win2000. The program runs without problem but as an exe it doesn't even get
to showi
Ralph H. Stoos Jr. wrote:
> File "autotp.py", line 21
> ready = raw_input("Ready to proceed ? TYPE (y)es or (n)o: ")
> ^
please post the entire output and the surrounding code (as much as
reasonable).
It may well be some paranthesis error, as alreasy stated.
--
Thomas Jollans - http:
This seems nice:
global.x = 1
is the same as
global x
x = 1
but maybe instead of the global.name something to refer to the upper
namespace (that can be the global one or the namespace of the function
that contains this one) can be more general:
upper.x = 1
upper.upper.x = 1
I think that making se
Stelios Xanthakis wrote:
> It had to happen :)
>
> http://pyvm32.infogami.com/EPL
>
> Seriously, this is not so much about the whitespace as for the
> new features, which might interest people who are thinking about
> new features. More specifically, "methods" and the "$" operator
> are reall
tomer> so now we have one place where people can share inventory
tomer> constructs, questions-and-answers, patches, documentation and
tomer> more. enjoy.
I've never seen Construct before, but when you say "parser" I think of
parsing programming languages. The couple of examples on th
Hi,
I'm trying to figure out how to implement a XML-RPC server that
is called by xinetd i.s.o. listening on a TCP socket itself.
I already have implemented a stand-alone XML-RPC server using
SimpleXMLRPCServer, but I now want something similar, that is
started via xinetd (i.e. reading/writing via
I am desperately looking for a way to call Python from Matlab. I have become
used to Python's rich syntax and large number of libraries, and feel
ridiculously clumsy being stuck with Matlab's rather restricted facilities
for doing other things than standard mathematical work.
Does anyone know of g
You can also access this group through Google Groups:
http://groups.google.com/group/comp.lang.python
which has nice search features.
I found O'Reilly's "Learning Python" to be helpful in combination with
O'Reilly's "Python in a Nutshell". Learning python is a nice
introduction to Python but is
> I am desperately looking for a way to call Python from Matlab. I have become
> used to Python's rich syntax and large number of libraries, and feel
> ridiculously clumsy being stuck with Matlab's rather restricted facilities
> for doing other things than standard mathematical work.
>
> Does anyon
There is also TurboGears, which (IMO) is greatness in the making.
Though unfortunately, the documentation is still catching up to the
greatness. I'm using it and loving it, though.
http://www.turbogears.org
DJango is great for content management. TurboGears is (IMO) a more
generalized framework
Thank you. Also this script is PublicDomain right?
Steven D'Aprano wrote:
> On Fri, 14 Apr 2006 16:59:13 -0700, fatalserpent wrote:
>
> > Here is the basic code (yes, I know its tiny).
> >
> > x = ['print "x =", x', 'for m in x: print m']
> > print "x =", x
> > for m in x: print m
> >
> > I want to
Steve Bergman wrote:
> One of these days Alex will come out with a 2nd Edition of Nutshell and
> there will be much rejoicing. ;-)
>
Rumor has it he is trying to hit print for OSCON (so soon, soon).
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
Announcing Urwid 0.9.3
--
Urwid home page:
http://excess.org/urwid/
Tarball:
http://excess.org/urwid/urwid-0.9.3.tar.gz
About this release:
===
This release adds support for gpm and mouse dragging to the raw_display
module, improves mouse release repo
RM 写道:
> This is from the new KOffice Announcement.
>
> http://www.koffice.org/announcements/announce-1.5.php
>
> '''This version of KOffice features a start of a unified scripting
> solution called Kross. Kross provides cross-language support for
> scripting (thus its name) and at present supports
On 4/15/06, Stelios Xanthakis <[EMAIL PROTECTED]> wrote:
> It had to happen :)
Did it?
> http://pyvm32.infogami.com/EPL
>
> Seriously, this is not so much about the whitespace as for the
> new features, which might interest people who are thinking about
> new features. More specifically,
Tim Hochberg wrote:
> Steven Bethard wrote:
>
>> Steven Bethard wrote:
>>
>>> Tim Hochberg wrote:
>>>
Steven Bethard wrote:
> Steven Bethard wrote:
>
>> Duncan Booth wrote:
>>
>>> make Element html:
>>> make Element body:
>>> make Element p:
>>>
On 4/15/06, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> Paul Moore wrote:
> > I've just added some instructions on how to build Python on Windows
> > with the free MS Toolkit C++ compiler. They are at
> > http://wiki.python.org/moin/Building_Python_with_the_free_MS_C_Toolkit.
>
> Cool! If you th
Ralph H. Stoos Jr. wrote:
> Tim,
>
> After a little more research, I did find that out. It is funny, but in
> the tutorial "Non-Programmers Tutorial For Python", it makes no mention
> of the indentation issue, at least in the beginning portions which I had
> read.
>
> This is an age old problem o
>> I've been digging around, but can't seem to come up
>> with the right combo of words to google for to get
>> helpful results. Is there some handy wrapper/module
>> that allows code to target existance as both a CGI
>> script and a mod_python script, with only one "import"
>> statement? Perhaps
Hello All
i am new to python language. i am working on a gnuradio project where it
uses python as the primary programming language. i am trying to convert
a message, text, or numbers into binary code so that i can process it.
i googled many times and tried many of the answers out there, no luck
Em Sáb, 2006-04-15 às 19:25 +, HNT20 escreveu:
> is there a way to convert a string into its binary representation of the
> ascii table.??
I'm very curious... why?
And no, I don't have the answer.
--
Felipe.
--
http://mail.python.org/mailman/listinfo/python-list
HNT20 wrote:
> Hello All
>
def ascii_to_bin(char):
ascii = ord(char)
bin = []
while (ascii > 0):
if (ascii & 1) == 1:
bin.append("1")
else:
bin.append("0")
ascii = ascii >> 1
bin.reverse()
binary = "".join(bin)
zerofix = (8
Ian Ozsvald wrote:
> Summary:
> At http://ShowMeDo.com we have 3 new videos by Jerol Harrington
> introducing Python Objects:
> http://showmedo.com/videoListPage?listKey=IntroductionToPythonObjectsUsingIPython_JerolH
>
>
> and 5 videos for beginners to wxPython:
> http://showmedo.com/videoListPa
HNT20 wrote:
> is there a way to convert a string into its binary representation of the
> ascii table.??
>
> an example of what i want would be:
>
> hi --> 011011101001
Why not just write some code to do it? e.g.
>>> def b1(n):
return "01"[n%2]
>>> def b2(n):
return b1(n>>1)+b1
If (assuming this is correct, you can do more tests) the given strings
are many and/or long, this can be a fast version. With Psyco this same
version can become quite faster.
Bye,
bearophile
from array import array
class ToBinary(object):
"""ToBinary: class to convert a given string to a bin
"HNT20" <[EMAIL PROTECTED]> wrote:
> i am new to python language. i am working on a gnuradio project where it
> uses python as the primary programming language. i am trying to convert
> a message, text, or numbers into binary code so that i can process it.
umm. characters and numbers are stored
bwaha wrote:
> First time trying to create an executable with py2exe. I have a small
> program which makes use of python23 (2.3.5?), wxpython ('2.6.2.1'),
> matplotlib ('0.83.2'), win32com (latest?), Numeric ('23.7') on Windows XP &
> Win2000. The program runs without problem but as an exe it does
Hi,
which is the best wx IDE for GUI development?
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> tomer> so now we have one place where people can share inventory
> tomer> constructs, questions-and-answers, patches, documentation and
> tomer> more. enjoy.
>
> I've never seen Construct before, but when you say "parser" I think of
> parsing programming language
SailChallenge was originally a program in C. It simulates a sailboat
being navigated by an ANN (Artificial Neural Network). Now a Python
"front end" has been created which invokes the compiled C program, and
then captures the real time text output, converting it into an
animation. A screen s
[EMAIL PROTECTED] wrote:
> If (assuming this is correct, you can do more tests) the given strings
> are many and/or long, this can be a fast version. With Psyco this same
> version can become quite faster.
> Bye,
> bearophile
>
>
> from array import array
>
> class ToBinary(object):
> """ToB
Rune Strand wrote:
> HNT20 wrote:
>> Hello All
>>
>
> def ascii_to_bin(char):
> ascii = ord(char)
> bin = []
>
> while (ascii > 0):
> if (ascii & 1) == 1:
> bin.append("1")
> else:
> bin.append("0")
> ascii = ascii >> 1
>
> bin.reve
Felipe Almeida Lessa wrote:
> Em Sáb, 2006-04-15 às 19:25 +, HNT20 escreveu:
>> is there a way to convert a string into its binary representation of the
>> ascii table.??
>
> I'm very curious... why?
>
> And no, I don't have the answer.
>
well, once i get the binary representations, i can
"HNT20" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> i am new to python language. i am working on a gnuradio project where it
> uses python as the primary programming language. i am trying to convert
> a message, text, or numbers into binary code so that i can process it.
>
On 16/04/2006 12:36 AM, fatal.serpent top-posted:
> Thank you. Also this script is PublicDomain right?
Wrong. If you attempt to turn "The D'Aprano Code" into a best-seller,
and don't donate assign all of your royalties to the PSF, they will
pursue you and your descendants to the ends of the univ
I'm working on various backup scripts, using filecmp and shutil.
When I run a script to copy files to a mapped network drive, shutil
creates a backup file with a date of 2002 or so.
If I use shutil.copy2 it copies the dates of the original files, but
creates folders with similary old dates and ti
Hi!
Warning : Win-XP manage many date/time for files : creation, last access,
last modification, year (?), day of photo
And, this can to change, depending on format of disk (NTFS, FAT, etc.)
and/or type of files (Jpeg, exe, etc.)
On a LAN, the date/time can also to depend of the date/time and
I'm afraid I can't be very helpful to you, but you could be most
helpful to some of us.
Can you elaborate on what specifically you found difficult? In some
circles Python is regarded as a direct competitor to Matlab. Your
preference for Python for "other things than standard mathematical
work" in
Thank you! I went into the set up of my network storage device and
found the time settings all wrong. Fixed it.
Sorry for the trouble.
rick
--
http://mail.python.org/mailman/listinfo/python-list
Em Sáb, 2006-04-15 às 18:09 -0400, Terry Reedy escreveu:
> # given string s
> binchars = []
> for c in s: binchars.append(a2b[ord(c)])
Faster:
binchars = [a2b[ord(c)] for c in s]
--
Felipe.
--
http://mail.python.org/mailman/listinfo/python-list
I have a suspicion it is the collaborative effort that is the problem
here -- I try to use Python whenever possible for
engineering/numerical analysis, but the established industry standard
(for most disciplines of engineering) is still MATLAB.
Although Python is arguably better in most respects,
Hi all,
Does a async sleep exist?
How to check this every 10 sec, but that the CPU is free?
Code:
import win32com.client
import time
import os
Document = win32com.client.Dispatch('MaxIm.Document')
Application = win32com.client.dynamic.Dispatch('MaxIm.Application')
path_to_watch = "F:/Images/VRT
I am trying to make an if-statement that will not do anything and print
'nothing entered' if there is nothing entered in a form. I have the
following code that does that, however, now even if I enter something
into the form, the code still outputs 'nothing entered'. This violates
the if state
On 16/04/2006 5:25 AM, HNT20 wrote:
>
> hi --> 011011101001
>
This implies that the bits in a byte are transmitted MSB first. I
haven't done anything anywhere near this area since about the time that
acoustic couplers went the way of buggy whips, but my vague recollection
is LSB first
Kun wrote:
> I am trying to make an if-statement that will not do anything and print
> 'nothing entered' if there is nothing entered in a form. I have the
> following code that does that, however, now even if I enter something
Yes, but did you enter everything?
> into the form, the code still o
On 2006-04-13, Barry Margolin wrote:
> In article <[EMAIL PROTECTED]>,
> "Chris F.A. Johnson" <[EMAIL PROTECTED]> wrote:
>
>> In fact, my scripts are portable to other terminal types by use
>> of files for each terminal, generated with tput. Using a
>> different terminal is as easy
> "Stelios" == Stelios Xanthakis <[EMAIL PROTECTED]> writes:
Stelios> It had to happen :) http://pyvm32.infogami.com/EPL
Stelios> Seriously, this is not so much about the whitespace as
Stelios> for the new features, which might interest people who are
Stelios> thinking about n
On Sat, 15 Apr 2006 07:36:30 -0700, fatal.serpent wrote:
> Thank you. Also this script is PublicDomain right?
Oh heavens, I never even thought about that... the world was a much better
place when you actually needed to *claim copyright* rather than just have
it apply automatically on every stupid
[EMAIL PROTECTED] wrote:
> Kun wrote:
>> I am trying to make an if-statement that will not do anything and print
>> 'nothing entered' if there is nothing entered in a form. I have the
>> following code that does that, however, now even if I enter something
>
> Yes, but did you enter everything?
>
Jay Parlar <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> Your problem is that the 'print' statement is sending the text to
> sys.stdout, and sys.stdout is buffered.
I thought it was something like this, but I couldn't find it in the docs :
(.
> print 'Start: %f,'% st,
> sys.stdout.flu
On Sat, 15 Apr 2006 20:28:47 -0400, Kun wrote:
> I am trying to make an if-statement that will not do anything and print
> 'nothing entered' if there is nothing entered in a form. I have the
> following code that does that, however, now even if I enter something
> into the form, the code still
The short version:
def str2bin(s):
return ''.join([''.join(['10'[not (m&ord(x))] for m in
(128,64,32,16,8,4,2,1)]) for x in s])
Notes:
Split into 3 lines for newsgroup post, 3rd line is actually the end of
the 2nd. It will run as shown above.
Returns digits in MSB order, to return L
I've been browsing what Python has to offer in the world of web
programming for past few weeks, while preparing to select something for
small, quick and dirty projects where my favorable solution, Zope3, is an
overkill.
There sure are handfull of solutions out there, but I didn't quite like
a
On 2006-04-16, John Machin <[EMAIL PROTECTED]> wrote:
> On 16/04/2006 5:25 AM, HNT20 wrote:
>>
>> hi --> 011011101001
>>
>
> This implies that the bits in a byte are transmitted MSB first. I
> haven't done anything anywhere near this area since about the time that
> acoustic couplers went
On 16/04/2006 10:28 AM, Kun wrote:
> I am trying to make an if-statement that will not do anything and print
> 'nothing entered' if there is nothing entered in a form. I have the
> following code that does that, however, now even if I enter something
> into the form, the code still outputs 'not
I currently have a python-cgi script that extracts data from a mysql
table. I would like to save this data as a string and send it to a
recipient via email.
I know how to send email using the smtp lib, but what I do not know his
how to save a portion of the page as a string. Any pointers?
--
I have a newbie question, and I have seen reference to this mentioned
in many places, but all just say "this has been discussed frequently
in (other places) so we won't discuss it here..." and I am unable to
find the actual answer...
I expected :
Array = ["topdir", ["/subdir1", ["/file1", "/file2
Try this:
if form.get("delete_id","") != "" and form.get("delete_data","") != ""
and...
the "get" method lets you have an optional second argument that gets
returned if the key is not in the dictionary.
Also, am I reading your code right? If I enter some fields but not all,
you print a messa
D:\python24\Lib\idlelib>pyshell.py
Traceback (most recent call last):
File "D:\python24\Lib\idlelib\PyShell.py", line 1388, in ?
main()
File "D:\python24\Lib\idlelib\PyShell.py", line 1361, in main
if not flist.open_shell():
File "D:\python24\Lib\idlelib\PyShell.py", line 277, in open
D:\python24\Lib\idlelib>pyshell.py
Traceback (most recent call last):
File "D:\python24\Lib\idlelib\PyShell.py", line 1388, in ?
main()
File "D:\python24\Lib\idlelib\PyShell.py", line 1361, in main
if not flist.open_shell():
File "D:\python24\Lib\idlelib\PyShell.py", line 277, in open
一首诗 wrote:
> socket.gaierror: (10104, 'getaddrinfo failed')
You're using a buggy firewall, write to your firewall vendor about this
bug. IDLE shell is making a connection over loopback network interface
in other words making a connection from your computer to your computer,
this type of connection
On Sat, 15 Apr 2006 22:36:17 -0500, CamelR wrote:
> I have a newbie question, and I have seen reference to this mentioned
> in many places, but all just say "this has been discussed frequently
> in (other places) so we won't discuss it here..." and I am unable to
> find the actual answer...
>
> I
Hi,
I've been (self) studying Python for the past two months and I have had
no background in OOP whatsoever.
I was able to write an interactive program that randomly selects an item
from a list. From a Main Menu, the user has the option to add items to
an empty list, show the list, run the rando
Martin Manns wrote:
> Robert Kern wrote:
>> Martin Manns wrote:
>
>>> If I cPickle a numpy array under Linux and un-cPickle it under Solaris
>>> 10, my arrays seem to be transposed.
>> Transposed? That's odd. There was a byteorder issue with pickles going across
>> differently-endianed platforms
On Sat, 15 Apr 2006 22:39:37 -0600, Miguel E. wrote:
> I am trying to create a function that removes an item as specified by
> the user. Apparently, the list operation "del list[:]" deletes the
> entire list. Below is the sample function.
If you know the value of the item, and not its position:
Karlo Lozovina wrote:
> There's only one thing bothering me, and that is it's lack of publicity.
> There are only few posts on thig NG with some refference to Myghty, and
> even less when it comes to Pylons (http://pylonshq.com/), framework built
> on top of Myghy. Myghy project isn't that new to e
Mr. M wrote:
> Somehow, the bug does not show up any more. I believe it was due to the
> numpy version that is fetched by cPickle. Is there any way to control
> (or even determine), which library version cPickle grabs for unpickling
> a numpy array (numpy, scipy, etc)?
You can import the appro
"Miguel E." <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I've been (self) studying Python for the past two months and I have had
> no background in OOP whatsoever.
>
> I was able to write an interactive program that randomly selects an item
> from a list. From a Main Menu
Steve Bergman <[EMAIL PROTECTED]> wrote:
...
> Both are a bit out of date. The current python version is 2.4.
> Learning Python covers 2.3. Nutshell covers up to 2.2.
>
> One of these days Alex will come out with a 2nd Edition of Nutshell and
> there will be much rejoicing. ;-)
If everything
Hi folks,
I've just released an XML object wrapper called XMLObject, which aims to
do for XML file handling what SQLObject does for database access.
XMLObject wraps XML files as Python objects, and lets you work with XML
data more quickly and easily, and with code that's shorter and much more
rea
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
http://mail.python.org/mailman/listinfo/python-list
89 matches
Mail list logo