Re: Why are my files in in my list - os module used with sys argv

2016-04-19 Thread Sayth Renshaw
On Tuesday, 19 April 2016 23:46:01 UTC+10, Peter Otten wrote: > Sayth Renshaw wrote: > > > Thanks for the insight, after doing a little reading I found this post > > which uses both argparse and glob and attempts to cover the windows and > > bash expansion of wildcards, > > http://breathmintsforp

Re: Why are my files in in my list - os module used with sys argv

2016-04-19 Thread Peter Otten
Sayth Renshaw wrote: > Thanks for the insight, after doing a little reading I found this post > which uses both argparse and glob and attempts to cover the windows and > bash expansion of wildcards, > http://breathmintsforpenguins.blogspot.com.au/2013/09/python-crossplatform-handling-of.html I ho

Re: Why are my files in in my list - os module used with sys argv

2016-04-19 Thread Sayth Renshaw
On Tuesday, 19 April 2016 23:21:42 UTC+10, Sayth Renshaw wrote: > On Tuesday, 19 April 2016 18:17:02 UTC+10, Peter Otten wrote: > > Steven D'Aprano wrote: > > > > > On Tue, 19 Apr 2016 09:44 am, Sayth Renshaw wrote: > > > > > >> Hi > > >> > > >> Why would it be that my files are not being foun

Re: Why are my files in in my list - os module used with sys argv

2016-04-19 Thread Sayth Renshaw
On Tuesday, 19 April 2016 18:17:02 UTC+10, Peter Otten wrote: > Steven D'Aprano wrote: > > > On Tue, 19 Apr 2016 09:44 am, Sayth Renshaw wrote: > > > >> Hi > >> > >> Why would it be that my files are not being found in this script? > > > > You are calling the script with: > > > > python jqxml

Re: Why are my files in in my list - os module used with sys argv

2016-04-19 Thread Peter Otten
Steven D'Aprano wrote: > On Tue, 19 Apr 2016 09:44 am, Sayth Renshaw wrote: > >> Hi >> >> Why would it be that my files are not being found in this script? > > You are calling the script with: > > python jqxml.py samples *.xml > > This does not do what you think it does: under Linux shells, t

Re: Why are my files in in my list - os module used with sys argv

2016-04-18 Thread MRAB
On 2016-04-19 00:44, Sayth Renshaw wrote: Hi Why would it be that my files are not being found in this script? from pyquery import PyQuery as pq import pandas as pd import os import sys if len(sys.argv) == 2: print("no params") sys.exit(1) dir = sys.argv[1] mask = sys.argv[2] files

Re: Why are my files in in my list - os module used with sys argv

2016-04-18 Thread Steven D'Aprano
On Tue, 19 Apr 2016 09:44 am, Sayth Renshaw wrote: > Hi > > Why would it be that my files are not being found in this script? You are calling the script with: python jqxml.py samples *.xml This does not do what you think it does: under Linux shells, the glob *.xml will be expanded by the shell

Why are my files in in my list - os module used with sys argv

2016-04-18 Thread Sayth Renshaw
Hi Why would it be that my files are not being found in this script? from pyquery import PyQuery as pq import pandas as pd import os import sys if len(sys.argv) == 2: print("no params") sys.exit(1) dir = sys.argv[1] mask = sys.argv[2] files = os.listdir(dir) fileResult = filter(lambda

Re: os module

2009-03-02 Thread Gabriel Genellina
En Mon, 02 Mar 2009 07:12:55 -0200, M Kumar escribió: Its just http, I am using pylons. Right now I am doing tht with extra parameter. But even if I get to know about the platform of the client machine, I need to use the other properties of the corresponding machine's os module

Re: os module

2009-03-02 Thread Tim Chase
Its just http, I am using pylons. Right now I am doing tht with extra parameter. But even if I get to know about the platform of the client machine, I need to use the other properties of the corresponding machine's os module. HTTP doesn't require the client browser to send any such i

Re: os module

2009-03-02 Thread Chris Rebert
gt; >> >> wrote: >> >> >> > >> >> >> > Hi, >> >> >> > >> >> >> > I am writing a server side program, clients can be any machine but >> >> >> > the >> >> >>

Re: os module

2009-03-02 Thread M Kumar
Its just http, I am using pylons. Right now I am doing tht with extra parameter. But even if I get to know about the platform of the client machine, I need to use the other properties of the corresponding machine's os module. for example I need to use "os.path". So even if I

Re: os module

2009-03-02 Thread Chris Rebert
>> >> > I am writing a server side program, clients can be any machine but >> >> > the >> >> > server machine is Linux. In program I want to use the OS module based >> >> > on >> >> > the >> >> > client's op

Re: os module

2009-03-02 Thread M Kumar
Oh that might be the problem, I m new to this and new to this kind of conversations. What you said was correct. But what I am looking for is, if one client reqst comes I need to process the data which I got from the client, so I need to use the os module. But since my program executes on the

Re: os module

2009-03-02 Thread Chris Rebert
> On Mon, Mar 2, 2009 at 1:59 PM, Chris Rebert wrote: >> >> On Mon, Mar 2, 2009 at 12:26 AM, M Kumar wrote: >> > >> > Hi, >> > >> > I am writing a server side program, clients can be any machine but the >> > server machine is Lin

Re: os module

2009-03-02 Thread M Kumar
Hi Chris, Thanks for quick and kind reply, but the python program runs on the server, sys.platform is linux only. What I want is I need to get a module, which shud be exactly same as if I import os module on the client machine On Mon, Mar 2, 2009 at 1:59 PM, Chris Rebert wrote: > On Mon, Ma

Re: os module

2009-03-02 Thread Chris Rebert
On Mon, Mar 2, 2009 at 12:26 AM, M Kumar wrote: > > Hi, > > I am writing a server side program, clients can be any machine but the > server machine is Linux. In program I want to use the OS module based on the > client's operating system. But when I do "import os"

os module

2009-03-02 Thread M Kumar
Hi, I am writing a server side program, clients can be any machine but the server machine is Linux. In program I want to use the OS module based on the client's operating system. But when I do "import os" m only able to get the module with the property of Linux. ANy idea how to im

Re: Executing WinXP commands using os module

2009-01-23 Thread M�ta-MCI (MVP)
Hi! Try: os.system("""start "" cmd /css checkout $\projectName\file -Yusername,password -c'Test comment' """) (not tested ; it's directly from my memory) @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Executing WinXP commands using os module

2009-01-23 Thread pranav
On Jan 23, 5:05 pm, Chris Rebert wrote: > On Fri, Jan 23, 2009 at 3:50 AM, pranav wrote: > > Greetings, > > I am writing a code to perform operations like checkout, check-in and > > others for SS. (SS is the command line utility for Visual SafeSource, > > VSS). I am familiar with all the command

Re: Executing WinXP commands using os module

2009-01-23 Thread Chris Rebert
On Fri, Jan 23, 2009 at 3:50 AM, pranav wrote: > Greetings, > I am writing a code to perform operations like checkout, check-in and > others for SS. (SS is the command line utility for Visual SafeSource, > VSS). I am familiar with all the commands for this purpose. I know > li'l python also. > Wha

Executing WinXP commands using os module

2009-01-23 Thread pranav
Greetings, I am writing a code to perform operations like checkout, check-in and others for SS. (SS is the command line utility for Visual SafeSource, VSS). I am familiar with all the commands for this purpose. I know li'l python also. What i want to learn is how do i use the command line arguments

Re: recursive using the os.walk(path) from the os module

2008-09-17 Thread Fredrik Lundh
A. Joseph wrote: I want to search through a directory and re-arrange all the files into e.g All .doc files go into MS WORD folder, all .pdf files goes into PDF Folder. I`m thinking of doing something with the os.walk(path) method from os module, I need some ideal how the algorithm should

Re: recursive using the os.walk(path) from the os module

2008-09-17 Thread Simon Brunning
2008/9/17 A. Joseph <[EMAIL PROTECTED]>: > I want to search through a directory and re-arrange all the files into e.g > > All .doc files go into MS WORD folder, all .pdf files goes into PDF Folder. > > I`m thinking of doing something with the os.walk(path) method from os

recursive using the os.walk(path) from the os module

2008-09-17 Thread A. Joseph
Hi, I want to search through a directory and re-arrange all the files into e.g All .doc files go into MS WORD folder, all .pdf files goes into PDF Folder. I`m thinking of doing something with the os.walk(path) method from os module, I need some ideal how the algorithm should look like, maybe