On Mon, 29 Jan 2007 23:05:37 -0800, ArdPy wrote:
> Hi,
>
> Pls tell me whats going on in the code snippet below:
>
n = 10
statstr = "N = ",n
type(statstr) #case1
>
print statstr
> ('N = ', 10)
print "N = ",n
On Jan 29, 10:15 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> The instructor learned his lesson: no more assignments
> done in "any language I can understand"
Without naming names, there was a person at my university who gained a
certain amount of notoriety by implementing a file system fo
On Jan 29, 1:50 pm, "azrael" <[EMAIL PROTECTED]> wrote:
> thanks guys. i see that there is no way then to go back to C to
> satisfy my prof and get a grade
Seconding what Dennis says below, it is totally possible to use Python
for this.
I didn't mean to discourage you from using Python--I just w
Hi,
Pls tell me whats going on in the code snippet below:
>>> n = 10
>>> statstr = "N = ",n
>>> type(statstr) #case1
>>> print statstr
('N = ', 10)
>>> print "N = ",n #case 2
N = 10
In the first case the result is printed as a tuple
"manstey" <[EMAIL PROTECTED]> writes:
> I have two classes. The first one wraps around an old-style class
> called oref
>
> Class CacheClass(object):
> def __init__(self, obj):
> self.__data = obj
> def __getattr__(self, attr):
> return getattr(self.__data, attr)
I presume
* Paul McGuire wrote:
>> py>def __init__(self, arg = []):
>> py>self.__list = arg
>
> Please don't perpetuate this bad habit!!! "arg=[]" is evaluated at
> compile time, not runtime, and will give all default-inited llists the
> same underlying list.
While this actually might be bad
Hello
how can I emulate a serial port in windows? I want to intercept data
sent to a 'com'port by a proprietary program. It sends statistics to a
serial display, and I want that data in my python program (that display
isn't needed).
Is this possible?
I've seen this kind of serial ports bei
Hi,
I am having trouble designing my classes.
I have two classes. The first one wraps around an old-style class
called oref
Class CacheClass(object):
def __init__(self, obj):
self.__data = obj
def __getattr__(self, attr):
return getattr(self.__data, attr)
The second cl
Toby A Inkster wrote:
> Steve Holden wrote:
>
>> There is absolutely no need to know the IP address of "your router" to
>> communicate with Internet devices. Either your IP layer is configured to
>> know the addresses of one or more routers, or it has discovered those
>> address by dynamic mean
tubby wrote:
> Dieter Deyke wrote:
>>> sout = os.popen('pdftotext "%s" - ' %f)
>
>> Your program above should read:
>>
>>sout = os.popen('pdftotext "%s" - ' % (f,))
>
> What is the significance of doing it this way?
It's actually just nit-picking - as long as you know f is never going to
En Mon, 29 Jan 2007 23:45:40 -0300, mark <[EMAIL PROTECTED]> escribió:
> i have few variables and i want to create a dictionary with these
> variables
> such that the keys are the variable names and the corresponding values
> are the variable values.how do i do this easily?
> for ex:
> var1='mar
En Mon, 29 Jan 2007 01:58:39 -0300, NoName <[EMAIL PROTECTED]> escribió:
> Perl:
> @char=("A".."Z","a".."z",0..9);
> do{print join("",@char[map{rand @char}(1..8)])}while(<>);
>
> !!generate passwords untill U press ctrl-z
>
>
>
> Python (from CookBook):
>
> from random import choice
> import strin
On 28 Jan 2007 21:20:47 -0800, "Paul McGuire" <[EMAIL PROTECTED]>
wrote:
>On Jan 27, 10:43 pm, avidfan <[EMAIL PROTECTED]> wrote:
>> I need to parse a log file using python and I need some advice/wisdom
>> on the best way to go about it:
>>
>> The log file entries will consist of something like th
Carl J. Van Arsdall wrote:
> Aahz wrote:
>> [snip]
>>
>> My response is that you're asking the wrong questions here. Our database
>> server locked up hard Sunday morning, and we still have no idea why (the
>> machine itself, not just the database app). I think it's more important
>> to focus on w
En Mon, 29 Jan 2007 20:17:11 -0300, <"none <"@bag.python.org> escribió:
> I have a very complex data structure which is basically a class object
> containing (sometimes many) other class objects,
What are "class objects"? instances of a given class, or a class itself?
> function references,
> in
[EMAIL PROTECTED] wrote:
> On Jan 27, 1:31 pm, Jim Klein <[EMAIL PROTECTED]> wrote:
>> I'm not one of the conquered races, I'm Swiss. We are the bankers to
>> the conquerers. :-)
>
> Exactly, Honorable J Klein, (although my reference was a general one,
> you have entered the thread, so I will pic
En Mon, 29 Jan 2007 23:42:07 -0300, <[EMAIL PROTECTED]> escribió:
> For example the raw data is as follows
>
> SomeText Description>PassorFail
>
> without spaces or new lines. I need this to be written into an XML
> file as
> [same content but nicely indented]
Is the file supposed to be processe
En Mon, 29 Jan 2007 10:16:32 -0300, Jan Kanis
<[EMAIL PROTECTED]> escribió:
> Hello everyone,
>
> I'm trying to change the interactive python prompt. According to the docs
> this is done by changing sys.ps1 and sys.ps2 . That works fine when
> running python interactively from a command line, bu
En Mon, 29 Jan 2007 01:24:23 -0300, manstey <[EMAIL PROTECTED]> escribió:
>
> Our class has its attributes set as classes, as in
>
> MyClass.Phone.Value='34562346'
> MyClass.Phone.Private=True
>
> Inside the MyClass definition we have a function like this:
>
> def MyFunc(self,clsProperty):
>if
En Sun, 28 Jan 2007 23:54:03 -0300, Raúl Gómez C. <[EMAIL PROTECTED]>
escribió:
> I can't use the subprocess module because my app needs to be compatible
> with
> Python 2.3 so, is there another approach to this problem???
Any variant of popen; see the popen2 module (but read the last notes o
I compiled Python 2.5 from python.org and I get an error message when I try
to import the Tkinter module. Python reports that there is no such module.
It says my Python isn't configured for Tkinter. How do I configure it? I'm
using GCC 4.1.1 to compile the tarball. Thanks for any help with this.
J
Excellent Technology, and photos:
http://stj911.org/jones/focus_on_goal.html
As scientists, we look at the evidence, perform experiments, and apply
the Scientific Method. The Greek method was to look at the evidence
(superficially) and then try to explain things through logic and
debate. The G
On Jan 30, 10:42 am, [EMAIL PROTECTED] wrote:
> For example the raw data is as follows
>
> SomeText Description>PassorFail
>
> without spaces or new lines. I need this to be written into an XML
> file as
>
>
>
>
>
>
> SomeText
>
On Mon, 29 Jan 2007 18:01:56 -0800, Jim wrote:
> Hello,
>
> I'm trying to write exception-handling code that is OK in the
> presence
> of unicode error messages. I seem to have gotten all mixed up and
> I'd
> appreciate any un-mixing that anyone can give me.
[snip]
>>> class MyException(Exce
i have few variables and i want to create a dictionary with these variables
such that the keys are the variable names and the corresponding values
are the variable values.how do i do this easily?
for ex:
var1='mark'
var2=['1','2','3']
my_dict = create_my_dictionary(var1, var2)
and my_dict is {'va
Hi
I am running a HTTP server which receives post from a process.
In my do_POST method am receiving raw data.
I know that this raw data has a valid XML content and I need to
convert this into an XML file.
Are there any routines to do this.. if not how to write one..
For example the raw data is
still a stupid troll.
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I'm trying to write exception-handling code that is OK in the
presence
of unicode error messages. I seem to have gotten all mixed up and
I'd
appreciate any un-mixing that anyone can give me.
I'm used to writing code like this.
class myException(Exception):
pass
fn='README'
On Mon, 29 Jan 2007 08:38:13 -0800, Szabolcs Nagy wrote:
>>> why use xrange? range is faster and simpler for small ranges
That is not true.
>>> import timeit
>>> timeit.Timer("range(50)", "").repeat()
[2.8599629402160645, 2.8296849727630615, 2.8609859943389893]
>>> timeit.Timer("xrange(50)", "")
On Mon, 29 Jan 2007 16:24:18 +0100, Laszlo Nagy wrote:
> NoName írta:
>> Hmmm..
>> In the Perl example password generates after user hit ENTER not
>> continously like in Python you wrote... :)
>>
>> i want see various ways to generate passwords even if they some
>> indirect like using BASE64
>>
In article <[EMAIL PROTECTED]>,
Carl J. Van Arsdall <[EMAIL PROTECTED]> wrote:
>Aahz wrote:
>>
>> My response is that you're asking the wrong questions here. Our database
>> server locked up hard Sunday morning, and we still have no idea why (the
>> machine itself, not just the database app). I t
Peter Otten wrote:
> Duncan Smith wrote:
>
>
>> In moving from 2.4 to 2.5 I find that some of my unit tests are now
>>failing. I've worked out that the problem relates to the set update
>>method. In 2.4 I could update a set with an iterable type derived from
>>dict as the argument. I now f
On Mon, 2007-01-29 at 15:47 -0800, [EMAIL PROTECTED] wrote:
>
I know this is a useless gesture, but my normal tolerance for such
behavior has reached an end.
Please stop spamming this list with off-topic profanities. Your
ramblings have nothing to do with programming in Python (this is a
compute
> I believe the only thing stopping me from doing a deepcopy is the
> function references, but I'm not sure. If so is there any way to
> transform a string into a function reference(w/o eval or exec)?
what's your python version?
for me deepcopy(lambda:1) does not work in py2.4 but it works in py2
But Bush was merely an ego front for the neocons ... He spoke their
speeches, signed their recommendations, and ordered their wars, go and
listen to Benjamin Friedman's excellent video in his very passionate
voice ...
http://video.google.com/videoplay?docid=3552214685532803163&q
=
"http://a1135.g.akamai.net/f/1135/18227/1h/
cchannel.download.akamai.com/18227/podcast/PORTLAND-OR/KPOJ-AM/
1-23-07%20POJ-cast.mp3?CPROG=PCAST&MARKET=PORTLAND-
OR&NG_FORMAT=newstalk&SITE_ID=674&STATION_ID=KPOJ-
AM&PCAST_AUTHOR=AM620_KPOJ&PCAST_CAT=Talk_Radio&PCAST_TITLE=Thom_Hartma
nn_Podcast"
htt
Listen you mother fucker VULTURE, the past cold war was with soviet
block, NOW the whole world hates you ... bastard you need friends, but
now with your 911 in which YOU KILLED YOUR OWN CITIZENS, you are THE
MOST ODIOUS NATION ON EARTH.
YOU NEED FRIENDS, your biggest perceived rival CHINA is the m
On Jan 30, 6:48 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> On Jan 29, 2:55 pm, "jupiter" <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi guys,
>
> > I have a problem. I have a list which contains strings and numeric.
> > What I want is to compare them in loop, ignore string and create
> > anot
J. Clifford Dyer wrote:
> I think that's the first time I've actually seen someone use a Monty
> Python theme for a python example, and I must say, I like it. However,
> "We are all out of Wensleydale."
>
> Cheers,
> Cliff
Oh, then you clearly don't waste nearly enough time on this newsgroup ;
> any pointers to a 2.3 module ref?
also look at:
http://rgruet.free.fr/PQR2.3.html#OtherModules
when coding for different python versions i can reccommend this quick
ref:
http://rgruet.free.fr/
(every language feature is colorcoded according to the version when it
was included)
--
http://m
Hi,
Is there is a way to write a program to select and switch between
windows? For instance, if I have three windows: Firefox, Thunderbird,
and emacs, can I run a program to bring up the desired windows, instead
of click on the windows use mouse.
Thanks,
Du
--
http://mail.python.org/mailman/li
I have a very complex data structure which is basically a class object
containing (sometimes many) other class objects, function references,
ints, floats, etc. The man for the copy module states pretty clearly
that it will not copy methods or functions. I've looked around for a
while (prob ju
SHORT VERSION:
Python File B changes sys.stdout to a file so all 'prints' are written
to the file. Python file A launches python file B with os.popen("./B
2>&^1 >dev/null &"). Python B's output disappears into never-never
land.
LONG VERSION:
I am working on a site that can kick off large-scal
> It seems that the vertices iterator creates new vertex objects every
> time instead of iterating over the existing ones. This essentially
i don't know much about bgl, but this is possible since vertices are
most likely not stored as python objects inside boost
> prevents, among other things, s
I realized my wrapping was broken, fixing that below...
On Jan 25, 12:47 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I'm trying to wrap GNU readline withctypes(the Python readline
> library doesn't support the callback interface), but I can't figure out
> how to set values to a variable
Steven D'Aprano wrote:
> On Tue, 23 Jan 2007 18:07:55 -0800, Russ wrote:
>
>> Achim Domma wrote:
>>> Hi,
>>>
>>> I want to use Python to script some formulas in my application. The user
>>> should be able to write something like
>>>
>>> A = B * C
>>>
>>> where A,B,C are instances of some wrapper c
On Jan 29, 11:15 am, "Vance P. Frickey" <[EMAIL PROTECTED]> wrote:
> Directorate (overseas espionage), his old employers owned
> someone in just about every important government agency in
> India, from the 1970s until they stopped being able to
> afford paying all those bribes.
But in this anglo-
Hendrik van Rooyen wrote:
> [snip]
>> could definitely do more of them. The thing will be
>>
>
> When I read this - I thought - probably your stuff is working
> perfectly - on your test cases - you could try to send it some
> random data and to see what happens - seeing as you have a test
WOW! :shock:
in this case:
while 1:i=__import__;print
i('binascii').b2a_base64(i('os').urandom(6)),;raw_input()
On 30 Янв., 04:06, "Szabolcs Nagy" <[EMAIL PROTECTED]> wrote:
> > while
> > 1:i=__import__;print''.join(i('random').choice(i('string').letters
> > +'1234567890')for x in range(8)),;r
thanks guys. i see that there is no way then to go back to C to
satisfy my prof and get a grade
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 29, 2:47 pm, [EMAIL PROTECTED] wrote:
> The library seems to build correctly (producing Polygon.py and
> cPolygon.pyd), but when I import it I get the following message from
> python.exe: "This application has failed to start because MSVCR80.dll
> was not found". I thought that this might be
Martin Global is one of North America's leading importers of goods
manufactured and produced throughout Asia. We are distinctively
unique
from other importers, as we have one of North America's largest
networks
linking our organization directly to thousands of manufacturers and
suppliers in
Martin Global is one of North America's leading importers of goods
manufactured and produced throughout Asia. We are distinctively
unique
from other importers, as we have one of North America's largest
networks
linking our organization directly to thousands of manufacturers and
suppliers in
[EMAIL PROTECTED] a écrit :
> hi
> can someone explain strip() for these :
> [code]
>
x='www.example.com'
x.strip('cmowz.')
>
> 'example'
> [/code]
>
> when i did this:
> [code]
>
x = 'abcd,words.words'
x.strip(',.')
>
> 'abcd,words.words'
> [/code]
>
> it does not strip off "
[EMAIL PROTECTED] schrieb:
> The library seems to build correctly (producing Polygon.py and
> cPolygon.pyd), but when I import it I get the following message from
> python.exe: "This application has failed to start because MSVCR80.dll
> was not found". I thought that this might be due to Python
Paul Rubin sayeth, on 01/29/2007 03:44 PM:
> Kartic <[EMAIL PROTECTED]> writes:
>> In any case, we have immediate requirements for a Pythonista with C++,
>> MySQL, XML, Debian expertise. Please email resume to:
>
> Generally it's ok to post here to the newsgroup with Python jobs. But
> you shoul
Drew a écrit :
>>What is your actual usecase?
>>
>>diez
>
>
> The issue is that I don't know how long the list will eventually be.
How is this an issue ? Python's lists are not fixed-sized arrays.
> Essentially I'm trying to use a 2D list to hold lines that I will
> eventually print to the sc
Thanks, let me check out this route, and then I'll post the results.
Melih Onvural
On Jan 29, 4:04 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
> On 29 Jan 2007 12:44:07 -0800, Melih Onvural <[EMAIL PROTECTED]> wrote:
>
> >I need to execute some javascript and then read the value as part of
David Bear schrieb:
> Since redhat packages python2.3 with their distro (RHEL 4..) I was looking
> for a module reference for that version. Looking at python.org I only see
> current documentation.
>
> any pointers to a 2.3 module ref?
http://www.python.org/doc/2.3/
http://www.python.org/doc/2.3/
> > Is there any way to produce this kind of behavior easily?Hints:
> >>> [None] * 5
> [None, None, None, None, None]
> >>> [1, 2, 3, None] + [10]
> [1, 2, 3, None, 10]
>
> HTH
That is exactly what I was looking for. I'm actually working on some
problems at http://codgolf.com. I find it helps
Steven D'Aprano schrieb:
> A few issues:
>
> (1) It doesn't seem to be reversible:
>
'© and many more...'.decode('latin-1')
> u'© and many more...'
>
> What should I do instead?
For reverse processing, you need to parse it with an
SGML/XML parser.
> (2) Are XML entities guaranteed to be t
David Bear wrote:
> Since redhat packages python2.3 with their distro (RHEL 4..) I was looking
> for a module reference for that version. Looking at python.org I only see
> current documentation.
>
> any pointers to a 2.3 module ref?
http://docs.python.org/
Click on "Locate previous versions."
On 29 Jan 2007 12:44:07 -0800, Melih Onvural <[EMAIL PROTECTED]> wrote:
>I need to execute some javascript and then read the value as part of a
>program that I am writing. I am currently doing something like this:
Python doesn't include a JavaScript runtime. You might look into the
stand-alone Sp
Since redhat packages python2.3 with their distro (RHEL 4..) I was looking
for a module reference for that version. Looking at python.org I only see
current documentation.
any pointers to a 2.3 module ref?
--
David Bear
-- let me buy your intellectual property, I want to own your thoughts --
--
Drew a écrit :
> I'm looking to add an element to list of items, however I'd like to
> add it at a specific index greater than the current size:
>
> list = [1,2,3]
NB: better to avoid using builtins types and functions names as identifiers.
> list.insert(10,4)
>
> What I'd like to see is somet
On Jan 29, 1:10 pm, "Drew" <[EMAIL PROTECTED]> wrote:
> > What is your actual usecase?
>
> > diezThe issue is that I don't know how long the list will eventually be.
> Essentially I'm trying to use a 2D list to hold lines that I will
> eventually print to the screen. Blank elements in the list wi
Hi there,
I am trying to install a Python library with a C extension (the
Polygon library) and I am having a bad time. My Python version is
Python 2.4.3 - Enthought Edition 1.0.0 (#69, Aug 2 2006, 12:09:59)
[MSC v.1310 32 bit (Intel)] on Windows XP Pro. I have dutifully
followed the instructi
Kartic <[EMAIL PROTECTED]> writes:
> In any case, we have immediate requirements for a Pythonista with C++,
> MySQL, XML, Debian expertise. Please email resume to:
Generally it's ok to post here to the newsgroup with Python jobs. But
you should describe the specific openings you're trying to fill
I need to execute some javascript and then read the value as part of a
program that I am writing. I am currently doing something like this:
import htmllib, urllib, formatter
class myparser(htmllib.HTMLParser):
insave = 0
def start_div(self, attrs):
for i in attrs:
John Nagle a écrit :
(snip)
>My main concern is with glue code to major packages. The connections
> to OpenSSL, MySQL, and Apache (i.e. mod_python) all exist, but have major
> weaknesses.
Neither MySQLdb nor mod_python are part of the Python's standard lib AFAIK.
> If you're doing web app
> py>def __init__(self, arg = []):
> py>self.__list = arg
Please don't perpetuate this bad habit!!! "arg=[]" is evaluated at
compile time, not runtime, and will give all default-inited llists the
same underlying list.
The correct idiom is:
def __init__(self, arg = None):
John Nagle skrev:
> Scripter47 wrote:
>> Hey
>>
>> It got a problem with python to connect to my SQL DBs, that's installed
>> on my apache server. how do i connect to sql? Gettting data? Insert into
>> it?
>
> You need a third-party open source package called "MySQLdb".
>
>
On Jan 29, 2:55 pm, "jupiter" <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> I have a problem. I have a list which contains strings and numeric.
> What I want is to compare them in loop, ignore string and create
> another list of numeric values.
>
> I tried int() and decimal() but without success.
>
>
Scripter47 wrote:
> Hey
>
> It got a problem with python to connect to my SQL DBs, that's installed
> on my apache server. how do i connect to sql? Gettting data? Insert into
> it?
You need a third-party open source package called "MySQLdb".
John Nagl
On Jan 29, 7:57 pm, "Drew" <[EMAIL PROTECTED]> wrote:
> I'm looking to add an element to list of items, however I'd like to
> add it at a specific index greater than the current size:
>
> list = [1,2,3]
> list.insert(10,4)
>
> What I'd like to see is something like:
>
> [1,2,3,,4]
>
> However I
On Jan 29, 1:55 pm, "jupiter" <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> I have a problem. I have a list which contains strings and numeric.
> What I want is to compare them in loop, ignore string and create
> another list of numeric values.
You can iterate over the list and use the type() funct
Hawk wrote:
> <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> you are such a dork.
>
> India has been a Russian satellite for years and years.
> Who has been
> running their schools? Not the British.
According to Oleg Kalugin, former head of the KGB's First
Directorate (overse
Hey
It got a problem with python to connect to my SQL DBs, that's installed
on my apache server. how do i connect to sql? Gettting data? Insert into it?
it is a localserver with php if that means something
here is a *REALLY* dirty solution that a have used:
[CODE]
from urllib import *
# sql quer
> What is your actual usecase?
>
> diez
The issue is that I don't know how long the list will eventually be.
Essentially I'm trying to use a 2D list to hold lines that I will
eventually print to the screen. Blank elements in the list will be
printed as spaces. I suppose every time I add an elem
2007/1/29, herve <[EMAIL PROTECTED]>:
Does anybody know how to change the foreground colors in a wx.StatusBar
wx.StatusBar is a subclass of wx.Window so SetForegroundColour should
work...
Cheers, Frank
PS: In general, wxPython related questions are best asked on the
wxPython-users mailing
Drew schrieb:
> I'm looking to add an element to list of items, however I'd like to
> add it at a specific index greater than the current size:
>
> list = [1,2,3]
> list.insert(10,4)
>
> What I'd like to see is something like:
>
> [1,2,3,,4]
>
> However I see:
>
> [1,2,3,4]
>
> Is there
Current requirements in US only.
Kartic sayeth, on 01/29/2007 01:56 PM:
> Hello,
>
> My company has quite a few opening involving python expertise. We are
> always looking for python resources (and find it difficult filling these
> positions, might I add). Is there any place to find developers
I'm looking to add an element to list of items, however I'd like to
add it at a specific index greater than the current size:
list = [1,2,3]
list.insert(10,4)
What I'd like to see is something like:
[1,2,3,,4]
However I see:
[1,2,3,4]
Is there any way to produce this kind of behavior eas
Hello,
My company has quite a few opening involving python expertise. We are
always looking for python resources (and find it difficult filling these
positions, might I add). Is there any place to find developers' resumes
(like finding jobs from http://python.org/community/jobs/)? If any one
k
I've just started toying with the python bindings of BGL and I'm
puzzled from the following:
>>> from boost.graph import Graph
>>> g = Graph()
>>> v = g.add_vertex()
>>> g.vertices.next() == v
True
>>> g.vertices.next() is v
False
It seems that the vertices iterator creates new vertex objects ev
On Jan 28, 2:56 pm, "azrael" <[EMAIL PROTECTED]> wrote:
> class Node:
> def __init__(self, cargo=None, next=None):
> self.cargo = cargo
> self.next = next
This is OK for the node itself, but maybe you should try writing a
LinkedList class that you use:
class LinkedList(object):
de
Matthew Wilson wrote:
> The decorator as_string returns the decorated function's value as
> string. In some instances I want to access just the function f,
> though, and catch the values before they've been decorated.
>
> Is this possible?
>
> def as_string(f):
> def anon(*args, **kwargs):
>
> Andy Dustman, the author of the package is quite responsive to requests
> raised in the mysql-python forums on SourceForge
> (http://sourceforge.net/forum/?group_id=22307). If you have problems with
> MySQLdb, bring them up there. I'm sure Andy will respond.
I apologize in advance for beating
Islamist bastard <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> FBI spook bastard that speaks french also
>
> On Jan 29, 8:13 am, "Hampton Din" <[EMAIL PROTECTED]> wrote:
>> stupid troll
>
>
--
http://mail.pytho
Real funny? Holocaust Deniers Convention in Iran?
Sick, sick Islamists!
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> http://a1135.g.akamai.net/f/1135/18227/1h/cchannel.download.akamai.com/
> 18227/podcast/PORTLAND-OR/KPOJ-AM/1-23-07%20POJ-cast.mp3?
--
http://mail.python.org/m
[EMAIL PROTECTED] wrote:
> Matt> In some instances I want to access just the function f, though,
> Matt> and catch the values before they've been decorated.
>
> def f(x):
> return x * x
>
> @as_string
> def fs(x):
> return f(x)
or just
fs = as_string(f)
Kent
>
> Call the one y
Stephan Diehl wrote:
> http://starship.python.net/cgi-bin/mailman/listinfo/python-berlin
argghhh, wrong link. please try
http://starship.python.net/mailman/listinfo/python-berlin
--
http://mail.python.org/mailman/listinfo/python-list
after a long (veeeyy) long time, I'm pleased to announce our next
python meeting in berlin.
time: friday 2.2. 7pm
place:Cafe & Restaurant UNENDLICH
Boetzowstrasse 14
10407 Berlin (Prenzlauer Berg "Boetzowviertel")
This is a fun meeting without offical talks.
If you haven't done so already, su
Matthew Wilson wrote:
> The decorator as_string returns the decorated function's value as
> string. In some instances I want to access just the function f,
> though, and catch the values before they've been decorated.
>
> Is this possible?
>
> def as_string(f):
> def anon(*args, **kwargs):
Matt> In some instances I want to access just the function f, though,
Matt> and catch the values before they've been decorated.
def f(x):
return x * x
@as_string
def fs(x):
return f(x)
Call the one you want.
Skip
--
http://mail.python.org/mailman/listinfo/python-list
The decorator as_string returns the decorated function's value as
string. In some instances I want to access just the function f,
though, and catch the values before they've been decorated.
Is this possible?
def as_string(f):
def anon(*args, **kwargs):
y = f(*args, **kwargs)
Paul Rubin wrote:
> "Szabolcs Nagy" <[EMAIL PROTECTED]> writes:
>
>>file('/dev/urandom').read(6).encode('base64')
>>(oneliner and without import sa op requested)
>
>
> Nice, though Un*x dependent (os.urandom is supposed to be portable).
Uh oh. I was looking at the Python "SSL" code recentl
> while
> 1:i=__import__;print''.join(i('random').choice(i('string').letters
> +'1234567890')for x in range(8)),;raw_input()
>
while
1:i=__import__;r='random';print''.join(i(r).choice(i('string').letters
+'1234567890')for x in`r`),;raw_input()
even shorter:
range -> `'random'`
:)
--
http://m
> I want, and the script will stop executing at that line and will
> return to the interactive interpreter, as I wish.
May I recommend wrapping your main program in a function definition? Such
as:
main():
# Bulk of your code (use a macro to indent it faster)
if __name__ == "__main__":
> If you really want a hack, here it is:
>
> while 1:print
> ''.join(__import__('random').choice(__import__('string').letters+'1234567890')
> for x in xrange(8)),;n=raw_input()
>
> This is a one-liner (though mail transmission may split it up), no
> import statements. If someone can come up with an
1 - 100 of 132 matches
Mail list logo