Sheldon wrote:
> The code below is a rookie attempt to copy a python list of strings to
> a string array in C. It works to some extent but results in memory
> problems when trying to free the C string array. Does anyone know how
> to do this properly?
You have numerous problems in this code. The
"Sheldon" <[EMAIL PROTECTED]> wrote:
>
> Duncan Booth skrev:
>
>> "Sheldon" <[EMAIL PROTECTED]> wrote:
>>
>> > I am new to this and copied this code from a colleague. So, it
>> > corrupts the pointer. How do I do this properly?
>> >
>> Here is at least part of your problem:
>>
>> msgop = PyL
I was wondering if some power users of Python would be willing to pay
money to benefit from doing a lot of their
scientific/engineering/financial modeling and simulation from running
their programs on high powered computing HPC. HPC would essentially
mean that you run on a cluster or group of compu
Hello
I need to use some regular expressions for more than one line.
And i would like to use some modificators like: /m or /s in perl.
For example:
re.sub(".*","",data)
will not cut out all javascript code if it's spread on many lines.
I could use something like /s from perl which treats . as all
vertigo wrote:
> I need to use some regular expressions for more than one line.
> And i would like to use some modificators like: /m or /s in perl.
> For example:
> re.sub(".*","",data)
>
> will not cut out all javascript code if it's spread on many lines.
that won't cut out all javascript code p
I'm confused. What is the definition of closure.
I'm not sure if it's correct, I get the definition from wikipedia:
"A closure typically comes about when one function is declared entirely
within the body of another, and the inner function refers to local
variables of the outer function. At runtim
Sheldon <[EMAIL PROTECTED]> wrote:
> Man. You are good. This is most insight I have had from anyone.
:-)
> I did initialize the arrays with PyObjects and today, after hours of
> debugging and now with your insight, I think the problem lies here:
Good!
You need to release some python references
On Tuesday 19 December 2006 13:15, vertigo wrote:
> Hello
>
> I need to use some regular expressions for more than one line.
> And i would like to use some modificators like: /m or /s in perl.
> For example:
> re.sub(".*","",data)
>
> will not cut out all javascript code if it's spread on many line
> vertigo wrote:
>> I need to use some regular expressions for more than one line.
>> And i would like to use some modificators like: /m or /s in perl.
>> For example:
>> re.sub(".*","",data)
>> will not cut out all javascript code if it's spread on many lines.
>
> that won't cut out all javascr
Nick Maclaren wrote:
> In article <[EMAIL PROTECTED]>,
> "J. Clifford Dyer" <[EMAIL PROTECTED]> writes:
> |>
> |> On the contrary, I think that example fits perfectly with my definition
> |> of homogenous. If there is no constraint on position, then what is the
> |> position determinative of? Or
At Monday 18/12/2006 17:37, [EMAIL PROTECTED] wrote:
Does anybody know whether htmlGen, the Python-class library for
generating HTML, is still being maintained? Or from where it can be
downloaded? The Starship site where it used to be hosted is dead.
*active* in what sense? HTML std doesn't ch
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of hg
Sent: Tuesday, December 19, 2006 9:44 AM
To: python-list@python.org
Subject: Re: Can a Tkinter GUI check for abort script:
Michael Yanowitz wrote:
> Hello:
>
>I have successfully implemented a Tkinter
so far this works
import cherrypy
import os.path
class Http:
def index(self):
f = open(os.path.join(os.path.dirname(__file__), '../htm/index.htm'))
xml = f.read()
f.close()
return xml
index.exposed = True
cherrypy.tree.mount(Http())
if __name__ == '__ma
On Windows I'm used to install packages by setup.py install. So did I with
Fibranet nanothreads - a few seconds and it was installed.
On Linux (ubuntu 6.06) all I could get at is an egg file. I found out that
I have to exec easy_install, which didn't much help here (seems to me, at
least - sorry,
Smart Charter Inc. is a dynamic new startup company whose goal is to
revolutionize the charter jet industry. If you are looking for a stable
9-5 job, look elsewhere. If you are ready for a challenging
ground-floor opportunity with significant upside potential you've come
to the right place. We a
Still learning python (2.4) and have instructions that all of our
python scripts should be SelfDoc'ing via pydoc standards.
One thing that isn't clear to me is how pydoc searches for keywords. I
believe that there might be certain rules for putting keywords together
under the SYNOPSIS and search
Huayang Xia a écrit :
> I'm confused. What is the definition of closure.
>
> I'm not sure if it's correct, I get the definition from wikipedia:
>
> "A closure typically comes about when one function is declared entirely
> within the body of another, and the inner function refers to local
> variab
Duncan Booth schrieb:
> The way that uri encoding is supposed to work is that first the input
> string in unicode is encoded to UTF-8 and then each byte which is not in
> the permitted range for characters is encoded as % followed by two hex
> characters.
Can you back up this claim ("is supposed
Hello
> On Tuesday 19 December 2006 13:15, vertigo wrote:
>> Hello
>>
>> I need to use some regular expressions for more than one line.
>> And i would like to use some modificators like: /m or /s in perl.
>> For example:
>> re.sub(".*","",data)
>>
>> will not cut out all javascript code if it's sp
Type "sudo easy_install myeggfile.egg."
If that gives you an error, then you don't have easy_install installed.
Install it this way:
sudo apt-get install python-setuptools
On Dec 19, 3:44 pm, Morpheus <[EMAIL PROTECTED]> wrote:
> On Windows I'm used to install packages by setup.py install. So d
You want re.sub("(?s)", "", htmldata)
Explanation: To make the dot match all characters, including newlines,
you need to set the DOTALL flag. You can set the flag using the (?_)
syntax, which is explained in section 4.2.1 of the Python Library
Reference.
A more readable way to do this is:
obj
Remi wrote:
> We had to do some serious cleanup and we disabled a lot of Trac sites
> that looked abandoned (people left their Trac sites open to spammers
> and our server was crawling under the load caused by these spammers).
Actually, to clarify the DEFAULT configuration for Trac is to leave it
Oops, I mean obj.sub("", htmldata)
On Dec 19, 4:15 pm, [EMAIL PROTECTED] wrote:
> You want re.sub("(?s)", "", htmldata)
>
> Explanation: To make the dot match all characters, including newlines,
> you need to set the DOTALL flag. You can set the flag using the (?_)
> syntax, which is explained i
Gert Cuykens wrote:
> so far this works
>
>
> import cherrypy
> import os.path
>
> class Http:
>
> def index(self):
> f = open(os.path.join(os.path.dirname(__file__), '../htm/index.htm'))
> xml = f.read()
> f.close()
> return xml
> index.exposed = True
>
> c
Bruno Desthuilliers wrote:
>> You skipped the first and most important sentence:
> "In programming languages, a closure is a function that refers to free
> variables in its lexical context."
>
> IOW, a closure is a function that carry it's own environment.
in contrast to functions that don't k
Hey everyone,
Is it possible to automatically insert headers/footers using
mod_python?
I will be not be using PSP's, so I cannot use the PSP/include solution.
Furthermore, the header will be dynamic; it won't be a static HTML
page.
In short, I've been looking for a page layout facility using
mod_
Nick Craig-Wood skrev:
> Sheldon <[EMAIL PROTECTED]> wrote:
> > Man. You are good. This is most insight I have had from anyone.
>
> :-)
>
> > I did initialize the arrays with PyObjects and today, after hours of
> > debugging and now with your insight, I think the problem lies here:
>
> Good!
>
>
Hello
Thanx for help, i have one more question:
i noticed that while matching regexp python tries to match as wide as it's
possible,
for example:
re.sub("","",htmldata)
would cut out everything before first "" in the
document.
Can i force re to math as narrow as possible ?
(to match first ""
> The cute secretary's name is "cherrypy.tools.staticdir".
> Check out her resume at http://www.cherrypy.org/wiki/StaticContent
I think i am in love :)
--
http://mail.python.org/mailman/listinfo/python-list
vertigo> i noticed that while matching regexp python tries to match as wide
as it's
vertigo> possible,
vertigo> for example:
vertigo> re.sub("","",htmldata)
vertigo> would cut out everything before first "" in the
vertigo> document.
vertigo> Can i force re to math
My understanding was:
Closure is a nested function first. If it refers free variable, then it
is closure. If it doesn't refer free variable, it doesn't have to be
nested. That is probably the reason, the free variable is emphasized.
Normally it makes sense to return a closure, but not a non-closur
(Apologies for two releases in less than a week. It was, um...
necessary. This should be it for quite a while barring any notable
bug reports.)
'twander' Version 3.210 is now released and available for download at:
http://www.tundraware.com/Software/twander
The last public release wa
Michael a écrit :
> Hey everyone,
>
> Is it possible to automatically insert headers/footers using
> mod_python?
> I will be not be using PSP's, so I cannot use the PSP/include solution.
> Furthermore, the header will be dynamic; it won't be a static HTML
> page.
>
> In short, I've been looking f
>From pytrix:
http://www.american.edu/econ/pytrix/pytrix.py
def permutationsg(lst):
'''Return generator of all permutations of a list.
'''
if len(lst)>1:
for i in range(len(lst)):
for x in permutationsg(lst[:i]+lst[i+1:]):
yield [lst[i]]+x
else:
> > The cute secretary's name is "cherrypy.tools.staticdir".
> > Check out her resume at http://www.cherrypy.org/wiki/StaticContent
>
> I think i am in love :)
Cant believe this just works out
import os.path
import cherrypy
pwd = os.path.dirname(os.path.abspath(__file__))
class Http:
_cp_c
Huayang Xia wrote:
> I don't understand why while a nested function perfectly matches the
> definition of closure, it is not closure simply because it is not used
> by external world.
Like so many other computing terms, the word "closure" is used in
different ways by different people.
Strictly
Klaas skrev:
> Sheldon wrote:
> > The code below is a rookie attempt to copy a python list of strings to
> > a string array in C. It works to some extent but results in memory
> > problems when trying to free the C string array. Does anyone know how
> > to do this properly?
>
> You have numerous
"manstey" <[EMAIL PROTECTED]> writes:
> Is is possible to have two classes, ClassA and ClassB, and
> setattr(ClassA, 'xx',ClassB), AND to then have ClassA.xx store an
> integer value as well, which is not part of ClassB?
You seem somewhat confused over classes and instances. There's little
need t
Does anybody know how to redirect a post request ?
i have a js file that does a post request to a /php/action.php file
and i would like for the secretary to just do the action method
instead that is defined in her python Http class book, so i can run
both php and python without changing the static
Sheldon wrote:
> Thanks Mike,
>
> I am rewriting the code but I don't understand the part about the c
> struct variable called work. The function I posted is a part of a
> larger script and I just posted that part that was problamatic. I was
> under the impression that if I declared the structure
Bruno Desthuilliers wrote:
> Michael a écrit :
> > Hey everyone,
> >
> > Is it possible to automatically insert headers/footers using
> > mod_python?
> > I will be not be using PSP's, so I cannot use the PSP/include solution.
> > Furthermore, the header will be dynamic; it won't be a static HTML
>
I looked at those APIs and it would appear that SOAP isn't around
anymore and there are no APIs for google translate :( Can anyone tell
me how to set the user-agent string in the HTTP header?
--
http://mail.python.org/mailman/listinfo/python-list
Hi list,
I've tried, lots of interpreter testing and google grepping to figure
this out and I think I'm missing something fundamental.
I have an ascii data dump from a POS system that has 131 fields in a
single column in a flat file. I can easily open the file, read in the
data and assemble it i
OK, I've asked this earlier this week with no response. Since then I've
also received a suggestion from the app developers but that failed with
the same type error problem. Hopefully Mark Hammond or other experts
can offer a suggestion as to how to get around this problem. I'm
foolish enough to thi
> I use it in phonoripper
> (http://klappnase.zexxo.net/phonoripper.index.html) to drag files from
>
Oops, wrong link address, should be:
http://klappnase.zexxo.net/phonoripper/index.html
Apologies
Michael
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> OK, I've asked this earlier this week with no response. Since then I've
> also received a suggestion from the app developers but that failed with
> the same type error problem. Hopefully Mark Hammond or other experts
> can offer a suggestion as to how to get around this
On Tuesday 19 December 2006 15:32, Paul Arthur wrote:
> On 2006-12-19, vertigo <[EMAIL PROTECTED]> wrote:
> > Hello
> >
> >> Take a look at Chapter 8 of 'Dive Into Python.'
> >> http://diveintopython.org/toc/index.html
> >
> > i read whole regexp chapter -
>
> Did you read Chapter 8? Regexes are 7
Jonathan Curran wrote:
> On Tuesday 19 December 2006 15:32, Paul Arthur wrote:
>> On 2006-12-19, vertigo <[EMAIL PROTECTED]> wrote:
>>> Hello
>>>
Take a look at Chapter 8 of 'Dive Into Python.'
http://diveintopython.org/toc/index.html
>>>
>>> i read whole regexp chapter -
>>
>> Did you
Andrew Sackville-West wrote:
>
> I can successfully connect to mysql and do stuff to my tables my
> specific problem is how to efficiently put those 132 fields into the
> thing. All I have been able to figure out is really ugly stuff like:
> build the mysql statement out of various pieces with appr
Not just Python, but every Regex engine works this way. You want a ?
after your *, as in <--(.*?)--> if you want it to catch the first
available "-->".
At this point in your adventure, you might be wondering whether regular
expressions are more trouble than they are worth. They are. There are
t
I'm doing some work with a Python program that works hand-in-hand with
the DOM on a local client (processing DOM events, issuing DOM
modification commands, etc.) I'm currently using cherrypy as the Python
server for this communication, and simple AJAX on the client browser
end. This works just
Michael Yanowitz top posted (again):
>No. test3.py (for example) is just plain Python code that sends and receives
socket data
>from another machine. It does (or could) contain loops that last a long time,
repeating
>the read or write operations to and from the socket. This grabs the CPU.
> Wh
On Tue, Dec 19, 2006 at 07:34:58PM -0800, Todd Neal wrote:
> Andrew Sackville-West wrote:
> >
> > I can successfully connect to mysql and do stuff to my tables my
> > specific problem is how to efficiently put those 132 fields into the
> > thing. All I have been able to figure out is really ugly s
Kenneth McDonald wrote:
> I'm doing some work with a Python program that works hand-in-hand with
> the DOM on a local client (processing DOM events, issuing DOM
> modification commands, etc.) I'm currently using cherrypy as the Python
> server for this communication, and simple AJAX on the clien
Hi everyone-
I've been away from coding for a while (I turned into a professional
photographer)...
So now I've taken up a project involving working with EXIF and XMP metadata in
image files (mainly JPEG and TIFF), and am having some trouble figuring out how
to handle some of the data...
Here's w
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
>
>Gert Cuykens a écrit :
>>> FWIW, the first version raises an exception (unless of course the name
>>> 'index' is already bound in the enclosing scope). And the second won't
>>> probably work as expected with CherryPy.
>>
>>
>> class HelloWorld:
>>
Andrew Sackville-West schrieb:
> I have an ascii data dump from a POS system that has 131 fields in a
> single column in a flat file. I can easily open the file, read in the
> data and assemble it into various formats. okay. what I *want* to do
> is insert each of these fields into a mysql databas
I am attempting to implement a process, and I'm pretty sure that a
major roadblock is that I do not understand the nomenclature. The
specs indicate that the goal is to calculate a message digest using an
SHA-256 algorithm. There are 2 examples included with the specs. The
label on the 2 examples
Using perl
<[EMAIL PROTECTED]> writes:
> The first part of the question is fairly basic - in C, working with
> signed integers, the MSB (is that still the right term?) is used to
> denote positive and negative, and the following bits increase
> towards positive infinity, correct? Such that in C, adding one
On 19 Dec 2006 16:12:59 -0800, Dr. Locke Z2A <[EMAIL PROTECTED]> wrote:
> I looked at those APIs and it would appear that SOAP isn't around
> anymore and there are no APIs for google translate :( Can anyone tell
> me how to set the user-agent string in the HTTP header?
import urllib2
req = urllib
Ben Finney wrote:
> \ "...one of the main causes of the fall of the Roman Empire was |
> `\that, lacking zero, they had no way to indicate successful |
> _o__) termination of their C programs." -- Robert Firth |
An amusing .sig, but it doesn't address the root cau
That seems like it'll do the trick quite well.
As far as the future generations go, there's no question as to whether it would
last if it were on my site - there are always changes being made to it and I'm
not expecting it to be very stable over the course of time, especially since it
would confus
"John Machin" <[EMAIL PROTECTED]> writes:
> Ben Finney wrote:
>
> > \ "...one of the main causes of the fall of the Roman Empire was |
> > `\that, lacking zero, they had no way to indicate successful |
> > _o__) termination of their C programs." -- Robert Firth |
>
>
101 - 164 of 164 matches
Mail list logo