Grzegorz Słodkowicz wrote:
> That's just theorisation but I'd rather expect the interpreter simply
> not to create a second tuple while there already is an identical one.
> This could save some memory if the tuple was large (Although by the same
> token comparison of large tuples can be expensi
Benjamin Goldenberg wrote:
> I would like to find out the name of the graphics card of the
> machine my program is running on. I have looked into the pyopengl
> module, and using them to query the card, but it seems like there
> ought to be a simpler way to find this out without setting up a
> glco
Is there a method, with python, of screenscraping a web page, if that web
page uses javascript?
I know about BeautifulSoup, but AFAIK at this time, BeautifulSoup is for
HTML that doesn't have embedded javascript.
Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Neil Cerutti <[EMAIL PROTECTED]> wrote:
>On 2007-08-09, Justin T. <[EMAIL PROTECTED]> wrote:
>>JP Calderone:
>>>
>>> It's not Pythonic.
>>
>> Ha! I wish there was a way to indicate sarcasm on the net. You
>> almost got people all riled up!
>
>Sorry. There's NO WAY t
Dan Stromberg - Datallegro <[EMAIL PROTECTED]> writes:
> Is there a method, with python, of screenscraping a web page, if that web
> page uses javascript?
Not pure CPython, no.
> I know about BeautifulSoup, but AFAIK at this time, BeautifulSoup is for
> HTML that doesn't have embedded javascrip
On Aug 9, 3:26 pm, Bjoern Schliessmann wrote:
> Benjamin Goldenberg wrote:
> > I would like to find out the name of the graphics card of the
> > machine my program is running on. I have looked into the pyopengl
> > module, and using them to query the card, but it seems like there
> > ought to be a
Benjamin Goldenberg wrote:
> I would like to find out the name of the graphics card of the machine
> my program is running on. I have looked into the pyopengl module, and
> using them to query the card, but it seems like there ought to be a
> simpler way to find this out without setting up a glcont
Grzegorz Słodkowicz wrote:
>> Why? Because.
>>
>> Seriously, it's just an optimization by the implementers. There is no
>> need for more than one empty tuple, since tuples can never be modified
>> once created.
>>
>> But they decided not to create (1, ) in advance. They probably knew that
>> har
Grzegorz Słodkowicz <[EMAIL PROTECTED]> writes:
>> Seriously, it's just an optimization by the implementers. There is
>> no need for more than one empty tuple, since tuples can never be
>> modified once created.
>>
>> But they decided not to create (1, ) in advance. They probably knew
>> that hard
Hi,
I would like to define a new variable which is not predefined by me.
For example,
I want to create an array called "X%s" where "%s" is to be determined
based on the data I am processing. So, for example, if I the file
I'm reading has
g 99
on the first line, I want to create a new variable cal
On Aug 9, 4:06 pm, Richard Jones <[EMAIL PROTECTED]>
wrote:
> Benjamin Goldenberg wrote:
> > I would like to find out the name of the graphics card of the machine
> > my program is running on. I have looked into the pyopengl module, and
> > using them to query the card, but it seems like there ough
On Aug 9, 5:11 pm, Lee Sander <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I would like to define a new variable which is not predefined by me.
> For example,
> I want to create an array called "X%s" where "%s" is to be determined
> based on the data I am processing. So, for example, if I the file
> I'm re
On Aug 9, 5:30 pm, Dustan <[EMAIL PROTECTED]> wrote:
> given the
> variables data (the dictionary), name (in your example, 'g') and
> *size* (in your example, 99), you can add it data as shown:
erm... make that:
given the variables data (the dictionary), name (in your example, 'g')
and size (in
Lee Sander wrote:
> Hi,
>
> I would like to define a new variable which is not predefined by me.
> For example,
> I want to create an array called "X%s" where "%s" is to be determined
> based on the data I am processing. So, for example, if I the file
> I'm reading has
> g 99
> on the first line,
[EMAIL PROTECTED] wrote:
> Hi all! I'm implementing one of my first multithreaded apps, and have
> gotten to a point where I think I'm going off track from a standard
> idiom. Wondering if anyone can point me in the right direction.
>
> The script will run as a daemon and watch a given directory
On Aug 9, 6:47 pm, eggie5 <[EMAIL PROTECTED]> wrote:
> I keep getting an error for line 7, what's wrong with this?
>
> from django.db import models
>
> class Poll(models.Model):
> question = models.CharField(max_length=200)
> pub_date = models.DateTimeField('date published')
>
> def
I keep getting an error for line 7, what's wrong with this?
from django.db import models
class Poll(models.Model):
question = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
def __unicode__(self):
return self.question
de
On Aug 9, 6:11 pm, Lee Sander <[EMAIL PROTECTED]> wrote:
> I would like to define a new variable which is not predefined by me.
> For example,
> I want to create an array called "X%s" where "%s" is to be determined
> based on the data I am processing.
Use a dictionary.
--
http://mail.python.org/
Hi All
I am a newbie to turtle graphics in python, so sorry if you find this
question too easy.
How can I get smoother lines in turtle graphics?
I am using python on windows.
Thanks in advance
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 9, 4:52 pm, Dan Bishop <[EMAIL PROTECTED]> wrote:
> On Aug 9, 6:47 pm, eggie5 <[EMAIL PROTECTED]> wrote:
>
> > I keep getting an error for line 7, what's wrong with this?
>
> > from django.db import models
>
> > class Poll(models.Model):
> > question = models.CharField(max_length=200)
>
Brian Cole wrote:
> I've been programming in Python for about 6 years now. One of the
> features I adore the most is the very useful error messages and stack
> traces that make it easy to debug. However, today I ran into a
> difficult to trace bug because the stack trace was reporting the
> problem
On Aug 9, 7:25 pm, [EMAIL PROTECTED] wrote:
> Hi all! I'm implementing one of my first multithreaded apps, and have
> gotten to a point where I think I'm going off track from a standard
> idiom. Wondering if anyone can point me in the right direction.
>
> The script will run as a daemon and watch
Evan Klitzke wrote:
> On 8/8/07, greg <[EMAIL PROTECTED]> wrote:
>> Istvan Albert wrote:
>>> A solution would be writing the code with a logging function to begin
>>> with, alas many times that is out of one's hand.
>> If the code has been written with calls to a builtin
>> print function, the situ
Hello,
I wish to know whether I should delete objects created on the fly via
the "del obj" statement. I noticed the RAM usage increased whenever
the application is being run for a long time. I am creating lots of
objects (messages) on the fly for communication between threads.
Rather than having
I want to ready binary data from a udp socket effeciently as possible
in python. I know of the struct package but do people have any tips
when dealing with binary data in python? Is there a library or api
that is faster when dealing with binary data. I am looking for a any
one with experience or
Many thanks to the numerous helpful comments by Paul Rubin, Carsten
Haese and others in the thread "How to pass a reference to the current
module".
After digesting these comments, I came up with this way to circumvent
the problem of attempting to reference modules that import other modules
i
Grzegorz Słodkowicz <[EMAIL PROTECTED]> writes:
> That's just theorisation but I'd rather expect the interpreter
> simply not to create a second tuple while there already is an
> identical one.
Others have already said that it's an implementation optimisation,
which seems to partly answer your qu
I've got a wxPython program that needs to do some drawing on a DC on a
regular basis, whether or not a paint event happens. I know how to
make a ClientDC to do the drawing in, and I know what drawing calls to
make. But how do I make it all happen? After I call MainLoop, none of
my code gets called
On Aug 9, 12:09 pm, "Justin T." <[EMAIL PROTECTED]> wrote:
> On Aug 9, 11:25 am, [EMAIL PROTECTED] wrote:
>
> > Here's how I have it designed so far. The main thread starts a
> > Watch(threading.Thread) class that loops and searches a directory for
> > files. It has been passed a Queue.Queue() ob
James Stroud wrote:
> def __unicode__(self):
> return self.choice
Laughing to hard at the tab & spaces thing to notice the lack of
indentation here.
James
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095
http://www.jamesstroud.com/
--
ht
eggie5 wrote:
> But this still isn't valid:
>
> from django.db import models
>
> class Poll(models.Model):
> question = models.CharField(max_length=200)
> pub_date = models.DateTimeField('date published')
>
> def __unicode__(self):
> return self.question
>
>
>
>
On Aug 9, 7:02 pm, eggie5 <[EMAIL PROTECTED]> wrote:
> On Aug 9, 4:52 pm, Dan Bishop <[EMAIL PROTECTED]> wrote:
>
> > On Aug 9, 6:47 pm, eggie5 <[EMAIL PROTECTED]> wrote:
>
> > > I keep getting an error for line 7, what's wrong with this?
>
> > > from django.db import models
>
> > > class Poll(mode
But this still isn't valid:
from django.db import models
class Poll(models.Model):
question = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
def __unicode__(self):
return self.question
class Choice(models.Model):
poll
I'm trying to get PDB working on Emacs 2.1.3, Python 2.3, Windows XP.
Whenever I try to run a Python file from the Emacs buffer using the
PDB command I get the following error
"spawning child process: invalid process"
I've tried the exact same command from the command prompt and the
debugger works
I'm disappointed that I didn't get a wxPython solution.
If the only way to get wxPython to correctly handle
this simple task is to code around it, I don't think
wxPython is really ready for Windows.
Is there a better place to ask?
Regarding the suggestions:
Bjoern, you're wrong. The GUI needs t
On Aug 9, 5:39 pm, MRAB <[EMAIL PROTECTED]> wrote:
> On Aug 9, 7:25 pm, [EMAIL PROTECTED] wrote:
>
> > Hi all! I'm implementing one of my first multithreaded apps, and have
> > gotten to a point where I think I'm going off track from a standard
> > idiom. Wondering if anyone can point me in the r
> approach. That sounds the easiest, although I'm still interested in
> any idioms or other proven approaches for this sort of thing.
>
> ~Sean
Idioms certainly have their place, but in the end you want clear,
correct code. In the case of multi-threaded programming,
synchronization adds complexi
Edward Loper wrote:
>> Anyone testing on xemacs? I tried it, and C-c C-c sent xemacs into an
>> infinite loop (apparantly).
I may have tracked down the cause of this problem. Please download the
most recent version, and try again. And when you do, let me know
whether that fixed it. :)
-Edwar
Hi,
I have a variable which is defined inside a class method. When I
call PyModule_GetDict on the module containing this class, the
dictionary doesn't contain any information about this variable. Is
this expected behavior? If so, what options do I have to access this
variable from my Python C e
On 8/9/07, [david] <[EMAIL PROTECTED]> wrote:
>
> I'm disappointed that I didn't get a wxPython solution.
>
> If the only way to get wxPython to correctly handle
> this simple task is to code around it, I don't think
> wxPython is really ready for Windows.
A thread *is* basically the right answer
On Aug 9, 6:31 pm, James Stroud <[EMAIL PROTECTED]> wrote:
> James Stroud wrote:
> > def __unicode__(self):
That's so goofy.
> > return self.choice
>
> Laughing to hard at the tab & spaces thing to notice the lack of
> indentation here.
>
> James
>
> --
> James Stroud
> UCLA-DOE Inst
hi,
for example an request object ... is request.user the same as
request.__class__.user?
THanks
james
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 10 Aug 2007 02:51:44 -, james_027 wrote
> hi,
>
> for example an request object ... is request.user the same as
> request.__class__.user?
Not in general:
>>> class Request(object):
...user = "somebody"
...
>>> request = Request()
>>> request.user == request.__class__.user
True
>>
Ben Finney wrote:
> It's important to also realise that the language is *deliberately*
> non-committal on whether any given value will have this behaviour;
> that is, it's entirely left to the language implementation which
> optimisation trade-offs to make, and the language user (that's you and
>
On Aug 9, 8:28 pm, James Stroud <[EMAIL PROTECTED]> wrote:
> eggie5 wrote:
> > But this still isn't valid:
>
> > from django.db import models
>
> > class Poll(models.Model):
> >question = models.CharField(max_length=200)
> >pub_date = models.DateTimeField('date published')
>
> > def __u
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi all! I'm implementing one of my first multithreaded apps, and have
> gotten to a point where I think I'm going off track from a standard
> idiom. Wondering if anyone can point me in the right direction.
>
> The script will run as
John K Masters <[EMAIL PROTECTED]> writes:
>
> OK fiddling around with this and reading the docs I tried:-
> a = 'qq' #10 q's
> b = 'qq' #10 q's
> a is b
> true
> c = 'q' * 10
> c
> 'qq' #10 q's
> d = 'q' * 10
> d
> 'qq' #10 q's
> c is d
> false
>
> So from what I'v
[david] wrote:
> I'd like to refresh the display before I start the main loop.
We have this kind of situation in Chandler, where we display and update
the splash screen before we enter MainLoop.
1. Create app object
http://lxr.osafoundation.org/source/chandler/Chandler.py#080
2. During app ob
On Fri, 10 Aug 2007 00:26:54 +, Steve wrote:
> I want to ready binary data from a udp socket effeciently as possible
> in python. I know of the struct package but do people have any tips
> when dealing with binary data in python? Is there a library or api
> that is faster when dealing with b
On Thu, 09 Aug 2007 19:34:37 -0700, MD wrote:
>I have a variable which is defined inside a class method. When I
> call PyModule_GetDict on the module containing this class, the
> dictionary doesn't contain any information about this variable. Is
> this expected behavior? If so, what options do
On Aug 10, 2:25 am, Godzilla <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I wish to know whether I should delete objects created on the fly via
> the "del obj" statement. I noticed the RAM usage increased whenever
> the application is being run for a long time. I am creating lots of
> objects (messages)
Dan Bishop wrote:
>> Tabs are for tables, hence the name. "Use spaces for space and use tabs
>> for tables" can be a little mnemonic to help you remember the rules. We
>> can make a little song together if you can think of some things that
>> rhyme with "don't" and "use" and "tabs".
>
> "won't"
>
101 - 152 of 152 matches
Mail list logo