Thank you Larry,
And one more thing to ask,
Will the COM Object be a total solution for my problems? I just try to
make a dll to encapsulate some 'icon and text' files for my
application. Which should get installed in the users system while
installing it. but user should not be able to edit those
I use py2exe to build python program to "aa.exe".
If this program has a bug, after closed this program, it will show
"aa.exe.log" in this folder.
Is there any ways to avoid this log file?
--
http://mail.python.org/mailman/listinfo/python-list
Oren suggested:
> How about using the filesystem as a database? For the number of records
> you describe it may work surprisingly well. A bonus is that the
> database is easy to manage manually.
I tried this for one application under the Windows OS and it worked fine...
until my records (text -
TPJ said unto the world upon 21/06/2005 02:00:
> First I have to admit that my English isn't good enough. I'm still
> studying and sometimes I just can't express what I want to express.
I've graded essays in Philosophy at my university that were written by
native speakers of English yet were sub
Brian van den Broek wrote:
> That suggests implementing the custom installation work in Python, and
> having a bash script that will
>
> 1) determine if there is an existing Python install,
> 2) if there is not, install Python in the standard way,
> 3) using the now guaranteed to be there instal
On 6/21/05, Austin <[EMAIL PROTECTED]> wrote:
> I use py2exe to build python program to "aa.exe".
> If this program has a bug, after closed this program, it will show
> "aa.exe.log" in this folder.
> Is there any ways to avoid this log file?
It's probably best just have a try/except at the very to
here's the Python spec for the Table function:
'''Table(f,[iStart,iEnd,iStep]) returns a list of f applied to the
range range(iStart,iEnd,iStep).
Example: Table(f,[3,10,2]) returns [f(3),f(5),f(7),f(9)]
Table(f,[iStart,iEnd,iStep], [jStart,jEnd,jStep], ...) returns a nested
list of f(i,j,...)
[EMAIL PROTECTED] wrote:
> Gruëzi, Gerald ;-)
>
> Well, ok, but I don't understand why I should first convert a pure
> unicode string into a byte string.
> The encoding ( here, latin-1) seems an arbitrary choice.
Yes. The correct choice would be 'cp1252', not 'latin-1',
since that's what your loc
On 6/12/05, Steve Jorgensen <[EMAIL PROTECTED]> wrote:
> Oops - I thought I cancelled that post when I relized I was saying nothing,
Would that everyone cancelled their posts when they realised that they
weren't saying anything. ;-)
--
Cheers,
Simon B,
[EMAIL PROTECTED],
http://www.brunningonlin
On 20 Jun 2005 22:24:09 -0700, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> Hello all,
...
> I hope somebody will help
> me in this regard to unfold this mystery.Bye.
I hope you will explain how this is related to Python.
- kv
--
http://mail.python.org/mailman/listinfo/python-list
On 20 Jun 2005 23:56:50 -0700, Sabin.A.K <[EMAIL PROTECTED]> wrote:
>
> Will the COM Object be a total solution for my problems? I just try to
> make a dll to encapsulate some 'icon and text' files for my
> application.
Are you trying to create a windows resource dll? I believe Python
isn't the t
On 6/15/05, Peter Hansen <[EMAIL PROTECTED]> wrote:
> __repr__ shouldn't be anything, if you don't have an actual need for it.
> Neither should __str__.
Oh, I don't know. __str__ is so frequently useful in debugging and
logging that I always try and do something useful with it.
--
Cheers,
Simo
"praba kar" wrote:
> In Php the following headers base we can clean
> the cache in the url "header('Cache-Control:
> no-store, no-cache, must-revalidate'); "
> I want to know Php equivalent headers in Python-cgi
> If anybody know regarding this kindly mail me.
did you try
print 'Cache
On Mon, 20 Jun 2005 23:42:21 -0800, EP wrote:
> until my records (text - maybe 50KB average) unexpectedly blossomed into
> the 10,000-1,000,000 ranges. If I or someone else (who innocently doesn't
> know better) opens up one of the directories with ~150,000 files in it,
> the machine's personalit
Dear people,
We have an application that makes use of a ZEO client and has other async
socket code that implements
as POP3 proxy. The ZEO client is called (to query and store ZEO server) from
within the proxy code when it runs during mail checks, so we have multiple
async connections at the sa
Dear people,
We have an application that makes use of a ZEO client and has other async
socket code that implements
as POP3 proxy. The ZEO client is called (to query and store ZEO server) from
within the proxy code when it runs during mail checks, so we have multiple
async connections at the sa
bill wrote:
>>I have to learn Python in a hurry.
>
> My apologies. I found what I needed. I don't understand it how
> I missed it in my first round of searching.
I don't know what you found, but I think you would
appreciate Martelli's "Python in a Nutshell". For
the really, really terse versi
Hello alltogether,
I hope somebody can help me in that case. I bet I have overseen s.th..
I have a VC++ IDispatch Com-Server (ATL) and include for error handling
issues a enumeration in the IDL-File.
[...]
enum PROG_ERROR {
P_OK = 0,
P_ERR_01 = 1,
P_ERR_02 = 2,
.
On Tue, 21 Jun 2005 01:33:06 GMT, rumours say that Benjamin Rutt
<[EMAIL PROTECTED]> might have written:
>I note that the help() function of interactive python can determine
>all available modules:
>I want to do the same (get all such modules in a python list); how can
>I do so? Or where is th
Remi Villatel wrote:
> while True:
> some(code)
> if final_condition is True:
> break
> #
> #
>
> What I don't find so "nice" is to have to build an infinite loop only to
> break it.
This is a common Python idiom. I think you will get used to it.
> Is there a better recipe?
Hi datacide,
before, the good part...: thank you for your replay. Your suggestion
has opened me a new worldl: an alternative method to get web
resources.
Now the bad part: your is an example of "guru's suggestion", that is a
few words from which the poor newbye can't exctract much. It is much
mor
On Tue, 21 Jun 2005 00:08:03 +0100, Tim Williams (gmail) <[EMAIL PROTECTED]>
wrote:
...
> For quick and simple removal of the extra space, append a '\b'
> backspace character to your output "string"
For things that are only ever to be viewed on the terminal, yes.
But this does, of course, print
On 6/21/05, Alexander Eisenhuth <[EMAIL PROTECTED]> wrote:
> Hello alltogether,
>
> I hope somebody can help me in that case. I bet I have overseen s.th..
>
> I have a VC++ IDispatch Com-Server (ATL) and include for error handling
> issues a enumeration in the IDL-File.
>
> [...]
> enum PROG_ERR
is it possible to eval a string like the following?
m='''
i0=[0,1]
i1=[2,3]
i2=[4,'a']
h0=[]
for j0 in i0:
h1=[]
for j1 in i1:
h2=[]
for j2 in i2:
h2.append(f(j0,j1,j2))
h1.append( h2[:] )
h0.append( h1[:] )
return h0'''
perhaps i'm tired, but why can't i run:
t='m=3'
pr
Another question could be: why is there not a statement "whileTrue" or "loop"?
For exemple:
whileTrue:
statement 1
if condition:
break
statement 2
It could be an economy of one unuseful test by loop.On 6/21/05, Magnus Lycka <[EMAIL PROTECTED]> wrote:
Remi Villate
Benjamin Rutt wrote:
> I want to do the same (get all such modules in a python list); how can
> I do
> so? Or where is the code for the REPL for help() itself so I can
> find out myself?
Get hold of the Python source code and grep for some (hopefully) selective
piece of text. In the case of hel
qwwee:
> for a certain argument I'd prefer an application fully
>explained (also if not covering all the features) to a more general
>tutorial with only brief and unrelated code snippets.
>Unfortunately, that's not the way things are normally done, because it
>is much harder to build a useful appli
Chinook wrote:
> I understand what you are saying. The point I'm messing up my head with
> though, is when the entity (tree node in my case or variable record content
> deconstructing in the aspect example I noted) is not an instance of a class
> already - it is obtained from an external source
> the doc seems to suggest that eval is only for expressions... it says
> uses exec for statements, but i don't seem to see a exec function?
Python 2.4 (#1, Dec 30 2004, 08:00:10)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin
Type "help", "copyright", "credits" or "license" for mo
On 17 Jun 2005 06:26:50 -0700, George Sakkis <[EMAIL PROTECTED]> wrote:
> During the last 18 months or so I have indulged in the joy of learning
> and using python for almost everything, but I may have to go back to
> C/C++ at work. Suddenly I found myself transliterating (or translating
> at least
How do I delete a class instance created using PyInstance_New? I've tried
calling Py_CLEAR on the instance, but __del__ isn't called. I've also tried
calling PyObject_Del, but this gives an access violation in
_PyObject_DebugDumpAddress so I guess that ain't a good idea :)
I've noticed that the
Simon Brunning wrote:
> On 6/15/05, Peter Hansen <[EMAIL PROTECTED]> wrote:
>>__repr__ shouldn't be anything, if you don't have an actual need for it.
>> Neither should __str__.
>
> Oh, I don't know. __str__ is so frequently useful in debugging and
> logging that I always try and do something use
Xah Lee wrote:
> the doc seems to suggest that eval is only for expressions... it says
> uses exec for statements, but i don't seem to see a exec function?
Because it's a statement: http://docs.python.org/ref/exec.html#l2h-563
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 21 Jun 2005 12:06:47 GMT
"Bue Krogh Vedel-Larsen" <[EMAIL PROTECTED]> wrote:
> How do I delete a class instance created using PyInstance_New? I've tried
> calling Py_CLEAR on the instance, but __del__ isn't called. I've also tried
> calling PyObject_Del, but this gives an access violatio
I wrote the following module to test the behavior of PyInstance_New. I
called it something like this:
import vedel
class k:
def __del__(self): print "deleted"
vedel.g(k)
I get output like:
after creation, x->refcnt = 1
doing decref
deleted
after decref
Unles
Cyril BAZIN wrote:
> Another question could be: why is there not a statement "whileTrue" or
> "loop"?
I don't think the saving of a single space to transform "while True:"
into "WhileTrue:" is really worth it. The same goes for "loop", the
added complexity to the language (as little as it is)
On Tue, Jun 21, 2005 at 08:13:47AM -0400, Peter Hansen wrote:
> Xah Lee wrote:
> > the doc seems to suggest that eval is only for expressions... it says
> > uses exec for statements, but i don't seem to see a exec function?
>
> Because it's a statement: http://docs.python.org/ref/exec.html#l2h-563
On Mon, 20 Jun 2005 17:23:27 -0700, James Stroud wrote:
> By the way, ignore any posts talking about speed of execution. This is
> generally a non-issue for new programmers. If you want your code to run
> faster, buy a faster computer.
Oooh, red rag to a bull.
Not everybody can afford to buy a
Europython 2005 will start on Monday 27 June!
If you haven't preregistered for Europython 2005, you still have
a few hours to do so. You can register and pay by credit card
until 21 June 18.00 CEST. Payment by SWIFT/IBAN is closed, since
we would not receive your payment before the conference sta
Leo 4.3.1 final is now available at http://sourceforge.net/projects/leo/
This is a bug fix release, with the following new features:
- Added support for Tk resource files.
- Added support for coloring the PL/SQL language.
- All Mark commands are now undoable.
- Improved Resize To Screen command.
the example in the spec of previous post is wrong. Here's corrected
version:
here's the Python spec for the Table function:
'''Table(f,[iStart,iEnd,iStep]) returns a list of f applied to the
range range(iStart,iEnd,iStep). Example: Table(f,[3,10,2]) returns
[f(3),f(5),f(7),f(9)] Table(f,[iStart,
Thanks, you are right!
On 6/20/05, Konstantin Veretennicov <[EMAIL PROTECTED]> wrote:
> > > type="image/svg+xml" name="wmap" wmode="transparent">
>
> Works for me...
--
http://www.spreadfirefox.com/?q=affiliates&id=24672&t=1";>La
web sin popups ni spyware: Usa Firefox en lugar de Internet
Ex
harold fellermann wrote:
> >>> s="print 'hello Xah Lee :-)'"
> >>> exec(s)
> hello Xah Lee :-)
Note that because "exec" is a statement, the parentheses above are
superfluous.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Hello people! I think it is my first message here.
Well, I would go to start a Delphi database program, but now my client
want a program that runs in Linux. So I want to know your opinion:
what best language/IDE I can use for my purposes? I need mainly:
MySQL or Potsgree SQL ***remote connection*
> [Å@ [Å. [Å,©Ä@ ©Ä. ©Ä etc.
This looks like UTF-8 encoding
Beat
--
mail: echo '<[EMAIL PROTECTED]>' | tr -d '[A-S]'
pgp: 0x506A903A; 49D5 794A EA77 F907 764F D89E 304B 93CF 506A 903A
gsm: 4.7.7.6.0.7.7.9.7.1.4.e164.arpa
icbm: 47.0452 N, 7.2715 E
"It takes love over gold, and mind over matt
Aziz McTang wrote:
> What I'm looking for is more to learn one good, comprehensive
> programming language well than several approximately on an ad hoc
> basis. What I also failed to mention is the desire to develop my
> presently limited computer skills a lot further.
I've programmed in perhaps 20
On Mon, 20 Jun 2005 23:42:21 -0800, EP <[EMAIL PROTECTED]> wrote:
> Oren suggested:
>
>> How about using the filesystem as a database? For the number of records
>> you describe it may work surprisingly well. A bonus is that the
>> database is easy to manage manually.
>
> I tried this for one appl
Jeff Epler <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
>
> Unless there's a cycle and GC gets involved, all there is to deleting
> *anything* in Python is correctly managing the refcount. On the other
> hand, you can never free an object while it is still reachable. Some
> local name
Thanks, thats it.
Konstantin Veretennicov schrieb:
import myserver
print myserver.constants. P_OK
> 0
>
> Maybe you can access constants without makepy, I don't know.
>
> - kv
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 21 Jun 2005 12:05:25 +0200, Magnus Lycka <[EMAIL PROTECTED]> wrote:
> Remi Villatel wrote:
>> while True:
>> some(code)
>> if final_condition is True:
>> break
>> #
>> #
>>
>> What I don't find so "nice" is to have to build an infinite loop only to
>> break it.
>
> Th
PyQt for example will do all this + Python but the desition is not that
easy
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello people! I think it is my first message here.
>
> Well, I would go to start a Delphi database program, but now my client
> want a program that runs
[EMAIL PROTECTED] wrote:
> MySQL or Potsgree SQL ***remote connection***(it's the most important).
> GUI interface.
> Report generator.
> Barcode printing.
I've done all of these very successfully in Python.
> Maybe PyGTK can do it for me? What do you think?
I've never used PyGTK, but it looks n
TPJ schrieb:
> First I have to admit that my English isn't good enough. I'm still
> studying and sometimes I just can't express what I want to express.
No excuses, please! Keep in mind that your English is much better than
the Polish of most of us. And just in case you were fishing for
compliments
Xah Lee wrote:
> '''Table(f,[iStart,iEnd,iStep]) returns a list of f applied to the
> range range(iStart,iEnd,iStep). Example: Table(f,[3,10,2]) returns
> [f(3),f(5),f(7),f(9)] Table(f,[iStart,iEnd,iStep],
> [jStart,jEnd,jStep], ...) returns a nested list of f(i,j,...) applied
> thru the iterator
>> __repr__ shouldn't be anything, if you don't have an actual need for
>> it. Neither should __str__.
Simon> Oh, I don't know. __str__ is so frequently useful in debugging
Simon> and logging that I always try and do something useful with it.
And sometimes __repr__ inherited fro
Really? I see Python is very good general-purpose language. I studing
TCL, C++ and Java too.
And remote conection? Do you know something?
Thank you very much! Bye!
--
http://mail.python.org/mailman/listinfo/python-list
Cathy Hui wrote:
> I am trying to install MySQL-Python 0.9.1 on my Solaris 8 system. The
> system has Python 2.3.3 and Mysql 4.0.21 installed.
You're wasting your time. Use MySQL-python-1.2.0.
--
http://mail.python.org/mailman/listinfo/python-list
On 6/21/05, Chinook <[EMAIL PROTECTED]> wrote:
>
> When I create the code objects though, it seems a couple different ways work
> and I'm wondering which is better and why (or is there a more correct
> technique in this situation)?
>
> The two different ways are illustrated below:
...
> >>> obj1
On 6/21/05, Charles Krug <[EMAIL PROTECTED]> wrote:
>
> Related question:
>
> What if I need to create/modify MS-Access or SQL Server dbs?
You could use ADO + adodbapi for both.
http://adodbapi.sourceforge.net/
- kv
--
http://mail.python.org/mailman/listinfo/python-list
Remi Villatel wrote:
> There is always a "nice" way to do things in Python but this time I can't
> find one.
>
> What I'm trying to achieve is a conditionnal loop of which the condition
> test would be done at the end so the loop is executed at least once. It's
> some way the opposite of "while".
Benji York wrote:
> If by "economy" you mean "optimization", then I would suggest that the
> difference would be unnoticeable.
If there is a measurable performance gain in skipping the runtime
test in "while True", then this is a compiler issue, not a language
issue. I don't know anything about t
Hi,
I have the following problem.
I'm developing a GUI program (wxPython). This program has to comunicate
(TCP) whit other program that controls a laboratory machine to do a
measurement. I have a dialog box, wiht two buttoms "Start measurement" and
"Stop". "Start" executes a function that do the
Hi,
I have a small problem: I have a WSDL file where different functions are
described. It worked perfectly until I have a function which has a
return-value named "return":
Here is my program:
--- cut here ---
from SOAPpy import WSDL
wsdlFile = 'mypbx.wsdl'
server = WSDL.Proxy(wsdlFile
> I think this seems to be a problem due to the use of a forbidden word. But I
> have no chance to change the WSDL definition, so: How can I get the
> variable resp.return? Any suggestions?
To get it: getattr(resp, 'return')
To set it: setattr(resp, 'return', value)
--
Brian Beck
Adventurer of th
I am looking for a function that takes an input string
and a pattern, and outputs a dictionary.
# @param s str, lowercase letters
# @param p str, lowercase and uppercase letters
# @return dict
def fill(s, p):
d = {}
return d
String s has characters from the lowercase letters.
Str
On 21 Jun 2005 06:51:16 -0700, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
said:
> Really? I see Python is very good general-purpose language. I studing
> TCL, C++ and Java too.
>
> And remote conection? Do you know something?
>
You mean connecting to a database from a remote machine?
Most (probabl
Brian Beck wrote:
>> I think this seems to be a problem due to the use of a forbidden word.
>> But I have no chance to change the WSDL definition, so: How can I get the
>> variable resp.return? Any suggestions?
>
> To get it: getattr(resp, 'return')
> To set it: setattr(resp, 'return', value)
>
"Magnus Lycka" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> James wrote:
> > The brain may be fine for generating Python from UML but it is MANY
> > MANY orders of magnitude harder to generate UML from code with just
> > your brain than using a tool (usually zero effort and error
For my database, I have a table of user information with a unique
identifier, and then I save to the filesystem my bitmap files, placing the
unique identifier, date and time information into the filename. Why stick a
photo into a database?
For instance:
User Table:
uniqueID: 0001
lNane: Rose
fNa
On 6/21/05, Magnus Lycka <[EMAIL PROTECTED]> wrote:
> I don't know anything about the Python compiler internals,
> but it doesn't seem very hard to identify simple literals following
> while and if, and to skip the runtime test. (Perhaps it's done
> already?)
True doesn't seem to be a literal, it
Oops, the 3rd test should be
fill('bb', p='Aa')
resulting in the empty dict {} because no binding for A can be found.
--
http://mail.python.org/mailman/listinfo/python-list
On Tuesday 21 June 2005 14:22, Zunbeltz Izaola wrote:
> This comunication is done in a new thread not to frezee the GUI.
> The problem is that when "Stop" is done (it kills the thread) some
> confirmation sockets are mixed (are not receibed in the correct order
> although i use tcp).
I guess you
Tim Peters a écrit :
> All versions of Windows >= Win95 use threads heavily, have very solid
> thread support, and the Win32 API was thread-aware from the start
> Thread _scheduling_ is pretty bizarre <= WinME, but process scheduling
> is too. Don't try to use hundreds of threads <= WinME and yo
Xah Lee wrote:
> here's the Python spec for the Table function:
...
> References:
>
> • for a context of this message, see: http://xahlee.org/tree/tree.htm
Here is a Scheme implementation of Table. As noted on your web page and the
Mathematica documentation, the first argument of Table "evaluat
GMane Python wrote:
> For my database, I have a table of user information with a unique
> identifier, and then I save to the filesystem my bitmap files, placing the
> unique identifier, date and time information into the filename. Why stick a
> photo into a database?
There are various possible re
Hi,
When trying to import the WMI module in a Python Windows Service, I get
the following:
dynamic module does not define init function (initwmi)
The WMI version is 0.6. Python 2.4 on Win32, Python Win32 extensions
version 203
Code below,
Cam.
def SvcDoRun(self):
import servi
Removing cross-posts to java and scheme lists.
On Tue, 21 Jun 2005 01:54:40 -0700, Xah Lee wrote:
> here's the Python spec for the Table function:
>
> '''Table(f,[iStart,iEnd,iStep]) returns a list of f applied to the
> range range(iStart,iEnd,iStep).
> Example: Table(f,[3,10,2]) returns [f(
On Tue, 21 Jun 2005 15:30:41 +0100, Toby Dickenson wrote:
> On Tuesday 21 June 2005 14:22, Zunbeltz Izaola wrote:
>
>
> I guess you are accessing the socket from both your GUI thread and
> communications thread. Dont do that. An action in the GUI thread should
> signal the communictions thread
Konstantin Veretennicov wrote:
> On 6/21/05, Magnus Lycka <[EMAIL PROTECTED]> wrote:
>
>>I don't know anything about the Python compiler internals,
>>but it doesn't seem very hard to identify simple literals following
>>while and if, and to skip the runtime test. (Perhaps it's done
>>already?)
>
Zunbeltz Izaola wrote:
> I'm developing a GUI program (wxPython). This program has to comunicate
> (TCP) whit other program that controls a laboratory machine to do a
> measurement. I have a dialog box, wiht two buttoms "Start measurement" and
> "Stop". "Start" executes a function that do the measu
"Xah Lee" schrieb
>
> perhaps i'm tired, but why can't i run:
>
> t='m=3'
> print eval(t)
>
Perhaps you didn't read the documentation? :-)
Perhaps you didn't try hard enough?
C:\WINNT>c:\programme\python\python
Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)]
on win32
Type "hel
Magnus Lycka wrote:
> Konstantin Veretennicov wrote:
>
>> On 6/21/05, Magnus Lycka <[EMAIL PROTECTED]> wrote:
>>
>>> I don't know anything about the Python compiler internals,
>>> but it doesn't seem very hard to identify simple literals following
>>> while and if, and to skip the runtime test. (P
Joost Jacob wrote:
> I am looking for a function that takes an input string
> and a pattern, and outputs a dictionary.
Here is one way. I won't say it's pretty but it is fairly straightforward and
it passes all your tests.
Kent
def fill(s, p):
"""
>>> fill('ab', p='aA')
{'A': 'b'}
[EMAIL PROTECTED]
| Hi,
|
| When trying to import the WMI module in a Python Windows
| Service, I get
| the following:
|
| dynamic module does not define init function (initwmi)
|
| The WMI version is 0.6. Python 2.4 on Win32, Python Win32 extensions
| version 203
This is almost certainly
[Tim Williams]
>>For quick and simple removal of the extra space, append a '\b'
>>backspace character to your output "string"
[Jorgen Grahn]
> For things that are only ever to be viewed on the terminal, yes.
> But this does, of course, print an actual backspace character.
> If you feed this outpu
> From: "Paul Rubin" "http://phr.cx"@NOSPAM.invalid
>> "Matthias Kluwe" <[EMAIL PROTECTED]> writes:
>> After getting a @gmail.com address, I recognized I had to use TLS in my
>> python scripts using smtplib in order to get mail to the smtp.gmail.com
>> server.
>> [...]
>> The server accepts and
Here's a hybrid solution, using pyparsing to parse your input pattern
string (p), and transforming it into a regexp string. Then uses
re.match using the regexp to process string (s), and then builds a
dictionary from the matched groups.
Download pyparsing at http://pyparsing.sourceforge.net.
--
i have the following code:
c=chr(169)+" some text"
how can i utf8 encode the variable above ?
something like in php utf8_encode($var);?!
chr(169) is the © (c) sign !
10x for your help !
p.s.: i tryed using codecs, etc but always get an error message
like: 'ascii' codec can't decode byte 0xa9 i
- Original Message -
From: "Matthias Kluwe" <[EMAIL PROTECTED]>
> > Have you verified that its your end that is broken, not gmail's, do
other
> > servers give the same response ?
>
> No, I have not -- I should have, as I know now: Connecting, starttls,
> login and sending mail works fin
On 21 Jun 2005 08:39:02 -0700, Matthias Kluwe <[EMAIL PROTECTED]> wrote:
>> From: "Paul Rubin" "http://phr.cx"@NOSPAM.invalid
>
>>> "Matthias Kluwe" <[EMAIL PROTECTED]> writes:
>>> After getting a @gmail.com address, I recognized I had to use TLS in my
>>> python scripts using smtplib in order to g
Salut, Catalin
You can first convert your c string to unicode, and in the process
specify an encoding that understands non-ASCII characters (if you don't
specify an encoding, it will try to use your default, which is most
likely ASCII, and you'll get the error you mentioned.). In the
following exa
Guys,
Thanks, that was all information that I wanted to hear. I have a
Cirrus Logic Linux port for the ARM9. I've no idea what the code
base is, I've not figured that out yet. I should just need to re-
compile on the platform.
thanks,
DLC
--
Catalin Constantin wrote:
> i have the following code:
>
> c=chr(169)+" some text"
>
> how can i utf8 encode the variable above ?
> something like in php utf8_encode($var);?!
>
> chr(169) is the © (c) sign !
>
> 10x for your help !
>
> p.s.: i tryed using codecs, etc but always get an error me
Grig Gheorghiu wrote:
import codecs
print codecs.encode(c, 'utf-8')
>
> © some text
Or simply:
py> print c.encode('utf-8')
© some text
--
http://mail.python.org/mailman/listinfo/python-list
I’m new to the list. I work for a US Gov’t
agency & have been learning Python. I’ve been doing web development
work for some years now & got involved with Python/Zope/Plone last fall. I’ve
had formal Zope/Plone training. I’ve also been working my way through
Deitel’s “Python How to Program”
Michele Simionato said unto the world upon 21/06/2005 07:58:
> qwwee:
>
>>for a certain argument I'd prefer an application fully
>>explained (also if not covering all the features) to a more general
>>tutorial with only brief and unrelated code snippets.
>>Unfortunately, that's not the way things
If you want to work with unicode, then write
us = u"\N{COPYRIGHT SIGN} some text"
You can also write this as
us = unichr(169) + u" some text"
When you have a Unicode string, you can convert it to a particular
encoding stored in a byte string with
bs = us.encode("utf-8")
It's gen
Practical Python is quite a good book. And to re-iterate again, teh
humongous tutorial list which has Hetland's Instant python among
others:
http://www.awaretek.com/tutorials.html
Brian van den Broek wrote:
> Michele Simionato said unto the world upon 21/06/2005 07:58:
> > qwwee:
> >
> >>for a c
The July/August 2005 issue of Computing in Science & Engineering has an
article by Michael Tobis about PyNSol (slides from the talk at
http://geosci.uchicago.edu/~tobis/PS0/PS3.html ). It appears to be a
code generation tool that takes a few equations specified by the user
and translates them to Py
I guess I use databases to store data ;-) and I do not wish to worry
about the type of data I'm storing. That's why I love to pickle.
I understand that during an optimization phase, decisions might be taken to
handle data otherwise.
Regards,
Philippe
GMane Python wrote:
> For my databa
1 - 100 of 141 matches
Mail list logo