Hallöchen!
At http://pyvisa.sourceforge.net you can find information about the
PyVISA package. It realises Python bindings for the VISA library
functions, which enables you to control GPIB, USB, and RS232-serial
measurement devices via Python.
Yesterday I released version 1.1, which works much
Ever wonder what Guido has been doing at Google? Now is your chance
to find out!
Guido has worked at Google for nearly a year. He splits his time
between working on Python and working on Google projects. He will be
giving a presentation and demo on Nov 30, 2006. I won't spoil it, but
this
Tonight November 23 from 6:30-8:30 pm, there will be a social
gathering of Sydney Python Users Group and any individuals interested
in discussing Python, Web, Zope, Plone, Ruby, Perl etc over drinks.
Laptops, code review etc allowed.
We will meet on the ground floor next to the internal
entrance
One resource you should always keep at hand is this extremely useful
Quick Reference:
http://rgruet.free.fr/PQR24/PQR2.4.html
Study it carefully, there is a lot in there that can teach you about
how Python works. Fire up IPython as well and start hacking!
2B
--
[EMAIL PROTECTED] wrote:
I need to do a quadratic optimization problem in python where the
constraints are quadratic and objective function is linear.
What are the possible choices to do this.
Too bad these homework assignments get trickier every time, isn't it?
Stefan
--
EXI-Andrews, Jack wrote:
the '*' and '+' don't seem to be greedy.. they will consume less in
order to match a string:
import re;re.match('(a+)(ab)','aaab').groups()
('aa', 'ab')
this is the sort of behaviour i'd expect from
'(a+?)(ab)'
a+ should greedily consume a's at the expense
walterbyrd wrote:
1) Can attributes can added just anywhere? I create an object called
point, then I can add attributes any time, and at any place in the
program?
in general, yes, but that should be done sparingly.
2) Are classes typically created like this:
class Point:
pass
Then
Noah Rawlins wrote:
I'm a nut for regular expressions and obfuscation...
import re
def splitline(line, size=4):
return re.findall(r'.{%d}' % size, line)
splitline(helloiamsuperman)
['hell', 'oiam', 'supe', 'rman']
there are laws against such use of regular expressions in
Hi ALL,
I am a newbee programmer and started of with python recently. I am
trying write a script which backups outlook (.pst ) files everytime I
shutdown my system. I have writtern following code after some findings
on net. My .pst file path is as follows
c:\documents and settings\060577\Local
Klaus Alexander Seistrup wrote:
Decorate-sort-undecorate?
#v+
array = []
for addr in Emails:
(user, domain) = addr.split('@')
array.append((domain, user, addr))
# end for
array.sort()
SortedEmails = [addr for (user, domain, addr) in array]
#v-
note that DSU is built
Hi to all,
i am not sure if this question really belongs here but anyway, here it
goes: I have seen a lot of IDEs for Python, a lot of good stuff but
actually none of them has what, for example, Visual Studio has: a
Visual Editor (with the ability to place controls on forms etc etc),
or RAD
I
Fredrik Lundh schrieb:
Noah Rawlins wrote:
I'm a nut for regular expressions and obfuscation...
import re
def splitline(line, size=4):
return re.findall(r'.{%d}' % size, line)
splitline(helloiamsuperman)
['hell', 'oiam', 'supe', 'rman']
there are laws against such use of
I have a home-grown Wiki that I created as an excercise, with it's own
wiki markup (actually just a clone of the Trac wiki markup). The wiki
text parser I wrote works nicely, but makes heavy use of regexes, tags
and stacks to parse the text. As such it is a bit of a mantainability
nightmare -
k.i.n.g. wrote:
how can i make the following code work, I have probelm with filepath
declaration.
http://effbot.org/pyfaq/tutor-i-need-help-im-getting-an-error-in-my-program-what-should-i-do
/F
--
http://mail.python.org/mailman/listinfo/python-list
I've just seen that gopherlib is deprecated in python 2.5
http://docs.python.org/lib/module-gopherlib.html
we still use this protocol (though there are only few working gopher
servers are left on the net)
My friend just wrote a standard compliant gopher server (pygopherd had
some problems oslt)
| c:\documents and settings\060577\Local Settings\Application
| Data\Microsoft\Outlook
| where 060577 represents username. I want my script to
| identigy the user
| logged in and go to the resp outlook folder or should be able to read
| outlook store directory path from registry and the copy
k.i.n.g. wrote:
Hi ALL,
I am a newbee programmer and started of with python recently. I am
trying write a script which backups outlook (.pst ) files everytime I
shutdown my system. I have writtern following code after some findings
on net. My .pst file path is as follows
c:\documents and
On Tue, 21 Nov 2006 21:00:02 -0800, John Machin wrote:
Steven D'Aprano wrote:
[snip]
def running_sum(dw):
Return a list of the running sums of sequence dw
rs = [0]*len(dw)
for i in range(len(dw)):
rs[i] = dw[i] + rs[i-1]
Please explain to the newbies why there is
Steven D'Aprano wrote:
On Tue, 21 Nov 2006 21:00:02 -0800, John Machin wrote:
Steven D'Aprano wrote:
[snip]
def running_sum(dw):
Return a list of the running sums of sequence dw
rs = [0]*len(dw)
for i in range(len(dw)):
rs[i] = dw[i] + rs[i-1]
Please
On Wed, 22 Nov 2006 02:28:04 -0800, John Machin wrote:
Steven D'Aprano wrote:
On Tue, 21 Nov 2006 21:00:02 -0800, John Machin wrote:
Steven D'Aprano wrote:
[snip]
def running_sum(dw):
Return a list of the running sums of sequence dw
rs = [0]*len(dw)
for i in
Hi list,
I have an awk program that parses a text file which I would like to
rewrite in python. The text file has multi-line records separated by
empty lines and each single-line field has two subfields:
node 10
x -1
y 1
node 11
x -2
y 1
node 12
x -3
y 1
and this I would like to parse into a
[... snip ...]
| ---
| how can i make the following code work, I have probelm with filepath
| declaration.
| ---
| import os, shutil
| filepath = ' C:\\Documents and Settings\\060577\\Local
|
walterbyrd wrote:
Reading Think Like a Computer Scientist I am not sure I understand
the way it describes the way objects work with Python.
1) Can attributes can added just anywhere? I create an object called
point, then I can add attributes any time, and at any place in the
program?
Apart
Thank You all for reply's so far
code
import os, sys
from win32com.shell import shell, shellcon
local_app_data = shell.SHGetSpecialFolderPath (0,
shellcon.CSIDL_LOCAL_APPDATA)
outlook_path = os.path.join (local_app_data, Microsoft, Outlook)
print outlook_path
/code)
The above code
Hi
I'm trying to write a Python script to receive and save a file on a web
server that has been POST'ed from a client application.
In essence, this is similar to handling a file upload from an HTML
form. However, I can't use:
form = cgi.FieldStorage()
fileitem = form['file']
since the file is
king kikapu wrote:
Hi to all,
i am not sure if this question really belongs here but anyway, here it
goes: I have seen a lot of IDEs for Python, a lot of good stuff but
actually none of them has what, for example, Visual Studio has: a
Visual Editor (with the ability to place controls on
k.i.n.g. wrote:
[snip code]
The above code was fine while printing, when I am trying to use this
(outlook_path) to use as source path it is giving file permission error
can you please clarify this
Did you follow the link that Fredrik Lundh gave you?
/MiO
--
I've to modifying a file, then I use a method imported that access to
that file and has to read the new data, but they are not read ( as if
the data were not flushed at the moment even using .close()
explicitly).
---
...
...
# If it is not
Hi ,
I am sorry I am providing the code i used as it is. Being newbee to
programming I have tinkerd with various options i found on the net.
start of the code
| code
| import os, sys
| from win32com.shell import shell, shellcon
|
| local_app_data = shell.SHGetSpecialFolderPath (0,
| shellcon.CSIDL_LOCAL_APPDATA)
| outlook_path = os.path.join (local_app_data, Microsoft, Outlook)
|
| print outlook_path
|
| /code)
|
|
| The above code was fine
I am writing a plugin for a piece of software in python, and I want to
start up a PyQt GUI in the plugin, without stalling the main thread
while the gui is running (later i will want to pass messages between
the main thread and the gui thread).
I'm new to pyqt, so I'm probably doing something
Hi all!
I have a problem with the module subprocess!
The problem is that the external software that I am running under
subprocess.Popen opens stdin, stdout, stderr, and other file descriptors to
write and read in the hard drive.
I know how to capture stdin, stdout and stderr, what I cannot do is
| I am sorry I am providing the code i used as it is. Being newbee to
| programming I have tinkerd with various options i found on the net.
Thanks. That makes it a lot easier
[... snip ...]
| source = outlook_path
| #source = outlook_path +'\\*'
| print source
[...]
| win32file.CopyFile
hmmm,,,ok, i see your point.
As i understand it, as a newcomer, it is a little cumbersome to right
the code in one ide,
glue the UI from another toll and all that stuff.
I know it works but if someone is coming from VS.Net, it seems a little
strange, at first.
I also saw that the wxWidgets is
Daniel Nogradi wrote:
I have an awk program that parses a text file which I would like to
rewrite in python. The text file has multi-line records separated by
empty lines and each single-line field has two subfields:
node 10
x -1
y 1
node 11
x -2
y 1
node 12
x -3
y 1
and this
I'd like to use XSV for validating an XML file in Python.
I am working on Linux Debian platform.
I'm not sure how to install XSV and how to configure it. My goal is to
be able to import the XSV library in Python and be able to use it's
functions.
XSV v2.10 for Debian available here:
Hi all,
I have an application that is using embedded python to offer some
scripting ability. An API is exposed via SWIG, and I am accessing that
API from my embedded python interpreter.
Scripts are present as separate files, and I'm invoking them at present
using the following:
iserr =
On Wednesday 22 November 2006 12:37 pm, anders wrote:
I am writing a plugin for a piece of software in python, and I want to
start up a PyQt GUI in the plugin, without stalling the main thread
while the gui is running (later i will want to pass messages between
the main thread and the gui
Fredrik Lundh wrote:
note that DSU is built into Python these days:
L.sort(key=transform)
Sweet, thanks for the hint.
Cheers,
--
Klaus Alexander Seistrup
http://klaus.seistrup.dk/
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
I'd like to use XSV for validating an XML file in Python.
I am working on Linux Debian platform.
I'm not sure how to install XSV and how to configure it. My goal is to
be able to import the XSV library in Python and be able to use it's
functions.
You can use dpkg to
Ant wrote:
So I thought I'd look into the pyparsing module, but can't find a
simple example of processing random text.
Have you looked at the examples on the pyparsing web page?
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
No particular reason for XSV
I just want to validate XML files against an XML schema through Python.
If you can suggest any other package for debian, I'll be glad to try
it.
Michel
Stefan Behnel wrote:
[EMAIL PROTECTED] wrote:
I'd like to use XSV for validating an XML file in Python.
I am
Hi
Having a method:
def method(self,x,y):
is it possible to discover, from outside the method, that the methods
arguments are ['self', 'x', 'y']?
Thanks.
/Martin
--
http://mail.python.org/mailman/listinfo/python-list
Stefan Behnel wrote:
[EMAIL PROTECTED] wrote:
I need to do a quadratic optimization problem in python where the
constraints are quadratic and objective function is linear.
What are the possible choices to do this.
Too bad these homework assignments get trickier every time, isn't it?
I
[EMAIL PROTECTED] wrote:
Hi
Having a method:
def method(self,x,y):
is it possible to discover, from outside the method, that the methods
arguments are ['self', 'x', 'y']?
import inspect
help(inspect.getargspec)
HTH
--
bruno desthuilliers
python -c print '@'.join(['.'.join([w[::-1]
Phil Thompson wrote:
On Wednesday 22 November 2006 12:37 pm, anders wrote:
I am writing a plugin for a piece of software in python, and I want to
start up a PyQt GUI in the plugin, without stalling the main thread
while the gui is running (later i will want to pass messages between
the
I have an awk program that parses a text file which I would like to
rewrite in python. The text file has multi-line records separated by
empty lines and each single-line field has two subfields:
node 10
x -1
y 1
node 11
x -2
y 1
node 12
x -3
y 1
and this I would
Python 2.4.2 (#1, Oct 13 2006, 17:11:24)
[GCC 4.1.0 (SUSE Linux)] on linux2
Type help, copyright, credits or license for more information.
a = object()
a
object object at 0xb7bbd438
a.spam = 1
Traceback (most recent call last):
File stdin, line 1, in ?
AttributeError: 'object' object has no
On Wednesday 22 November 2006 2:06 pm, anders wrote:
Phil Thompson wrote:
On Wednesday 22 November 2006 12:37 pm, anders wrote:
I am writing a plugin for a piece of software in python, and I want to
start up a PyQt GUI in the plugin, without stalling the main thread
while the gui is
I haven't used it but Komodo (Professional version) says it has:
ActiveState GUI Builder (Komodo Professional only)
Enhance your applications with GUI dialogs: Simple, Tk-based dialog
builder with seamless round-trip integration, for Perl, Python, Ruby,
and Tcl.
--
[EMAIL PROTECTED] wrote:
Stefan Behnel wrote:
BTW: any reason you need to use XSV? There are some other libraries out there
that can validate XML based on XML Schema and RelaxNG, e.g. lxml. They are
much more powerful than XSV.
No particular reason for XSV
I just want to validate XML files
Thanks everybody. I will sort all of this out, but right now my head is
spinning.
Is there some book, or other reference, that explains of this? I was
thinking about Python for Dummies. The Think like a Computer
Scientist book, and Dive into Python book don't seem to explain
Python's object model
I have already downloaded and seen the trial of Komodo Professional.
Indeed it has a simple Gui Builder but one can only use TKinter on it.
No wxWidgets support and far from truly RAD, but it is the only
integrated
GUI builder in these IDEs...
On Nov 22, 4:31 pm, Steve [EMAIL PROTECTED] wrote:
Phil Thompson wrote:
On Wednesday 22 November 2006 2:06 pm, anders wrote:
Phil Thompson wrote:
On Wednesday 22 November 2006 12:37 pm, anders wrote:
I am writing a plugin for a piece of software in python, and I want to
start up a PyQt GUI in the plugin, without stalling the main
On 22 Nov 2006 06:43:55 -0800, anders [EMAIL PROTECTED] wrote:
Phil Thompson wrote:
On Wednesday 22 November 2006 2:06 pm, anders wrote:
Phil Thompson wrote:
On Wednesday 22 November 2006 12:37 pm, anders wrote:
I am writing a plugin for a piece of software in python, and I want to
Hallöchen!
At http://pyvisa.sourceforge.net you can find information about the
PyVISA package. It realises Python bindings for the VISA library
functions, which enables you to control GPIB, USB, and RS232-serial
measurement devices via Python.
Yesterday I released version 1.1, which works much
Dale Strickland-Clark wrote:
Python 2.4.2 (#1, Oct 13 2006, 17:11:24)
a = object()
a.spam = 1
Traceback (most recent call last):
File stdin, line 1, in ?
AttributeError: 'object' object has no attribute 'spam'
class B(object): pass
a = B()
a.spam = 1
What is subclassing adding to
What is subclassing adding to the class here?
A __dict__:
o = object()
dir(o)
['__class__', '__delattr__', '__doc__', '__getattribute__', '__hash__',
'__init__', '__new__', '__reduce__', '__reduce_ex__', '__repr__',
'__setattr__', '__str__']
class C(object): pass
...
c = C()
dir(c)
Dale Strickland-Clark wrote:
Why can't I assign to attributes of an instance of object?
it doesn't have any attribute storage.
/F
--
http://mail.python.org/mailman/listinfo/python-list
king kikapu wrote:
I have already downloaded and seen the trial of Komodo Professional.
Indeed it has a simple Gui Builder but one can only use TKinter on it.
No wxWidgets support and far from truly RAD, but it is the only
integrated
GUI builder in these IDEs...
On Nov 22, 4:31 pm, Steve
I've read a bit about lxml, didn't found anything related to validating
XML schema...
Maybe you can give more details on how to install lxml and use it in
Python to validate XML files against an XML Schema
I'm going to ask the server administrator to install lxml, so I can't
play around a lot
[EMAIL PROTECTED] wrote:
Stefan Behnel wrote:
[EMAIL PROTECTED] wrote:
Stefan Behnel wrote:
BTW: any reason you need to use XSV? There are some other libraries out
there
that can validate XML based on XML Schema and RelaxNG, e.g. lxml. They are
much more powerful than XSV.
No particular
Perhaps this piece of code might explain the behaviour:
class C( object ):
... __slots__ = ()
...
o = C()
o.a = 1
Traceback (most recent call last):
File input, line 1, in ?
AttributeError: 'C' object has no attribute 'a'
object behaves like having an implict __slots__ attribute.
Hi!
are your friend.
See, also:
filepath = '%HOMEPATH%\\LocalSettings\\Application
Data\\Microsoft\\Outlook\\*'
and %USERPROFILE% %APPDATA% etc.
--
@-salutations
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
This works for me.
You were very helpful, thank you!
Michel
Stefan Behnel wrote:
[EMAIL PROTECTED] wrote:
Stefan Behnel wrote:
[EMAIL PROTECTED] wrote:
Stefan Behnel wrote:
BTW: any reason you need to use XSV? There are some other libraries out
there
that can validate XML based on
Ant [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I have a home-grown Wiki that I created as an excercise, with it's own
wiki markup (actually just a clone of the Trac wiki markup). The wiki
text parser I wrote works nicely, but makes heavy use of regexes, tags
and stacks to parse
MC wrote:
are your friend.
to be precise, list2cmdline is your friend. see discussion and examples here:
http://effbot.org/pyfaq/why-can-t-raw-strings-r-strings-end-with-a-backslash.htm
/F
--
http://mail.python.org/mailman/listinfo/python-list
I didn't know about this product you mention (wxDesigner).
I download the trial and it seems pretty good, reminds me the wxGlade.
So you make the GUI in this, generate Python code and import the module
on your main project and reference it respectively ??
On Nov 22, 4:58 pm, hg [EMAIL
king kikapu wrote:
Hi to all,
i am not sure if this question really belongs here but anyway, here it
goes: I have seen a lot of IDEs for Python, a lot of good stuff but
actually none of them has what, for example, Visual Studio has: a
Visual Editor (with the ability to place controls on
Here it's very well explained:
http://groups.google.com/group/django-developers/browse_thread/thread/7bcb01ec38e7e6cd
syncdb() method:
http://code.djangoproject.com/browser/django/trunk/django/core/management.py#L435
But I'm not sure if is a django problem or from python.
MindClass ha escrito:
Yes,
Actually when you create the project from wxDesigner, the main will
also be generated for you ... then you include the correct files in
eclipse (note that one file never needs to be edited ... like glade).
I went for wxDesigner years ago when wxglade was fairly unstable ...
have not tested
Michael,
put this at the top of your code. After the window
closes read the testLog.out file. It may give you
a clue as to what is happening.
sys.stdout = open('testLog.out', 'w')
jim-on-linux
http://www.inqvista.com
On Tuesday 21 November 2006 22:20, mkengel wrote:
Caution: newbie
OK I see that now. Thanks for pointing that out. So basically, I can't
do what I want at all. That's a bit of a pain. Is there no way of
tricking Qt into thinking I'm running it in the main thread?
Maybe you can either invert the thread-roles - that is, run your main
application in a thread,
Diez B. Roggisch wrote:
OK I see that now. Thanks for pointing that out. So basically, I can't
do what I want at all. That's a bit of a pain. Is there no way of
tricking Qt into thinking I'm running it in the main thread?
Maybe you can either invert the thread-roles - that is, run your
anders wrote:
Diez B. Roggisch wrote:
OK I see that now. Thanks for pointing that out. So basically, I can't
do what I want at all. That's a bit of a pain. Is there no way of
tricking Qt into thinking I'm running it in the main thread?
Maybe you can either invert the thread-roles -
Steven D'Aprano wrote:
On Tue, 21 Nov 2006 22:39:09 +0100, Mathias Panzenboeck wrote:
Yes, this is known. I think IronPython uses a specialized dictionary for
members, which prohibits
malformed names. I don't know if there will be such a dictionary in any
future CPython version.
Peter Otten, your solution is very nice, it uses groupby splitting on
empty lines, so it doesn't need to read the whole files into memory.
But Daniel Nogradi says:
But the names of the fields (node, x, y) keeps changing from file to
file, even their number is not fixed, sometimes it is (node,
Hi,
I'm trying to construct a parser, but I'm stuck with some basic stuff... For
example, I want to match the following:
letter = A...Z | a...z
literal = letter+
include_bool := + | -
term = [include_bool] literal
So I defined this as:
literal = Word(alphas)
include_bool = Optional(oneOf(+
On Tue, Nov 21, 2006 at 05:00:32PM -0800, Tom Plunket wrote:
Bruno Desthuilliers wrote:
I've got a bunch of code that runs under a bunch of unit tests. It'd
be really handy if when testing I could supply replacement
functionality to verify that the right things get called without
I'm just a bit loathe to download and install more stuff when
something simpler appears to be near-at-hand. ...especially
considering the page describing this module doesn't offer any download
links! http://python-mock.sourceforge.net/
How about mini-mock:
Dear List,
I was writing a Python extension module, including a sleeping call to
poll(2), and noticed, to my great surprise (and joy), that even when
blocking there, KeyboardInterrupt still worked properly when sending
SIGINTs to the interpreter. It really got me wondering how it works,
though.
Hi,
I'm bringing over a thread that's going on on f.c.l.python.
The point was to get rid of french accents from words.
We noticed that len('à') != len('a') and I found the hack below to fix
the problem ... yet I do not understand - especially since 'à' is
included in the extended ASCII table,
Hi,
I am using Python 2.4 and cx_Oracle. I have a stored proc that takes two
arguments. First is an NUMBER, second is a BOOLEAN. How do you call that
stored procedure?
After properly extablishing a connection, I have something like this:
cursor = con.cursor()
Fredrik Tolf wrote:
So how does it work? Does my code get to return Py_FALSE, and the
interpreter ignores it, seeing that an exception is set? Is a non-local
exit performed right over my call stack (in which case my next question
would be how to clean up resources being used from my C code)?
hg wrote:
We noticed that len('à') != len('a')
sounds odd.
len('à') == len('a')
True
are you perhaps using an UTF-8 editor?
to keep your sanity, no matter what editor you're using, I recommend
adding a coding directive to the source file, and using *only* Unicode
string literals for
Fredrik Lundh wrote:
hg wrote:
We noticed that len('à') != len('a')
sounds odd.
len('à') == len('a')
True
are you perhaps using an UTF-8 editor?
to keep your sanity, no matter what editor you're using, I recommend
adding a coding directive to the source file, and using *only*
hg wrote:
Fredrik Lundh wrote:
hg wrote:
We noticed that len('à') != len('a')
sounds odd.
len('à') == len('a')
True
are you perhaps using an UTF-8 editor?
to keep your sanity, no matter what editor you're using, I recommend
adding a coding directive to the source file, and using
tool69 wrote:
Sorry, but did someone knows if Pida works under Windows ?
Thanks.
No, it doesn't really. You can start it up with a bit of hacking, and I
have seen screenshots around, but only with the scintilla-based editor.
We are waiting for SVG support in GTK on windows. Writing a
hg [EMAIL PROTECTED] wrote:
or in other words, put this at the top of your file (where utf-8 is
whatever your editor/system is using):
# -*- coding: utf-8 -*-
and use
u'text'
for all non-ASCII literals.
/F
Hi,
The problem is that:
# -*- coding: utf-8 -*-
import
Duncan Booth wrote:
hg [EMAIL PROTECTED] wrote:
or in other words, put this at the top of your file (where utf-8 is
whatever your editor/system is using):
# -*- coding: utf-8 -*-
and use
u'text'
for all non-ASCII literals.
/F
Hi,
The problem is that:
# -*- coding: utf-8
hg wrote:
How would you handle the string.maketrans then ?
maketrans works on bytes, not characters. what makes you think that you
can use maketrans if you haven't gotten the slightest idea what's in the
string?
if you want to get rid of accents in a Unicode string, you can do the
Hi,
I'm trying to construct a parser, but I'm stuck with some basic
stuff... For example, I want to match the following:
letter = A...Z | a...z
literal = letter+
include_bool := + | -
term = [include_bool] literal
So I defined this as:
literal = Word(alphas)
include_bool = Optional(oneOf(+ -))
Chris Lambacher wrote:
I'm just a bit loathe to download and install more stuff when
something simpler appears to be near-at-hand. ...especially
considering the page describing this module doesn't offer any download
links! http://python-mock.sourceforge.net/
Oh yeah, and the
Fredrik Lundh wrote:
hg wrote:
How would you handle the string.maketrans then ?
maketrans works on bytes, not characters. what makes you think that you
can use maketrans if you haven't gotten the slightest idea what's in the
string?
if you want to get rid of accents in a Unicode
Hi all,
line is am trying to match is
1959400|Q2BYK3|Q2BYK3_9GAMM Hypothetical outer membra29.90.00011 1
regex i have written is
re.compile
(r'(\d+?)\|((P|O|Q)\w{5})\|\w{3,6}\_\w{3,5}\s+?.{25}\s{3}(\d+?\.\d)\s+?(\d\.\d+?)')
I am trying to extract 0.0011 value from the above line.
why
hg wrote:
Duncan Booth wrote:
hg [EMAIL PROTECTED] wrote:
or in other words, put this at the top of your file (where utf-8 is
whatever your editor/system is using):
# -*- coding: utf-8 -*-
and use
u'text'
for all non-ASCII literals.
/F
Hi,
The problem is
On Wed, Nov 22, 2006 at 11:17:52AM -0800, Bytter wrote:
Hi,
I'm trying to construct a parser, but I'm stuck with some basic
stuff... For example, I want to match the following:
letter = A...Z | a...z
literal = letter+
include_bool := + | -
term = [include_bool] literal
So I defined
Szabolcs Nagy [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I've just seen that gopherlib is deprecated in python 2.5
http://docs.python.org/lib/module-gopherlib.html
we still use this protocol (though there are only few working gopher
servers are left on the net)
My friend
Tor Erik Soenvisen wrote:
How safe is the following code against SQL injection:
# Get user privilege
digest = sha.new(pw).hexdigest()
# Protect against SQL injection by escaping quotes
uname = uname.replace(', '')
sql = 'SELECT privilege FROM staff
line is am trying to match is
1959400|Q2BYK3|Q2BYK3_9GAMM Hypothetical outer membra29.90.00011 1
regex i have written is
re.compile
(r'(\d+?)\|((P|O|Q)\w{5})\|\w{3,6}\_\w{3,5}\s+?.{25}\s{3}(\d+?\.\d)\s+?(\d\.\d+?)')
I am trying to extract 0.0011 value from the above line.
why
1 - 100 of 162 matches
Mail list logo