[EMAIL PROTECTED] wrote:
> I am running python to c converter application. It throws an
> error saying python.h file not found.
>Can somebody plz suggest how to resolve this problem.
you need the python build files. if you're using Linux, look for
something named python-dev or pyt
Fredrik Lundh wrote:
>> *24. Display recent 10 java files, (with *.java extension) , in
>> descending order by time, latest to oldest time. (1) *
>
> >>> files = sorted(glob.glob("*.py"), key=os.path.getmtime)[-10:]
> >>> files.reverse()
(to display the files, use print)
--
http://mail.py
I was wondering if there was a way to take a txt file and, while
keeping most of it, replace only one line. See, I'd have a file like:
Tommy 555
Bob 62
Joe 529
And I'd want to set it to be:
Tommy 555
Bob 66
Joe 529
Is there any easy way to do this?
--
http://mail.python.org/mailman/listinfo/p
Carlos Lopez wrote:
> Please help i am losing my mind ... UNIX Newbee
>
> *23. How do you add a line to the end of an existing file "myfile" with
> date stamp. (1) *
>>> f = open("myfile", "a+")
>>> f.write(datestamp)
>>> f.close()
> *24. Display recent 10 java files, (with *.java extension
Hi,
I am running python to c converter application. It throws an
error saying python.h file not found.
Can somebody plz suggest how to resolve this problem.
Regards,
Praveen Kumar
--
http://mail.python.org/mailman/listinfo/python-list
Le Mardi 06 Juin 2006 03:08, Dustan a écrit :
>
> I should probably also mention, the only reason I downloaded the image
> to a file was because I don't know of any other way to do it. I feel no
> need to save the image to my hard drive.
using PIL, there is something like this (untested) :
(assum
Fuzzyman wrote:
> Well, this is true. Doesn't make it a *good* thing of course... :-)
on the other hand, the rules for what works and doesn't on public
forums have been finely tuned for many years.
that's why "the rules don't apply to me" people like Lee, "Neuruss",
and others get the kind of pu
Really sorry for that indentation thing :)
I tried out the code you have given, and also the one sreeram had written.
In all of these,i get the same error of this type:
Error i get in Sreeram's code is:
n1,_,n2,_ = line.split(',')
ValueError: need more than 1 value to unpack
And error i get in you
> > All that I want is this:
> > I download ( via Python) some pictures from internet and I want to add
> > all these pictures into one =one file/
> > So far, I managed to download pictures but I do not know how to add i
> > them nto one file.
> > How can I do that?
> > Thank you for reply and he
Girish Sahani wrote:
> Gerard Flanagan wrote:
>> Girish Sahani wrote:
>> > I wrote the following code to concatenate every 2 keys of a dictionary
>> and
>> > their corresponding values.
>> > e.g if i have tiDict1 = tiDict1 = {'a':[1,2],'b':[3,4,5]} i should get
>> > tiDict2={'ab':[1,2][3,4,5]} and
Hi,
Im attemtping to set values of custom cookies and use it to gain access
to certain web-pages that require these custom cookies.
What I've done so far is creating the cookies like so:
import Cookie
C = Cookie.SmartCookie()
C["__user_name"] = "foob"
And Im trying to open a url that requires
On 6/06/2006 2:10 PM, Girish Sahani wrote:
> I have a text file in the following format:
>
> 1,'a',2,'b'
> 3,'a',5,'c'
> 3,'a',6,'c'
> 3,'a',7,'b'
> 8,'a',7,'b'
Check out the csv module.
> .
> .
> .
> Now i need to generate 2 things by reading the file:
> 1) A dictionary with the numbers as keys
alf wrote:
> Would it be .append()? Does it reallocate te list with each apend?
No append does NOT reallocate for every call. Whenever a reallocation
happens, the newsize is proportional to the older size. So you should
essentially get amortized constant time for every append call.
If you want to
Girish Sahani wrote:
> 1) A dictionary with the numbers as keys and the letters as values.
> e.g the above would give me a dictionary like
> {1:'a', 2:'b', 3:'a', 5:'c', 6:'c' }
def get_dict( f ) :
out = {}
for line in file(f) :
n1,s1,n2,s2 = line.split(',')
out.upd
alf wrote:
> Would it be .append()? Does it reallocate te list with each apend?
>
> l=[]
> for i in xrange(n):
> l.append(i)
No, it doesn't. It expands the capacity of the list if necessary.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37
> Hi,
>
> Would it be .append()? Does it reallocate te list with each apend?
Yes it does.
If order of the new element being added doesnt matter you can use append.
If it does, you can use insert().
>
> l=[]
> for i in xrange(n):
>l.append(i)
>
>
> Thx, A.
> --
> http://mail.python.org/mailm
Hi,
Would it be .append()? Does it reallocate te list with each apend?
l=[]
for i in xrange(n):
l.append(i)
Thx, A.
--
http://mail.python.org/mailman/listinfo/python-list
I have a text file in the following format:
1,'a',2,'b'
3,'a',5,'c'
3,'a',6,'c'
3,'a',7,'b'
8,'a',7,'b'
.
.
.
Now i need to generate 2 things by reading the file:
1) A dictionary with the numbers as keys and the letters as values.
e.g the above would give me a dictionary like
{1:'a', 2:'b', 3:'a',
Please help i am
losing my mind ... UNIX Newbee
23. How do you add a line to the end of an existing file "myfile" with
date stamp. (1)
Ans : /home/clopez ed test.txt $a The last line of text. . w
q
24. Display recent 10 java files, (with *.java extensi
cannot help you with Tkinter but...
save=open("image.jpg","wb")
save.write(web_download.read())
save.close()
perhaps this would let you open the file in Paint
--
http://mail.python.org/mailman/listinfo/python-list
Girish Sahani wrote:
> I want to generate all substrings of size k-1 from a string of size k.
> e.g 'abcd' should give me ['abc','abd','bcd','acd']
def get_sub_set( s ) :
return [s[:i]+s[i+1:] for i in range(len(s))]
>>> print get_sub_set( 'abcd' )
['bcd', 'acd', 'abd', 'abc']
Regards
Sreeram
"liam_herron" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> I have a core c++ library that is exposed to python through the
> boost_python framework.
> I would like to write the core of a Newton's method solver in C++ and
> be able to write the
> functions that are evaluated to be
Andrei B wrote:
> I need to get absolute path name of a file that's in the same dir as
> the exe, however the Current Working Directory is changed to somthing
> else.
>
Use sys.path[0]
--
http://mail.python.org/mailman/listinfo/python-list
try,
if hasattr(sys, 'frozen'): me = sys.executable
else: me = sys.argv[0]
--
http://mail.python.org/mailman/listinfo/python-list
I need to get absolute path name of a file that's in the same dir as
the exe, however the Current Working Directory is changed to somthing
else.
I turn my script into an executable with py2exe, then I create a
shortcut to the EXE on the desktop. I change the "Start In" variable of
the shortcut "C:
I want to generate all substrings of size k-1 from a string of size k.
e.g 'abcd' should give me ['abc','abd','bcd','acd']
Order of these strings in the list doesnt matter.
Also order doesnt matter inside the string e.g 'abc' or 'bca' or 'bac' is
the same.
I wrote the following code but it doesnt g
>>> Could someone tell me where to learn more about directory
>>> processes or show me an improved version of my first
>>> script snippet?
Use os.walk
http://docs.python.org/lib/os-file-dir.html
It takes a little reading to get it if you are a beginner, but there
are zillions of examples if you
On 5/06/2006 10:46 PM, Bruno Desthuilliers wrote:
> [EMAIL PROTECTED] a écrit :
>> hi
>> in my code, i use dict(a) to make to "a" into a dictionary , "a" comes
>> from user input, so my program does not know in the first place. Then
>> say , it becomes
>>
>> a = { '-A' : 'value1' , '-B' : "value2"
I wrote:
> Nobody answered last time. I guess they wanted me to give it a shot.
> Well, here is how I download the image (it's a class method):
>
> def download_image(self):
> web_download=self.opener.open(self.url)
> save=open("image.jpg","w")
> save.writelines(web_down
I have a core c++ library that is exposed to python through the
boost_python framework.
I would like to write the core of a Newton's method solver in C++ and
be able to write the
functions that are evaluated to be in python. Does anyone have any
ideas on this?
--
http://mail.python.org/mailman
Nobody answered last time. I guess they wanted me to give it a shot.
Well, here is how I download the image (it's a class method):
def download_image(self):
web_download=self.opener.open(self.url)
save=open("image.jpg","w")
save.writelines(web_download.readlines())
Fredrik Lundh wrote:
> do you think the few of us who haven't already done so would miss
> anything if we plonked you now?
Oh, no...
How am I supposed to live without you, Freddie?
--
http://mail.python.org/mailman/listinfo/python-list
Thank you Terry.
I searched but didn't get useful information. In fact, I've built
pycrypto 2.0.1 successfully. However, the source of pyOpenSSL seemed to
be incompatible with lastest OpenSSL 0.98b. I tried to build it and got
dozens of compile errors which complain about syntax error in x509v3.h.
Luis M. González wrote:
> Fuzzyman wrote:
>> FWIW I agree. If anyone didn't want to answer the question they didn't
>> need to.
>>
>> Why be rude to someone asking a polite question. It's not as if there
>> isn't much more *worse* noise on this group.
>
> The poster asked the question very politel
>> there are far easier ways
>> #!/bin/bash
>> cat *.txt >outputfile
Well, yes, but if he's kicking things off with:
>> os.chdir("C:\\Python23\\programs\\filetree")
I'm guessing he's not on Linux. Maybe you're trying to convert him?
rd
--
http://mail.python.org/mailman/listinfo/python-list
If you are looking for a "real" python to C, well in this case
C++ look for the shedskin compiler. It will take a rather
nice subset of Python and generate C++ code from it.
It is still rather experimental but I have been using it.
Chance G.
On Mon, 05 Jun 2006 07:19:39 -0700, Fuzzyman wrote:
He means Lisp macros. Lisp macros are nothing like the crippled C++
macros that people tend to think of.
Roedy Green wrote:
> On 21 May 2006 02:15:31 -0700, "Xah Lee" <[EMAIL PROTECTED]> wrote,
> quoted or indirectly quoted someone who said :
>
>
> Java has lots of macro languages, including C++'s
[EMAIL PROTECTED] a écrit :
> Hi python experts
>
> In C++ I can do something like this:
> class Base {
> public:
> void f() { this->f_(); }
> private:
> virtual void f_() = 0;
> };
>
> class Derived : public Base {
> private:
> void f_() { // Do something }
> };
>
> int main()
John Salerno a écrit :
> If I want to get all the values that are entered into an HTML form and
> write them to a file, is there some way to handle them all at the same
> time, or must FieldStorage be indexed by each specific field name?
AFAIK, FieldStorage is a somewhat dict-like object, but I'
[EMAIL PROTECTED]:
> I'd like to have a dictionary (actually a nested dictionary) to call
> these functions so I can avoid if-then-elsing everything. Eath
> dictionary item has three things in it: the function to be called, a
> string to pass to the function (which is also the key to the dict), an
Robert Kern wrote:
> Fuzzyman wrote:
> > Erik Max Francis wrote:
>
> >>Here were the "harsh" and "whining" responses to his question he's
> >>complaining about:
> >
> > Fair enough. Maybe they weren't "harsh" and "whining", just patronising
> > and abrupt.
>
> Welcome to USENET!
Well, this is tru
Fuzzyman wrote:
> Erik Max Francis wrote:
>>Here were the "harsh" and "whining" responses to his question he's
>>complaining about:
>
> Fair enough. Maybe they weren't "harsh" and "whining", just patronising
> and abrupt.
Welcome to USENET!
--
Robert Kern
"I have come to believe that the whol
faulkner a écrit :
(please, don't top-post - corrected)
>
> Miguel Galves wrote:
>
>>Hello,
>>
>>I`m starting to learn python, and I hava a very good background in Java
>>and C/C++ programming. I was reading Dive into python chapter about
>>OO and I saw that in python we can do the following:
>>
Fuzzyman wrote:
> FWIW I agree. If anyone didn't want to answer the question they didn't
> need to.
>
> Why be rude to someone asking a polite question. It's not as if there
> isn't much more *worse* noise on this group.
I also agree.
Although the question may have appeared out of place, it wasn'
Erik Max Francis wrote:
> Fuzzyman wrote:
>
> > FWIW I agree. If anyone didn't want to answer the question they didn't
> > need to.
> >
> > Why be rude to someone asking a polite question. It's not as if there
> > isn't much more *worse* noise on this group.
>
> Here were the "harsh" and "whining"
Neuruss wrote:
> The other zilion persons who were not interested (other than the four I
> mentioned above) silently and peacefully ignored the question on went
> on with their happy lifes.
That's because many of them have killfiled you.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.al
Fuzzyman wrote:
> FWIW I agree. If anyone didn't want to answer the question they didn't
> need to.
>
> Why be rude to someone asking a polite question. It's not as if there
> isn't much more *worse* noise on this group.
Here were the "harsh" and "whining" responses to his question he's
complai
pcm wrote:
> Fuzzyman wrote:
>
> >
> > pcm wrote:
> >> Hi,
> >>
> >> Has anyone ever worked on a Python-WinCE-based program that involved
> >> serial port management ?
> >>
> >
> > Because of the size of the runtime and the fragility of the GUI
> > toolkits, there has been little serious developme
Neuruss wrote:
> Erik Max Francis wrote:
> > > I'm curious, who are "us"?
> >
> > The regular readers of comp.lang.python. If you don't think we haven't
> > seen this a zillion times before, you're kidding yourself.
> >
> > If you want help on a language, ask in that language's newsgroup/mailing
Bernard Lebel wrote:
> Hello,
>
> I have this Tkinter window that when you click on a certain button,
> another instance of Tk is created, and thus a new windows is spawned.
> That second windows holds a few widgets to browse files and
> directories.
>
> Now, as soon as I start browsing files and
Luis M. González wrote:
> There are thousands of threads to choose from in this forum.
> If they didn't like this question, they could have picked any other one
> to discuss.
> There's no need to be disagreeable :-)
Plenty of people _did_ helpfully respond to his question with the right
answer.
*Very* strong suggestion - read the following link:
http://www.catb.org/~esr/faqs/smart-questions.html
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> Delaney, Timothy (Tim) wrote:
>
>> The most important problem here is that you've lost the stack trace
from
>> the original exception.
>
> which, in many cases, is a good thing, especially if you replace "int"
> with a call to some low-level support library. if I call API
when you set an attribute of an object, python secretly calls that
objects __setattr__ method.
class test:
def __setattr__(self, attr_name, attr_value):
print self, attr_name, attr_value
self.__dict__[attr_name] = attr_value# do what the original
__setattr__ method does.
tes
Fredrik Lundh wrote:
> as mentioned in the documentation, and implied by my answer, parseString
> is a helper function in the xml.sax module, not a parser method. try doing
>
> xml.sax.parseString(string, handler)
>
> instead of that make_parser/setContentHandler/parse dance.
>
>
Thanks a
Settings.__init__ needs to call ConfigParser.SafeConfigParser.__init__
before it calls self.readfp.
Nexu wrote:
> Hello,
>
> I'm not sure exactly what i'm doing wrong here. I asked around on IRC
> and i was told the code is correct.
> The purpose of Settings() is that whenever Settings() or any of
Bernard Lebel wrote:
> Unless you were being sarcastic? ;-)
Just temporarily dense. :)
--
http://mail.python.org/mailman/listinfo/python-list
Neuruss wrote:
> [more childish blah blah blah]
do you think the few of us who haven't already done so would miss
anything if we plonked you now?
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Tim Peters <[EMAIL PROTECTED]> wrote:
>[Jim Segrave]
>> Actually, presorted lists are not a bad case for heapsort - it's quite
>> immune to any existing order or lack thereof,
>
>Write a heapsort and time it. It's not a difference in O() behavior,
>but more memory m
[EMAIL PROTECTED] wrote:
> I am getting the following error.
>
> File "acmtest.py", line 205, in parseMessage
> parser.parseString(message)
> AttributeError: ExpatParser instance has no attribute 'parseString'
>
> Am I simply missing that library here? Or am I calling it incorrectly?
as me
On 6/5/06, John Salerno <[EMAIL PROTECTED]> wrote:
> What is dir(), btw? Is it a class for creating the application?
[Bernard] In your Python documentation, dir() is described in the
built-in functions (section 2.1) as well as the tutorial, in the
"Modules" section (chapter 6). Unless you were be
John Salerno wrote:
> What is dir(), btw? Is it a
> class for creating the application?
Heh heh, how quickly I forget about built-ins. :) Try something like this:
import Tkinter as tk
root = tk.Tk()
label = tk.Label(root, text='Hello world!')
label.pack()
root.mainloop()
--
http://mail.python
Byte wrote:
> Hi, I'm using the "Learning to Program" GUI tutorial on
> http://www.freenetpages.co.uk/hp/alan.gauld/
> and am trying to write my first GUI. However, the code the tutorial
> gives for starting by making a window:
>
>
> import Tkinter
>
> top = Tkinter.Tk()
>
> dir(top)
>
> Does
[EMAIL PROTECTED] writes:
> Hi python experts
>
> In C++ I can do something like this:
> class Base {
> public:
> void f() { this->f_(); }
> private:
> virtual void f_() = 0;
> };
>
> class Derived : public Base {
> private:
> void f_() { // Do something }
> };
>
> int main()
On Mon, Jun 05, 2006 at 07:34:05PM +0100, Steve Holden wrote:
> amberite wrote:
> > [EMAIL PROTECTED] wrote:
> >
> >>I am using cx_Oracle and MySQLdb to pull a lot of data from some tables
> >>and I find that the cursor.execute method uses a lot of memory that
> >>never gets garbage collected. Usi
Hi, I'm using the "Learning to Program" GUI tutorial on
http://www.freenetpages.co.uk/hp/alan.gauld/
and am trying to write my first GUI. However, the code the tutorial
gives for starting by making a window:
import Tkinter
top = Tkinter.Tk()
dir(top)
Does not work. The Python interpreter does
Fredrik Lundh wrote:
> if you want to parse a string, use xml.sax.parseString instead of
> xml.sax.parse.
>
>
My function has changed to the following (parseString call instead of
parse):
def parseMessage(self, message):
#create a XML parser
parser = make_parser()
#c
Hello,
I'm not sure exactly what i'm doing wrong here. I asked around on IRC
and i was told the code is correct.
The purpose of Settings() is that whenever Settings() or any of its
methods are called. It should pick up the latest settings from file
instead of returning what was in the buffer. This
Gerard Flanagan wrote:
> Girish Sahani wrote:
> > I wrote the following code to concatenate every 2 keys of a dictionary and
> > their corresponding values.
> > e.g if i have tiDict1 = tiDict1 = {'a':[1,2],'b':[3,4,5]} i should get
> > tiDict2={'ab':[1,2][3,4,5]} and similarly for dicts with large
[EMAIL PROTECTED] (John J. Lee) writes:
> Laszlo Nagy <[EMAIL PROTECTED]> writes:
> [...]
> > how can I return the redirection URL?
> > I tried to get this information from the exception but I could not. Is
> > it possible to read it from the openerdirector?
> > Any suggestions?
> >
> >
> >
Girish Sahani wrote:
> I wrote the following code to concatenate every 2 keys of a dictionary and
> their corresponding values.
> e.g if i have tiDict1 = tiDict1 = {'a':[1,2],'b':[3,4,5]} i should get
> tiDict2={'ab':[1,2][3,4,5]} and similarly for dicts with larger no. of
> features.
> Now i want
"Mike Meng" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I'm learning Twisted and downloaded pyOpenSSL and pycrypto win32
> installer on http://twisted.sourceforge.net/contrib/ . But I find the
> lastest version are for Python 2.3. I try to rebuild pyOpenSSL from
> source,
Lad wrote:
> Steve Holden wrote:
>
>>Lad wrote:
>>
>>>K.S.Sreeram wrote:
>>>
>>>
Lad wrote:
>Hello ,
>is it possible to add( with PYTHON language) several image files into
>one?
Google for 'Python Imaging Library'...
Regards
Sreeram
>
amberite wrote:
> [EMAIL PROTECTED] wrote:
>
>>I am using cx_Oracle and MySQLdb to pull a lot of data from some tables
>>and I find that the cursor.execute method uses a lot of memory that
>>never gets garbage collected. Using fetchmany instead of fetchall does
>>not seem to make any difference, s
Fredrik Lundh wrote:
Marshall Dudley wrote:
> That is what I did originally, downloaded the latest version from
the main
> python site. I compiled by the README file instructions, and
I compiled by the
> instructions on the python url which are different, but both gave
identical
> results, compi
[Jim Segrave]
> Actually, presorted lists are not a bad case for heapsort - it's quite
> immune to any existing order or lack thereof,
Write a heapsort and time it. It's not a difference in O() behavior,
but more memory movement is required for a sorted list because
transforming the list into a m
On 2006-06-05, PipedreamerGrey <[EMAIL PROTECTED]> wrote:
Just in case you really are trying to accomplish something
other than learn Python, there are far easier ways to do these
tasks:
> This is the beginning of a script that I wrote to open all the
> text files in a single directory, then proc
[EMAIL PROTECTED] wrote:
> I am using cx_Oracle and MySQLdb to pull a lot of data from some tables
> and I find that the cursor.execute method uses a lot of memory that
> never gets garbage collected. Using fetchmany instead of fetchall does
> not seem to make any difference, since it's the execut
Steve Holden wrote:
> su wrote:
>> to find which process dumped core at the promt we give
>>
>> $ file core.28424
>>
>> core.28424: ELF 32-bit LSB core file of 'soffice.bin' (signal 11),
>> Intel 80386, version 1 (SYSV), from 'soffice.bin'
>>
>> from this command we know 'soffice.bin' process du
On 5 Jun 2006 10:01:06 -0700, PipedreamerGrey <[EMAIL PROTECTED]> wrote:
> This is the beginning of a script that I wrote to open all the text
> files in a single directory, then process the data in the text files
> line by line into a single index file.
>
> os.chdir("C:\\Python23\\programs\\filetr
In article <[EMAIL PROTECTED]>,
Tim Peters <[EMAIL PROTECTED]> wrote:
>[Scott David Daniels]
>>> For example, time timsort (Python's internal sort) on pre-sorted
>>> data; you'll find it is handled faster than random data.
>
>O(N) vs O(N log N), in fact.
>
>[Lawrence D'Oliveiro]
>> But isn't that h
Nonsense! I meant leaving out --enable-shared.
On Sunday 04 June 2006 16:17, Martin Wiechert wrote:
> You were right, leaving out --with-pydebug did the trick.
>
> Thanks, Martin
>
> On Sunday 28 May 2006 03:53, [EMAIL PROTECTED] wrote:
> > Martin Wiechert wrote:
> > > Hi list,
> > >
> > > I've cr
Steve Holden wrote:
> Lad wrote:
> > K.S.Sreeram wrote:
> >
> >>Lad wrote:
> >>
> >>>Hello ,
> >>>is it possible to add( with PYTHON language) several image files into
> >>>one?
> >>
> >>Google for 'Python Imaging Library'...
> >>
> >>Regards
> >>Sreeram
> >>
> >>
> >>
> >
> > Thank you for your
WOW!
Thanks for all the answers, even those not related to regular
expressions tought me some stuff I wasn't aware of.
I appreciate it very much.
SuperHik wrote:
> hi all,
>
> I'm trying to understand regex for the first time, and it would be very
> helpful to get an example. I have an old(er)
Le Lundi 05 Juin 2006 19:40, Maric Michaud a écrit :
> Le Lundi 05 Juin 2006 19:18, [EMAIL PROTECTED] a écrit :
> > Any thoughts?
>
oups wanted to wirte this :
In [27]: a, b = (lambda : 'works like this'), (lambda *a : a)
In [28]: a(*())
Out[28]: 'works like this'
In [29]: b(*())
Out[29]: ()
-
Le Lundi 05 Juin 2006 19:18, [EMAIL PROTECTED] a écrit :
> Any thoughts?
In [24]: a, b = (lambda : 'works like this'), (lambda a, b : (a,b))
In [25]: a(*())
Out[25]: 'works like this'
In [26]: b(4,3)
Out[26]: (4, 3)
--
_
Maric Michaud
_
Aristote - www.aristote.info
[EMAIL PROTECTED] wrote:
> Hi,
>
> I'm writing a hand-written recursive decent parser for SPICE syntax
> parsing. In one case I have one function that handles a bunch of
> similar cases (you pass the name and the number of tokens you're
> looking for). In another case I have a function that hand
try os.spawn() using the os module
--
http://mail.python.org/mailman/listinfo/python-list
Hello Vinay,
On Sun, Jun 04, 2006 at 05:23:55AM -0700, Vinay Sajip wrote:
> It's not propagated to the root logger (or to ancestor loggers in
> general) - just to the handlers associated with ancestor loggers.
...
> You can set levels on handlers as well as loggers. So if you add a
> syslog handle
Hi,
I'm writing a hand-written recursive decent parser for SPICE syntax
parsing. In one case I have one function that handles a bunch of
similar cases (you pass the name and the number of tokens you're
looking for). In another case I have a function that handles a
different set of tokens and so
This is the beginning of a script that I wrote to open all the text
files in a single directory, then process the data in the text files
line by line into a single index file.
os.chdir("C:\\Python23\\programs\\filetree")
mydir = glob.glob("*.txt")
index = open("index.rtf", 'w')
for File in mydir
Thanks all for your help!
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> So in recap, it looks like it is trying to take my string argument as a
> file handler. How can I get around this?
if you want to parse a string, use xml.sax.parseString instead of
xml.sax.parse.
--
http://mail.python.org/mailman/listinfo/python-list
Marshall Dudley wrote:
> That is what I did originally, downloaded the latest version from the main
> python site. I compiled by the README file instructions, and I compiled by
> the
> instructions on the python url which are different, but both gave identical
> results, compiles fine, runs fine
Girish Sahani <[EMAIL PROTECTED]>:
> I wrote the following code to concatenate every 2 keys of a dictionary and
> their corresponding values.
> e.g if i have tiDict1 = tiDict1 = {'a':[1,2],'b':[3,4,5]} i should get
> tiDict2={'ab':[1,2][3,4,5]} and similarly for dicts with larger no. of
> features.
Hey all, I recently came across the xml.sax libraries and am trying to
use them. I am currently making a string variable, and am attempting
to pass it into a parser instance as follows:
def parseMessage(self, message):
#create a XML parser
parser = make_parser()
#cre
Hi all,
I'm learning Twisted and downloaded pyOpenSSL and pycrypto win32
installer on http://twisted.sourceforge.net/contrib/ . But I find the
lastest version are for Python 2.3. I try to rebuild pyOpenSSL from
source, but get lots of compile errors. Are these two packages
obsolated? Where ca
Le Lundi 05 Juin 2006 16:07, [EMAIL PROTECTED] a écrit :
> class Base {
> public:
> void f() { this->f_(); }
> private:
> virtual void f_() = 0;
> };
>
> class Derived : public Base {
> private:
> void f_() { // Do something }
> };
>
> int main() {
> Derived d;
> d.f();
>
Fredrik Lundh wrote:
> Marshall Dudley wrote:
>
> > Is it not possible to install the latest version of python on my FreeBSD
> > system? Upgrading the FreeBSD is not an option since this is a production
> > system and everything else is working fine.
>
> that's really a FreeBSD question, isn't it
Sorry to bring it back up, but is there a way to spawn the process
without Twisted?
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 177 matches
Mail list logo