dmitrey writes:
> hi all,
> suppose I have Python dict myDict and I know it's not empty.
> I have to get any (key, value) pair from the dict (no matter which
> one) and perform some operation.
> In Python 2 I used mere
> key, val = myDict.items()[0]
> but in Python 3 myDict.items() return iterato
Ian Simcock writes:
> Greetings all.
>
> I'm using Python 2.7 under Windows and am trying to run a command line
> program and process the programs output as it is running. A number of
> web searches have indicated that the following code would work.
>
> import subprocess
>
> p = subprocess.Popen(
[EMAIL PROTECTED] wrote:
> Trying to get moinmoin wiki working on Windows 2000 using IIS and
> python. I get the following error when trying to view the start page
> after insalling moinmoin and python - key error seems to be at the end
> related to socket.py (ImportError: WSAStartup failed: erro
[EMAIL PROTECTED] wrote:
> Thanks for the suggestion Rob. All I can find are 2 copies of
> winsock.dll:
> c:/WINNT/system32/winsock.dll
> c:/WINNT/system32/dllcache/winsock.dll
> They're both the same version 3.10.0.13
>
> I assume it's ok to have a copy in the dllcach directory and that's not
>
abcd wrote:
> I have a regex: '[A-Za-z]:\\([^/:\*\?"<>\|])*'
>
> when I do, re.compile('[A-Za-z]:\\([^/:\*\?"<>\|])*') ...I get
>
> sre_constants.error: unbalanced parenthesis
>
> do i need to escape something else? i see that i have matching
> parenthesis.
You should use raw string:
re.compile
abcd wrote:
> not sure why this passes:
>
>
> >>> regex = r'[A-Za-z]:\\([^/:\*\?"<>\|])*'
> >>> p = re.compile(regex)
> >>> p.match('c:\\test')
> <_sre.SRE_Match object at 0x009D77E0>
> >>> p.match('c:\\test?:/')
> <_sre.SRE_Match object at 0x009D7720>
> >>>
>
> the last example shouldnt give a ma
> How and what should I do to import file1.py into file1-dir1.py ? Please
> give me some references to the tutorial topic which I can study as
> well.
And some reference:
http://docs.python.org/tut/node8.html
Regards,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
> This is my function:
> selecteddeptcodes = context.REQUEST.DEPTCODE
> currentstatus = context.REQUEST.STATUS
>
> if currentstatus == 'pending':
> for dptcd in selecteddeptcodes:
>context.changetolive(DEPTCODE=dptcd)
> if currentstatus == 'old':
> for dptcd in selecteddeptcodes:
>contex
placid wrote:
> Hi all,
>
> How do i import a module that has an hypen/dash (-) in its name ? I get
> a SytaxError exception
You can use function __import__.
>>> print open("-test.py").read()
def fun2():
return "Hello from -test !"
>>> import -test
File "", line 1
import -test
Slawomir Nowaczyk wrote:
> Really, typing brace after function/if/etc should add newlines and
> indent code as required -- automatically. Actually, for me, it is even
> *less* typing in C and similar languages... I probably should teach my
> Emacs to automatically add newline after colon in Pytho
Robin Haswell wrote:
> Hey there
>
> Soon we will have many squid proxies on many seperate connections for use
> by our services. I want to make them available to users via a single HTTP
> proxy - however, I want fine-grained control over how the squid proxies
> are selected for each connection. T
Michiel Sikma wrote:
> So here's the question of the day: what does your sys.platform tell
> you? :-)
uname -srv
HP-UX B.11.00 D
python -c "import sys; print sys.platform"
hp-ux11
Regards,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
Slawomir Nowaczyk wrote:
> On Wed, 09 Aug 2006 07:33:41 -0700
> Rob Wolfe <[EMAIL PROTECTED]> wrote:
>
> #> Slawomir Nowaczyk wrote:
> #>
> #> > Really, typing brace after function/if/etc should add newlines and
> #> > indent code as required -
John Salerno <[EMAIL PROTECTED]> writes:
> I figured my first step is to install the win32 extension, which I
> did, but I can't seem to find any documentation for it. A couple of
> the links on Mark Hammond's site don't seem to work.
>
> Anyway, all I need to do is search in the Word document for
John Machin wrote:
> If you want to distribute obfuscated code, consider writing it in perl
> :-)
LOL
That's really strong protection. Machine code is too easy
to reverse engineer. :)
Regards,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
"Rafał Janas" <[EMAIL PROTECTED]> writes:
> Hi,
>
> How to read/write value over different classes (in different files)
> Something like global values?
You need to be more specific about what exactly you're trying
to accomplish. Some code whould be great.
Maybe import statement is what you're lo
"Perseo" <[EMAIL PROTECTED]> writes:
> Hi guys,
>
> I'm disprate with the Pdf Unicode. I try to create a class using ufpdf
> but some chars are not correct and now I would like try Python because
> a friend tolds me that it's very powerful.
> I need a simple script in Python that grab all Records
Perseo wrote:
> Hi again,
>
> WORKS!!! I download all I need as python + reportlab. Only 2 questions:
>
> 1. I need all of this package? because it is 6Mb!
I'm afraid you need all of it.
BTW My reportlab package is only 3MB... hmm strange.
> 2. How can I connect my software with MySql. In my Hos
[EMAIL PROTECTED] wrote:
> Hi, I am having some difficulty trying to create a regular expression.
>
> Consider:
>
>
>
>
>
>
> Whenever a tag1 is followed by a tag 2, I want to retrieve the values
> of the tag1:name and tag2:value attributes. So my end result here
> should be
> john, tall
>
[EMAIL PROTECTED] wrote:
> Thanks, i just tried it but I got the same result.
>
> I've been thinking about it for a few hours now and the problem with
> this approach is that the .*? before the (?=tag2) may have matched a
> tag1 and i don't know how to detect it.
Maybe like this:
'tag1.+?name="(.
[EMAIL PROTECTED] wrote:
> got zero results on this one :)
Really?
>>> s = '''
'''
>>> pat = re.compile('tag1.+?name="(.+?)".*?(?:<)(?=tag2).*?="adj__(.*?)__',
>>> re.DOTALL)
>>> m = re.findall(pat, s)
>>> m
[('john', 'tall'), ('joe', 'short')]
Regards,
Rob
--
http://mail.python.org/m
Perseo wrote:
> Nothing to do!
> I enable test2.py and the folder with 777 permission and I write at the
> top of the file the PYTHONPATH "#!/usr/bin/python" as you told me but
> it doesn't works as well.
#!/usr/bin/python is not PYTHONPATH. I think you should
read this:
http://docs.python.org/tu
"Edward K. Ream" <[EMAIL PROTECTED]> writes:
> Can anyone tell me how the content handler can determine the encoding of the
> file? Can sax provide this info?
Try this:
from xml.parsers import expat
s = """
Title
Chapter 1
"""
class MyParser(object):
def XmlDecl(self, version, encodin
"Gasten" <[EMAIL PROTECTED]> writes:
> Can you help?
I'm not a guru on curses by any means, but I've moved one line
of your code and IMHO it works fine now.
Look below for the code I've changed.
> I'll just append all my code here (for anyone to test), so you who
> doesn't want to read this humb
[EMAIL PROTECTED] wrote:
> Hi,
>
> I just want to send a very simple email from within python.
>
> I think the standard module of smtpd in python can do this, but I
> haven't found documents about how to use it after googleing. Are there
> any examples of using smtpd ? I'm not an expert,so I need
[EMAIL PROTECTED] wrote:
> Do I have to setup a smtp server on my localhost ?
If I see correctly your smtp server is gmail.com.
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
Alexander Eisenhuth wrote:
> Hello,
>
> is there a assignement operator, that i can overwrite?
You can't overwrite assignment operator, but you can
overwrite methods of numeric objects:
http://docs.python.org/ref/numeric-types.html
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-li
Fulvio wrote:
> I'm trying to get working an assertion which filter address from some domain
> but if it's prefixed by '.com'.
> Even trying to put the result in a negate test I can't get the wanted result.
[...]
> Seem that I miss some better regex implementation to avoid that both of the
> fi
Fulvio wrote:
> Great, it works perfectly. I found my errors.
> I didn't use r ahead of the patterns and i was close to the 'allow' pattern
> but didn't give positive result and KregexEditor reported wrong way. This
> specially because of '<' inside the stream. I thing that is not a normal
> reg
Skink <[EMAIL PROTECTED]> writes:
> Hi,
>
> I'm relatively new to django and maybe my question is stupid, but...
>
> Is it possible to map in urls.py some url not to function in views.py
> (which has first argument with HttpRequest) but to some class method?
> In that case each instance of such cl
[EMAIL PROTECTED] wrote:
> Below is my code, which is kind of virtual and with its help ill use it
> in my main project.
> Now what i am looking for is can anybody write all the code inside a
> class...so that I can reuse it. I am kind of novice...n kind of stuc
> with that.
>
> from Tkinter impor
mardif wrote:
> Hi !
>
> this is my problem:
>
> I've a wxNotebook object, which contains 2 Panels.
> On up, there is TAB section, I have 2 tabs.
> I want to color the TAB section with ( for example ) red color.
>
> I've tried with SetBackgroundColour() for wxNotebook object and for 2
> panel insi
mardif wrote:
> If you set:
>
> frame.SetBackgroundColour(wx.RED)
>
> On unix, you can see that label "form1" and "form2" are grey, and
> others elements are red.
> But on Windows, on the same line of "form1" and "form2", the color is
> not red, but grey as labels.
>
> I want to color this space
Bob Greschke wrote:
> I don't use classes much (mainly because I'm stupid), but I'd like to make a
> subclass of the regular Tkinter Button widget that simply adds spaces to the
> passed "text=" when the program is running on Windows (Linux, Solaris, Mac
> add a little space between the button tex
[EMAIL PROTECTED] wrote:
> Hi there,
>
> I'm new to python and I'm from the java world.
> Though I love to learn python, I'm not very comfortable with the python
> documentation.
> Because when i read jdk doc, i can see the class hierachy, class
> member, class methods etc in html docs. It's very
Hari Sekhon wrote:
> I am writing a wrapper to a binary command to run it and then do
> something with the xml output from it.
>
> What is the best way of making sure that the command is installed on the
> system before I try to execute it, like the python equivalent of the
> unix command "which"?
Steve Holden <[EMAIL PROTECTED]> writes:
> Rob Wolfe wrote:
>> Hari Sekhon wrote:
>>
>>>I am writing a wrapper to a binary command to run it and then do
>>>something with the xml output from it.
>>>
>>>What is the best way of making sure th
[EMAIL PROTECTED] wrote:
> Hi,
[...]
> Step 3: Wrote the given script of multipication in a file named as
> multiply (using vi editor)
The name of module should be multiply.py
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
John Machin wrote:
> Rob Wolfe wrote:
> > [EMAIL PROTECTED] wrote:
> > > Hi,
> > [...]
> > > Step 3: Wrote the given script of multipication in a file named as
> > > multiply (using vi editor)
> >
> > The name of module should be multiply.p
[EMAIL PROTECTED] wrote:
> I want to compare 2 directories: dir1 and dir2.
> What I want to do is to get these informations:
> 1. does they have the same number of files and sub-directories?
> 2. does each file with the same name have the same size and date
> information?
>
> So, how can I do it i
"Sandra-24" <[EMAIL PROTECTED]> writes:
> A dictionary that can be shared across processes without being
> marshaled?
>
> Is there such a thing already for python?
Check this out:
http://poshmodule.sourceforge.net/
--
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
kelemen.viktor wrote:
> everything worked correctly but when i wrote a short script:
> "
> from jpype import *
>
> jpype.startJVM('/usr/lib/jvm/java-1.5.0-sun-1.5.0.06/jre/lib/i386/client/libjvm.so','-ea')
> java.lang.System.out.println("hello world")
> shutdownJVM()
> "
> and tried to run it thi
kelemen.viktor wrote:
> Hi
>
> thanks for your suggestions
>
> ive modified the sample code
You've modified it incorrect.
> "
> import jpype
> from jpype import *
You should use "import jpype" OR "from jpype import *" (not
recommended)
but NOT BOTH.
> jpype.startJVM('/usr/lib/jvm/java-1.5.0-su
Phil Schmidt wrote:
> I am making a little Tkinter GUI app that needs to be in several
> languages (english, french, etc.), adjustable at runtime via a menu
> pick to select the language. The only way I can see to change text in
> the menus entries is to destroy them and recreate them usiing diffe
wo_shi_big_stomach wrote:
> Newbie to python writing a script to recurse a directory tree and delete
> the first line of a file if it contains a given string. I get the same
> error on a Mac running OS X 10.4.8 and FreeBSD 6.1.
>
> Here's the script:
>
> # start of program
>
> # p.pl - fix broken
Frank Millman wrote:
> Hi all
>
> I am writing a business/accounting application. Once a user has logged
> in they are presented with a menu. Each menu option has a description
> and an associated file name and program name. The file name is the name
> of a .py file (impName) and the program name
Frank Millman wrote:
> One small point. The docs have the following warning -
>
> "Important: the caller is responsible for closing the file argument, if
> it was not None, even when an exception is raised. This is best done
> using a try ... finally statement. "
>
> I have added this to my code.
robert wrote:
> My code does recursion loops through a couple of functions. Due to
> problematic I/O input this leads sometimes to "endless" recursions and after
> expensive I/O to the Python recursion exception.
> What would be a good method to detect recursion loops and stop it by
> user-Exce
hg wrote:
> Hi,
>
> must I parse argv[0] to get it, or is there an easier way (that works under
> Windows and *nix)?
>
> Ex:
>
> python /home/hg/test/test.py ==> test.py #knows it is in /home/hg/test
IMHO it is easy enough:
>>> dname, fname = os.path.split("/home/hg/test/test.py")
>>> dname
'/ho
Actually when you remember the ancient history of Windows and MS/DOS
you will see why. That filename, and a lot of others (as noted by
Fredrik) are legacies of that time. They were special filenames (think
"/dev/null") that related to specific devices.
Gives us a good example of one of the little
Thomas Dybdahl Ahle wrote:
> Problem is - I can't do that when I get killed.
> Isn't it possible to open processes in such a way like terminals? If I
> kill the terminal, everything open in it will die too.
On POSIX platform you can use signals and ``os.kill`` function.
Fo example:
import os,
Thomas Dybdahl Ahle <[EMAIL PROTECTED]> writes:
> But you can't ever catch sigkill.
There is no protection against sigkill.
> Isn't there a way to make sure the os kills the childprocess when the
> parrent dies?
If the parent dies suddenly without any notification childprocesses
become zombies
[EMAIL PROTECTED] wrote:
> Hi
>
> I have a problem with encoding non-ascii characters in a web
> application. The application uses Paste and Mako.
>
> The code is here: http://www.webudkast.dk/demo.txt
>
> The main points are:
>
> After getting some user generated input using
> paste.request.parse
Jim <[EMAIL PROTECTED]> writes:
> Hello,
>
> I need a program that will traverse a directory tree to ensure that
> there
> are unix-style line endings on every file in that tree that is a text
> file.
> To tell text files from others I want to use the unix "file" command
> (Python's "mimetypes" is
Steve Howell wrote:
> Hi, I'm offering a challenge to extend the following
> page by one good example:
>
> http://wiki.python.org/moin/SimplePrograms
What about simple HTML parsing? As a matter of fact this is not
language concept, but shows the power of Python standard library.
Besides, that's v
Steven Bethard <[EMAIL PROTECTED]> writes:
> I'd hate to steer a potential new Python developer to a clumsier
"clumsier"???
Try to parse this with your program:
page2 = '''
URLs
http://domain1/page1";>some page1
http://domain2/page2";>some page2
'''
> libra
Steve Howell wrote:
> I suggested earlier that maybe we post multiple
> solutions. That makes me a little nervous, to the
> extent that it shows that the Python community has a
> hard time coming to consensus on tools sometimes.
We agree that BeautifulSoup is the best for parsing HTML. :)
> Th
Steven Bethard <[EMAIL PROTECTED]> writes:
>> I vote for example with ElementTree (without xpath)
>> with a mention of using ElementSoup for invalid HTML.
>
> Sounds good to me. Maybe something like::
>
> import xml.etree.ElementTree as etree
> dinner_recipe = '''
>
> 24slicesbaguette
> 2+tbspol
py_genetic <[EMAIL PROTECTED]> writes:
> Hi,
>
> I'm looking to generate x alphabetic strings in a list size x. This
> is exactly the same output that the unix command "split" generates as
> default file name output when splitting large files.
>
> Example:
>
> produce x original, but not random s
[EMAIL PROTECTED] wrote:
> So, I'm writing this to have your opinion on what tools I should use
> to do this and what technique I should use.
Take a look at parsing example on this page:
http://wiki.python.org/moin/SimplePrograms
--
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-l
Sérgio Monteiro Basto wrote:
> Stefan Behnel wrote:
>
> > Sérgio Monteiro Basto wrote:
> >> but is one single error that blocks this.
> >> Finally I found it , it is :
> >> >> if I put :
> >> >>
> >> p = re.compile('"align')
> >> content = p.sub('" align', content)
> >>
> >> I can parse the html
Steven D'Aprano wrote:
> From a purely functional perspective, bools are unnecessary in Python. I
> think of True and False as syntactic sugar. But they shouldn't be
> syntactic sugar for 1 and 0 any more than they should be syntactic sugar
> for {"x": "foo"} and {}.
But `bools` are usefull in s
Marc 'BlackJack' Rintsch wrote:
> On Wed, 11 Jul 2007 00:37:38 -0700, Rob Wolfe wrote:
>
> > Steven D'Aprano wrote:
> >
> >> From a purely functional perspective, bools are unnecessary in Python. I
> >> think of True and False as syntactic suga
Chad wrote:
> Is there anyway to set the individual options in Tkinter to a
> particular variable. For example, I have a menu option(code is below)
> which has January, February, March and so on, which I would like to
> have corresponding values of 01, 02, 03 and so on. Can someone please
> tell
Stephen M. Gava wrote:
> On Thu, 19 Apr 2007 06:09:33 -0700, kyosohma wrote:
>
> > On Apr 19, 6:29 am, "Stephen M. Gava" <[EMAIL PROTECTED]>
> > wrote:
> >> Hi all,
> >>
> >> I prefer using tkinter to wxpython (so sue me :) and i need to display
> >> a lot of html in a particular app. does anyone
Antoon Pardon wrote:
> The following is part of the explanation on slices in the
> tutorial:
>
> The best way to remember how slices work is to think of the indices as
> pointing between characters, with the left edge of the first character
> numbered 0. Then the right edge of the last character o
Tobiah <[EMAIL PROTECTED]> writes:
> I wanted to do:
>
> query = "query text" % tuple(rec[1:-1].append(extra))
>
> but the append() method returns none, so I did this:
>
> fields = rec[1:-1]
> fields.append(extra)
> query = "query text" % tuple(fields)
What about this?
fscked <[EMAIL PROTECTED]> writes:
> I cannot seem to get this to work. I am hyst trying to read in a list
> of paths and see if the directory or any sub has a filename pattern.
> Here is the code:
>
> import os, sys
> from path import path
>
> myfile = open("boxids.txt", "r")
> for line in myfile
Rob Wolfe <[EMAIL PROTECTED]> writes:
> fscked <[EMAIL PROTECTED]> writes:
>
>> I cannot seem to get this to work. I am hyst trying to read in a list
>> of paths and see if the directory or any sub has a filename pattern.
>> Here is the code:
>>
[EMAIL PROTECTED] writes:
> Hi,
> I guess this is a very trivial question --
> I am using a label widget to display text (black font in a white
> background color). I am trying to use my mouse to scroll over the
> displayed text to select it, but tkinter does not allow me to do it.
> Is there a me
[EMAIL PROTECTED] writes:
> I am a true n00b... and I just using Python to complete some very
> small uneventful task, but need help with one last thing.
>
> Basically, this I what I am trying to do.
>
> make a temp directory (this part I can do)
>
> Need help with:
> ***unzip a JAR file with the
"Jesse" <[EMAIL PROTECTED]> writes:
> Hi all, I have a problem using wget and Popen. I hope someone can help.
>
>
> -- Problem --
> I want to use the command:
> wget -nv -O "dir/cpan.txt" "http://search.cpan.org";
> and capture all it's stdout+stderr.
> (Note that option -O requires 'dir' to be ex
Paul Rudin <[EMAIL PROTECTED]> writes:
> I can't get the gdb fringe interaction functionality to work with
> either pdb or pydb. Any hints as to versions or incantations I should
> try?
It works for me on Debian Etch and GNU Emacs 21.4.1.
I'm using this settings:
(setq pdb-path '/usr/lib/python2
Paul Rudin <[EMAIL PROTECTED]> writes:
> Unfortunately this doesn't make any difference for me, with either
> emacs 22 or 21. I guess I'll just have to dig deeper into the code.
So what happens after M-x pdb?
--
http://mail.python.org/mailman/listinfo/python-list
Jon Clements wrote:
> Hi All.
>
> I'm using psycopg2 to retrieve results from a rather large query (it
> returns 22m records); unsurprisingly this doesn't fit in memory all at
> once. What I'd like to achieve is something similar to a .NET data
> provider I have which allows you to set a 'FetchSiz
"Sebastian Bassi" <[EMAIL PROTECTED]> writes:
> I would like to remove the namespace information from my elements and
> have just the tag without this information. This
> "{http://uniprot.org/uniprot}"; is preapended into all my output.
> I understand that the solution is related with "_namespace_
Godzilla wrote:
> Hello,
>
> How do you create/spawn new processes in XP over telnet using python?
> I.e. I would like to create a new process and have it running in the
> background... when I terminate the telnet connection, I would what the
> spawned processes to keep running until I shut it off
"Godzilla" <[EMAIL PROTECTED]> writes:
> Rob, I would be logging into another XP machine to do some software
I was afraid of that. :)
> installation... the code you provided, correct me if I'm wrong, seems
> to work under Unix/Linux.
This part of running and killing processes, yes.
> Any idea
bytecolor wrote:
[...]
> changing = False
> root = tk.Tk()
> t = tk.Text(master=root)
> t.pack()
> t.focus_set()
> t.tk.call(t._w, 'edit', 'modified', 0)
What about instead of:
> t.bind('<>', text_changed)
this event:
t.bind('', text_changed)
> root.mainloop()
--
HTH,
Rob
--
http://ma
bytecolor wrote:
> Hey Rob,
> I actually started with that event, until I came across the modified
> event. I'm working on syntax highlighting. So I need any text change.
> Also, colorizing on a key release is annoyingly noticeable to the
> user. I tried it :)
>
> I'm sure there are going to be o
"ianaré" <[EMAIL PROTECTED]> writes:
> hey all, I'm trying to get real time updates of batch file output.
[...]
> So I tried subprocess:
> proc = subprocess.Popen('"C:/path/to/test.bat"', bufsize=0,
> stdout=subprocess.PIPE)
Instead of that:
> for line in proc.stdout:
> self.display.Writ
Mark Elston <[EMAIL PROTECTED]> writes:
> This is probably a *really* stupid question but...
> I have looked at all the documentation I have for 2.4.3
> and all the docs I can download for 2.5 and I simply cannot
> find anything, anywhere that documents what egg files are.
>
> I have read posts re
Jorgen Bodde wrote:
> All I can think of is a 'crappy' construction where I use the iterator
> to see if there was something in there, but surely, there must be a
> better way to know?
>
> >>> r = c.execute('select * from song where id = 2')
> >>> notfound = True
> >>> for s in r:
> ... notfoun
Soren wrote:
> Unable to load Boost.Build: could not find "boost-build.jam"
> ---
> Attempted search from C:\boost\boost_1_33_1\libs\python\example
> \tutorial up to t
> he root and in these directories from BOOST_BUILD_PATH and BOOST_RO
Soren wrote:
> > Try to create boost-build.jam file like this:
> >
> > # boost-build.jam
> > boost-build C:\boost\boost_1_33_1\tools\build\v1 ;
>
>
> Hi Rob, Thanks for the answer!
>
> It did solve the error.. but produced a new one:
>
> C:\boost\boost_1_33_1\libs\python\example\tutorial>bjam -sT
stef mientki <[EMAIL PROTECTED]> writes:
> hello,
>
> Why does Configparser change names to lowercase ?
>
> As Python is case sensitive (which btw I don't like at all ;-)
> but now when really need the casesensitivity,
> because it handles about names which should be recognized by human,
> it cha
Peter Bengtsson <[EMAIL PROTECTED]> writes:
> In UTF8, \u0141 is a capital L with a little dash through it as can be
> seen in this image:
> http://static.peterbe.com/lukasz.png
>
> I tried this:
import unicodedata
unicodedata.normalize('NFKD', u'\u0141').encode('ascii','ignore')
> ''
>
brad <[EMAIL PROTECTED]> writes:
> Will len(a_string) become a_string.len()? I was just reading
>
> http://docs.python.org/dev/3.0/whatsnew/3.0.html
>
> One of the criticisms of Python compared to other OO languages is that
> it isn't OO enough or as OO as others or that it is inconsistent. And
>
Gabriel Genellina <[EMAIL PROTECTED]> writes:
> At Tuesday 9/1/2007 14:56, Steven W. Orr wrote:
>
>>I *just* read the tutorial so please be gentle. I created a file called
>>fib.py which works very nicely thank you. When I run it it does what it's
>>supposed to do but I do not get a resulting .pyc
Imbaud Pierre <[EMAIL PROTECTED]> writes:
> I am willing to retrieve the file an imported module came from;
> module.__file__, or inspect.getfile(module) only gives me the
> relative file name. How do I determine the path?
>>> import os
>>> os.path.abspath(module.__file__)
--
HTH,
Rob
--
http:
"Coby" <[EMAIL PROTECTED]> writes:
> Just to give you some background about my problem:
>
> I execute os.system(command), where command is a string.
>
> On the command line in windows, I get:
>
> "Continue, and unload these objects? [no]"
>
> I need to respond 'y' to continue, but I am uncertain o
"Sergey Dorofeev" <[EMAIL PROTECTED]> writes:
> Hello.
>
> Why does not work?
[...]
> m=email.message.Message()
[...]
> p2=email.message.Message()
> p2.set_type("message/rfc822")
> p2.set_payload(m)
Payload is a _list_ of Message objects (is_multipart() == True)
or a _string_ object (is_multi
Sergey Dorofeev wrote:
> "Rob Wolfe" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
>
> >> p2=email.message.Message()
> >> p2.set_type("message/rfc822")
> >> p2.set_payload(m)
> >
> > Payload is a _lis
Stef Mientki <[EMAIL PROTECTED]> writes:
> I'm making special versions of existing functions,
> and now I want the help-text of the newly created function to exists of
> 1. an extra line from my new function
> 2. all the help text from the old function
>
> # the old function
> def triang(M,sym=1):
Jammer <[EMAIL PROTECTED]> writes:
> Does anyone that knows python want to write me a byte dump for strings? :-)
>
> I am trying to modify a plugin (that someone else wrote) that uses
> interprocess communication.
> It works on strings without special characters but it fails on other
> stings like
jvdb wrote:
> Hi there,
>
> I am quite new on python programming and need some help on solving my
> problem..
>
> I have to make a (python) program which deletes files from
> directories. I don't think deleting, etc. is the problem. The problem
> is that the directories where i have to delete them
Stef Mientki <[EMAIL PROTECTED]> writes:
> Is it possible to change the searchpath for modules on the flight,
> under winXP ?
> Most preferred is some command to extend the searchpath.
> (the environment variable PYTHONPATH needs a reboot)
Do you mean something like that?
>>> import some_module
[EMAIL PROTECTED] wrote:
> >>> from Numeric import zeros
> >>> p=zeros(3)
> >>> p
> array([0,0,0])
> >>> p[0]
> 0
> >>> x=p[0]
`x' is now a reference to immutable integer object
with value 0, not to first element of array `p'
> >>> x=10
now `x' is a reference to immutable integer object
with va
mark wrote:
> is it possible to call a php function from python and use a class from
> php in python? i want to use mmslib which creates mms messages and the
> only implementation is a php mmslib implementation.
You can consider to use some kind of RPC (remote procedure call)
for example XML-RPC.
"Andy Dingley" <[EMAIL PROTECTED]> writes:
> I'm trying to write rot13, but to do it in a better and more Pythonic
> style than I'm currrently using. What would you reckon to the
> following pretty ugly thing? How would you improve it? In
> particular, I don't like the way a three-way selectio
1 - 100 of 140 matches
Mail list logo