On Tue, May 24, 2016 at 6:20 AM, Mohan L wrote:
> I wanted to send an email notification with content of logfile after 15
> mins on any change. The idea is I want to send only one mail for chunk of
> events.Say for example, I want to send only one email when some one extract
> a tar.gz file in wat
Hi All,
I am using the bellow script to watch directories. Using 20 seconds to
aggregate together a larger chunk of events and enabled coalescing of
events.
I wanted to send an email notification with content of logfile after 15
mins on any change. The idea is I want to send only one mail for ch
On 2012-12-19 14:11, Alexander Blinne wrote:
Am 19.12.2012 14:41, schrieb AT:
Thanks a million
Can you recommend a good online book/tutorial on regular expr. in python?
http://docs.python.org/3/howto/regex.html
Another good resource is:
http://www.regular-expressions.info/
--
http://mail.p
Am 19.12.2012 14:41, schrieb AT:
> Thanks a million
> Can you recommend a good online book/tutorial on regular expr. in python?
http://docs.python.org/3/howto/regex.html
--
http://mail.python.org/mailman/listinfo/python-list
On Wednesday, 19 December 2012 18:16:18 UTC+5, Peter Otten wrote:
> AT wrote:
>
>
>
> > I am new to python and web2py framework. Need urgent help to match a
>
> > pattern in an string and replace the matched text.
>
> >
>
> > I've this string (basically an sql statement):
>
> > stmnt = 'SE
AT wrote:
> I am new to python and web2py framework. Need urgent help to match a
> pattern in an string and replace the matched text.
>
> I've this string (basically an sql statement):
> stmnt = 'SELECT taxpayer.id,
> taxpayer.enc_name,
> taxpayer.age,
> taxpayer.occup
On Wednesday, 19 December 2012 16:27:19 UTC+5, Thomas Bach wrote:
> On Wed, Dec 19, 2012 at 02:42:26AM -0800, AT wrote:
>
> > Hi,
>
> >
>
> > I am new to python and web2py framework. Need urgent help to match a
>
> > pattern in an string and replace the matched text.
>
> >
>
>
>
> Well,
On Wed, Dec 19, 2012 at 02:42:26AM -0800, AT wrote:
> Hi,
>
> I am new to python and web2py framework. Need urgent help to match a
> pattern in an string and replace the matched text.
>
Well, what about str.replace then?
>>> 'egg, ham, tomato'.replace('ham', 'spam, ham, spam')
'egg, spam, ham,
On Wed, 19 Dec 2012 03:01:32 -0800, AT wrote:
> I just wanted to change taxpayer.enc_name in stmnt to
> decrypt(taxpayer.enc_name)
>
> hope it clarifies?
Maybe. Does this help?
lunch = "Bread, ham, cheese and tomato."
# replace ham with spam
offset = lunch.find('ham')
if offset != -1:
lunch
On Wednesday, 19 December 2012 15:51:22 UTC+5, Steven D'Aprano wrote:
> On Wed, 19 Dec 2012 02:42:26 -0800, AT wrote:
>
>
>
> > Hi,
>
> >
>
> > I am new to python and web2py framework. Need urgent help to match a
>
> > pattern in an string and replace the matched text.
>
> >
>
> > I've
On Wed, 19 Dec 2012 02:42:26 -0800, AT wrote:
> Hi,
>
> I am new to python and web2py framework. Need urgent help to match a
> pattern in an string and replace the matched text.
>
> I've this string (basically an sql statement):
>
> stmnt = 'SELECT taxpayer.id,
> taxpayer.enc_name,
>
Hi,
I am new to python and web2py framework. Need urgent help to match a pattern in
an string and replace the matched text.
I've this string (basically an sql statement):
stmnt = 'SELECT taxpayer.id,
taxpayer.enc_name,
taxpayer.age,
taxpayer.occupation
FROM
En Wed, 31 Aug 2011 22:46:54 -0300, escribió:
I need to access the dictionary of the script that I am running through
my vc++ application by embedding python.
I am linking to python dynamically. I want to obtain the dictionary of
the script and access the variables declared in the script.
Hi
I need to access the dictionary of the script that I am running through
my vc++ application by embedding python.
I am linking to python dynamically. I want to obtain the dictionary of
the script and access the variables declared in the script.
However, with the PyObject * that I get from the d
On 3/08/2011 6:58 PM, mrinal...@edss.co.in wrote:
Hi,
I am trying to embed python into my MFC application. I have done this
before by statically linking to the python lib. But I want to change
this now.
The idea is to take the information from the registry for the installed
version of python on
Hi,
I am trying to embed python into my MFC application. I have done this
before by statically linking to the python lib. But I want to change
this now.
The idea is to take the information from the registry for the installed
version of python on the target machine. Then load python using
load
On Nov 29, 8:33 pm, Terry Reedy wrote:
> On 11/29/2010 1:55 AM, BansalMaddy wrote:
>
>
>
> > On Nov 29, 2:03 am, Terry Reedy wrote:
> >> On 11/28/2010 6:36 PM, BansalMaddy wrote:
>
> >>> hi all!
> >>> i need a help in python! i am struggling to implement this since last
> >>> 2/3 days. suppose i
On 11/29/2010 1:55 AM, BansalMaddy wrote:
On Nov 29, 2:03 am, Terry Reedy wrote:
On 11/28/2010 6:36 PM, BansalMaddy wrote:
hi all!
i need a help in python! i am struggling to implement this since last
2/3 days. suppose i have a 2D plot (say y=x**2).
now on the same plot i want to transform my
On Nov 29, 2:03 am, Terry Reedy wrote:
> On 11/28/2010 6:36 PM, BansalMaddy wrote:
>
> > hi all!
> > i need a help in python! i am struggling to implement this since last
> > 2/3 days. suppose i have a 2D plot (say y=x**2).
> > now on the same plot i want to transform my origin of coordinate
> > s
On 11/28/2010 6:36 PM, BansalMaddy wrote:
hi all!
i need a help in python! i am struggling to implement this since last
2/3 days. suppose i have a 2D plot (say y=x**2).
now on the same plot i want to transform my origin of coordinate
system to a point (x',y' on this curve and again create a new p
hi all!
i need a help in python! i am struggling to implement this since last
2/3 days. suppose i have a 2D plot (say y=x**2).
now on the same plot i want to transform my origin of coordinate
system to a point (x',y' on this curve and again create a new plot
with origin at x',y')
can somebody help
Hi,
I dont know it is the right place to post this question. I need help to change
one search code line . can you help me please.
here is my search method code:
search=re.compile("^#acl InternationalGroup.*\n", re.M).search(pagetext)
if search:
ret=search.group()
else:
waqas ahmad wrote:
Now i want to search all those pages, where i have *NOT* written "#acl
InternationalGroup:read" *But* i have written only "CatInternational"
in the page text.
You can split the two queries into two regexes:
import re
acl = re.compile(r'#acl InternationalGroup:read')
cat =
t.
I dont know how can i find only those pages where i have written only
"CatInternational" line in the page.
I shall be veryy thankful to you really for help.
Best Regards,
Waqas
Date: Fri, 25 Sep 2009 15:39:27 -0600
Subject: Re: [Tutor] Help required
From:
On Fri, Sep 25, 2009 at 1:56 PM, waqas ahmad wrote:
>
>
> Hi,
>
> I dont know it is the right place to post this question. I need help to
> change one search code line . can you help me please.
>
> here is my search method code:
>
> search=re.compile("^#acl InternationalGroup.*\n", re.M).search(
Hi,
I am having an application server in pylons, which was giving error
sometimes and sometimes it gives the result. I will copy paste the error
below. I am new to pylons and not getting any clue of this kind of behavior.
Please help me what should I do to avoid this kind of errors.
-
abhinayaraj.r...@emulex.com a écrit :
(snip)
I need to have a look at that all those doc's you have mentioned. That should
help.
+1 QOTW !-)
--
http://mail.python.org/mailman/listinfo/python-list
-Original Message-
From: Bruno Desthuilliers [mailto:bruno.42.desthuilli...@websiteburo.invalid]
Sent: Thursday, March 05, 2009 10:45 PM
To: python-list@python.org
Subject: Re: Help required to read and print lines based on the type of first
character
abhinayaraj.r...@emulex.com a
abhinayaraj.r...@emulex.com a écrit :
Please, don't top-post, and learn to quote & snip
(if you don't know what top-posting is, google is your friend).
Thank you so much for your guidance, Bruno.
This should help me in a long way.
Here is the code I have written.
path = raw_input("\nEnter
nt data
Thanks
Abhi
-Original Message-
From: Bruno Desthuilliers [mailto:bruno.42.desthuilli...@websiteburo.invalid]
Sent: Thursday, March 05, 2009 6:50 PM
To: python-list@python.org
Subject: Re: Help required to read and print lines based on the type of first
character
(answering to the
(answering to the OP)
En Wed, 04 Mar 2009 07:36:01 -0200, escribió:
I am a beginner in Python. In fact, beginner to coding/ scripting.
Here is a scenario, I need to code. Need your help on this:
Your first task here should be to refine the specs - too much
ambiguities in it:
A script th
abhinayaraj.r...@emulex.com wrote:
> Thank you for the suggestions.
>
> Some little reading gave the idea and it works well too. :)
>
> Here is the code:
> fileIN = open("test.txt")
> count = 0
> for line in fileIN:
> data= line
>
> if '' in data:
> count = 4
>
abhinayaraj.r...@emulex.com writes:
> if '' in data:
> count = 4
> elif '###' in data:
> count = 3
> elif '##' in data:
> count = 2
> elif '#' in data:
> count = 1
> elif data.find('#') == -1:
>
sl-...@yahoo.com.ar]
Sent: Thursday, March 05, 2009 10:41 AM
To: Raju, Abhinayaraj
Cc: python-list@python.org
Subject: Re: Help required to read and print lines based on the type of first
character
De: "abhinayaraj.r...@emulex.com"
> I am sorry to that I am not able to fully grasp
De: "abhinayaraj.r...@emulex.com"
> I am sorry to that I am not able to fully grasp it. Could you help me with
> some more details?
> How can I identify each line and utilize the interactive interpreter?
You really should read the tutorial at http://docs.python.org/tut
(or any other introductor
En Wed, 04 Mar 2009 07:36:01 -0200, escribió:
I am a beginner in Python. In fact, beginner to coding/ scripting.
Here is a scenario, I need to code. Need your help on this:
A script that
1. Reads from a file (may be a local file say test.txt)
2. And, if the line begins with a "#", s
Hi,
I am a beginner in Python. In fact, beginner to coding/ scripting.
Here is a scenario, I need to code. Need your help on this:
A script that
1. Reads from a file (may be a local file say test.txt)
2. And, if the line begins with a "#", should print the line one time
3. if the
On May 21, 8:11 pm, Trevor Hennion <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I am producing a Web based database application for a customer and could
> do with some help producing pdf documents from the data.
>
> The project uses Apache. Postgresql and Python CGI scripts on a Linux
> server for a compan
On May 21, 8:11 pm, Trevor Hennion <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I am producing a Web based database application for a customer and could
> do with some help producing pdf documents from the data.
>
> The project uses Apache. Postgresql and Python CGI scripts on a Linux
> server for a compan
Hi,
I am producing a Web based database application for a customer and could
do with some help producing pdf documents from the data.
The project uses Apache. Postgresql and Python CGI scripts on a Linux
server for a company with 20-25 users.
I have been looking at the http://www.reportlab.org -
machines[machinekey] = [0,1,0,0,0,0,0,0,0,0,0,0,0]
is what I needed...thanks
On 16 Apr, 15:07, Christoph Haas <[EMAIL PROTECTED]> wrote:
> On Mon, Apr 16, 2007 at 06:43:37AM -0700, loial wrote:
> > The following code only returns the last row(22) added to the
> > machines dictionary.
> > pr
On Mon, Apr 16, 2007 at 06:43:37AM -0700, loial wrote:
> The following code only returns the last row(22) added to the
> machines dictionary.
> presumably I need some additional syntax to add rows to the dictionary
> rather than overwrite.
>
> What do I need to add?
>
> machinekey = "11"
The following code only returns the last row(22) added to the
machines dictionary.
presumably I need some additional syntax to add rows to the dictionary
rather than overwrite.
What do I need to add?
machinekey = "11"
machines = { machinekey:[1,0,0,0,0,0,0,0,0,0,0,0,0] }
machinekey = "2
On Feb 24, 7:04 pm, Thomas Bartkus <[EMAIL PROTECTED]> wrote:
> Most user apps. require 95% of coding effort to provide a usable user
> interface and 5% effort on the algorithmic meat. The "afterwards" you
> allude to. So why do we still endure so much programming effort on the
> unimportant part
On Mon, 19 Feb 2007 08:03:43 -0800, Andy Dingley wrote:
> GUI-based" is fairly unimportant as it's just how you build your
> programs, not what they do afterwards
Most user apps. require 95% of coding effort to provide a usable user
interface and 5% effort on the algorithmic meat. The "afterwar
On Feb 18, 7:35 pm, Dave Cook <[EMAIL PROTECTED]> wrote:
> On 2007-02-16, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > i have read about Python, Ruby and Visual C++. but i want to go
> > through with GUI based programming language like VB.net
>
> You might take a look athttp://dabodev.com
>
>
Mark Morss a écrit :
> On Feb 16, 4:22 pm, [EMAIL PROTECTED] wrote:
>> I am VB6 programmer and wants to start new programming language but i
>> am unable to deciced.
>>
>> i have read about Python, Ruby and Visual C++. but i want to go
>> through with GUI based programming language like VB.net
>>
>
>
> It's now the *3rd* time I mention Glade, wxGlade and QTDesigner in this
> thread. Hendrik, I know *exactly* what Stef is talking about - been
> here, done that.
Doubt, that know what I'm talking about ...
... Glade, wxGlade, QTDesigner are not my choice ;-)
... at the moment I tend towards
[EMAIL PROTECTED] a écrit :
> On Feb 16, 4:22 pm, [EMAIL PROTECTED] wrote:
>
>>I am VB6 programmer and wants to start new programming language but i
>>am unable to deciced.
>>
>>i have read about Python, Ruby and Visual C++. but i want to go
>>through with GUI based programming language like VB.ne
Hendrik van Rooyen a écrit :
> "Bruno Desthuilliers" <[EMAIL PROTECTED]> wrote:
>
>
>
>>Stef Mientki a écrit :
>>(snip)
>>
>>>I've been using Python for just 2 months, and didn't try any graphical
>>>design,
>>
>>So how can you comment on GUI programming with Python ?
>
>
> I think we have a
On 19 Feb 2007 09:56:06 -0800, Mark Morss <[EMAIL PROTECTED]> wrote:
> Good grief. I suppose it is Microsoft to whom we owe the idea that
> there could be such a thing as a "GUI based" programming language.
Who do we blame for the idea that everyone in the world should be able
to express themsel
On Feb 16, 4:22 pm, [EMAIL PROTECTED] wrote:
> I am VB6 programmer and wants to start new programming language but i
> am unable to deciced.
>
> i have read about Python, Ruby and Visual C++. but i want to go
> through with GUI based programming language like VB.net
>
> so will you please guide me
On 16 Feb, 21:22, [EMAIL PROTECTED] wrote:
> I am VB6 programmer and wants to start new programming language
Why? What is causing you to do this, and what do you need to achieve
by doing it?
> i want to go through with GUI based programming language like VB.net
"GUI-based" is fairly unimportant
Muntasir Azam Khan wrote:
> On Feb 17, 3:22 am, [EMAIL PROTECTED] wrote:
>> I am VB6 programmer and wants to start new programming language but i
>> am unable to deciced.
>>
>> i have read about Python, Ruby and Visual C++. but i want to go
>> through with GUI based programming language like VB.net
On Feb 17, 3:22 am, [EMAIL PROTECTED] wrote:
> I am VB6 programmer and wants to start new programming language but i
> am unable to deciced.
>
> i have read about Python, Ruby and Visual C++. but i want to go
> through with GUI based programming language like VB.net
>
> so will you please guide me
On Feb 16, 11:12 pm, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> "GUI based programming languages" ? What's that ?
LabView
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 17, 1:34 am, Stef Mientki <[EMAIL PROTECTED]>
wrote:
> - designing the GUI will cost me about 2 .. 3 times as much in Python
Use a design tool like GLADE for PyGTK, wxGlade for wxPython or Komodo
for tkinter. The more of the GUI code you can remove from your
functional code the better. GUI
"Bruno Desthuilliers" <[EMAIL PROTECTED]> wrote:
>Stef Mientki a écrit :
>(snip)
>> I've been using Python for just 2 months, and didn't try any graphical
>> design,
>
>So how can you comment on GUI programming with Python ?
I think we have a language problem here (no pun intended)
When Stef s
On Feb 16, 4:22 pm, [EMAIL PROTECTED] wrote:
> I am VB6 programmer and wants to start new programming language but i
> am unable to deciced.
>
> i have read about Python, Ruby and Visual C++. but i want to go
> through with GUI based programming language like VB.net
>
> so will you please guide me
On 2007-02-16, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> i have read about Python, Ruby and Visual C++. but i want to go
> through with GUI based programming language like VB.net
You might take a look at http://dabodev.com
Dave Cook
--
http://mail.python.org/mailman/listinfo/python-list
Stef Mientki schrieb:
>>> - designing the GUI will cost me about 2 .. 3 times as much in Python
>>
>> You mean delphi here I presume?
> No, but if that's your believe ..
I'm sorry, that was a misreading of mine.
> Some examples:
> - Creating a treeview (like in the M$ explorer), with full edit
>
On 2/17/07, Stef Mientki <[EMAIL PROTECTED]> wrote:
> Some examples:
> - Creating a treeview (like in the M$ explorer), with full edit capabilities
> and full drag & drop
> facilities: Delphi takes about 40 lines of code (most of them even ^C ^V).
> - Creating a graphical overview of relations be
Stef Mientki a écrit :
(snip)
> I'm not an (educated) programmer, so I don't always use the right terms :-(
> If I look at a well established program like DIA,
> and see that it still can't repaint it's screen always correctly, ...
I suppose you're talking about the Diagram drawing program Dia. If
Stef Mientki wrote:
> Some examples:
> - Creating a treeview (like in the M$ explorer), with full edit
> capabilities and full drag & drop facilities: Delphi takes about
> 40 lines of code (most of them even ^C ^V). - Creating a graphical
> overview of relations between database tables, which can
En Sat, 17 Feb 2007 21:12:07 -0300, Stef Mientki
<[EMAIL PROTECTED]> escribió:
>> I would love to see:
>> - a comparison between wx and gtk (QT doesn't have a very inviting
>> license ;-)
> I just found this:
> http://www.wxwidgets.org/wiki/index.php/WxWidgets_Compared_To_Other_Toolkits
But ke
> I would love to see:
> - a comparison between wx and gtk (QT doesn't have a very inviting
> license ;-)
I just found this:
http://www.wxwidgets.org/wiki/index.php/WxWidgets_Compared_To_Other_Toolkits
--
http://mail.python.org/mailman/listinfo/python-list
>> - designing the GUI will cost me about 2 .. 3 times as much in Python
>
> You mean delphi here I presume?
No, but if that's your believe ..
Some examples:
- Creating a treeview (like in the M$ explorer), with full edit capabilities
and full drag & drop
facilities: Delphi takes about 40 lines o
Stef Mientki a écrit :
> Bruno Desthuilliers wrote:
>
>> Stef Mientki a écrit :
>>
>>> [EMAIL PROTECTED] wrote:
>>>
I am VB6 programmer and wants to start new programming language but i
am unable to deciced.
i have read about Python, Ruby and Visual C++. but i want to go
t
On Feb 17, 1:35 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> But I've done extensive, cross-platform development with Qt. And can
> assert that it is unmatched in productivity and feature richness,
> especially when combined with python. And certainly beat VB, and most
> probably even delphi
[EMAIL PROTECTED] wrote:
> I am VB6 programmer and wants to start new programming language but i
> am unable to deciced.
>
> i have read about Python, Ruby and Visual C++. but i want to go
> through with GUI based programming language like VB.net
>
By 'GUI based programming language' I think tha
In your situation consider C# too.
If you like python then try IronPython for .NET.
I think that C++ is not ideal for you.
P.S.: VB6 is NOT a real OOP language.
--
http://mail.python.org/mailman/listinfo/python-list
> The final goal of programming language is (in most cases)
> meant to create functional things,
> that can assist people to perform their tasks.
> The UI of that resulting thing should be optimal adapted to the final
> audience (and task).
> My audience is most comfortable with a intuitive GUI.
>
Peter Decker wrote:
> On 2/16/07, Stef Mientki <[EMAIL PROTECTED]> wrote:
>
>> In one of the other threads, Dabo was meant as a GUI designer,
>> I tried it yesterday,
>> and although it looks very promising,
>> at the moment this is not a graphical design environment,
>> just a complex (compared t
On 2/16/07, Stef Mientki <[EMAIL PROTECTED]> wrote:
> In one of the other threads, Dabo was meant as a GUI designer,
> I tried it yesterday,
> and although it looks very promising,
> at the moment this is not a graphical design environment,
> just a complex (compared to Delphi) design environment
Bruno Desthuilliers wrote:
> Stef Mientki a écrit :
>> [EMAIL PROTECTED] wrote:
>>
>>> I am VB6 programmer and wants to start new programming language but i
>>> am unable to deciced.
>>>
>>> i have read about Python, Ruby and Visual C++. but i want to go
>>> through with GUI based programming langu
Bruno Desthuilliers:
> Iftikhar:
> > i have read about Python, Ruby and Visual C++. but i want to go
> > through with GUI based programming language
>
> "GUI based programming languages" ? What's that ?
Maybe a language like Gui4cli :-)
http://users.hol.gr/~dck/g4c/
Bye,
bearophile
--
http://ma
Stef Mientki a écrit :
> [EMAIL PROTECTED] wrote:
>
>> I am VB6 programmer and wants to start new programming language but i
>> am unable to deciced.
>>
>> i have read about Python, Ruby and Visual C++. but i want to go
>> through with GUI based programming language like VB.net
>>
>> so will you p
Stef Mientki wrote:
> Although the GUI of Python is not as good as VB,
What is the GUI of a language?
Regards,
Björn
--
BOFH excuse #334:
50% of the manual is in .pdf readme files
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> I am VB6 programmer and wants to start new programming language but i
> am unable to deciced.
>
> i have read about Python, Ruby and Visual C++. but i want to go
> through with GUI based programming language like VB.net
>
> so will you please guide me which GUI based la
[EMAIL PROTECTED] a écrit :
> I am VB6 programmer and wants to start new programming language but i
> am unable to deciced.
>
> i have read about Python, Ruby and Visual C++. but i want to go
> through with GUI based programming language
"GUI based programming languages" ? What's that ?
> like V
On 2007-02-16, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I am VB6 programmer and wants to start new programming language
> but i am unable to deciced.
>
> i have read about Python, Ruby and Visual C++. but i want to go
> through with GUI based programming language like VB.net
>
> so will you p
I am VB6 programmer and wants to start new programming language but i
am unable to deciced.
i have read about Python, Ruby and Visual C++. but i want to go
through with GUI based programming language like VB.net
so will you please guide me which GUI based language has worth with
complete OOPS Cha
Thank you all guys. It seems like the simpler the solution, the more I
am happy about it. Sorry, for the simple question, I am quite new to
this lang.
Cheers.
Robert Kern wrote:
> Yoav wrote:
>
>>Don't think it will do much good. I need to get them from a file and
>>extract the last folder i
In article <[EMAIL PROTECTED]>, Yoav <[EMAIL PROTECTED]> wrote:
>Fredrik Lundh wrote:
>> "Yoav" wrote:
>>>I am trying the following:
>>>
>>>re.search(r'\\[^"\\]+(?=("?$))', "c:\ret_files")
>> instead of struggling with weird REs, why not use Python's standard
>> filename manipulation library inste
Yoav wrote:
> Don't think it will do much good. I need to get them from a file and
> extract the last folder in the path. For example:
> if I get "c:\dos\util"
> I want to extract the string "\util"
You mean like this:
import os
os.path.sep + os.path.split(r"c:\dos\util")[-1]
--
Robert Kern
[
Hi,
> Don't think it will do much good. I need to get them from a file and
> extract the last folder in the path. For example:
> if I get "c:\dos\util"
> I want to extract the string "\util"
Still, os.path is your friend:
import os
filepath = r'C:\dos\util'
base, last = os.path.split(file
Yoav wrote:
> Don't think it will do much good. I need to get them from a file and
> extract the last folder in the path. For example:
> if I get "c:\dos\util"
> I want to extract the string "\util"
Then os.path.basename should be for you.
Reinhold
--
http://mail.python.org/mailman/listinfo/py
Yoav wrote:
> Don't think it will do much good. I need to get them from a file and
> extract the last folder in the path. For example:
> if I get "c:\dos\util"
> I want to extract the string "\util"
like frederik says (I use '/' as I am using Unix):
>>> import os
>>> os.path.split ('c:/foo/ba
Don't think it will do much good. I need to get them from a file and
extract the last folder in the path. For example:
if I get "c:\dos\util"
I want to extract the string "\util"
Fredrik Lundh wrote:
> "Yoav" wrote:
>
>>I am trying the following:
>>
>>re.search(r'\\[^"\\]+(?=("?$))', "c:\ret_
Thanks guys. Issue solved.
I am also going to give Microsoft a call about it. Any other issues you
want me to raise while I am talking to them?
Cheers.
Robert Kern wrote:
> Yoav wrote:
>
>>I am trying the following:
>>
>>re.search(r'\\[^"\\]+(?=("?$))', "c:\ret_files")
>>
>>and I get a return
"Yoav" wrote:
>I am trying the following:
>
> re.search(r'\\[^"\\]+(?=("?$))', "c:\ret_files")
>
> and I get a return of NoneType, and I have no idea why. I know that I
> missing something here, but I really can't figure out why
instead of struggling with weird REs, why not use Python's standard
f
Yoav enlightened us with:
> I am trying the following:
>
> re.search(r'\\[^"\\]+(?=("?$))', "c:\ret_files")
>
> and I get a return of NoneType, and I have no idea why.
Because you don't match a carriage return "\r".
> I know that I missing something here, but I really can't figure out
> why (I be
Yoav wrote:
> I am trying the following:
>
> re.search(r'\\[^"\\]+(?=("?$))', "c:\ret_files")
>
> and I get a return of NoneType, and I have no idea why. I know that I
> missing something here, but I really can't figure out why (I bet it's
> something obvious). I also tried this RE on KODOS and
I am trying the following:
re.search(r'\\[^"\\]+(?=("?$))', "c:\ret_files")
and I get a return of NoneType, and I have no idea why. I know that I
missing something here, but I really can't figure out why (I bet it's
something obvious). I also tried this RE on KODOS and it works fine
there, so
94 matches
Mail list logo