That was harsh, Steven.
Well, to answer your question pytart, do a quick search here:
http://groups.google.com/group/comp.lang.python/topics?pli=1
and/or here:
http://aspn.activestate.com/ASPN/Mail/Browse/Threaded/python-list
as I'm pretty sure someone has already asked this question that has got
a
On Oct 22, 1:13�am, ru...@yahoo.com wrote:
> On 10/21/2009 11:47 PM, Carl Banks wrote:
>
>
>
>
>
> > On Oct 21, 12:46 pm, David C Ullrich wrote:
> >> On Tue, 20 Oct 2009 15:22:55 -0700, Mensanator wrote:
> >> > On Oct 20, 1:51 pm, David C Ullrich wrote:
> >> > I'm not saying either behaviour is w
On Wed, 21 Oct 2009 07:07:54 -0700, pytart wrote:
> Hello ,
>I have a project to develop a basic character recognition
> module in python using backpropagation and artificial neural networks. I
> would be very helpful if u cud give me some helpful links for the
> project.
Oh that's hilari
On Wed, 21 Oct 2009 01:11:29 -0700, catalinf...@gmail.com wrote:
> I have this error , what happen ?
>
> Python 2.5.2 (r252:60911, Sep 30 2008, 15:41:38) [GCC 4.3.2 20080917
> (Red Hat 4.3.2-4)] on linux2 Type "help", "copyright", "credits" or
> "license" for more information.
import md5
>>>
On Oct 21, 11:21�pm, John Yeung wrote:
> On Oct 21, 5:43�pm, Mensanator wrote:
>
> > >>> '01110'.split('0')
>
> > ['', '1', '', '', '', '11', '']
>
> > is a perfect example. It shows the empty strings
> > generated from the leading and trailing delimiters,
> > and also that you get 3 empty st
2009/10/22 John Yeung
> On Oct 22, 12:28 am, John Nagle wrote:
>
> >The Shed Skin people would welcome some help.
> >
> >http://shed-skin.blogspot.com/
>
> People? It's one guy. It apparently started out as a Master's thesis
> as well. ;)
>
> I am a great admirer of the Shed Skin p
En Wed, 21 Oct 2009 16:06:31 -0300, geremy condra
escribió:
I decided to play around with nonlocal declarations today, and was
somewhat surprised when a call to nonlocals() resulted in 'nonlocals
is not defined'. Is there an a standard equivalent to globals() or
locals() for variables in oute
On 10/21/2009 11:47 PM, Carl Banks wrote:
> On Oct 21, 12:46 pm, David C Ullrich wrote:
>> On Tue, 20 Oct 2009 15:22:55 -0700, Mensanator wrote:
>> > On Oct 20, 1:51 pm, David C Ullrich wrote:
>> > I'm not saying either behaviour is wrong, it's just not obvious that the
>> > one behaviour doesn't
On 10/21/2009 02:56 PM, Tim Chase wrote:
> ru...@yahoo.com wrote:
>> On 10/21/2009 01:40 AM, Lie Ryan wrote:
>>> ru...@yahoo.com wrote:
>> 1) It may look like a homework problem to you but it
>> probably isn't.
>> Seehttp://groups.google.com/group/comp.lang.python/msg/8ac6db43b09fdc92
On Oct 21, 12:46 pm, David C Ullrich wrote:
> On Tue, 20 Oct 2009 15:22:55 -0700, Mensanator wrote:
> > On Oct 20, 1:51 pm, David C Ullrich wrote:
> > I'm not saying either behaviour is wrong, it's just not obvious that the
> > one behaviour doesn't follow from the other and the documentation cou
On Oct 22, 12:28 am, John Nagle wrote:
> The Shed Skin people would welcome some help.
>
> http://shed-skin.blogspot.com/
People? It's one guy. It apparently started out as a Master's thesis
as well. ;)
I am a great admirer of the Shed Skin project, and I would be as happy
as anyone
omer azazi wrote:
On 12 أكتوبر, 05:42, TerryP wrote:
On Oct 11, 11:25 pm, omer azazi wrote:
I appologise if I appear _rude_, but this is comp.lang.python -- it is
for the discussion of Python and related projects that were created by
men and women. A discussion about faith does not belong
En Wed, 21 Oct 2009 18:40:01 -0300, Andreas Balogh
escribió:
Gabriel, thanks for your hint. I've managed to create an implementation
of an AttrDict passing Gabriels tests.
Any more comments about the pythonicness of this implementation?
class AttrDict(dict):
"""A dict whose items can
En Wed, 21 Oct 2009 22:24:49 -0300, David Sfiligoi
escribió:
On Wed, 21 Oct 2009 00:45:21 -0300, Gabriel Genellina wrote:
If you want to keep the cursor open, you must commit the (implicit)
current transaction, even if it only contains selects (a rollback would
work too).
Alternatively, low
On Oct 21, 5:43 pm, Mensanator wrote:
> >>> '01110'.split('0')
>
> ['', '1', '', '', '', '11', '']
>
> is a perfect example. It shows the empty strings
> generated from the leading and trailing delimiters,
> and also that you get 3 empty strings between the
> '1's, not 4. When creating docume
Qrees wrote:
Hello
As my Master's dissertation I chose Cpython optimization. That's why
i'd like to ask what are your suggestions what can be optimized. Well,
I know that quite a lot. I've downloaded the source code (I plan to
work on Cpython 2.6 and I've downloaded 2.6.3 release). By looking at
Hi, I'm writing a script to capture a command on the commandline and run it
on a remote server.
I guess I don't understand subprocess because the code below exec's the
user's .cshrc file even though by default shell=False in the Popen call.
Here's the code. I put a line in my .cshrc file: echo '
On Thu, 22 Oct 2009 14:00:03 +1100, Ben Finney
wrote:
>> Ben Finney writes:
>> > Reported to service provider as spam.
>>
>> Please don't reply to SPAM. You just make it visible to those of us
>> with better filters. Hint : spammers do not read your reply.
>
>I didn't quote the spam except to be
Richard Riley writes:
> Ben Finney writes:
> > Reported to service provider as spam.
>
> Please don't reply to SPAM. You just make it visible to those of us
> with better filters. Hint : spammers do not read your reply.
I didn't quote the spam except to be clear which message I'm responding
to.
On Wed, Oct 21, 2009 at 9:45 PM, holmes86 wrote:
> Hi,everyone
>
> I'm a python newbie,and I want to write a facebook client.But I don't
> know how to do it.Meanwhile I have any write web experience,so I also
> don't know how to analyse web page.Any help will be appreciate.
> --
> http://mail.pyth
Dan Guido wrote:
This doesn't give me quite the results I expected, so I'll have to
take a closer look at my project as a whole tomorrow. The test cases
clearly show the need for all the fancy parsing I'm doing on the path
though.
Looks like I'll return to this tomorrow and post an update as
app
Python 2.6.3 is installed on my Windows XP throught the binary file
provided by Python.org. Then I followed the steps described here:
http://faq.pygtk.org/index.py?req=show&file=faq21.001.htp
to install PyGTK. However, I still get the following error:
>>> import pygtk
>>> pygtk.require('2.0')
>>>
On Oct 21, 9:04 pm, nusch wrote:
> Is there any simple command which allows me to save position of all
> windows: QMainWindow, QDialogs and qdockwidgets with their sizes,
> dock state and positions ? Or do I need to store those values
> manually, how can I do it fast?
Both fast and simple have
Hi,everyone
I'm a python newbie,and I want to write a facebook client.But I don't
know how to do it.Meanwhile I have any write web experience,so I also
don't know how to analyse web page.Any help will be appreciate.
--
http://mail.python.org/mailman/listinfo/python-list
I have asked in emacs help too, but basically does anyone here have
pylint integrated with emacs so that you can actually read the error
description? I am set up as described here:-
http://tinyurl.com/yfshb5b
or
http://stackoverflow.com/questions/1259873/how-can-i-use-emacs-flymake-mode-for-pyt
On Wed, 21 Oct 2009 00:45:21 -0300, Gabriel Genellina wrote:
>
> If you want to keep the cursor open, you must commit the (implicit)
> current transaction, even if it only contains selects (a rollback would
> work too).
> Alternatively, lower the transaction isolation level below "repeatable
> rea
Jorgen Grahn wrote:
On Fri, 2009-10-16, Jeremy wrote:
On Oct 15, 6:32 pm, MRAB wrote:
TerryP wrote:
On Oct 15, 7:42 pm, Jeremy wrote:
I need to write a Python script that will call some command line
programs (using os.system). I will have many such calls, but I want
to control when the c
En Wed, 21 Oct 2009 06:24:55 -0300, Lele Gaifax
escribió:
"Gabriel Genellina" writes:
DON'T do that. Really. Changing the default encoding is a horrible,
horrible hack and causes a lot of problems.
...
More reasons:
http://tarekziade.wordpress.com/2008/01/08/syssetdefaultencoding-is-evil/
Se
On Wed, 21 Oct 2009 09:06:50 +1100, Ben Finney wrote:
> Grant Edwards writes:
>> On 2009-10-20, Peter Pearson wrote:
>>
>> > Reported to Google's groups-abuse.
>>
>> What are these postings supposed to mean?
>
> That the posting which started the thread (which you may or may not have
> seen, so i
On Wed, 21 Oct 2009 23:28:24 +0100, Stephen Fairchild
wrote:
Tim Golden wrote:
catalinf...@gmail.com wrote:
I have this error , what happen ?
Python 2.5.2 (r252:60911, Sep 30 2008, 15:41:38)
[GCC 4.3.2 20080917 (Red Hat 4.3.2-4)] on linux2
Type "help", "copyright", "credits" or "license"
Tim Golden wrote:
> catalinf...@gmail.com wrote:
>> I have this error , what happen ?
>>
>> Python 2.5.2 (r252:60911, Sep 30 2008, 15:41:38)
>> [GCC 4.3.2 20080917 (Red Hat 4.3.2-4)] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
> import md5
> pass =
On Wed, Oct 21, 2009 at 5:40 PM, Dan Guido wrote:
> This doesn't give me quite the results I expected, so I'll have to
> take a closer look at my project as a whole tomorrow. The test cases
> clearly show the need for all the fancy parsing I'm doing on the path
> though.
To get back to what I thi
On Fri, 2009-10-16, Jeremy wrote:
> On Oct 15, 6:32 pm, MRAB wrote:
>> TerryP wrote:
>> > On Oct 15, 7:42 pm, Jeremy wrote:
>> >> I need to write a Python script that will call some command line
>> >> programs (using os.system). I will have many such calls, but I want
>> >> to control when the c
On Thu, 2009-10-15, TerryP wrote:
...
> launching external programs, irregardless of language, generally falls
> into 3 major categories:
>
> 0.) blocks until program is done; like system
> 1.) replaces your program with process, never returns; like exec
> 2.) quickly return after asynchronou
Nobody wrote:
Just curious, why did you choose to set the upper boundary at 0x?
Characters outside the 16-bit range aren't supported on all builds. They
won't be supported on most Windows builds, as Windows uses 16-bit Unicode
extensively:
Python 2.5.1 (r251:54863, Apr 18 2007, 08
On Wed, 2009-10-14, Steven D'Aprano wrote:
...
> Setting up a try...except block is cheap in Python. According to my
> tests, the overhead is little more than that of a single pass statement.
>
> But actually raising and catching the exception is not cheap. If you use
> a lot of exceptions for f
On Oct 21, 2:46 pm, David C Ullrich wrote:
> On Tue, 20 Oct 2009 15:22:55 -0700, Mensanator wrote:
> > On Oct 20, 1:51 pm, David C Ullrich wrote:
> >> On Thu, 15 Oct 2009 18:18:09 -0700, Mensanator wrote:
> >> > All I wanted to do is split a binary number into two lists, a list of
> >> > blocks o
Gabriel, thanks for your hint. I've managed to create an implementation of an AttrDict
passing Gabriels tests.
Any more comments about the pythonicness of this implementation?
class AttrDict(dict):
"""A dict whose items can also be accessed as member variables."""
def __init__(self, *ar
This doesn't give me quite the results I expected, so I'll have to
take a closer look at my project as a whole tomorrow. The test cases
clearly show the need for all the fancy parsing I'm doing on the path
though.
Looks like I'll return to this tomorrow and post an update as
appropriate. Thanks fo
Dan Guido wrote:
Hi Diez,
The source of the string literals is ConfigParser, so I can't just
mark them with an 'r'.
Python string literals only exist in Python source code. Functions and
methods only return *strings*, not literals. If you mistakenly put the
str() representation of a string
> If you don't know yet, you could find interesting this project:
>
> http://code.google.com/p/unladen-swallow/
I know about this project. I'll have a look at it, but I'd like to
create something of my own.
> They too are trying to improve CPython speed.
>
> If you are thinking of language var
ru...@yahoo.com wrote:
On 10/21/2009 01:40 AM, Lie Ryan wrote:
ru...@yahoo.com wrote:
1) It may look like a homework problem to you but it
probably isn't.
Seehttp://groups.google.com/group/comp.lang.python/msg/8ac6db43b09fdc92
Homework comes in many forms - school driven homework should be
t
Is there any simple command which allows me to save position of all
windows: QMainWindow, QDialogs and qdockwidgets with their sizes,
dock state and positions ? Or do I need to store those values
manually, how can I do it fast?
--
http://mail.python.org/mailman/listinfo/python-list
I'm writing a test case right now, will update in a few minutes :-).
I'm using Python 2.6.x
I need to read these values in from a configparser file or the windows
registry and get MD5 sums of the actual files on the filesystem and
copy the files to a new location. The open() method completely barf
ru...@yahoo.com wrote:
On 10/21/2009 01:40 AM, Lie Ryan wrote:
ru...@yahoo.com wrote:
1) It may look like a homework problem to you but it
probably isn't.
Seehttp://groups.google.com/group/comp.lang.python/msg/8ac6db43b09fdc92
Homework comes in many forms - school driven homework should be
t
Dan Guido wrote:
Hi Anthony,
Thanks for your reply, but I don't think your tests have any control
characters in them. Try again with a \v, a \n, or a \x in your input
and I think you'll find it doesn't work as expected.
A path read from a file, config file, or winreg would never contain
contr
Dan Guido wrote:
Hi Diez,
The source of the string literals is ConfigParser, so I can't just
mark them with an 'r'.
config =onfigParser.RawConfigParser()
config.read(filename)
crazyfilepath =onfig.get(name, "ImagePath")
normalfilepath =ormalize_path(crazyfilepath)
The ultimate origin of the st
On Oct 16, 10:35 am, mario ruggier wrote:
> On Oct 5, 4:25 pm, Aaron Watters wrote:
>
> > Occasionally I fantasize about making a non-trivial change
> > to one of these programs, but I strongly resist going further
> > than that because the ORM meatgrinder makes it somewhere
> > between extremely
Hi Anthony,
Thanks for your reply, but I don't think your tests have any control
characters in them. Try again with a \v, a \n, or a \x in your input
and I think you'll find it doesn't work as expected.
--
Dan Guido
On Wed, Oct 21, 2009 at 3:50 PM, Anthony Tolle wrote:
> On Oct 21, 3:20 pm, D
> Emmanuel Surleau a écrit :
> >> Emmanuel Surleau a écrit :
> Django : very strong integration, excellent documentation and support,
> huge community, really easy to get started with. And possibly a bit
> more mature and stable...
> >>>
> >>> One strong point in favour of Django: it
Dan Guido wrote:
I'm trying to write a few methods that normalize Windows file paths.
I've gotten it to work in 99% of the cases, but it seems like my code
still chokes on '\x'. I've pasted my code below, can someone help me
figure out a better way to write this? This seems overly complicated
for
On Oct 21, 3:20 pm, Dan Guido wrote:
> Hi Diez,
>
> The source of the string literals is ConfigParser, so I can't just
> mark them with an 'r'.
>
> config = ConfigParser.RawConfigParser()
> config.read(filename)
> crazyfilepath = config.get(name, "ImagePath")
> normalfilepath = normalize_path(craz
On Tue, 20 Oct 2009 15:22:55 -0700, Mensanator wrote:
> On Oct 20, 1:51 pm, David C Ullrich wrote:
>> On Thu, 15 Oct 2009 18:18:09 -0700, Mensanator wrote:
>> > All I wanted to do is split a binary number into two lists, a list of
>> > blocks of consecutive ones and another list of blocks of cons
Hi Diez,
The source of the string literals is ConfigParser, so I can't just
mark them with an 'r'.
config = ConfigParser.RawConfigParser()
config.read(filename)
crazyfilepath = config.get(name, "ImagePath")
normalfilepath = normalize_path(crazyfilepath)
The ultimate origin of the strings is the
I decided to play around with nonlocal declarations today, and was
somewhat surprised when a call to nonlocals() resulted in 'nonlocals
is not defined'. Is there an a standard equivalent to globals() or
locals() for variables in outer nested scopes?
Geremy Condra
--
http://mail.python.org/mailman
On Wed, Oct 21, 2009 at 11:35 AM, Peng Yu wrote:
> On Tue, Oct 20, 2009 at 4:42 PM, Diez B. Roggisch wrote:
>> Peng Yu schrieb:
>>>
>>> I have a .pyc file generated by python 2.4. My current python is of
>>> version 2.6. I'm wondering how to generate the corresponding .py file
>>> from it.
>>
>>
On Tue, Oct 20, 2009 at 4:42 PM, Diez B. Roggisch wrote:
> Peng Yu schrieb:
>>
>> I have a .pyc file generated by python 2.4. My current python is of
>> version 2.6. I'm wondering how to generate the corresponding .py file
>> from it.
>
> http://www.crazy-compilers.com/decompyle/
Is there any fre
Dan Guido wrote:
> I'm trying to write a few methods that normalize Windows file paths.
> I've gotten it to work in 99% of the cases, but it seems like my code
> still chokes on '\x'. I've pasted my code below, can someone help me
> figure out a better way to write this? This seems overly complica
On Wed, 07 Oct 2009 18:44:03 +0200, Jean-Michel Pichavant
wrote:
: When opposing vi to emacs, there's is no possibility you get
: constructive and objective answer, because basically, what can do with
: one, you can also do it with the other.
You seem rather negative. I could not see any
On Oct 21, 4:59 am, Bruno Desthuilliers wrote:
> beSTEfar a écrit :
> (snip)
> > When parsing strings, use Regular Expressions.
>
> And now you have _two_ problems
>
> For some simple parsing problems, Python's string methods are powerful
> enough to make REs overkill. And for any complex enough
I'm trying to write a few methods that normalize Windows file paths.
I've gotten it to work in 99% of the cases, but it seems like my code
still chokes on '\x'. I've pasted my code below, can someone help me
figure out a better way to write this? This seems overly complicated
for such a simple prob
Il Wed, 21 Oct 2009 10:28:55 -0700, Qrees ha scritto:
> Hello
>
> As my Master's dissertation I chose Cpython optimization. That's why i'd
> like to ask what are your suggestions what can be optimized. Well, I
> know that quite a lot. I've downloaded the source code (I plan to work
> on Cpython 2
On 2009-10-21 12:38 PM, Yang wrote:
Here is another question on this. I am running Python 2.6.3 which uses
Tcl 8.5. I could not find the BLT binary source for Tcl 8.5. The
latest version is for Tcl 8.4. How could I install BLT? For example,
can I change the default Tcl version that Python has ac
On Oct 21, 12:13 pm, Robert Kern wrote:
> On 2009-10-21 10:50 AM, Yang Yang wrote:
>
>
>
> > Hello,
>
> > I tried to follow the following code demonstrating the use of Pmw.BLT:
>
> > >>> from Tkinter import *
> > >>> import Pmw
> > >>> master = Tk()
> > >>> g = Pmw.Blt.Graph( master )
>
> > I
On Mon, 2009-10-19, oripel wrote:
> On Oct 14, 5:59 pm, Jorgen Grahn wrote:
>> But this sentence on the home page
>>
>> The documentation is sadly outdated, but may be
>> a starting point:
>>
>> made me stop looking. As far as I can tell, you cannot even find out
>> what's so advanced abo
On 10/21/2009 01:40 AM, Lie Ryan wrote:
> ru...@yahoo.com wrote:
1) It may look like a homework problem to you but it
probably isn't.
Seehttp://groups.google.com/group/comp.lang.python/msg/8ac6db43b09fdc92
>>> Homework comes in many forms - school driven homework should be
>>> trea
On Wed, 21 Oct 2009 05:16:56 -0400, Chris Jones wrote:
>> > Where are the literals (i.e. u'\N{DEGREE SIGN}') defined?
>>
>> You can get them from the unicodedata module, e.g.:
>>
>> import unicodedata
>> for i in xrange(0x1):
>>n = unicodedata.name(unichr(i),None)
>>
Hello:
Would it be okay to post a San Francisco-based contract Python Developer
role on this group list? Here is the link to the URL:
http://docs.google.com/View?id=dtc9xms_77hsrm8pc3.
Unfortunately since the company is in stealth, I can't give out to much info
via email. You can find a bit more
On 2009-10-21 10:50 AM, Yang Yang wrote:
Hello,
I tried to follow the following code demonstrating the use of Pmw.BLT:
>>> from Tkinter import *
>>> import Pmw
>>> master = Tk()
>>> g = Pmw.Blt.Graph( master )
I got the following error message after I typed the last line:
Traceback (most
On Wed, Oct 21, 2009 at 3:28 AM, Processor-Dev1l
wrote:
> On Oct 18, 8:13 am, Toff wrote:
>> On 18 oct, 02:13, geremy condra wrote:
>>
>>
>>
>> > On Sat, Oct 17, 2009 at 7:57 PM, David Robinow wrote:
>> > > On Sat, Oct 17, 2009 at 7:48 PM, geremy condra
>> > > wrote:
>> > >> For the love of b
Hello,
I tried to follow the following code demonstrating the use of Pmw.BLT:
>>> from Tkinter import *
>>> import Pmw
>>> master = Tk()
>>> g = Pmw.Blt.Graph( master )
I got the following error message after I typed the last line:
Traceback (most recent call last):
File "", line 1, in
File
I tried to follow the following code demonstrating the use of Pwm.BLT:
>>> from Tkinter import *
>>> import Pmw
>>> master = Tk()
>>> g = Pmw.Blt.Graph( master )
I got the following error message after I typed the last line:
Traceback (most recent call last):
File "", line 1, in
File "C:\Py
On 2009-10-21 07:11 AM, Carl Banks wrote:
One thing PySide has going against it is the shared library binaries
are a lot larger than PyQT4's, because of its use of boost::python.
Not a good thing for something that exists so that it can be put on a
mobile device.
I believe the consensus amongs
Yep, you can run it without any kind of GUI to my knowledge.
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 21, 6:50 am, Brett wrote:
> I also posted this question to the linux-omap list and received some
> helpful (and timely) assistance. I'm running this on an ARM (omap
> 3530, gumstix). Here is the take-home message (from the omap technical
> reference and reported to me
> herehttp://www.spin
pytart wrote:
> Hello ,
>I have a project to develop a basic character recognition
> module in python using backpropagation and artificial neural networks.
> I would be very helpful if u cud give me some helpful links for the
> project. I am having problems with the implementation part of
Hello ,
I have a project to develop a basic character recognition
module in python using backpropagation and artificial neural networks.
I would be very helpful if u cud give me some helpful links for the
project. I am having problems with the implementation part of the
project, the backprop
On Oct 21, 8:02 am, Carl Banks wrote:
> On Oct 20, 5:03 pm, Brett wrote:
>
>
>
> > I'm trying to read and write from /dev/mem on a linux system using the
> > mmap module. When I run this minimal example:
> > ---
> > import os, mmap
>
> > MAP_MASK = mmap.PAGESIZE - 1
>
Do you have some code that we could see that provokes the problem?
Cheers,
Brian
Joseph Turian wrote:
I was having a mysterious problem with SimpleXMLRPCServer. (I am using
Python 2.5.2)
The request handlers were sometimes failing without any error message
to the log output.
What I discovered
On Oct 20, 6:45 pm, rm wrote:
> On Oct 20, 6:14 pm, Robert Kern wrote:
>
> > On 2009-10-20 16:48 PM, rm wrote:
>
> > > Have you guys heard about PySide:
>
> > >http://www.pyside.org/
>
> > > It is basically the same as PyQt (Qt bindings for Python), but
> > > licensed with the LGPL instead of GPL
On Oct 20, 5:03 pm, Brett wrote:
> I'm trying to read and write from /dev/mem on a linux system using the
> mmap module. When I run this minimal example:
> ---
> import os, mmap
>
> MAP_MASK = mmap.PAGESIZE - 1
>
> addr = 0x48088024
>
> f = os.open("/dev/mem", os.O_RDWR
Mark Dickinson wrote:
On Oct 20, 10:51 pm, Tommy Grav wrote:
I have created a binary file that saves this struct from some C code:
struct recOneData {
char label[3][84];
char constName[400][6];
double timeData[3];
long int numConst;
double AU;
beSTEfar a écrit :
(snip)
> When parsing strings, use Regular Expressions.
And now you have _two_ problems
For some simple parsing problems, Python's string methods are powerful
enough to make REs overkill. And for any complex enough parsing (any
recursive construct for example - think XML, H
kak...@gmail.com a écrit :
Hello,
I would like to make a program that takes a text file with the
following representation:
outlook = sunny
| humidity <= 70: yes (2.0)
| humidity > 70: no (3.0)
outlook = overcast: yes (4.0)
outlook = rainy
| windy = TRUE: no (2.0)
| windy = FALSE: yes (3.
omer azazi writes:
> On 12 أكتوبر, 05:42, TerryP wrote:
> > On Oct 11, 11:25 pm, omer azazi wrote:
> >
> > I appologise if I appear _rude_, but this is comp.lang.python -- it
> > is for the discussion of Python and related projects that were
> > created by men and women. A discussion about fait
"Gabriel Genellina" writes:
> DON'T do that. Really. Changing the default encoding is a horrible,
> horrible hack and causes a lot of problems.
> ...
> More reasons:
> http://tarekziade.wordpress.com/2008/01/08/syssetdefaultencoding-is-evil/
> See also this recent thread in python-dev:
> http://c
On Wed, Oct 21, 2009 at 1:41 PM, catalinf...@gmail.com
wrote:
> I have this error , what happen ?
>
> Python 2.5.2 (r252:60911, Sep 30 2008, 15:41:38)
> [GCC 4.3.2 20080917 (Red Hat 4.3.2-4)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
import md5
pa
catalinf...@gmail.com wrote:
I have this error , what happen ?
Python 2.5.2 (r252:60911, Sep 30 2008, 15:41:38)
[GCC 4.3.2 20080917 (Red Hat 4.3.2-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import md5
pass = md5.new()
File "", line 1
pass = md5.n
On Wed, Oct 21, 2009 at 12:20:35AM EDT, Nobody wrote:
> On Tue, 20 Oct 2009 17:56:21 +, George Trojan wrote:
[..]
> > Where are the literals (i.e. u'\N{DEGREE SIGN}') defined?
>
> You can get them from the unicodedata module, e.g.:
>
> import unicodedata
> for i in xrange(0x100
On Oct 21, 9:18 am, Mark Dickinson wrote:
> On Oct 20, 10:51 pm, Tommy Grav wrote:
>
> > def read_header(cls):
> > hdrData = "84s"*3
> > constNData = "6s"*400
>
> I'm confused: why is this not "400s"*6 rather than "6s"*400?
> Doesn't constName[400][6] mean 6 lots of constN
On 12 أكتوبر, 05:42, TerryP wrote:
> On Oct 11, 11:25 pm, omer azazi wrote:
>
> I appologise if I appear _rude_, but this is comp.lang.python -- it is
> for the discussion of Python and related projects that were created by
> men and women. A discussion about faith does not belong in
> comp.lang.
On Wed, Oct 21, 2009 at 6:11 PM, catalinf...@gmail.com <
catalinf...@gmail.com> wrote:
> >>> pass = md5.new()
> File "", line 1
>pass = md5.new()
> ^
> SyntaxError: invalid syntax
>
pass is a keyword in Python, you can't use it as an identifier.
Try password instead.
Cheers,
Xav
--
On 21 oct, 10:11, "catalinf...@gmail.com"
wrote:
> I have this error , what happen ?
>
> Python 2.5.2 (r252:60911, Sep 30 2008, 15:41:38)
> [GCC 4.3.2 20080917 (Red Hat 4.3.2-4)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.>>>
> import md5
> >>> pass = md5.ne
Emmanuel Surleau a écrit :
Emmanuel Surleau a écrit :
Django : very strong integration, excellent documentation and support,
huge community, really easy to get started with. And possibly a bit more
mature and stable...
One strong point in favour of Django: it follows Python's philosophy of
"bat
Hello,
I would like to make a program that takes a text file with the
following representation:
outlook = sunny
| humidity <= 70: yes (2.0)
| humidity > 70: no (3.0)
outlook = overcast: yes (4.0)
outlook = rainy
| windy = TRUE: no (2.0)
| windy = FALSE: yes (3.0)
and convert it to xml fil
On Oct 20, 10:51 pm, Tommy Grav wrote:
> I have created a binary file that saves this struct from some C code:
>
> struct recOneData {
> char label[3][84];
> char constName[400][6];
> double timeData[3];
> long int numConst;
> double AU;
> doubl
On Oct 20, 11:18 am, ru...@yahoo.com wrote:
> Why *not* answering a question in comp.lang.python
> because you think it is homework is BAD.
>
> 1) It may look like a homework problem to you but it
> probably isn't.
> Seehttp://groups.google.com/group/comp.lang.python/msg/8ac6db43b09fdc92
Homewor
On 10/20/2009 11:48 AM, Falcolas wrote:
> On Oct 20, 11:18 am, ru...@yahoo.com wrote:
>> Why *not* answering a question in comp.lang.python
>> because you think it is homework is BAD.
I got a little over-hyperbolic above and muddied the waters.
More accurately, this should have been, "Why insistin
Why *not* answering a question in comp.lang.python
because you think it is homework is BAD.
1) It may look like a homework problem to you but it
probably isn't.
See http://groups.google.com/group/comp.lang.python/msg/8ac6db43b09fdc92
2) When you publicly accuse someone of "cheating" (and
even
On Tue, 20 Oct 2009 10:18:55 -0700, rurpy wrote:
> 6) Please don't apply your abstract moral standards to
> the entire rest of the world, knowing nothing about the particular
> circumstances of the poster.
Perhaps you should apply this rule to yourself, and stop telling us how
to respond to pe
1 - 100 of 109 matches
Mail list logo